1 | <?php |
||
7 | class IonicPushMessage |
||
8 | { |
||
9 | /** @var string */ |
||
10 | public $sendTo = 'tokens'; |
||
11 | |||
12 | /** @var string */ |
||
13 | public $profile; |
||
14 | |||
15 | /** @var string */ |
||
16 | public $title = ''; |
||
17 | |||
18 | /** @var string */ |
||
19 | public $message = ''; |
||
20 | |||
21 | /** @var string */ |
||
22 | public $sound = ''; |
||
23 | |||
24 | /** @var DateTime */ |
||
25 | public $scheduled = ''; |
||
26 | |||
27 | /** @var array */ |
||
28 | public $payload = []; |
||
29 | |||
30 | /** @var array */ |
||
31 | public $iosData = []; |
||
32 | |||
33 | /** @var array */ |
||
34 | public $androidData = []; |
||
35 | |||
36 | /** |
||
37 | * @param array $data |
||
|
|||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | 3 | public static function create($profile) |
|
45 | |||
46 | /** |
||
47 | * @param string $profile |
||
48 | */ |
||
49 | 11 | public function __construct($profile) |
|
53 | |||
54 | /** |
||
55 | * Set the method of targeting users - tokens (default), user_ids, or emails. |
||
56 | * |
||
57 | * @param string $profile |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function sendTo($sendTo) |
||
67 | |||
68 | /** |
||
69 | * Set the title. |
||
70 | * |
||
71 | * @param string $title |
||
72 | * |
||
73 | * @return $this |
||
74 | */ |
||
75 | 1 | public function title($title) |
|
81 | |||
82 | /** |
||
83 | * Set the message. |
||
84 | * |
||
85 | * @param string $message |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | 3 | public function message($message) |
|
95 | |||
96 | /** |
||
97 | * Set the security sound to use. |
||
98 | * |
||
99 | * @param string $sound |
||
100 | * |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function sound($sound) |
||
109 | |||
110 | /** |
||
111 | * Send custom key/value data with your notifications. |
||
112 | * |
||
113 | * @param array $payload |
||
114 | * |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function payload($payload) |
||
123 | |||
124 | /** |
||
125 | * Schedule the message for later delivery. |
||
126 | * |
||
127 | * @param string|DateTime $date |
||
128 | * @return $this |
||
129 | */ |
||
130 | public function scheduled($date) |
||
140 | |||
141 | /** |
||
142 | * Dynamically add device specific data. |
||
143 | * |
||
144 | * @param string $method |
||
145 | * @param array $args |
||
146 | * |
||
147 | * @return object |
||
148 | */ |
||
149 | 6 | public function __call($method, $args) |
|
167 | |||
168 | /** |
||
169 | * Get the method we want to use to send messages. |
||
170 | * |
||
171 | * @return string |
||
172 | */ |
||
173 | 3 | public function getSendToType() |
|
177 | |||
178 | /** |
||
179 | * List of allowed Android options. |
||
180 | * |
||
181 | * @return array |
||
182 | */ |
||
183 | 1 | public function allowedAndroidOptions() |
|
200 | |||
201 | /** |
||
202 | * List of allowed iOS options. |
||
203 | * |
||
204 | * @return array |
||
205 | */ |
||
206 | 5 | public function allowediOSOptions() |
|
219 | |||
220 | /** |
||
221 | * @return array |
||
222 | */ |
||
223 | 10 | public function toArray() |
|
258 | } |
||
259 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.