Completed
Push — master ( c14ed6...643334 )
by Johnny
02:41
created

Game::setViewers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
namespace Redbox\Twitch;
3
4
class Game {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Redbox\Twitch\Game has been defined more than once; this definition is ignored, only the first definition in src/EmoticonImages.php (L4-6) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
5
6
    /**
7
     * @var string
8
     */
9
    protected $name;
10
11
    /**
12
     * @var string
13
     */
14
    protected $box_large;
15
16
    /**
17
     * @var string
18
     */
19
    protected $box_medium;
20
21
    /**
22
     * @var string
23
     */
24
    protected $box_small;
25
26
    /**
27
     * @var string
28
     */
29
    protected $box_template;
30
31
    /**
32
     * @var string
33
     */
34
    protected $logo_large;
35
36
    /**
37
     * @var string
38
     */
39
    protected $logo_medium;
40
41
    /**
42
     * @var string
43
     */
44
    protected $logo_small;
45
46
    /**
47
     * @var string
48
     */
49
    protected $logo_template;
50
51
    /**
52
     * @var string
53
     */
54
    protected $viewers;
55
56
    /**
57
     * @var string
58
     */
59
    protected $channels;
60
61
    /**
62
     * @return string
63
     */
64
    public function getName()
65
    {
66
        return $this->name;
0 ignored issues
show
Bug introduced by
The property name does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
67
    }
68
69
    /**
70
     * @param string $name
71
     */
72
    public function setName($name)
73
    {
74
        $this->name = $name;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getBoxLarge()
81
    {
82
        return $this->box_large;
0 ignored issues
show
Bug introduced by
The property box_large does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
83
    }
84
85
    /**
86
     * @param string $box_large
87
     */
88
    public function setBoxLarge($box_large)
89
    {
90
        $this->box_large = $box_large;
91
    }
92
93
    /**
94
     * @return string
95
     */
96
    public function getBoxMedium()
97
    {
98
        return $this->box_medium;
0 ignored issues
show
Bug introduced by
The property box_medium does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
99
    }
100
101
    /**
102
     * @param string $box_medium
103
     */
104
    public function setBoxMedium($box_medium)
105
    {
106
        $this->box_medium = $box_medium;
107
    }
108
109
    /**
110
     * @return string
111
     */
112
    public function getBoxSmall()
113
    {
114
        return $this->box_small;
0 ignored issues
show
Bug introduced by
The property box_small does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
115
    }
116
117
    /**
118
     * @param string $box_small
119
     */
120
    public function setBoxSmall($box_small)
121
    {
122
        $this->box_small = $box_small;
123
    }
124
125
    /**
126
     * @return string
127
     */
128
    public function getBoxTemplate()
129
    {
130
        return $this->box_template;
0 ignored issues
show
Bug introduced by
The property box_template does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
131
    }
132
133
    /**
134
     * @param string $box_template
135
     */
136
    public function setBoxTemplate($box_template)
137
    {
138
        $this->box_template = $box_template;
139
    }
140
141
    /**
142
     * @return string
143
     */
144
    public function getLogoLarge()
145
    {
146
        return $this->logo_large;
0 ignored issues
show
Bug introduced by
The property logo_large does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
147
    }
148
149
    /**
150
     * @param string $logo_large
151
     */
152
    public function setLogoLarge($logo_large)
153
    {
154
        $this->logo_large = $logo_large;
155
    }
156
157
    /**
158
     * @return string
159
     */
160
    public function getLogoMedium()
161
    {
162
        return $this->logo_medium;
0 ignored issues
show
Bug introduced by
The property logo_medium does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
163
    }
164
165
    /**
166
     * @param string $logo_medium
167
     */
168
    public function setLogoMedium($logo_medium)
169
    {
170
        $this->logo_medium = $logo_medium;
171
    }
172
173
    /**
174
     * @return string
175
     */
176
    public function getLogoSmall()
177
    {
178
        return $this->logo_small;
0 ignored issues
show
Bug introduced by
The property logo_small does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
179
    }
180
181
    /**
182
     * @param string $logo_small
183
     */
184
    public function setLogoSmall($logo_small)
185
    {
186
        $this->logo_small = $logo_small;
187
    }
188
189
    /**
190
     * @return string
191
     */
192
    public function getLogoTemplate()
193
    {
194
        return $this->logo_template;
0 ignored issues
show
Bug introduced by
The property logo_template does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
195
    }
196
197
    /**
198
     * @param string $logo_template
199
     */
200
    public function setLogoTemplate($logo_template)
201
    {
202
        $this->logo_template = $logo_template;
203
    }
204
205
    /**
206
     * @return string
207
     */
208
    public function getViewers()
209
    {
210
        return $this->viewers;
0 ignored issues
show
Bug introduced by
The property viewers does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
211
    }
212
213
    /**
214
     * @param string $viewers
215
     */
216
    public function setViewers($viewers)
217
    {
218
        $this->viewers = $viewers;
219
    }
220
221
    /**
222
     * @return string
223
     */
224
    public function getChannels()
225
    {
226
        return $this->channels;
0 ignored issues
show
Bug introduced by
The property channels does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
227
    }
228
229
    /**
230
     * @param string $channels
231
     */
232
    public function setChannels($channels)
233
    {
234
        $this->channels = $channels;
235
    }
236
}