Passed
Pull Request — master (#43)
by Baptiste
02:06
created

Configuration::getResponseHeaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types=1);
2
namespace Behapi\Debug;
3
4
/**
5
 * Object containing the debug configuration (status, headers)
6
 *
7
 * @author Baptiste Clavié <[email protected]>
8
 */
9
final class Configuration
10
{
11
    /** @var bool */
12
    private $status = false;
13
14
    /** @var string[] Request headers to print when debugging */
15
    private $requestHeaders = [];
16
17
    /** @var string[] Response headers to print when debugging */
18
    private $responseHeaders = [];
19
20
    public function __construct(array $requestHeaders, array $responseHeaders)
21
    {
22
        $this->requestHeaders = $requestHeaders;
23
        $this->responseHeaders = $responseHeaders;
24
    }
25
26
    public function setStatus(bool $status)
27
    {
28
        $this->status = $status;
29
    }
30
31
    public function getStatus(): bool
32
    {
33
        return $this->status;
34
    }
35
36
    public function getRequestHeaders(): array
37
    {
38
        return $this->requestHeaders;
39
    }
40
41
    public function getResponseHeaders(): array
42
    {
43
        return $this->responseHeaders;
44
    }
45
}
46