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

Method isCollection

src/FileRise/Storage/WebDavAdapter.php:508–520  ·  view source on GitHub ↗
($value)

Source from the content-addressed store, hash-verified

506 }
507
508 private function isCollection($value): bool
509 {
510 if ($value instanceof ResourceType) {
511 return $value->is('{DAV:}collection');
512 }
513 if (is_array($value)) {
514 return in_array('{DAV:}collection', $value, true);
515 }
516 if (is_string($value)) {
517 return stripos($value, 'collection') !== false;
518 }
519 return false;
520 }
521
522 private function ensureParentExists(string $path): bool
523 {

Callers 1

propsToStatMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected