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

Logger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A log() 0 3 1
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