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 — master ( 912221...961991 )
by Gallice
05:44 queued 02:40
created

Delivery::create()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
crap 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