| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 78 | public function get(string $key) |
||
| 79 | { |
||
| 80 | $key = strtolower($key); |
||
| 81 | $value = []; |
||
|
|
|||
| 82 | |||
| 83 | if (isset($this->configuration[$key]) || $this->loadConfigFile($key)) { |
||
| 84 | $value = $this->configuration[$key]; |
||
| 85 | } else { |
||
| 86 | throw new ConfigException($key . ' configuration file is missing.'); |
||
| 87 | } |
||
| 88 | |||
| 89 | return $value; |
||
| 90 | } |
||
| 91 | |||
| 102 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.