diff options
Diffstat (limited to 'WpfTest/HttpReturnStatus')
| -rw-r--r-- | WpfTest/HttpReturnStatus/BadRequest.php | 18 | ||||
| -rw-r--r-- | WpfTest/HttpReturnStatus/InternalServerError.php | 16 | ||||
| -rw-r--r-- | WpfTest/HttpReturnStatus/NoHandlerFound.php | 18 | ||||
| -rw-r--r-- | WpfTest/HttpReturnStatus/NotFound.php | 18 |
4 files changed, 0 insertions, 70 deletions
diff --git a/WpfTest/HttpReturnStatus/BadRequest.php b/WpfTest/HttpReturnStatus/BadRequest.php deleted file mode 100644 index 83b5011..0000000 --- a/WpfTest/HttpReturnStatus/BadRequest.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -namespace WpfTest\HttpReturnStatus; - -use WpfTest\HttpReturnStatus; - -class BadRequest extends \Exception implements HttpReturnStatus { - public function __construct(?string $reason) { - $this->message = $reason ?? 'Request does not conform to expectations'; - } - - public function httpCode(): int { - return 400; - } - - public function httpReason(): string { - return "Bad Request"; - } -}
\ No newline at end of file diff --git a/WpfTest/HttpReturnStatus/InternalServerError.php b/WpfTest/HttpReturnStatus/InternalServerError.php deleted file mode 100644 index 0141e26..0000000 --- a/WpfTest/HttpReturnStatus/InternalServerError.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -namespace WpfTest\HttpReturnStatus; - -use WpfTest\HttpReturnStatus; - -class InternalServerError extends \Exception implements HttpReturnStatus { - public function __construct(\Exception $reason) { - $this->message = $reason->getMessage(); - } - public function httpCode(): int { - return 500; - } - public function httpReason(): string { - return "Internal Server Error"; - } -}
\ No newline at end of file diff --git a/WpfTest/HttpReturnStatus/NoHandlerFound.php b/WpfTest/HttpReturnStatus/NoHandlerFound.php deleted file mode 100644 index d914ca2..0000000 --- a/WpfTest/HttpReturnStatus/NoHandlerFound.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -namespace WpfTest\HttpReturnStatus; - -use WpfTest\HttpReturnStatus; - -class NoHandlerFound extends \Exception implements HttpReturnStatus { - public function __construct(string $path) { - $this->message = "No handler found for path $path"; - } - - public function httpCode(): int { - return 404; - } - - public function httpReason(): string { - return "Not Found"; - } -}
\ No newline at end of file diff --git a/WpfTest/HttpReturnStatus/NotFound.php b/WpfTest/HttpReturnStatus/NotFound.php deleted file mode 100644 index eef23b3..0000000 --- a/WpfTest/HttpReturnStatus/NotFound.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -namespace WpfTest\HttpReturnStatus; - -use WpfTest\HttpReturnStatus; - -class NotFound extends \Exception implements HttpReturnStatus { - public function __construct(?string $reason) { - $this->message = $reason ?? 'Request was handled but no appropriate resource found'; - } - - public function httpCode(): int { - return 404; - } - - public function httpReason(): string { - return "Not Found"; - } -}
\ No newline at end of file |
