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.

Binding   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 72
ccs 28
cts 28
cp 1
rs 10
c 0
b 0
f 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A queue() 0 3 1
A arguments() 0 3 1
A shouldWait() 0 3 1
A routingKey() 0 3 1
A exchange() 0 3 1
A wait() 0 6 1
A withArgument() 0 6 1
A __construct() 0 6 1
A dontWait() 0 6 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Queue;
5
6
use Innmind\Immutable\{
7
    MapInterface,
8
    Map,
9
};
10
11
final class Binding
12
{
13
    private $exchange;
14
    private $queue;
15
    private $routingKey;
16
    private $wait = true;
17
    private $arguments;
18
19 52
    public function __construct(string $exchange, string $queue, string $routingKey = '')
20
    {
21 52
        $this->exchange = $exchange;
22 52
        $this->queue = $queue;
23 52
        $this->routingKey = $routingKey;
24 52
        $this->arguments = new Map('string', 'mixed');
25 52
    }
26
27
    /**
28
     * Don't wait for the server response
29
     */
30 6
    public function dontWait(): self
31
    {
32 6
        $self = clone $this;
33 6
        $self->wait = false;
34
35 6
        return $self;
36
    }
37
38
    /**
39
     * Wait for the response server
40
     */
41 2
    public function wait(): self
42
    {
43 2
        $self = clone $this;
44 2
        $self->wait = true;
45
46 2
        return $self;
47
    }
48
49 4
    public function withArgument(string $key, $value): self
50
    {
51 4
        $self = clone $this;
52 4
        $self->arguments = $self->arguments->put($key, $value);
53
54 4
        return $self;
55
    }
56
57 40
    public function exchange(): string
58
    {
59 40
        return $this->exchange;
60
    }
61
62 40
    public function queue(): string
63
    {
64 40
        return $this->queue;
65
    }
66
67 40
    public function routingKey(): string
68
    {
69 40
        return $this->routingKey;
70
    }
71
72 44
    public function shouldWait(): bool
73
    {
74 44
        return $this->wait;
75
    }
76
77
    /**
78
     * @return MapInterface<string, mixed>
79
     */
80 42
    public function arguments(): MapInterface
81
    {
82 42
        return $this->arguments;
83
    }
84
}
85