| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 2 | public function __construct($file) |
|
| 33 | { |
||
| 34 | // Verify the configuration exists and is readable. |
||
| 35 | 2 | if (!is_readable($file)) |
|
| 36 | 2 | { |
|
| 37 | 1 | throw new \RuntimeException('Configuration file does not exist or is unreadable.'); |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | $this->config = (new Registry)->loadFile($file); |
|
| 41 | 1 | } |
|
| 42 | |||
| 71 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.