Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | final class Status |
||
8 | { |
||
9 | /** |
||
10 | * @var array|string[] |
||
11 | */ |
||
12 | protected array $codes = [ |
||
13 | '0' => 'Success', |
||
14 | '2000' => 'General error', |
||
15 | '15000' => 'Must change USERPASS', |
||
16 | '15500' => 'Signon invalid', |
||
17 | '15501' => 'Customer account already in use', |
||
18 | '15502' => 'USERPASS Lockout' |
||
19 | ]; |
||
20 | private string $code; |
||
21 | private string $severity; |
||
22 | private string $message; |
||
23 | |||
24 | public function __construct(string $code, string $severity, string $message) |
||
25 | { |
||
26 | $this->code = $code; |
||
27 | $this->severity = $severity; |
||
28 | $this->message = $message; |
||
29 | } |
||
30 | |||
31 | public function getCode(): string |
||
32 | { |
||
33 | return $this->code; |
||
34 | } |
||
35 | |||
36 | public function getSeverity(): string |
||
39 | } |
||
40 | |||
41 | public function getMessage(): string |
||
42 | { |
||
43 | return $this->message; |
||
44 | } |
||
45 | |||
46 | public function getDescription(): string |
||
49 | } |
||
50 | } |
||
51 |