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

Method safeId

src/FileRise/Storage/SourceContext.php:219–225  ·  view source on GitHub ↗
(string $id)

Source from the content-addressed store, hash-verified

217 }
218
219 private static function safeId(string $id): string
220 {
221 if (preg_match('/^[A-Za-z0-9_-]{1,64}$/', $id)) {
222 return $id;
223 }
224 return self::DEFAULT_ID;
225 }
226}

Callers 1

metaRootForSourceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected