Apply new CS rules on the webdav feature

This commit is contained in:
2024-01-15 20:38:03 +01:00
parent fca929f56f
commit 4cff706306
14 changed files with 104 additions and 108 deletions

View File

@@ -36,17 +36,17 @@ class PropfindRequestAnalyzer
$propfinds = $request->getElementsByTagNameNS('DAV:', 'propfind');
if (0 === $propfinds->count()) {
throw new ParseRequestException("any propfind element found");
throw new ParseRequestException('any propfind element found');
}
if (1 < $propfinds->count()) {
throw new ParseRequestException("too much propfind element found");
throw new ParseRequestException('too much propfind element found');
}
$propfind = $propfinds->item(0);
if (0 === $propfind->childNodes->count()) {
throw new ParseRequestException("no element under propfind");
throw new ParseRequestException('no element under propfind');
}
$unknows = [];
@@ -79,7 +79,6 @@ class PropfindRequestAnalyzer
default => '',
};
}
}
$props = array_filter(array_values($props), fn (string $item) => '' !== $item);
@@ -98,7 +97,7 @@ class PropfindRequestAnalyzer
self::KNOWN_PROPS,
array_fill(0, count(self::KNOWN_PROPS), $default)
),
'unknowns' => []
'unknowns' => [],
];
}
}