From 69d0118228faf1dd924a82eb6801d0e2d79cdacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Fri, 13 Apr 2018 18:37:19 +0200 Subject: [PATCH 1/3] adds Unauthorized --- src/UnauthorizedResponse.php | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/UnauthorizedResponse.php diff --git a/src/UnauthorizedResponse.php b/src/UnauthorizedResponse.php new file mode 100644 index 0000000..59dae03 --- /dev/null +++ b/src/UnauthorizedResponse.php @@ -0,0 +1,47 @@ + +// Date: 23/02/2018 +// Time: 19:22 +// Project: Psr7Responses +// +declare(strict_types = 1); +namespace CodeInc\Psr7Responses; + +/** + * Class UnauthorizedResponse + * + * @package CodeInc\Psr7Responses + * @author Joan Fabrégat + */ +class UnauthorizedResponse extends HtmlResponse { + /** + * UnauthorizedResponse constructor. + * + * @param string|null $html + * @param null|string $charset + * @param array $headers + * @param null $body + * @param string $version + * @param null|string $reason + */ + public function __construct(string $html = null, ?string $charset = null, array $headers = [], + $body = null, string $version = '1.1', ?string $reason = null) + { + parent::__construct($html ?? '', $charset, 401, $headers, $version, $reason); + } +} \ No newline at end of file From a2f382ca4abce6aefcd0b365a6ca32df07914f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Fri, 13 Apr 2018 18:37:24 +0200 Subject: [PATCH 2/3] typo --- src/ForbiddenResponse.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ForbiddenResponse.php b/src/ForbiddenResponse.php index 9e30781..2d6b491 100644 --- a/src/ForbiddenResponse.php +++ b/src/ForbiddenResponse.php @@ -30,16 +30,16 @@ * @author Joan Fabrégat */ class ForbiddenResponse extends HtmlResponse { - /** - * NotFoundResponse constructor. - * - * @param string|null $html - * @param null|string $charset - * @param array $headers - * @param null $body - * @param string $version - * @param null|string $reason - */ + /** + * ForbiddenResponse constructor. + * + * @param string|null $html + * @param null|string $charset + * @param array $headers + * @param null $body + * @param string $version + * @param null|string $reason + */ public function __construct(string $html = null, ?string $charset = null, array $headers = [], $body = null, string $version = '1.1', ?string $reason = null) { From f08becfda6dfa4558b94267a56ee49a31d3e7565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Fri, 13 Apr 2018 18:37:28 +0200 Subject: [PATCH 3/3] v# --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 98c0c9c..24e2069 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "codeinc/psr7-responses", - "version": "1.2.1", + "version": "1.2.2", "description": "A collection of PSR-7 responses", "homepage": "https://github.com/CodeIncHQ/Psr7Responses", "type": "library",