| 1 | <?php |
||
| 10 | class YieldOp extends AbstractExpressionCompiler |
||
| 11 | { |
||
| 12 | protected $name = 'PhpParser\Node\Expr\Yield_'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * yield {value}, yield {key} => {value} |
||
| 16 | * |
||
| 17 | * @param \PhpParser\Node\Expr\Yield_ $expr |
||
| 18 | * @param Context $context |
||
| 19 | * @return CompiledExpression |
||
| 20 | */ |
||
| 21 | protected function compile($expr, Context $context) |
||
| 29 | } |
||
| 30 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: