Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | final class Json extends Filesystem |
||
9 | { |
||
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 | } |
||
26 | |||
27 | public function store(string $path, array $content) |
||
32 | } |
||
33 | } |
||
34 |