Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function renderWith() |
||
31 | 3 | { |
|
32 | 3 | $properties = [ |
|
33 | 3 | 'value' => $this->value, |
|
34 | 'options' => [], |
||
35 | 3 | ]; |
|
36 | |||
37 | foreach ($this->options as $value => $label) { |
||
38 | 7 | $properties['options'][] = [ |
|
39 | 'value' => $value, |
||
40 | 7 | 'label' => $label, |
|
41 | 7 | 'selected' => $this->value == $value |
|
42 | ]; |
||
43 | 1 | } |
|
44 | |||
45 | 1 | return $properties; |
|
46 | 1 | } |
|
47 | |||
74 |
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..