Passed
Push — main ( 5ca287...d84479 )
by Thierry
05:24
created

Logger::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Jaxon\App\Component;
4
5
use Psr\Log\LoggerInterface;
6
use Psr\Log\LoggerTrait;
7
8
class Logger
9
{
10
    use LoggerTrait;
11
12
    /**
13
     * @param LoggerInterface $logger
14
     */
15
    public function __construct(private LoggerInterface $logger)
16
    {}
17
18
    /**
19
     * Logs with an arbitrary level.
20
     *
21
     * @param mixed  $level
22
     * @param string|\Stringable $message
23
     * @param array $context
24
     *
25
     * @return void
26
     */
27
    public function log($level, string|\Stringable $message, array $context = [])
28
    {
29
        $this->logger->log($level, $message, $context);
30
    }
31
}
32