Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #6 from CodeIncHQ/1.x
Browse files Browse the repository at this point in the history
1.2.2
  • Loading branch information
Joan Fabrégat authored Apr 13, 2018
2 parents bfdc176 + f08becf commit d8c3aad
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
20 changes: 10 additions & 10 deletions src/ForbiddenResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
* @author Joan Fabrégat <[email protected]>
*/
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)
{
Expand Down
47 changes: 47 additions & 0 deletions src/UnauthorizedResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
//
// +---------------------------------------------------------------------+
// | CODE INC. SOURCE CODE |
// +---------------------------------------------------------------------+
// | Copyright (c) 2017 - Code Inc. SAS - All Rights Reserved. |
// | Visit https://www.codeinc.fr for more information about licensing. |
// +---------------------------------------------------------------------+
// | NOTICE: All information contained herein is, and remains the |
// | property of Code Inc. SAS. The intellectual and technical concepts |
// | contained herein are proprietary to Code Inc. SAS are protected by |
// | trade secret or copyright law. Dissemination of this information or |
// | reproduction of this material is strictly forbidden unless prior |
// | written permission is obtained from Code Inc. SAS. |
// +---------------------------------------------------------------------+
//
// Author: Joan Fabrégat <[email protected]>
// 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 <[email protected]>
*/
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);
}
}

0 comments on commit d8c3aad

Please sign in to comment.