1 | <?php |
||
18 | class Result implements ExportableInterface { |
||
19 | /** |
||
20 | * Length of a program |
||
21 | * |
||
22 | * @var integer |
||
23 | */ |
||
24 | private $length; |
||
25 | |||
26 | /** |
||
27 | * Vocabulary |
||
28 | * |
||
29 | * @var integer |
||
30 | */ |
||
31 | private $vocabulary; |
||
32 | |||
33 | /** |
||
34 | * Volume |
||
35 | * |
||
36 | * @var integer |
||
37 | */ |
||
38 | private $volume; |
||
39 | |||
40 | /** |
||
41 | * Difficulty |
||
42 | * |
||
43 | * @var float |
||
44 | */ |
||
45 | private $difficulty; |
||
46 | |||
47 | /** |
||
48 | * Effort |
||
49 | * |
||
50 | * @var float |
||
51 | */ |
||
52 | private $effort; |
||
53 | |||
54 | /** |
||
55 | * Bugs expected |
||
56 | * |
||
57 | * @var float |
||
58 | */ |
||
59 | private $bugs; |
||
60 | |||
61 | /** |
||
62 | * Time |
||
63 | * |
||
64 | * @var integer |
||
65 | */ |
||
66 | private $time; |
||
67 | |||
68 | /** |
||
69 | * Intelligent content |
||
70 | * |
||
71 | * @var integer |
||
72 | */ |
||
73 | private $intelligentContent; |
||
74 | |||
75 | /** |
||
76 | * @var |
||
77 | */ |
||
78 | private $level; |
||
79 | |||
80 | /** |
||
81 | * @var |
||
82 | */ |
||
83 | private $numberOfOperators; |
||
84 | |||
85 | /** |
||
86 | * @var |
||
87 | */ |
||
88 | private $numberOfUniqueOperators; |
||
89 | |||
90 | |||
91 | /** |
||
92 | * @var |
||
93 | */ |
||
94 | private $numberOfOperands; |
||
95 | |||
96 | /** |
||
97 | * @var |
||
98 | */ |
||
99 | private $numberOfUniqueOperands; |
||
100 | /** |
||
101 | * @inheritdoc |
||
102 | */ |
||
103 | public function asArray() { |
||
115 | |||
116 | /** |
||
117 | * @param float $bugs |
||
118 | * @return $this |
||
119 | */ |
||
120 | public function setBugs($bugs) |
||
125 | |||
126 | /** |
||
127 | * @return float |
||
128 | */ |
||
129 | public function getBugs() |
||
133 | |||
134 | /** |
||
135 | * @param float $difficulty |
||
136 | * @return $this |
||
137 | */ |
||
138 | public function setDifficulty($difficulty) |
||
143 | |||
144 | /** |
||
145 | * @return float |
||
146 | */ |
||
147 | public function getDifficulty() |
||
151 | |||
152 | /** |
||
153 | * @param float $effort |
||
154 | * @return $this |
||
155 | */ |
||
156 | public function setEffort($effort) |
||
161 | |||
162 | /** |
||
163 | * @return float |
||
164 | */ |
||
165 | public function getEffort() |
||
169 | |||
170 | /** |
||
171 | * @param int $length |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function setLength($length) |
||
179 | |||
180 | /** |
||
181 | * @return int |
||
182 | */ |
||
183 | public function getLength() |
||
187 | |||
188 | /** |
||
189 | * @param int $time |
||
190 | * @return $this |
||
191 | */ |
||
192 | public function setTime($time) |
||
197 | |||
198 | /** |
||
199 | * @return int |
||
200 | */ |
||
201 | public function getTime() |
||
205 | |||
206 | /** |
||
207 | * @param int $vocabulary |
||
208 | * @return $this |
||
209 | */ |
||
210 | public function setVocabulary($vocabulary) |
||
215 | |||
216 | /** |
||
217 | * @return int |
||
218 | */ |
||
219 | public function getVocabulary() |
||
223 | |||
224 | /** |
||
225 | * @param int $volume |
||
226 | * @return $this |
||
227 | */ |
||
228 | public function setVolume($volume) |
||
233 | |||
234 | /** |
||
235 | * @return int |
||
236 | */ |
||
237 | public function getVolume() |
||
241 | |||
242 | /** |
||
243 | * @return integer |
||
244 | */ |
||
245 | public function getIntelligentContent() { |
||
248 | |||
249 | /** |
||
250 | * @param float $intelligentContent |
||
251 | * @return $this |
||
252 | */ |
||
253 | public function setIntelligentContent($intelligentContent) |
||
258 | |||
259 | /** |
||
260 | * @param int $numberOfOperands |
||
261 | * @return $this |
||
262 | */ |
||
263 | public function setNumberOfOperands($numberOfOperands) |
||
268 | |||
269 | /** |
||
270 | * @return int |
||
271 | */ |
||
272 | public function getNumberOfOperands() |
||
276 | |||
277 | /** |
||
278 | * @param int $numberOfOperators |
||
279 | * @return $this |
||
280 | */ |
||
281 | public function setNumberOfOperators($numberOfOperators) |
||
286 | |||
287 | /** |
||
288 | * @return int |
||
289 | */ |
||
290 | public function getNumberOfOperators() |
||
294 | |||
295 | /** |
||
296 | * @param int $numberOfUniqueOperands |
||
297 | * @return $this |
||
298 | */ |
||
299 | public function setNumberOfUniqueOperands($numberOfUniqueOperands) |
||
304 | |||
305 | /** |
||
306 | * @return int |
||
307 | */ |
||
308 | public function getNumberOfUniqueOperands() |
||
312 | |||
313 | /** |
||
314 | * @param int $numberOfUniqueOperators |
||
315 | * @return $this |
||
316 | */ |
||
317 | public function setNumberOfUniqueOperators($numberOfUniqueOperators) |
||
322 | |||
323 | /** |
||
324 | * @return int |
||
325 | */ |
||
326 | public function getNumberOfUniqueOperators() |
||
330 | |||
331 | /** |
||
332 | * @param double $level |
||
333 | * @return $this |
||
334 | */ |
||
335 | public function setLevel($level) |
||
340 | |||
341 | /** |
||
342 | * @return double |
||
343 | */ |
||
344 | public function getLevel() |
||
348 | |||
349 | |||
350 | |||
351 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.