Code Duplication    Length = 9-9 lines in 2 locations

src/Response/HtmlResponse.php 1 location

@@ 9-17 (lines=9) @@
6
7
use Furious\Psr7\Response;
8
9
class HtmlResponse extends Response
10
{
11
    public function __construct(string $html, int $statusCode = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
12
    {
13
        parent::__construct($statusCode, $headers + [
14
            'Content-Type' => 'text/html; charset=utf-8'
15
        ], $html, $version, $reason);
16
    }
17
}

src/Response/TextResponse.php 1 location

@@ 9-17 (lines=9) @@
6
7
use Furious\Psr7\Response;
8
9
class TextResponse extends Response
10
{
11
    public function __construct(string $text, int $statusCode = 200, array $headers = [], $body = null, string $version = '1.1', string $reason = null)
12
    {
13
        parent::__construct($statusCode, $headers + [
14
            'Content-Type' => 'text/plain; charset=utf-8'
15
        ], $text, $version, $reason);
16
    }
17
}