Total Complexity | 8 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | abstract class AbstractResponseSaveDto implements ResponseSaveDtoInterface |
||
14 | { |
||
15 | const STATUS_OK = 'OK'; |
||
16 | const STATUS_ERROR = 'ERROR'; |
||
17 | |||
18 | const FIELD_STATUS = 'status'; |
||
19 | const FIELD_MESSAGE = 'message'; |
||
20 | const FIELD_NOTIFICATION = 'notification'; |
||
21 | |||
22 | protected $status; |
||
23 | |||
24 | protected $message; |
||
25 | |||
26 | /** @var NotificationInterface */ |
||
27 | protected $notification; |
||
28 | |||
29 | public function setOkStatus() |
||
30 | { |
||
31 | $this->status = static::STATUS_OK; |
||
32 | } |
||
33 | |||
34 | public function setErrorStatus() |
||
35 | { |
||
36 | $this->status = static::STATUS_ERROR; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function getStatus() |
||
43 | { |
||
44 | return $this->status; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param mixed $status |
||
49 | */ |
||
50 | public function setStatus($status): void |
||
51 | { |
||
52 | $this->status = $status; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function getMessage() |
||
59 | { |
||
60 | return $this->message; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param mixed $message |
||
65 | */ |
||
66 | public function setMessage($message): void |
||
67 | { |
||
68 | $this->message = $message; |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @return NotificationInterface |
||
73 | */ |
||
74 | public function getNotification(): NotificationInterface |
||
75 | { |
||
76 | return $this->notification; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @param NotificationInterface $notification |
||
81 | */ |
||
82 | public function setNotification(NotificationInterface $notification): void |
||
85 | } |
||
86 | } |
||
87 |