diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-26 22:34:13 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 10:41:46 +0100 |
commit | 4077f16aecafbc5d07a43f458aeb67d3edf1213d (patch) | |
tree | 2dfb5c937cb32fbee3eb785d792d876e6d52c761 /lib/public/ILogger.php | |
parent | cd3eb80ef4e9613e16430cb4c53332ac3cdae97a (diff) | |
download | nextcloud-server-4077f16aecafbc5d07a43f458aeb67d3edf1213d.tar.gz nextcloud-server-4077f16aecafbc5d07a43f458aeb67d3edf1213d.zip |
Make ILogger strict
* Make implementations strict
* Add scalar typehints
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/ILogger.php')
-rw-r--r-- | lib/public/ILogger.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php index 6ee850ee8ae..2d44244075b 100644 --- a/lib/public/ILogger.php +++ b/lib/public/ILogger.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -43,7 +44,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function emergency($message, array $context = array()); + public function emergency(string $message, array $context = []); /** * Action must be taken immediately. @@ -53,7 +54,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function alert($message, array $context = array()); + public function alert(string $message, array $context = []); /** * Critical conditions. @@ -63,7 +64,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function critical($message, array $context = array()); + public function critical(string $message, array $context = []); /** * Runtime errors that do not require immediate action but should typically @@ -74,7 +75,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function error($message, array $context = array()); + public function error(string $message, array $context = []); /** * Exceptional occurrences that are not errors. @@ -84,7 +85,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function warning($message, array $context = array()); + public function warning(string $message, array $context = []); /** * Normal but significant events. @@ -94,7 +95,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function notice($message, array $context = array()); + public function notice(string $message, array $context = []); /** * Interesting events. @@ -104,7 +105,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function info($message, array $context = array()); + public function info(string $message, array $context = []); /** * Detailed debug information. @@ -114,7 +115,7 @@ interface ILogger { * @return null * @since 7.0.0 */ - public function debug($message, array $context = array()); + public function debug(string $message, array $context = []); /** * Logs with an arbitrary level. @@ -125,7 +126,7 @@ interface ILogger { * @return mixed * @since 7.0.0 */ - public function log($level, $message, array $context = array()); + public function log($level, string $message, array $context = []); /** * Logs an exception very detailed @@ -143,5 +144,5 @@ interface ILogger { * @return void * @since 8.2.0 */ - public function logException($exception, array $context = array()); + public function logException($exception, array $context = []); } |