1111
1212use Sabre \CardDAV \Card ;
1313use Sabre \DAV ;
14+ use Sabre \DAV \Exception \BadRequest ;
1415use Sabre \DAV \Server ;
1516use Sabre \DAV \ServerPlugin ;
1617use Sabre \HTTP \RequestInterface ;
@@ -91,7 +92,7 @@ public function httpPatch(RequestInterface $request, ResponseInterface $response
9192 // Init property name & value
9293 $ propertyName = $ request ->getHeader ('X-Property ' );
9394 if (is_null ($ propertyName )) {
94- throw new DAV \ Exception \ BadRequest ('No valid "X-Property" found in the headers ' );
95+ throw new BadRequest ('No valid "X-Property" found in the headers ' );
9596 }
9697
9798 $ propertyData = $ request ->getHeader ('X-Property-Replace ' );
@@ -100,7 +101,7 @@ public function httpPatch(RequestInterface $request, ResponseInterface $response
100101 $ propertyData = $ request ->getHeader ('X-Property-Append ' );
101102 $ method = self ::METHOD_APPEND ;
102103 if (is_null ($ propertyData )) {
103- throw new DAV \ Exception \ BadRequest ('No valid "X-Property-Append" or "X-Property-Replace" found in the headers ' );
104+ throw new BadRequest ('No valid "X-Property-Append" or "X-Property-Replace" found in the headers ' );
104105 }
105106 }
106107
@@ -112,7 +113,7 @@ public function httpPatch(RequestInterface $request, ResponseInterface $response
112113
113114 // We cannot know which one to update in that case
114115 if (count ($ properties ) > 1 ) {
115- throw new DAV \ Exception \ BadRequest ('The specified property appear more than once ' );
116+ throw new BadRequest ('The specified property appear more than once ' );
116117 }
117118
118119 // Init if not in the vcard
0 commit comments