Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | trait FormStatus |
||
7 | { |
||
8 | /** |
||
9 | * Add success status to the view model |
||
10 | * |
||
11 | * @return $this |
||
12 | */ |
||
13 | public function withSuccess() { |
||
14 | $this->withStatus('success'); |
||
15 | return $this; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * Add success status to the view model |
||
20 | * |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function withFailure() { |
||
24 | $this->withStatus('failure'); |
||
25 | return $this; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Set a Client Inquiry success/failure status to be displayed in the view model |
||
30 | * |
||
31 | * @param string $status |
||
32 | * @return $this |
||
33 | */ |
||
34 | private function withStatus(string $status) { |
||
37 | } |
||
38 | } |
||
39 |