| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function filterOutput($result, CommandData $commandData) |
||
| 18 | { |
||
| 19 | $expr = $commandData->input()->getOption('filter'); |
||
| 20 | $default_field = $commandData->annotationData()->get('filter-default-field'); |
||
| 21 | if (!empty($expr)) { |
||
| 22 | $factory = LogicalOpFactory::get(); |
||
| 23 | $op = $factory->evaluate($expr, $default_field); |
||
|
|
|||
| 24 | $filter = new FilterOutputData(); |
||
| 25 | $result = $this->wrapFilteredResult($filter->filter($result, $op), $result); |
||
| 26 | } |
||
| 27 | |||
| 28 | return $result; |
||
| 29 | } |
||
| 30 | |||
| 45 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: