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.

Delivery   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 64
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSequence() 0 4 1
A getWatermark() 0 4 1
A getMessageIds() 0 4 1
A create() 0 5 2
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Callback;
4
5
class Delivery
6
{
7
    /**
8
     * @var int
9
     */
10
    private $sequence;
11
12
    /**
13
     * @var array
14
     */
15
    private $messageIds;
16
17
    /**
18
     * @var int
19
     */
20
    private $watermark;
21
22
    /**
23
     * @param int $watermark
24
     * @param int $sequence
25
     * @param array $messageIds
26
     */
27 5
    public function __construct($watermark, $sequence, array $messageIds = [])
28
    {
29 5
        $this->watermark = $watermark;
30 5
        $this->sequence = $sequence;
31 5
        $this->messageIds = $messageIds;
32 5
    }
33
34
    /**
35
     * @return int
36
     */
37 1
    public function getSequence()
38
    {
39 1
        return $this->sequence;
40
    }
41
42
    /**
43
     * @return int
44
     */
45 1
    public function getWatermark()
46
    {
47 1
        return $this->watermark;
48
    }
49
50
    /**
51
     * @return array
52
     */
53 1
    public function getMessageIds()
54
    {
55 1
        return $this->messageIds;
56
    }
57
58
    /**
59
     * @param array $payload
60
     *
61
     * @return static
62
     */
63 1
    public static function create(array $payload)
64
    {
65 1
        $mids = isset($payload['mids']) ? $payload['mids'] : [];
66 1
        return new static($payload['watermark'], $payload['seq'], $mids);
67
    }
68
}
69