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   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Test Coverage

Coverage 31.58%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 18
c 1
b 0
f 0
dl 0
loc 78
rs 10
ccs 6
cts 19
cp 0.3158
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 7 1
A parse() 0 6 1
A getName() 0 3 1
A getImageUrl() 0 3 1
A getId() 0 3 1
A getCode() 0 3 1
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
}