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 ( e189ab...b5f9de )
by Baptiste
01:57
created

Publish   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 95
Duplicated Lines 0 %

Coupling/Cohesion

Components 4
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 11
lcom 4
cbo 0
dl 0
loc 95
ccs 36
cts 36
cp 1
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A to() 0 7 1
A toDefaultExchange() 0 7 1
A withRoutingKey() 0 7 1
A flagAsMandatory() 0 7 1
A flagAsNotMandatory() 0 7 1
A flagAsImmediate() 0 7 1
A flagAsNotImmediate() 0 7 1
A exchange() 0 4 1
A routingKey() 0 4 1
A mandatory() 0 4 1
A immediate() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Basic;
5
6
final class Publish
7
{
8
    private $exchange = '';
9
    private $routingKey = '';
10
    private $mandatory = false;
11
    private $immediate = false;
12
13 1
    public function to(string $exchange): self
14
    {
15 1
        $self = clone $this;
16 1
        $self->exchange = $exchange;
17
18 1
        return $self;
19
    }
20
21 1
    public function toDefaultExchange(): self
22
    {
23 1
        $self = clone $this;
24 1
        $self->exchange = '';
25
26 1
        return $self;
27
    }
28
29 1
    public function withRoutingKey(string $key): self
30
    {
31 1
        $self = clone $this;
32 1
        $self->routingKey = $key;
33
34 1
        return $self;
35
    }
36
37
    /**
38
     * This will raise an error if the message can't be routed
39
     */
40 1
    public function flagAsMandatory(): self
41
    {
42 1
        $self = clone $this;
43 1
        $self->mandatory = true;
44
45 1
        return $self;
46
    }
47
48
    /**
49
     * This will fail silently if the message can't be routed
50
     */
51 1
    public function flagAsNotMandatory(): self
52
    {
53 1
        $self = clone $this;
54 1
        $self->mandatory = false;
55
56 1
        return $self;
57
    }
58
59
    /**
60
     * This will raise an error if the message can't be delivered immediately
61
     */
62 1
    public function flagAsImmediate(): self
63
    {
64 1
        $self = clone $this;
65 1
        $self->immediate = true;
66
67 1
        return $self;
68
    }
69
70
    /**
71
     * This will fail silently if the message can't be delivered immediately
72
     */
73 1
    public function flagAsNotImmediate(): self
74
    {
75 1
        $self = clone $this;
76 1
        $self->immediate = false;
77
78 1
        return $self;
79
    }
80
81 2
    public function exchange(): string
82
    {
83 2
        return $this->exchange;
84
    }
85
86 2
    public function routingKey(): string
87
    {
88 2
        return $this->routingKey;
89
    }
90
91 2
    public function mandatory(): bool
92
    {
93 2
        return $this->mandatory;
94
    }
95
96 2
    public function immediate(): bool
97
    {
98 2
        return $this->immediate;
99
    }
100
}
101