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

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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