1 | <?php declare(strict_types = 1); |
||
5 | class FacileMongoDbBundleExtension extends \Twig_Extension |
||
6 | { |
||
7 | public function getFunctions() |
||
14 | |||
15 | /** |
||
16 | * @param string $label |
||
17 | * @param string $methodName |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function queryFilterTranslate(string $label, string $methodName) |
||
28 | |||
29 | /** |
||
30 | * @param string $label |
||
31 | * @param string $methodName |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function queryDataTranslate(string $label, string $methodName) |
||
51 | |||
52 | /** |
||
53 | * Returns the name of the extension. |
||
54 | * |
||
55 | * @return string The extension name |
||
56 | */ |
||
57 | public function getName() |
||
61 | } |
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
,die
orexit
statements that have been added for debug purposes.In the above example, the last
return false
will never be executed, because a return statement has already been met in every possible execution path.