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 ( a71c17...924269 )
by Baptiste
02:08
created

Exchange::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Client\Channel\Exchange;
5
6
use Innmind\AMQP\{
7
    Client\Channel\Exchange as ExchangeInterface,
8
    Model\Exchange\Declaration,
9
    Model\Exchange\Deletion,
10
    Transport\Connection,
11
    Transport\Frame\Channel
12
};
13
14
final class Exchange implements ExchangeInterface
15
{
16
    private $connection;
17
    private $channel;
18
19 3
    public function __construct(Connection $connection, Channel $channel)
20
    {
21 3
        $this->connection = $connection;
22 3
        $this->channel = $channel;
23 3
    }
24
25 1 View Code Duplication
    public function declare(Declaration $command): ExchangeInterface
26
    {
27 1
        $this->connection->send(
28 1
            $this->connection->protocol()->exchange()->declare(
29 1
                $this->channel,
30 1
                $command
31
            )
32
        );
33
34 1
        if ($command->shouldWait()) {
35 1
            $this->connection->wait('exchange.declare-ok');
36
        }
37
38 1
        return $this;
39
    }
40
41 1 View Code Duplication
    public function delete(Deletion $command): ExchangeInterface
42
    {
43 1
        $this->connection->send(
44 1
            $this->connection->protocol()->exchange()->delete(
45 1
                $this->channel,
46 1
                $command
47
            )
48
        );
49
50 1
        if ($command->shouldWait()) {
51 1
            $this->connection->wait('exchange.delete-ok');
52
        }
53
54 1
        return $this;
55
    }
56
}
57