Skip to content
Snippets Groups Projects
Commit 239d5cc8 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fully typehint lib/Logger/*.php

parent 98d27a3d
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface ...@@ -58,7 +58,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface
* @param string $format The format used for logs. * @param string $format The format used for logs.
* @return void * @return void
*/ */
public function setLogFormat($format) public function setLogFormat(string $format) : void
{ {
// we don't need the format here // we don't need the format here
} }
...@@ -71,7 +71,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface ...@@ -71,7 +71,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface
* @param string $string The formatted message to log. * @param string $string The formatted message to log.
* @return void * @return void
*/ */
public function log($level, $string) public function log(int $level, string $string) : void
{ {
if (array_key_exists($level, self::$levelNames)) { if (array_key_exists($level, self::$levelNames)) {
$levelName = self::$levelNames[$level]; $levelName = self::$levelNames[$level];
......
...@@ -82,7 +82,7 @@ class FileLoggingHandler implements LoggingHandlerInterface ...@@ -82,7 +82,7 @@ class FileLoggingHandler implements LoggingHandlerInterface
* @param string $format The format used for logs. * @param string $format The format used for logs.
* @return void * @return void
*/ */
public function setLogFormat($format) public function setLogFormat(string $format) : void
{ {
$this->format = $format; $this->format = $format;
} }
...@@ -95,7 +95,7 @@ class FileLoggingHandler implements LoggingHandlerInterface ...@@ -95,7 +95,7 @@ class FileLoggingHandler implements LoggingHandlerInterface
* @param string $string The formatted message to log. * @param string $string The formatted message to log.
* @return void * @return void
*/ */
public function log($level, $string) public function log(int $level, string $string) : void
{ {
if (!is_null($this->logFile)) { if (!is_null($this->logFile)) {
// set human-readable log level. Copied from SimpleSAML\Logger\ErrorLogLoggingHandler. // set human-readable log level. Copied from SimpleSAML\Logger\ErrorLogLoggingHandler.
......
...@@ -30,7 +30,7 @@ interface LoggingHandlerInterface ...@@ -30,7 +30,7 @@ interface LoggingHandlerInterface
* @param string $string The message to log. * @param string $string The message to log.
* @return void * @return void
*/ */
public function log($level, $string); public function log(int $level, string $string) : void;
/** /**
...@@ -39,5 +39,5 @@ interface LoggingHandlerInterface ...@@ -39,5 +39,5 @@ interface LoggingHandlerInterface
* @param string $format The format used for logs. * @param string $format The format used for logs.
* @return void * @return void
*/ */
public function setLogFormat($format); public function setLogFormat(string $format) : void;
} }
...@@ -49,7 +49,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface ...@@ -49,7 +49,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface
* @param string $format The format used for logs. * @param string $format The format used for logs.
* @return void * @return void
*/ */
public function setLogFormat($format) public function setLogFormat(string $format) : void
{ {
$this->format = $format; $this->format = $format;
} }
...@@ -62,7 +62,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface ...@@ -62,7 +62,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface
* @param string $string The formatted message to log. * @param string $string The formatted message to log.
* @return void * @return void
*/ */
public function log($level, $string) public function log(int $level, string $string) : void
{ {
// changing log level to supported levels if OS is Windows // changing log level to supported levels if OS is Windows
if ($this->isWindows) { if ($this->isWindows) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment