File tree Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change 1
- * ~
1
+ vendor /
2
+ composer.lock
Original file line number Diff line number Diff line change 13
13
}
14
14
],
15
15
"require" : {
16
- "php" : " >=5.3 .0" ,
17
- "psr/log" : " ~1 .0"
16
+ "php" : " ^8 .0" ,
17
+ "psr/log" : " ^2.0 || ^3 .0"
18
18
},
19
19
"autoload" : {
20
20
"psr-0" : {
Original file line number Diff line number Diff line change 16
16
*/
17
17
class MultiLogger extends AbstractLogger
18
18
{
19
- /**
20
- * @var LoggerInterface[]
21
- */
22
- private $ loggers ;
19
+ /** @var LoggerInterface[] */
20
+ private array $ loggers ;
23
21
24
22
/**
25
23
* @param LoggerInterface[] $loggers Array of loggers to be called
26
24
*/
27
- public function __construct (array $ loggers = array () )
25
+ public function __construct (array $ loggers = [] )
28
26
{
29
27
$ this ->loggers = $ loggers ;
30
28
}
31
29
32
30
/**
33
31
* Adds a logger to the list of loggers.
34
- *
35
- * @param LoggerInterface $logger
36
32
*/
37
- public function addLogger (LoggerInterface $ logger )
33
+ public function addLogger (LoggerInterface $ logger ): void
38
34
{
39
35
$ this ->loggers [] = $ logger ;
40
36
}
41
37
42
38
/**
43
- * Logs with an arbitrary level.
44
- *
45
- * @param mixed $level
46
- * @param string $message
47
- * @param array $context
39
+ * {@inheritdoc}
48
40
*/
49
- public function log ($ level , $ message , array $ context = array ())
41
+ public function log ($ level , string | \ Stringable $ message , array $ context = []): void
50
42
{
51
43
foreach ($ this ->loggers as $ logger ) {
52
- /* @var $logger LoggerInterface */
53
44
$ logger ->log ($ level , $ message , $ context );
54
45
}
55
46
}
You can’t perform that action at this time.
0 commit comments