Request::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 5
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 Psr\Http\Message\UriInterface;
16
use Zend\Diactoros\Request as DiactorosRequest;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
class Request extends DiactorosRequest implements RequestInterface
22
{
23
    use MessageTrait;
24
25
    /**
26
     * @param string|UriInterface|null        $uri
27
     * @param string|null                     $method
28
     * @param string|resource|StreamInterface $body
29
     * @param array                           $headers
30
     * @param array                           $parameters
31
     */
32 15543
    public function __construct(
33
        $uri = null,
34
        $method = null,
35
        $body = 'php://memory',
36
        array $headers = [],
37
        array $parameters = []
38
    ) {
39 15543
        parent::__construct($uri, $method, $body, $headers);
40
41 15543
        $this->parameters = $parameters;
42 15543
    }
43
}
44