Total Complexity | 9 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
4 | class Result |
||
5 | { |
||
6 | protected $success = true; |
||
7 | protected $error; |
||
8 | protected $label; |
||
9 | protected $details; |
||
10 | |||
11 | public function __construct(string $label) |
||
14 | } |
||
15 | |||
16 | public function getLabel(): string |
||
19 | } |
||
20 | |||
21 | public function setSuccess(bool $success): void |
||
22 | { |
||
23 | $this->success = $success; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @deprecated |
||
28 | */ |
||
29 | public function getSuccess(): bool |
||
30 | { |
||
31 | return $this->success; |
||
32 | } |
||
33 | |||
34 | public function isSuccess(): bool |
||
35 | { |
||
36 | return $this->success; |
||
37 | } |
||
38 | |||
39 | public function setError(string $error): void |
||
40 | { |
||
41 | $this->setSuccess(false); |
||
42 | $this->error = $error; |
||
43 | } |
||
44 | |||
45 | public function getError(): ?string |
||
48 | } |
||
49 | |||
50 | public function setDetails(string $details): void |
||
51 | { |
||
52 | $this->details = $details; |
||
53 | } |
||
54 | |||
55 | public function getDetails(): ?string |
||
58 | } |
||
59 | } |
||
60 |