summaryrefslogtreecommitdiff
path: root/server/vendor/php-opencloud/common/src/Common/Error
diff options
context:
space:
mode:
authorEoleDev <EoleDev@outlook.fr>2016-03-23 15:30:47 +0100
committerEoleDev <EoleDev@outlook.fr>2016-03-23 15:30:47 +0100
commit54ec6723deb44e325782afd366eeec01ee29ac55 (patch)
tree5431400d307754a02e6c40b35a40e6761d7dac0c /server/vendor/php-opencloud/common/src/Common/Error
parent0dc17aa9efb987dcdf6f864f4110450bcc0c9003 (diff)
Maj Library
Diffstat (limited to 'server/vendor/php-opencloud/common/src/Common/Error')
-rw-r--r--server/vendor/php-opencloud/common/src/Common/Error/BadResponseError.php6
-rw-r--r--server/vendor/php-opencloud/common/src/Common/Error/BaseError.php2
-rw-r--r--server/vendor/php-opencloud/common/src/Common/Error/Builder.php14
-rw-r--r--server/vendor/php-opencloud/common/src/Common/Error/NotImplementedError.php2
-rw-r--r--server/vendor/php-opencloud/common/src/Common/Error/UserInputError.php2
5 files changed, 13 insertions, 13 deletions
diff --git a/server/vendor/php-opencloud/common/src/Common/Error/BadResponseError.php b/server/vendor/php-opencloud/common/src/Common/Error/BadResponseError.php
index f7640ea..faa7128 100644
--- a/server/vendor/php-opencloud/common/src/Common/Error/BadResponseError.php
+++ b/server/vendor/php-opencloud/common/src/Common/Error/BadResponseError.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
namespace OpenCloud\Common\Error;
@@ -28,12 +28,12 @@ class BadResponseError extends BaseError
$this->response = $response;
}
- public function getRequest()
+ public function getRequest(): RequestInterface
{
return $this->request;
}
- public function getResponse()
+ public function getResponse(): ResponseInterface
{
return $this->response;
}
diff --git a/server/vendor/php-opencloud/common/src/Common/Error/BaseError.php b/server/vendor/php-opencloud/common/src/Common/Error/BaseError.php
index a7cb26e..1776890 100644
--- a/server/vendor/php-opencloud/common/src/Common/Error/BaseError.php
+++ b/server/vendor/php-opencloud/common/src/Common/Error/BaseError.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
namespace OpenCloud\Common\Error;
diff --git a/server/vendor/php-opencloud/common/src/Common/Error/Builder.php b/server/vendor/php-opencloud/common/src/Common/Error/Builder.php
index e3ccdfe..f9762b7 100644
--- a/server/vendor/php-opencloud/common/src/Common/Error/Builder.php
+++ b/server/vendor/php-opencloud/common/src/Common/Error/Builder.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
namespace OpenCloud\Common\Error;
@@ -48,7 +48,7 @@ class Builder
*
* @return string
*/
- private function header($name)
+ private function header(string $name): string
{
return sprintf("%s\n%s\n", $name, str_repeat('~', strlen($name)));
}
@@ -61,7 +61,7 @@ class Builder
*
* @return bool
*/
- private function linkIsValid($link)
+ private function linkIsValid(string $link): bool
{
$link = $this->docDomain . $link;
@@ -78,7 +78,7 @@ class Builder
* @codeCoverageIgnore
* @return string
*/
- public function str(MessageInterface $message)
+ public function str(MessageInterface $message): string
{
if ($message instanceof RequestInterface) {
$msg = trim($message->getMethod() . ' '
@@ -112,7 +112,7 @@ class Builder
*
* @return BadResponseError
*/
- public function httpError(RequestInterface $request, ResponseInterface $response)
+ public function httpError(RequestInterface $request, ResponseInterface $response): BadResponseError
{
$message = $this->header('HTTP Error');
@@ -138,7 +138,7 @@ class Builder
return $e;
}
- private function getStatusCodeMessage($statusCode)
+ private function getStatusCodeMessage(int $statusCode): string
{
$errors = [
400 => 'Please ensure that your input values are valid and well-formed. ',
@@ -159,7 +159,7 @@ class Builder
*
* @return UserInputError
*/
- public function userInputError($expectedType, $userValue, $furtherLink = null)
+ public function userInputError(string $expectedType, $userValue, string $furtherLink = null): UserInputError
{
$message = $this->header('User Input Error');
diff --git a/server/vendor/php-opencloud/common/src/Common/Error/NotImplementedError.php b/server/vendor/php-opencloud/common/src/Common/Error/NotImplementedError.php
index 3e01d74..db18f62 100644
--- a/server/vendor/php-opencloud/common/src/Common/Error/NotImplementedError.php
+++ b/server/vendor/php-opencloud/common/src/Common/Error/NotImplementedError.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
namespace OpenCloud\Common\Error;
diff --git a/server/vendor/php-opencloud/common/src/Common/Error/UserInputError.php b/server/vendor/php-opencloud/common/src/Common/Error/UserInputError.php
index 964875e..e92ab92 100644
--- a/server/vendor/php-opencloud/common/src/Common/Error/UserInputError.php
+++ b/server/vendor/php-opencloud/common/src/Common/Error/UserInputError.php
@@ -1,4 +1,4 @@
-<?php
+<?php declare(strict_types=1);
namespace OpenCloud\Common\Error;