Sf4 /
Api
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Created by PhpStorm. |
||
| 4 | * User: siim |
||
| 5 | * Date: 6.02.19 |
||
| 6 | * Time: 8:08 |
||
| 7 | */ |
||
| 8 | |||
| 9 | namespace Sf4\Api\Dto\Response; |
||
| 10 | |||
| 11 | use Sf4\Api\Entity\Traits\StatusTrait; |
||
| 12 | use Sf4\Api\Notification\NotificationInterface; |
||
| 13 | |||
| 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; |
||
|
0 ignored issues
–
show
|
|||
| 33 | } |
||
| 34 | |||
| 35 | public function setErrorStatus(): void |
||
| 36 | { |
||
| 37 | $this->status = static::STATUS_ERROR; |
||
|
0 ignored issues
–
show
It seems like
static::STATUS_ERROR of type string is incompatible with the declared type integer|null of property $status.
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.. Loading history...
|
|||
| 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 |
||
| 68 | { |
||
| 69 | $this->notification = $notification; |
||
| 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..