| 1 | <?php |
||
| 15 | class Specification |
||
| 16 | { |
||
| 17 | use QueryTrait; |
||
| 18 | |||
| 19 | public $requestedRelations = []; |
||
| 20 | |||
| 21 | public function requestRelation($name) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param Query $query |
||
| 28 | * @return Query |
||
| 29 | */ |
||
| 30 | public function applyTo($query) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param Query $query |
||
| 45 | */ |
||
| 46 | public function applyWhereTo($query) |
||
| 56 | } |
||
| 57 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.