Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function load(string $path): array |
||
11 | { |
||
12 | if ($this->doesntExists($path)) { |
||
13 | $this->log('File not found: ' . $path); |
||
14 | |||
15 | return []; |
||
16 | } |
||
17 | |||
18 | $this->log('Loading data from a file: ' . $path); |
||
19 | |||
20 | $content = Pretty::make()->loadRaw($path); |
||
21 | |||
22 | $items = json_decode($content, true); |
||
23 | |||
24 | return $this->correctValues($items); |
||
25 | } |
||
34 |