1 | <?php |
||
17 | class Message |
||
18 | { |
||
19 | /** |
||
20 | * @var ApnId |
||
21 | */ |
||
22 | private $id; |
||
23 | |||
24 | /** |
||
25 | * @var ApsData |
||
26 | */ |
||
27 | private $aps; |
||
28 | |||
29 | /** |
||
30 | * @var Priority |
||
31 | */ |
||
32 | private $priority; |
||
33 | |||
34 | /** |
||
35 | * @var \DateTime |
||
36 | */ |
||
37 | private $expiration; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private $customData; |
||
43 | |||
44 | /** |
||
45 | * Constructor. |
||
46 | * |
||
47 | * @param ApsData $apsData |
||
48 | * @param ApnId|null $id |
||
49 | * @param Priority|null $priority |
||
50 | * @param Expiration|null $expiration |
||
51 | * @param array $customData |
||
52 | */ |
||
53 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * Get identifier of message |
||
69 | * |
||
70 | * @return ApnId |
||
71 | */ |
||
72 | public function getId() : ApnId |
||
76 | |||
77 | /** |
||
78 | * Get APS data |
||
79 | * |
||
80 | * @return ApsData |
||
81 | */ |
||
82 | public function getApsData() : ApsData |
||
86 | |||
87 | /** |
||
88 | * Get priority |
||
89 | * |
||
90 | * @return Priority |
||
91 | */ |
||
92 | public function getPriority() : Priority |
||
96 | |||
97 | /** |
||
98 | * Get expiration |
||
99 | * |
||
100 | * @return Expiration |
||
101 | */ |
||
102 | public function getExpiration() : Expiration |
||
106 | |||
107 | /** |
||
108 | * Add or replace custom data |
||
109 | * |
||
110 | * @param string $name |
||
111 | * @param mixed $value |
||
112 | * |
||
113 | * @return Message |
||
114 | * |
||
115 | * @throws \InvalidArgumentException |
||
116 | */ |
||
117 | public function withCustomData(string $name, $value) |
||
132 | |||
133 | /** |
||
134 | * Get custom data |
||
135 | * |
||
136 | * @return array |
||
137 | */ |
||
138 | public function getCustomData() |
||
142 | } |
||
143 |
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..