From c99f00a8ba1abf56e01f8850154db1f012d420e8 Mon Sep 17 00:00:00 2001 From: Franck Cassedanne Date: Tue, 30 Sep 2014 00:07:40 +0100 Subject: [PATCH] scrutinizer fixes --- src/Logger.php | 4 ++-- src/Logger/AbstractLogger.php | 8 ++++---- src/Logger/ErrorLog.php | 2 +- src/Logger/Mail.php | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Logger.php b/src/Logger.php index ca34e00..2c9bf85 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -92,9 +92,9 @@ public function getFirstLoggerIndex($code) } /** - * Gets the name of the logging level (obsolete). + * Gets the name of the PSR-3 logging level. * - * @param integer $level + * @param string $level * @return string * @throws InvalidArgumentException */ diff --git a/src/Logger/AbstractLogger.php b/src/Logger/AbstractLogger.php index 45ad685..5fecda8 100644 --- a/src/Logger/AbstractLogger.php +++ b/src/Logger/AbstractLogger.php @@ -52,7 +52,7 @@ abstract class AbstractLogger extends AbsPsrLogger /** * Gets the named level code. * - * @return string $name + * @return string $name * @throws InvalidArgumentException */ public static function getLevelCode($name) @@ -104,9 +104,9 @@ public function process(array $log) } /** - * Checks whether the given level code will be handled by this handler. + * Checks whether the given level code is handled by this handler. * - * @param integer $record + * @param integer $level_code * @return boolean */ public function isHandling($level_code) @@ -123,7 +123,7 @@ public function isHandling($level_code) */ public function setMinLevel($name) { - $this->min_level = static::getLevelCode($name); + $this->min_level = (int) static::getLevelCode($name); return $this; } diff --git a/src/Logger/ErrorLog.php b/src/Logger/ErrorLog.php index ab34487..8590f38 100644 --- a/src/Logger/ErrorLog.php +++ b/src/Logger/ErrorLog.php @@ -50,7 +50,7 @@ class ErrorLog extends AbstractLogger implements LoggerInterface /** * Constructor. * @param string|null $file The filename to log messages to. - * @param string $type The messag/delivery type. + * @param integer $type The messag/delivery type. */ public function __construct($file = null, $type = self::PHP) { diff --git a/src/Logger/Mail.php b/src/Logger/Mail.php index b06f990..575536e 100644 --- a/src/Logger/Mail.php +++ b/src/Logger/Mail.php @@ -25,9 +25,8 @@ class Mail extends ErrorLog implements LoggerInterface /** * Constructor. * - * @param string $Email Email addr to append to. + * @param string $email The email to append to. * @param string|null $headers A string of additional (mail) headers. - * @see http://php.net/manual/en/function.mail.php * @throws Psr\Log\InvalidArgumentException If the email does not validate. */ public function __construct($email, $headers = null)