mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 04:37:38 +02:00
Merge pull request #1178 from katzien/master
Add scalar hints and return types to a few Handler classes
This commit is contained in:
@@ -35,14 +35,21 @@ use Monolog\Logger;
|
||||
*/
|
||||
class ChannelLevelActivationStrategy implements ActivationStrategyInterface
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $defaultActionLevel;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $channelToActionLevel;
|
||||
|
||||
/**
|
||||
* @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any
|
||||
* @param array $channelToActionLevel An array that maps channel names to action levels.
|
||||
*/
|
||||
public function __construct($defaultActionLevel, $channelToActionLevel = [])
|
||||
public function __construct($defaultActionLevel, array $channelToActionLevel = [])
|
||||
{
|
||||
$this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel);
|
||||
$this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel);
|
||||
|
@@ -20,6 +20,9 @@ use Monolog\Logger;
|
||||
*/
|
||||
class ErrorLevelActivationStrategy implements ActivationStrategyInterface
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $actionLevel;
|
||||
|
||||
/**
|
||||
|
@@ -47,7 +47,7 @@ class SlackRecord
|
||||
|
||||
/**
|
||||
* User icon e.g. 'ghost', 'http://example.com/user.png'
|
||||
* @var ?string
|
||||
* @var string|null
|
||||
*/
|
||||
private $userIcon;
|
||||
|
||||
|
Reference in New Issue
Block a user