| 1 | <?php |
||
| 22 | class IndexAction extends AbstractMiddlewareAction |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Gets template map name or template file path. |
||
| 26 | * |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function getTemplateName() : string |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Gets template data. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function getTemplateData() : array |
||
| 44 | } |
||
| 45 |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return,dieorexitstatements that have been added for debug purposes.In the above example, the last
return falsewill never be executed, because a return statement has already been met in every possible execution path.