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

Method getSource

src/FileRise/Storage/SourcesConfig.php:332–345  ·  view source on GitHub ↗
(?string $id)

Source from the content-addressed store, hash-verified

330 }
331
332 public static function getSource(?string $id): ?array
333 {
334 if (self::proSourcesAvailable()) {
335 return ProSources::getSource($id);
336 }
337
338 $cfg = self::coreConfigFromRaw(self::loadRaw());
339 $id = trim((string)$id);
340 if ($id !== '' && isset($cfg['sources'][$id])) {
341 return self::buildSourceView($cfg['sources'][$id], true, false);
342 }
343
344 return null;
345 }
346
347 public static function getFirstEnabledSource(): ?array
348 {

Callers 6

testByIdMethod · 0.80
initMethod · 0.80
getSourceByIdMethod · 0.80

Calls 4

proSourcesAvailableMethod · 0.95
coreConfigFromRawMethod · 0.95
loadRawMethod · 0.95
buildSourceViewMethod · 0.95

Tested by

no test coverage detected