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.

Continent::getId()   A
last analyzed

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
rs 10
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace NStack\Models;
4
5
/**
6
 * Class Continent
7
 *
8
 * @package NStack\Models
9
 * @author  Casper Rasmussen <[email protected]>
10
 */
11
class Continent extends Model
12
{
13
    /** @var int */
14
    protected $id;
15
16
    /** @var string */
17
    protected $name;
18
19
    /** @var string */
20
    protected $code;
21
22
    /** @var string */
23
    protected $imageUrl;
24
25
    /**
26
     * parse
27
     *
28
     * @param array $data
29
     * @author Casper Rasmussen <[email protected]>
30
     */
31 2
    public function parse(array $data)
32
    {
33 2
        $this->id = (int)$data['id'];
34 2
        $this->name = (string)$data['name'];
35 2
        $this->code = (string)$data['code'];
36 2
        $this->imageUrl = (string)$data['image_url'];
37 2
    }
38
39
    /**
40
     * toArray
41
     *
42
     * @return array
43
     * @author Casper Rasmussen <[email protected]>
44
     */
45
    public function toArray(): array
46
    {
47
        return [
48
            'id'        => $this->id,
49
            'name'      => $this->name,
50
            'code'      => $this->code,
51
            'image_url' => $this->imageUrl,
52
        ];
53
    }
54
55
    /**
56
     * @return int
57
     * @author Casper Rasmussen <[email protected]>
58
     */
59
    public function getId(): int
60
    {
61
        return $this->id;
62
    }
63
64
    /**
65
     * @return string
66
     * @author Casper Rasmussen <[email protected]>
67
     */
68
    public function getName(): string
69
    {
70
        return $this->name;
71
    }
72
73
    /**
74
     * @return string
75
     * @author Casper Rasmussen <[email protected]>
76
     */
77
    public function getCode(): string
78
    {
79
        return $this->code;
80
    }
81
82
    /**
83
     * @return string
84
     * @author Casper Rasmussen <[email protected]>
85
     */
86
    public function getImageUrl(): string
87
    {
88
        return $this->imageUrl;
89
    }
90
}