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