MCPcopy Create free account
hub / github.com/error311/FileRise / loadRaw

Method loadRaw

src/FileRise/Storage/SourcesConfig.php:475–485  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers 8

getConfigMethod · 0.95
getPublicConfigMethod · 0.95
getAdminListMethod · 0.95
getSourceMethod · 0.95
getFirstEnabledSourceMethod · 0.95
saveEnabledMethod · 0.95
upsertSourceMethod · 0.95
deleteSourceMethod · 0.95

Calls 1

filePathMethod · 0.95

Tested by

no test coverage detected