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.

Message   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMessage() 0 4 1
A getChannel() 0 4 1
A ack() 0 4 1
A nack() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\React\ObservableBunny;
4
5
use Bunny\Channel;
6
use Bunny\Message as BunnyMessage;
7
8
final class Message
9
{
10
    /**
11
     * @var BunnyMessage
12
     */
13
    private $message;
14
15
    /**
16
     * @var Channel
17
     */
18
    private $channel;
19
20
    /**
21
     * @param BunnyMessage $message
22
     * @param Channel      $channel
23
     */
24 4
    public function __construct(BunnyMessage $message, Channel $channel)
25
    {
26 4
        $this->message = $message;
27 4
        $this->channel = $channel;
28 4
    }
29
30
    /**
31
     * @return BunnyMessage
32
     */
33 2
    public function getMessage(): BunnyMessage
34
    {
35 2
        return $this->message;
36
    }
37
38
    /**
39
     * @return Channel
40
     */
41 1
    public function getChannel(): Channel
42
    {
43 1
        return $this->channel;
44
    }
45
46
    /**
47
     * Convenience ack.
48
     *
49
     * @return bool|\React\Promise\PromiseInterface
50
     */
51 1
    public function ack()
52
    {
53 1
        return $this->channel->ack($this->message);
54
    }
55
56
    /**
57
     * Convenience nack.
58
     *
59
     * @return bool|\React\Promise\PromiseInterface
60
     */
61 1
    public function nack()
62
    {
63 1
        return $this->channel->nack($this->message);
64
    }
65
}
66