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.

Instrument::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: wechsler
5
 * Date: 25/02/2017
6
 * Time: 17:48
7
 */
8
9
namespace Phase\TakeATicket\Model;
10
11
use JsonSerializable;
12
13
class Instrument implements JsonSerializable
14
{
15
    /**
16
     * DB ID
17
     *
18
     * @var int
19
     */
20
    protected $id;
21
22
    /**
23
     * Full name
24
     *
25
     * @var string
26
     */
27
    protected $name;
28
29
    /**
30
     * Short (single-letter?) name
31
     *
32
     * @var string
33
     */
34
    protected $abbreviation;
35
36
    /**
37
     * HTML fragment for display icons
38
     *
39
     * @var string
40
     */
41
    protected $iconHtml;
42
43
    /**
44
     * @return int
45
     */
46
    public function getId()
47
    {
48
        return $this->id;
49
    }
50
51
    /**
52
     * @param int $id
53
     * @return Instrument
54
     */
55
    public function setId($id)
56
    {
57
        $this->id = $id;
58
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getName()
65
    {
66
        return $this->name;
67
    }
68
69
    /**
70
     * @param string $name
71
     * @return Instrument
72
     */
73
    public function setName($name)
74
    {
75
        $this->name = $name;
76
        return $this;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getAbbreviation()
83
    {
84
        return $this->abbreviation;
85
    }
86
87
    /**
88
     * @param string $abbreviation
89
     * @return Instrument
90
     */
91
    public function setAbbreviation($abbreviation)
92
    {
93
        $this->abbreviation = $abbreviation;
94
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100
    public function getIconHtml()
101
    {
102
        return $this->iconHtml;
103
    }
104
105
    /**
106
     * @param string $iconHtml
107
     * @return Instrument
108
     */
109
    public function setIconHtml($iconHtml)
110
    {
111
        $this->iconHtml = $iconHtml;
112
        return $this;
113
    }
114
115
    /**
116
     * Specify data which should be serialized to JSON
117
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
118
     * @return array
119
     */
120
    public function jsonSerialize()
121
    {
122
        return [
123
            'id' => $this->getId(),
124
            'name' => $this->getName(),
125
            'abbreviation' => $this->getAbbreviation(),
126
            'iconHtml' => $this->getIconHtml(),
127
        ];
128
    }
129
130
    /**
131
     * @return string
132
     */
133
    public function __toString()
134
    {
135
        return $this->getName();
136
    }
137
}
138