1 | <?php |
||
5 | class EnvironmentFinder |
||
6 | { |
||
7 | /** |
||
8 | * Gets the environment variables defined within $file. |
||
9 | * @param string $file Path and filename. |
||
10 | * @return array |
||
11 | */ |
||
12 | public function getFromFile($file) |
||
22 | |||
23 | /** |
||
24 | * Gets the environment variables defined within the $files. |
||
25 | * @param array $files Array of paths and filenames. |
||
26 | * @return array |
||
27 | */ |
||
28 | public function getFromFiles(array $files) |
||
38 | } |
||
39 |
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.