Total Complexity | 6 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | abstract class AbstractResponseSaveDto implements ResponseSaveDtoInterface |
||
15 | { |
||
16 | use StatusTrait; |
||
17 | |||
18 | public const STATUS_OK = 'OK'; |
||
19 | public const STATUS_ERROR = 'ERROR'; |
||
20 | |||
21 | public const FIELD_STATUS = 'status'; |
||
22 | public const FIELD_MESSAGE = 'message'; |
||
23 | public const FIELD_NOTIFICATION = 'notification'; |
||
24 | |||
25 | protected $message; |
||
26 | |||
27 | /** @var NotificationInterface */ |
||
28 | protected $notification; |
||
29 | |||
30 | public function setOkStatus(): void |
||
31 | { |
||
32 | $this->status = static::STATUS_OK; |
||
|
|||
33 | } |
||
34 | |||
35 | public function setErrorStatus(): void |
||
36 | { |
||
37 | $this->status = static::STATUS_ERROR; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function getMessage() |
||
44 | { |
||
45 | return $this->message; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param mixed $message |
||
50 | */ |
||
51 | public function setMessage($message): void |
||
52 | { |
||
53 | $this->message = $message; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return NotificationInterface |
||
58 | */ |
||
59 | public function getNotification(): NotificationInterface |
||
60 | { |
||
61 | return $this->notification; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @param NotificationInterface $notification |
||
66 | */ |
||
67 | public function setNotification(NotificationInterface $notification): void |
||
70 | } |
||
71 | } |
||
72 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..