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

Reject::deliveryTag()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Basic;
5
6
final class Reject
7
{
8
    private $deliveryTag;
9
    private $requeue = false;
10
11 2
    public function __construct(int $deliveryTag)
12
    {
13 2
        $this->deliveryTag = $deliveryTag;
14 2
    }
15
16
    /**
17
     * This will requeue unacknowledged messages meaning they may be delivered
18
     * to a different consumer that the original one
19
     */
20 1
    public static function requeue(int $deliveryTag): self
21
    {
22 1
        $self = new self($deliveryTag);
23 1
        $self->requeue = true;
24
25 1
        return $self;
26
    }
27
28 2
    public function deliveryTag(): int
29
    {
30 2
        return $this->deliveryTag;
31
    }
32
33 2
    public function shouldRequeue(): bool
34
    {
35 2
        return $this->requeue;
36
    }
37
}
38