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.

Cancel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 34
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldWait() 0 3 1
A consumerTag() 0 3 1
A __construct() 0 3 1
A wait() 0 6 1
A dontWait() 0 6 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 28
    public function __construct(string $consumerTag)
12
    {
13 28
        $this->consumerTag = $consumerTag;
14 28
    }
15
16 6
    public function dontWait(): self
17
    {
18 6
        $self = clone $this;
19 6
        $self->wait = false;
20
21 6
        return $self;
22
    }
23
24 2
    public function wait(): self
25
    {
26 2
        $self = clone $this;
27 2
        $self->wait = true;
28
29 2
        return $self;
30
    }
31
32 24
    public function consumerTag(): string
33
    {
34 24
        return $this->consumerTag;
35
    }
36
37 24
    public function shouldWait(): bool
38
    {
39 24
        return $this->wait;
40
    }
41
}
42