Completed
Pull Request — master (#2)
by René
06:36 queued 04:32
created

Response::output()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 4
Bugs 0 Features 0
Metric Value
c 4
b 0
f 0
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Zortje\MVC\Network;
5
6
/**
7
 * Class Response
8
 *
9
 * @package Zortje\MVC\Network
10
 */
11
class Response
12
{
13
14
    /**
15
     * @var array HTTP headers
16
     */
17
    protected $headers = [];
18
19
    /**
20
     * @var string Output
21
     */
22
    protected $output;
23
24
    /**
25
     * @param array  $headers
26
     * @param string $output
27
     */
28 1
    public function __construct(array $headers, string $output)
29
    {
30 1
        $this->headers = $headers;
31 1
        $this->output  = $output;
32 1
    }
33
34
    /**
35
     * @return array
36
     */
37 1
    public function output(): array
38
    {
39
        return [
40 1
            'headers' => $this->headers,
41 1
            'output'  => $this->output
42
        ];
43
    }
44
}
45