| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 46 | public function find() |
||
| 47 | { |
||
| 48 | $return = array(); |
||
| 49 | /** @var array $idsByNavigation First step - filter by navigation */ |
||
| 50 | if (sizeof($idsByNavigation = (new MaterialNavigation())->idsByRelationID(static::$navigationIDs))) { |
||
| 51 | // Second step filter by additional field value |
||
| 52 | if (sizeof($this->fieldFilter)) { |
||
| 53 | $return = (new MaterialField($idsByNavigation)) |
||
|
|
|||
| 54 | ->byRelationID($this->fieldFilter[]); |
||
| 55 | } else { // Just return entities filtered by navigation |
||
| 56 | return (new Material($idsByNavigation, static::$identifier))->byIDs($idsByNavigation, 'exec'); |
||
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 60 | return $return; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
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: