diff --git a/lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php b/lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php index 5d5f6cafe4c3feb4551e5d944b35c95fa934a0bc..0fdbdeddfdb8a6ccaba230f9e7a214c24b9459c9 100644 --- a/lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php +++ b/lib/SimpleSAML/Logger/ErrorLogLoggingHandler.php @@ -58,7 +58,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface * @param string $format The format used for logs. * @return void */ - public function setLogFormat($format) + public function setLogFormat(string $format) : void { // we don't need the format here } @@ -71,7 +71,7 @@ class ErrorLogLoggingHandler implements LoggingHandlerInterface * @param string $string The formatted message to log. * @return void */ - public function log($level, $string) + public function log(int $level, string $string) : void { if (array_key_exists($level, self::$levelNames)) { $levelName = self::$levelNames[$level]; diff --git a/lib/SimpleSAML/Logger/FileLoggingHandler.php b/lib/SimpleSAML/Logger/FileLoggingHandler.php index 745a1ed6a02db92cf6acf1b7ea284bd72bc3c93d..659b06b86f163b1b97c25ffcaca999f11091aa0e 100644 --- a/lib/SimpleSAML/Logger/FileLoggingHandler.php +++ b/lib/SimpleSAML/Logger/FileLoggingHandler.php @@ -82,7 +82,7 @@ class FileLoggingHandler implements LoggingHandlerInterface * @param string $format The format used for logs. * @return void */ - public function setLogFormat($format) + public function setLogFormat(string $format) : void { $this->format = $format; } @@ -95,7 +95,7 @@ class FileLoggingHandler implements LoggingHandlerInterface * @param string $string The formatted message to log. * @return void */ - public function log($level, $string) + public function log(int $level, string $string) : void { if (!is_null($this->logFile)) { // set human-readable log level. Copied from SimpleSAML\Logger\ErrorLogLoggingHandler. diff --git a/lib/SimpleSAML/Logger/LoggingHandlerInterface.php b/lib/SimpleSAML/Logger/LoggingHandlerInterface.php index 3681c26248fc3e9b07b2b36ec62da9483d1e9bf7..16585d6a699c32481d0b444f1341a08b2bfb04b9 100644 --- a/lib/SimpleSAML/Logger/LoggingHandlerInterface.php +++ b/lib/SimpleSAML/Logger/LoggingHandlerInterface.php @@ -30,7 +30,7 @@ interface LoggingHandlerInterface * @param string $string The message to log. * @return void */ - public function log($level, $string); + public function log(int $level, string $string) : void; /** @@ -39,5 +39,5 @@ interface LoggingHandlerInterface * @param string $format The format used for logs. * @return void */ - public function setLogFormat($format); + public function setLogFormat(string $format) : void; } diff --git a/lib/SimpleSAML/Logger/SyslogLoggingHandler.php b/lib/SimpleSAML/Logger/SyslogLoggingHandler.php index 49da62d8296d11a9ecbb78b8326a7587113ac20f..57ad7d3403ad566555b68fda8c65d429f23361b2 100644 --- a/lib/SimpleSAML/Logger/SyslogLoggingHandler.php +++ b/lib/SimpleSAML/Logger/SyslogLoggingHandler.php @@ -49,7 +49,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface * @param string $format The format used for logs. * @return void */ - public function setLogFormat($format) + public function setLogFormat(string $format) : void { $this->format = $format; } @@ -62,7 +62,7 @@ class SyslogLoggingHandler implements LoggingHandlerInterface * @param string $string The formatted message to log. * @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 if ($this->isWindows) {