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

Cancel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 36
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A dontWait() 0 7 1
A wait() 0 7 1
A consumerTag() 0 4 1
A shouldWait() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Basic;
5
6
final class Cancel
7
{
8
    private $consumerTag;
9
    private $wait = true;
10
11 2
    public function __construct(string $consumerTag)
12
    {
13 2
        $this->consumerTag = $consumerTag;
14 2
    }
15
16 1
    public function dontWait(): self
17
    {
18 1
        $self = clone $this;
19 1
        $self->wait = false;
20
21 1
        return $self;
22
    }
23
24 1
    public function wait(): self
25
    {
26 1
        $self = clone $this;
27 1
        $self->wait = true;
28
29 1
        return $self;
30
    }
31
32 2
    public function consumerTag(): string
33
    {
34 2
        return $this->consumerTag;
35
    }
36
37 2
    public function shouldWait(): bool
38
    {
39 2
        return $this->wait;
40
    }
41
}
42