Conditions | 4 |
Paths | 6 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function setValue($data) { |
||
24 | if (!is_array($data)) { |
||
25 | $data = (array) $data; |
||
26 | } |
||
27 | |||
28 | foreach ($data as $i => $value) { |
||
29 | # remove invalid values |
||
30 | if (!isset($this->options[$value])) { |
||
31 | unset($data[$i]); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | $this->value = array_values($data); |
||
|
|||
36 | return $this; |
||
37 | } |
||
38 | |||
76 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..