Total Complexity | 8 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
5 | final class View implements ViewInterface |
||
6 | { |
||
7 | 3 | public function __construct( |
|
8 | private string $template, |
||
9 | private array $parameters = [], |
||
10 | private int $statusCode = 200, |
||
11 | private string $contentType = self::CONTENT_TYPE_HTML, |
||
12 | private array $headers = [] |
||
13 | ) |
||
14 | { |
||
15 | 3 | } |
|
16 | |||
17 | 2 | public function getStatusCode(): int |
|
18 | { |
||
19 | 2 | return $this->statusCode; |
|
20 | } |
||
21 | |||
22 | 3 | public function getHeaders(): array |
|
23 | { |
||
24 | 3 | return $this->headers; |
|
25 | } |
||
26 | |||
27 | 1 | public function setHeader(string $key, string $value): void |
|
30 | } |
||
31 | |||
32 | 2 | public function getContentType(): string |
|
33 | { |
||
34 | 2 | return $this->contentType; |
|
35 | } |
||
36 | |||
37 | 2 | public function getTemplate(): string |
|
38 | { |
||
39 | 2 | return $this->template; |
|
40 | } |
||
41 | |||
42 | 3 | public function getParameters(): array |
|
43 | { |
||
44 | 3 | return $this->parameters; |
|
45 | } |
||
46 | |||
47 | 1 | public function setParameter(string $key, $value): void |
|
50 | } |
||
51 | } |
||
52 |