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

Response   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
c 5
b 0
f 0
lcom 1
cbo 0
dl 0
loc 34
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A output() 0 7 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