GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 766e5a...64b934 )
by Cees-Jan
09:28 queued 08:12
created

ContextLogger::log()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\PSR3\ContextLogger;
4
5
use Psr\Log\AbstractLogger;
6
use Psr\Log\LoggerInterface;
7
8
final class ContextLogger extends AbstractLogger
9
{
10
    /**
11
     * @var LoggerInterface
12
     */
13
    private $logger;
14
15
    /**
16
     * @var string
17
     */
18
    private $prefix;
19
20
    /**
21
     * @var array
22
     */
23
    private $context;
24
25
    /**
26
     * @param LoggerInterface $logger
27
     * @param string          $prefix
28
     * @param array           $context
29
     */
30 15
    public function __construct(LoggerInterface $logger, string $prefix, array $context)
31
    {
32 15
        $this->logger = $logger;
33 15
        $this->prefix = $prefix;
34 15
        $this->context = $context;
35 15
    }
36
37 14
    public function log($level, $message, array $context = [])
38
    {
39 14
        $this->logger->log($level, '[' . $this->prefix . '] ' . $message, $this->context + $context);
40 13
    }
41
}
42