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 — develop ( dc3756...ffde21 )
by Baptiste
06:26
created

Logger   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 31
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A channel() 0 7 1
A closed() 0 4 1
A close() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Client;
5
6
use Innmind\AMQP\Client as ClientInterface;
7
use Psr\Log\LoggerInterface;
8
9
final class Logger implements ClientInterface
10
{
11
    private $client;
12
    private $logger;
13
14 1
    public function __construct(
15
        ClientInterface $client,
16
        LoggerInterface $logger
17
    ) {
18 1
        $this->client = $client;
19 1
        $this->logger = $logger;
20 1
    }
21
22 1
    public function channel(): Channel
23
    {
24 1
        return new Channel\Logger(
25 1
            $this->client->channel(),
26 1
            $this->logger
27
        );
28
    }
29
30 1
    public function closed(): bool
31
    {
32 1
        return $this->client->closed();
33
    }
34
35 1
    public function close(): void
36
    {
37 1
        $this->client->close();
38 1
    }
39
}
40