Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
43 | 25 | private function normalizeReader(string|ConfigReaderInterface|null $reader): ConfigReaderInterface |
|
44 | { |
||
45 | 25 | if ($reader instanceof ConfigReaderInterface) { |
|
46 | 1 | return $reader; |
|
47 | } |
||
48 | |||
49 | 24 | if (is_string($reader)) { |
|
50 | 2 | return new $reader(); |
|
51 | } |
||
52 | |||
53 | 23 | return new PhpConfigReader(); |
|
54 | } |
||
56 |