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.

PluginLogger::log()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 3
crap 1
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\React\PSR3\Phergie;
4
5
use Psr\Log\AbstractLogger;
6
use function WyriHaximus\PSR3\checkCorrectLogLevel;
7
use function WyriHaximus\PSR3\processPlaceHolders;
8
9
final class PluginLogger extends AbstractLogger
10
{
11
    /**
12
     * @var LogStream
13
     */
14
    private $stream;
15
16
    /**
17
     * PluginLogger constructor.
18
     * @param LogStream $stream
19
     */
20 17
    public function __construct(LogStream $stream)
21
    {
22 17
        $this->stream = $stream;
23 17
    }
24
25 14
    public function log($level, $message, array $context = [])
26
    {
27 14
        checkCorrectLogLevel($level);
28 13
        $message = (string)$message;
29 13
        $message = processPlaceHolders($message, $context);
30 13
        $this->stream->onNext(new Entry($level, $message, $context));
31 13
    }
32
}
33