| Conditions | 4 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 41 | public function init() |
|
| 32 | { |
||
| 33 | $params = [ |
||
| 34 | 'class' |
||
| 35 | 41 | ]; |
|
| 36 | 41 | if (is_string($this->value)) |
|
| 37 | 41 | { |
|
| 38 | 35 | $this->class = $this->value; |
|
| 39 | 35 | } |
|
| 40 | else |
||
| 41 | { |
||
| 42 | 8 | foreach (array_keys($this->value) as $key) |
|
| 43 | { |
||
| 44 | 1 | if (!is_numeric($key)) |
|
| 45 | 1 | { |
|
| 46 | 1 | $params[] = $key; |
|
| 47 | 1 | } |
|
| 48 | 1 | } |
|
| 49 | } |
||
| 50 | 35 | $config = ParamsExpander::expand($this, $params); |
|
| 51 | 35 | $this->_entity->sanitizer = $config; |
|
|
|
|||
| 52 | 35 | } |
|
| 53 | |||
| 55 |
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..