Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
57 | protected function loadConfigFile(string $key) : bool |
||
58 | { |
||
59 | $key = strtolower($key); |
||
60 | $filename = $this->path . DIRECTORY_SEPARATOR . ucfirst($key) . Config::CONFIG_FILE_EXTENSION; |
||
61 | |||
62 | if (file_exists($filename)) { |
||
63 | $this->configuration[$key] = require $filename; |
||
64 | return true; |
||
65 | } |
||
66 | |||
67 | return false; |
||
68 | } |
||
69 | |||
102 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.