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 7

Size/Duplication

Total Lines 46
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 2
dl 46
loc 46
ccs 19
cts 19
cp 1
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 10 10 1
A exchange() 4 4 1
A queue() 4 4 1
A basic() 4 4 1
A transaction() 4 4 1
A closed() 4 4 1
A close() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Client\Channel;
5
6
use Innmind\AMQP\Client\Channel as ChannelInterface;
7
use Psr\Log\LoggerInterface;
8
9 View Code Duplication
final class Logger implements ChannelInterface
1 ignored issue
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    private $channel;
12
    private $basic;
13
14 2
    public function __construct(
15
        ChannelInterface $channel,
16
        LoggerInterface $logger
17
    ) {
18 2
        $this->channel = $channel;
19 2
        $this->basic = new Basic\Logger(
20 2
            $channel->basic(),
21 2
            $logger
22
        );
23 2
    }
24
25 1
    public function exchange(): Exchange
26
    {
27 1
        return $this->channel->exchange();
28
    }
29
30 1
    public function queue(): Queue
31
    {
32 1
        return $this->channel->queue();
33
    }
34
35 1
    public function basic(): Basic
36
    {
37 1
        return $this->basic;
38
    }
39
40 1
    public function transaction(): Transaction
41
    {
42 1
        return $this->channel->transaction();
43
    }
44
45 1
    public function closed(): bool
46
    {
47 1
        return $this->channel->closed();
48
    }
49
50 1
    public function close(): void
51
    {
52 1
        $this->channel->close();
53 1
    }
54
}
55