aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/DAV/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/DAV/Exception')
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/BadRequest.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/Conflict.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php19
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/Forbidden.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php19
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php19
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php28
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/Locked.php37
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php22
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/NotFound.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php33
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php19
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php16
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php19
-rw-r--r--vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php16
21 files changed, 198 insertions, 209 deletions
diff --git a/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php b/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php
index c21f493da..569c63ba0 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/BadRequest.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * BadRequest
+ * BadRequest.
*
* The BadRequest is thrown when the user submitted an invalid HTTP request
* BadRequest
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class BadRequest extends DAV\Exception {
-
+class BadRequest extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 400;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/Conflict.php b/vendor/sabre/dav/lib/DAV/Exception/Conflict.php
index 4190e6082..2ec227feb 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/Conflict.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/Conflict.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * Conflict
+ * Conflict.
*
* A 409 Conflict is thrown when a user tried to make a directory over an existing
* file or in a parent directory that doesn't exist.
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Conflict extends DAV\Exception {
-
+class Conflict extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 409;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php b/vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php
index b2d2746c5..c1a4914ed 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/ConflictingLock.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * ConflictingLock
+ * ConflictingLock.
*
* Similar to the Locked exception, this exception thrown when a LOCK request
* was made, on a resource which was already locked
@@ -14,23 +16,20 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ConflictingLock extends Locked {
-
+class ConflictingLock extends Locked
+{
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
if ($this->lock) {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:no-conflicting-lock');
$errorNode->appendChild($error);
$error->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:href', $this->lock->uri));
}
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php b/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php
index 77df7ca9e..2f882c396 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/Forbidden.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * Forbidden
+ * Forbidden.
*
* This exception is thrown whenever a user tries to do an operation he's not allowed to
*
@@ -13,17 +15,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Forbidden extends DAV\Exception {
-
+class Forbidden extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 403;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php b/vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php
index 96e1acc50..fe6e1268c 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/InsufficientStorage.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * InsufficientStorage
+ * InsufficientStorage.
*
* This Exception can be thrown, when for example a harddisk is full or a quota is exceeded
*
@@ -13,17 +15,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class InsufficientStorage extends DAV\Exception {
-
+class InsufficientStorage extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 507;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php b/vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php
index 6324d9f3a..99baeb8bc 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/InvalidResourceType.php
@@ -1,9 +1,11 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
/**
- * InvalidResourceType
+ * InvalidResourceType.
*
* This exception is thrown when the user tried to create a new collection, with
* a special resourcetype value that was not recognized by the server.
@@ -14,20 +16,17 @@ namespace Sabre\DAV\Exception;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class InvalidResourceType extends Forbidden {
-
+class InvalidResourceType extends Forbidden
+{
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
* @param \Sabre\DAV\Server $server
- * @param \DOMElement $errorNode
- * @return void
+ * @param \DOMElement $errorNode
*/
- function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode)
+ {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:valid-resourcetype');
$errorNode->appendChild($error);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php
index 51a253b29..6c5f1c435 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/InvalidSyncToken.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * InvalidSyncToken
+ * InvalidSyncToken.
*
* This exception is emited for the {DAV:}valid-sync-token pre-condition, as
* defined in rfc6578, section 3.2.
@@ -19,20 +21,17 @@ use Sabre\DAV;
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class InvalidSyncToken extends Forbidden {
-
+class InvalidSyncToken extends Forbidden
+{
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:valid-sync-token');
$errorNode->appendChild($error);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php b/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php
index 989718558..9d26fcb10 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/LengthRequired.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * LengthRequired
+ * LengthRequired.
*
* This exception is thrown when a request was made that required a
* Content-Length header, but did not contain one.
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class LengthRequired extends DAV\Exception {
-
+class LengthRequired extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 411;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php b/vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php
index 5f8c31868..1c7402384 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/LockTokenMatchesRequestUri.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * LockTokenMatchesRequestUri
+ * LockTokenMatchesRequestUri.
*
* This exception is thrown by UNLOCK if a supplied lock-token is invalid
*
@@ -13,29 +15,25 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class LockTokenMatchesRequestUri extends Conflict {
-
+class LockTokenMatchesRequestUri extends Conflict
+{
/**
- * Creates the exception
+ * Creates the exception.
*/
- function __construct() {
-
- $this->message = 'The locktoken supplied does not match any locks on this entity';
-
+ public function __construct()
+ {
+ parent::__construct('The locktoken supplied does not match any locks on this entity');
}
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-matches-request-uri');
$errorNode->appendChild($error);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/Locked.php b/vendor/sabre/dav/lib/DAV/Exception/Locked.php
index 8176db46e..632bafc60 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/Locked.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/Locked.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * Locked
+ * Locked.
*
* The 423 is thrown when a client tried to access a resource that was locked, without supplying a valid lock token
*
@@ -13,49 +15,48 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class Locked extends DAV\Exception {
-
+class Locked extends DAV\Exception
+{
/**
- * Lock information
+ * Lock information.
*
- * @var Sabre\DAV\Locks\LockInfo
+ * @var \Sabre\DAV\Locks\LockInfo
*/
protected $lock;
/**
- * Creates the exception
+ * Creates the exception.
*
* A LockInfo object should be passed if the user should be informed
* which lock actually has the file locked.
*
* @param DAV\Locks\LockInfo $lock
*/
- function __construct(DAV\Locks\LockInfo $lock = null) {
+ public function __construct(DAV\Locks\LockInfo $lock = null)
+ {
+ parent::__construct();
$this->lock = $lock;
-
}
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 423;
-
}
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
if ($this->lock) {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:lock-token-submitted');
$errorNode->appendChild($error);
@@ -66,7 +67,5 @@ class Locked extends DAV\Exception {
$href
);
}
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php b/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php
index 30c1c2553..a3d9c56f2 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/MethodNotAllowed.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * MethodNotAllowed
+ * MethodNotAllowed.
*
* The 405 is thrown when a client tried to create a directory on an already existing directory
*
@@ -13,17 +15,16 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class MethodNotAllowed extends DAV\Exception {
-
+class MethodNotAllowed extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 405;
-
}
/**
@@ -32,16 +33,15 @@ class MethodNotAllowed extends DAV\Exception {
* The headers must be returned as an array.
*
* @param \Sabre\DAV\Server $server
+ *
* @return array
*/
- function getHTTPHeaders(\Sabre\DAV\Server $server) {
-
+ public function getHTTPHeaders(\Sabre\DAV\Server $server)
+ {
$methods = $server->getAllowedMethods($server->getRequestUri());
return [
'Allow' => strtoupper(implode(', ', $methods)),
];
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php b/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php
index e69a60c75..0a5ba9b5a 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/NotAuthenticated.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * NotAuthenticated
+ * NotAuthenticated.
*
* This exception is thrown when the client did not provide valid
* authentication credentials.
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class NotAuthenticated extends DAV\Exception {
-
+class NotAuthenticated extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 401;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/NotFound.php b/vendor/sabre/dav/lib/DAV/Exception/NotFound.php
index b0397446d..9cf837074 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/NotFound.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/NotFound.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * NotFound
+ * NotFound.
*
* This Exception is thrown when a Node couldn't be found. It returns HTTP error code 404
*
@@ -13,17 +15,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class NotFound extends DAV\Exception {
-
+class NotFound extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 404;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php b/vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php
index 68f309222..cebb83363 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/NotImplemented.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * NotImplemented
+ * NotImplemented.
*
* This exception is thrown when the client tried to call an unsupported HTTP method or other feature
*
@@ -13,17 +15,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class NotImplemented extends DAV\Exception {
-
+class NotImplemented extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 501;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php b/vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php
index 43e17344a..d237f906b 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/PaymentRequired.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * Payment Required
+ * Payment Required.
*
* The PaymentRequired exception may be thrown in a case where a user must pay
* to access a certain resource or operation.
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class PaymentRequired extends DAV\Exception {
-
+class PaymentRequired extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 402;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php b/vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php
index 550360e5a..20d8a2a30 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/PreconditionFailed.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * PreconditionFailed
+ * PreconditionFailed.
*
* This exception is normally thrown when a client submitted a conditional request,
* like for example an If, If-None-Match or If-Match header, which caused the HTTP
@@ -15,8 +17,8 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class PreconditionFailed extends DAV\Exception {
-
+class PreconditionFailed extends DAV\Exception
+{
/**
* When this exception is thrown, the header-name might be set.
*
@@ -28,44 +30,39 @@ class PreconditionFailed extends DAV\Exception {
public $header = null;
/**
- * Create the exception
+ * Create the exception.
*
* @param string $message
* @param string $header
*/
- function __construct($message, $header = null) {
-
+ public function __construct($message, $header = null)
+ {
parent::__construct($message);
$this->header = $header;
-
}
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 412;
-
}
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
if ($this->header) {
$prop = $errorNode->ownerDocument->createElement('s:header');
$prop->nodeValue = $this->header;
$errorNode->appendChild($prop);
}
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php b/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php
index a83695627..cecfec12d 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/ReportNotSupported.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * ReportNotSupported
+ * ReportNotSupported.
*
* This exception is thrown when the client requested an unknown report through the REPORT method
*
@@ -13,20 +15,17 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ReportNotSupported extends UnsupportedMediaType {
-
+class ReportNotSupported extends UnsupportedMediaType
+{
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:supported-report');
$errorNode->appendChild($error);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php b/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php
index c8ccfc062..6ccb5b8c8 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/RequestedRangeNotSatisfiable.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * RequestedRangeNotSatisfiable
+ * RequestedRangeNotSatisfiable.
*
* This exception is normally thrown when the user
* request a range that is out of the entity bounds.
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class RequestedRangeNotSatisfiable extends DAV\Exception {
-
+class RequestedRangeNotSatisfiable extends DAV\Exception
+{
/**
- * returns the http statuscode for this exception
+ * returns the http statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 416;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php b/vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php
index 31df606e2..43c995c9c 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/ServiceUnavailable.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * ServiceUnavailable
+ * ServiceUnavailable.
*
* This exception is thrown in case the service
* is currently not available (e.g. down for maintenance).
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class ServiceUnavailable extends DAV\Exception {
-
+class ServiceUnavailable extends DAV\Exception
+{
/**
- * Returns the HTTP statuscode for this exception
+ * Returns the HTTP statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 503;
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php
index d0f0f84e8..7dbe878b9 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/TooManyMatches.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * TooManyMatches
+ * TooManyMatches.
*
* This exception is emited for the {DAV:}number-of-matches-within-limits
* post-condition, as defined in rfc6578, section 3.2.
@@ -19,20 +21,17 @@ use Sabre\DAV;
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class TooManyMatches extends Forbidden {
-
+class TooManyMatches extends Forbidden
+{
/**
- * This method allows the exception to include additional information into the WebDAV error response
+ * This method allows the exception to include additional information into the WebDAV error response.
*
- * @param DAV\Server $server
+ * @param DAV\Server $server
* @param \DOMElement $errorNode
- * @return void
*/
- function serialize(DAV\Server $server, \DOMElement $errorNode) {
-
+ public function serialize(DAV\Server $server, \DOMElement $errorNode)
+ {
$error = $errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits');
$errorNode->appendChild($error);
-
}
-
}
diff --git a/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php b/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php
index f3d92842d..bc9da30da 100644
--- a/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php
+++ b/vendor/sabre/dav/lib/DAV/Exception/UnsupportedMediaType.php
@@ -1,11 +1,13 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\Exception;
use Sabre\DAV;
/**
- * UnSupportedMediaType
+ * UnSupportedMediaType.
*
* The 415 Unsupported Media Type status code is generally sent back when the client
* tried to call an HTTP method, with a body the server didn't understand
@@ -14,17 +16,15 @@ use Sabre\DAV;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class UnsupportedMediaType extends DAV\Exception {
-
+class UnsupportedMediaType extends DAV\Exception
+{
/**
- * returns the http statuscode for this exception
+ * returns the http statuscode for this exception.
*
* @return int
*/
- function getHTTPCode() {
-
+ public function getHTTPCode()
+ {
return 415;
-
}
-
}