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.
Passed
Push — master ( 556562...8743ff )
by Casper
07:04 queued 05:11
created

CollectionShow1   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 59
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 5 1
A getImage() 0 3 1
A getText() 0 3 1
A toArray() 0 6 1
A getId() 0 3 1
1
<?php
2
3
namespace NStack\Tests\objects;
4
5
use NStack\Models\Model;
6
7
/**
8
 * Class CollectionShow1
9
 *
10
 * @package NStack\Tests\objects
11
 * @author  Tiago Araujo <[email protected]>
12
 */
13
class CollectionShow1 extends Model
14
{
15
    /** @var int */
16
    protected $id;
17
18
    /** @var string */
19
    protected $text;
20
21
    /** @var string */
22
    protected $image;
23
24
    /**
25
     * parse
26
     *
27
     * @param array $data
28
     */
29
    public function parse(array $data)
30
    {
31
        $this->id       = (int)$data['id'];
32
        $this->text     = (string)$data['text'];
33
        $this->image    = (string)$data['image'];
34
    }
35
36
    /**
37
     * toArray
38
     *
39
     * @return array
40
     */
41
    public function toArray(): array
42
    {
43
        return [
44
            'id'     => $this->id,
45
            'text'   => $this->text,
46
            'image'  => $this->image,
47
        ];
48
    }
49
50
    /**
51
     * @return int
52
     */
53
    public function getId(): int
54
    {
55
        return $this->id;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getText(): string
62
    {
63
        return $this->text;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getImage(): string
70
    {
71
        return $this->image;
72
    }
73
74
}