Response::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 4
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Ivory Http Adapter package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\HttpAdapter\Message;
13
14
use Psr\Http\Message\StreamInterface;
15
use Zend\Diactoros\Response as DiactorosResponse;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
class Response extends DiactorosResponse implements ResponseInterface
21
{
22
    use MessageTrait;
23
24
    /**
25
     * @param string|resource|StreamInterface $body
26
     * @param int                             $status
27
     * @param array                           $headers
28
     * @param array                           $parameters
29
     */
30 14868
    public function __construct(
31
        $body = 'php://memory',
32
        $status = 200,
33
        array $headers = [],
34
        array $parameters = []
35
    ) {
36 14868
        parent::__construct($body, $status, $headers);
37
38 14868
        $this->parameters = $parameters;
39 14868
    }
40
}
41