EmptyResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 17
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace HttpSoft\Response;
6
7
use HttpSoft\Message\Stream;
8
use Psr\Http\Message\ResponseInterface;
9
10
final class EmptyResponse implements ResponseInterface, ResponseStatusCodeInterface
11
{
12
    use ResponseExtensionTrait;
13
14
    /**
15
     * @param int $code
16
     * @param array $headers
17
     * @param string $protocol
18
     * @param string $reasonPhrase
19
     */
20 25
    public function __construct(
21
        int $code = self::STATUS_NO_CONTENT,
22
        array $headers = [],
23
        string $protocol = '1.1',
24
        string $reasonPhrase = ''
25
    ) {
26 25
        $this->init($code, $reasonPhrase, $headers, new Stream('php://temp', 'r'), $protocol);
27
    }
28
}
29