1 | <?php |
||
7 | class ApnMessage |
||
8 | { |
||
9 | /** |
||
10 | * The title of the notification. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | public $title; |
||
15 | |||
16 | /** |
||
17 | * The body of the notification. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | public $body; |
||
22 | |||
23 | /** |
||
24 | * The badge of the notification. |
||
25 | * |
||
26 | * @var int |
||
27 | */ |
||
28 | public $badge; |
||
29 | |||
30 | /** |
||
31 | * The sound for the notification. |
||
32 | * |
||
33 | * @var string|null |
||
34 | */ |
||
35 | public $sound; |
||
36 | |||
37 | /** |
||
38 | * The category for action button. |
||
39 | * |
||
40 | * @var string|null |
||
41 | * */ |
||
42 | public $category; |
||
43 | |||
44 | /** |
||
45 | * Value indicating incoming resource in the notification. |
||
46 | * |
||
47 | * @var int|null |
||
48 | */ |
||
49 | public $contentAvailable = null; |
||
50 | |||
51 | /** |
||
52 | * Additional data of the notification. |
||
53 | * |
||
54 | * @var array |
||
55 | */ |
||
56 | public $custom = []; |
||
57 | |||
58 | /** |
||
59 | * Value indicating when the message will expire. |
||
60 | * |
||
61 | * @var \string |
||
62 | */ |
||
63 | public $pushType = null; |
||
64 | |||
65 | /** |
||
66 | * Message specific client. |
||
67 | * |
||
68 | * @var \Pushok\Client|null |
||
69 | */ |
||
70 | public $client = null; |
||
71 | |||
72 | /** |
||
73 | * The notification service app extension flag. |
||
74 | * |
||
75 | * @var int|null |
||
76 | */ |
||
77 | public $mutableContent = null; |
||
78 | |||
79 | /** |
||
80 | * @param string|null $title |
||
81 | * @param string|null $body |
||
82 | * @param array $custom |
||
83 | * @param null|int $badge |
||
84 | * |
||
85 | * @return static |
||
86 | */ |
||
87 | 1 | public static function create($title = null, $body = null, $custom = [], $badge = null) |
|
91 | |||
92 | /** |
||
93 | * @param string|null $title |
||
94 | * @param string|null $body |
||
95 | * @param array $custom |
||
96 | * @param null|int $badge |
||
97 | */ |
||
98 | 15 | public function __construct($title = null, $body = null, $custom = [], $badge = null) |
|
105 | |||
106 | /** |
||
107 | * Set the alert title of the notification. |
||
108 | * |
||
109 | * @param string $title |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | 1 | public function title($title) |
|
119 | |||
120 | /** |
||
121 | * Set the alert message of the notification. |
||
122 | * |
||
123 | * @param string $body |
||
124 | * |
||
125 | * @return $this |
||
126 | */ |
||
127 | 1 | public function body($body) |
|
133 | |||
134 | /** |
||
135 | * Set the badge of the notification. |
||
136 | * |
||
137 | * @param int $badge |
||
138 | * |
||
139 | * @return $this |
||
140 | */ |
||
141 | 1 | public function badge($badge) |
|
147 | |||
148 | /** |
||
149 | * Set the sound for the notification. |
||
150 | * |
||
151 | * @param string|null $sound |
||
152 | * |
||
153 | * @return $this |
||
154 | */ |
||
155 | 2 | public function sound($sound = 'default') |
|
161 | |||
162 | /** |
||
163 | * Set category for this notification. |
||
164 | * |
||
165 | * @param string|null $category |
||
166 | * |
||
167 | * @return $this |
||
168 | * */ |
||
169 | 1 | public function category($category) |
|
175 | |||
176 | /** |
||
177 | * Set content available value for this notification. |
||
178 | * |
||
179 | * @param int $value |
||
180 | * |
||
181 | * @return $this |
||
182 | */ |
||
183 | 1 | public function contentAvailable($value = 1) |
|
189 | |||
190 | /** |
||
191 | * Set the push type for this notification. |
||
192 | * |
||
193 | * @param string $pushType |
||
194 | * |
||
195 | * @return $this |
||
196 | */ |
||
197 | 1 | public function pushType(string $pushType) |
|
201 | |||
202 | /** |
||
203 | * Add custom data to the notification. |
||
204 | * |
||
205 | * @param string $key |
||
206 | * @param mixed $value |
||
207 | * |
||
208 | * @return $this |
||
209 | */ |
||
210 | 2 | public function custom($key, $value) |
|
216 | |||
217 | /** |
||
218 | * Override the data of the notification. |
||
219 | * |
||
220 | * @param array $custom |
||
221 | * |
||
222 | * @return $this |
||
223 | */ |
||
224 | 1 | public function setCustom($custom) |
|
230 | |||
231 | /** |
||
232 | * Add an action to the notification. |
||
233 | * |
||
234 | * @param string $action |
||
235 | * @param mixed $params |
||
236 | * |
||
237 | * @return $this |
||
238 | */ |
||
239 | 1 | public function action($action, $params = null) |
|
246 | |||
247 | /** |
||
248 | * Set message specific client. |
||
249 | * |
||
250 | * @param \Pushok\Client |
||
251 | * @return $this |
||
252 | */ |
||
253 | 1 | public function via(Client $client) |
|
259 | |||
260 | /** |
||
261 | * Set mutable content value for this notification. |
||
262 | * |
||
263 | * @param int $value |
||
264 | * |
||
265 | * @return $this |
||
266 | */ |
||
267 | 1 | public function mutableContent($value = 1) |
|
273 | } |
||
274 |
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..