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.
Failed Conditions
Push — master ( 550dab...bc8237 )
by Casper
03:45 queued 02:01
created

SeenUpdate::getCreated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace NStack\Models;
4
5
use DateTime;
6
use Exception;
7
8
/**
9
 * Class SeenUpdate
10
 *
11
 * @package NStack\Models
12
 * @author  Tiago Araujo <[email protected]>
13
 */
14
class SeenUpdate extends Model
15
{
16
    /** @var int */
17
    protected $id;
18
19
    /** @var String */
20
    protected $guid;
21
22
    /** @var string */
23
    protected $answer;
24
25
    /** @var string */
26
    protected $type;
27
28
    /** @var DateTime */
29
    protected $created;
30
31
    /**
32
     * parse
33
     *
34
     * @param array $data
35
     * @throws Exception
36
     */
37 1
    public function parse(array $data)
38
    {
39 1
        $this->id       = (int)$data['id'];
40 1
        $this->guid     = (int)$data['guid'];
41 1
        $this->answer   = (string)$data['answer'];
42 1
        $this->type     = (string)$data['type'];
43 1
        $this->created  = new DateTime($data['created']);
44 1
    }
45
46
    /**
47
     * toArray
48
     *
49
     * @return array
50
     */
51
    public function toArray(): array
52
    {
53
        return [
54
            'id'      => $this->id,
55
            'guid'    => $this->guid,
56
            'answer'  => $this->answer,
57
            'type'    => $this->type,
58
            'created' => $this->created,
59
        ];
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getId(): int
66
    {
67
        return $this->id;
68
    }
69
70
    /**
71
     * @return String
72
     */
73
    public function getGuid(): String
74
    {
75
        return $this->guid;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getAnswer(): string
82
    {
83
        return $this->answer;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function getType(): string
90
    {
91
        return $this->type;
92
    }
93
94
    /**
95
     * @return DateTime
96
     */
97
    public function getCreated(): DateTime
98
    {
99
        return $this->created;
100
    }
101
102
}