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