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 1313 }
1414 ],
1515 "require" : {
16- "php" : " >=5.3 .0" ,
17- "psr/log" : " ~1 .0"
16+ "php" : " ^8 .0" ,
17+ "psr/log" : " ^2.0 || ^3 .0"
1818 },
1919 "autoload" : {
2020 "psr-0" : {
Original file line number Diff line number Diff line change 1616 */
1717class MultiLogger extends AbstractLogger
1818{
19- /**
20- * @var LoggerInterface[]
21- */
22- private $ loggers ;
19+ /** @var LoggerInterface[] */
20+ private array $ loggers ;
2321
2422 /**
2523 * @param LoggerInterface[] $loggers Array of loggers to be called
2624 */
27- public function __construct (array $ loggers = array () )
25+ public function __construct (array $ loggers = [] )
2826 {
2927 $ this ->loggers = $ loggers ;
3028 }
3129
3230 /**
3331 * Adds a logger to the list of loggers.
34- *
35- * @param LoggerInterface $logger
3632 */
37- public function addLogger (LoggerInterface $ logger )
33+ public function addLogger (LoggerInterface $ logger ): void
3834 {
3935 $ this ->loggers [] = $ logger ;
4036 }
4137
4238 /**
43- * Logs with an arbitrary level.
44- *
45- * @param mixed $level
46- * @param string $message
47- * @param array $context
39+ * {@inheritdoc}
4840 */
49- public function log ($ level , $ message , array $ context = array ())
41+ public function log ($ level , string | \ Stringable $ message , array $ context = []): void
5042 {
5143 foreach ($ this ->loggers as $ logger ) {
52- /* @var $logger LoggerInterface */
5344 $ logger ->log ($ level , $ message , $ context );
5445 }
5546 }
You can’t perform that action at this time.
0 commit comments