()
| 473 | } |
| 474 | |
| 475 | private static function loadRaw(): array |
| 476 | { |
| 477 | $path = self::filePath(); |
| 478 | if ($path === '' || !is_file($path)) { |
| 479 | return ['enabled' => false, 'sources' => []]; |
| 480 | } |
| 481 | |
| 482 | $raw = @file_get_contents($path); |
| 483 | $data = is_string($raw) ? json_decode($raw, true) : null; |
| 484 | return is_array($data) ? $data : ['enabled' => false, 'sources' => []]; |
| 485 | } |
| 486 | |
| 487 | private static function saveRaw(array $cfg): bool |
| 488 | { |
no test coverage detected