Skip to content

Commit 5db120a

Browse files
committed
fix(dav): resolve psalm issues in addressbook query report
Assisted-by: ClaudeCode:claude-opus-5-5
1 parent a4fd6b4 commit 5db120a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎apps/dav/lib/CardDAV/Plugin.php‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ public function propFind(PropFind $propFind, INode $node) {
6868
*
6969
* @param \Sabre\CardDAV\Xml\Request\AddressBookQueryReport $report
7070
*/
71+
#[\Override]
7172
protected function addressbookQueryReport($report) {
7273
$depth = $this->server->getHTTPDepth(0);
7374

74-
if ($depth == 0) {
75+
if ($depth === 0) {
7576
$candidateNodes = [
7677
$this->server->tree->getNodeForPath($this->server->getRequestUri()),
7778
];
@@ -88,12 +89,7 @@ protected function addressbookQueryReport($report) {
8889
continue;
8990
}
9091

91-
$blob = $node->get();
92-
if (is_resource($blob)) {
93-
$blob = stream_get_contents($blob);
94-
}
95-
96-
if (!$this->validateFilters($blob, $report->filters, $report->test)) {
92+
if (!$this->validateFilters($node->get(), $report->filters, $report->test)) {
9793
continue;
9894
}
9995

@@ -117,7 +113,7 @@ protected function addressbookQueryReport($report) {
117113
$vcardType = $this->negotiateVCard(
118114
$contentType
119115
);
120-
if ($depth == 0) {
116+
if ($depth === 0) {
121117
$href = $this->server->getRequestUri();
122118
} else {
123119
$href = $this->server->getRequestUri() . '/' . $validNode->getName();

0 commit comments

Comments
 (0)