Total Complexity | 4 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | final class NovaApiError |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $code; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $message; |
||
19 | |||
20 | /** |
||
21 | * @var array|null |
||
22 | */ |
||
23 | private $details; |
||
24 | |||
25 | /** |
||
26 | * Constructor. |
||
27 | * |
||
28 | * @param string $code The code |
||
29 | * @param string $message The message |
||
30 | * @param array|null $details The details |
||
31 | */ |
||
32 | public function __construct(string $code, string $message, array $details = null) |
||
33 | { |
||
34 | $this->code = $code; |
||
35 | $this->message = $message; |
||
36 | $this->details = $details; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get value. |
||
41 | * |
||
42 | * @return string code |
||
43 | */ |
||
44 | public function getCode(): string |
||
45 | { |
||
46 | return $this->code; |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get value. |
||
51 | * |
||
52 | * @return string message |
||
53 | */ |
||
54 | public function getMessage(): string |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Get value. |
||
61 | * |
||
62 | * @return array|null details |
||
63 | */ |
||
64 | public function getDetails() |
||
67 | } |
||
68 | } |
||
69 |