| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 74 | public function get(string $key) |
||
| 75 | { |
||
| 76 | $key = strtolower($key); |
||
| 77 | $value = []; |
||
|
|
|||
| 78 | |||
| 79 | if (isset($this->configuration[$key]) || $this->loadConfigFile($key)) { |
||
| 80 | $value = $this->configuration[$key]; |
||
| 81 | } else { |
||
| 82 | throw new ConfigException($key . ' configuration file is missing.'); |
||
| 83 | } |
||
| 84 | |||
| 85 | return $value; |
||
| 86 | } |
||
| 87 | |||
| 98 |
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.