Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
19 | 8 | public function load() |
|
20 | { |
||
21 | 8 | $this->ensureFileIsReadable(); |
|
22 | |||
23 | 8 | $filePath = $this->filePath; |
|
24 | 8 | $lines = $this->readLinesFromFile($filePath); |
|
25 | |||
26 | 8 | $finalLines = []; |
|
27 | 8 | foreach ($lines as $line) { |
|
28 | 8 | if (!$this->isComment($line) && $this->looksLikeSetter($line)) { |
|
29 | 8 | list($name, $value) = $this->normaliseEnvironmentVariable($line, null); |
|
30 | 8 | $finalLines[$name] = $value; |
|
31 | } |
||
32 | } |
||
33 | |||
34 | 8 | return $finalLines; |
|
35 | } |
||
36 | } |
||
37 |