1 | <?php |
||
12 | class TryCatchSt extends AbstractCompiler |
||
13 | { |
||
14 | protected $name = '\PhpParser\Node\Stmt\TryCatch'; |
||
15 | |||
16 | /** |
||
17 | * @param \PhpParser\Node\Stmt\TryCatch $statement |
||
18 | * @param Context $context |
||
19 | * @return CompiledExpression |
||
20 | */ |
||
21 | public function compile($statement, Context $context) |
||
43 | } |
||
44 |
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.