Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | abstract class AbstractApiProblem implements ApiProblemInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $type; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | protected $status; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $title; |
||
23 | |||
24 | /** |
||
25 | * @var string|null |
||
26 | */ |
||
27 | protected $detail; |
||
28 | |||
29 | /** |
||
30 | * @var string|null |
||
31 | */ |
||
32 | protected $instance; |
||
33 | |||
34 | public function __construct( |
||
35 | string $type, |
||
36 | int $status, |
||
37 | string $title, |
||
38 | string $detail = null, |
||
39 | string $instance = null |
||
40 | ) { |
||
41 | 2 | $this->type = $type; |
|
42 | $this->status = $status; |
||
43 | $this->title = $title; |
||
44 | $this->detail = $detail; |
||
45 | $this->instance = $instance; |
||
46 | } |
||
47 | |||
48 | 2 | public function getType(): string |
|
49 | 2 | { |
|
50 | 2 | return $this->type; |
|
51 | 2 | } |
|
52 | 2 | ||
53 | 2 | public function getStatus(): int |
|
56 | } |
||
57 | |||
58 | 2 | public function getTitle(): string |
|
59 | { |
||
60 | 2 | return $this->title; |
|
61 | } |
||
62 | |||
63 | public function getDetail(): ?string |
||
64 | { |
||
65 | return $this->detail; |
||
66 | 2 | } |
|
67 | |||
68 | 2 | public function getInstance(): ?string |
|
69 | { |
||
70 | return $this->instance; |
||
71 | } |
||
72 | |||
73 | public function getHeaders(): array |
||
76 | 2 | } |
|
77 | } |
||
78 |