TextResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 6
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Furious\Psr7\Response;
6
7
use Furious\Psr7\Response;
8
9 View Code Duplication
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
}