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::delete()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 15
Code Lines 8

Duplication

Lines 15
Ratio 100 %

Code Coverage

Tests 8
CRAP Score 2

Importance

Changes 0
Metric Value
dl 15
loc 15
c 0
b 0
f 0
ccs 8
cts 8
cp 1
rs 9.4285
cc 2
eloc 8
nc 2
nop 1
crap 2
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