From 10bef97dea14cee40beb9864740d9c3cb4c6e1e3 Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 17 Jul 2018 17:25:17 +0100 Subject: [PATCH] Add scalar hints and return types to the ActivationStrategyInterface interface and its implementations. --- .../Handler/FingersCrossed/ActivationStrategyInterface.php | 2 +- .../Handler/FingersCrossed/ChannelLevelActivationStrategy.php | 2 +- .../Handler/FingersCrossed/ErrorLevelActivationStrategy.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php index b73854ad..3b765969 100644 --- a/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ b/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -24,5 +24,5 @@ interface ActivationStrategyInterface * @param array $record * @return bool */ - public function isHandlerActivated(array $record); + public function isHandlerActivated(array $record): bool; } diff --git a/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php index 63a14cb6..8d0e4a2e 100644 --- a/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ b/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -48,7 +48,7 @@ class ChannelLevelActivationStrategy implements ActivationStrategyInterface $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); } - public function isHandlerActivated(array $record) + public function isHandlerActivated(array $record): bool { if (isset($this->channelToActionLevel[$record['channel']])) { return $record['level'] >= $this->channelToActionLevel[$record['channel']]; diff --git a/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php index d0ebd840..5a2a7991 100644 --- a/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ b/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -27,7 +27,7 @@ class ErrorLevelActivationStrategy implements ActivationStrategyInterface $this->actionLevel = Logger::toMonologLevel($actionLevel); } - public function isHandlerActivated(array $record) + public function isHandlerActivated(array $record): bool { return $record['level'] >= $this->actionLevel; }