1 | <?php |
||
5 | class IonicPushMessage |
||
6 | { |
||
7 | /** @var string */ |
||
8 | protected $sendTo = 'tokens'; |
||
9 | |||
10 | /** @var string */ |
||
11 | protected $profile; |
||
12 | |||
13 | /** @var string */ |
||
14 | protected $title = ''; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $message = ''; |
||
18 | |||
19 | /** @var string */ |
||
20 | protected $sound = ''; |
||
21 | |||
22 | /** @var array */ |
||
23 | protected $payload = []; |
||
24 | |||
25 | /** @var array */ |
||
26 | protected $iosData = []; |
||
27 | |||
28 | /** @var array */ |
||
29 | protected $androidData = []; |
||
30 | |||
31 | /** |
||
32 | * @param array $data |
||
|
|||
33 | * |
||
34 | * @return static |
||
35 | */ |
||
36 | public static function create($title, $message) |
||
40 | |||
41 | /** |
||
42 | * @param string $title |
||
43 | * @param string $message |
||
44 | */ |
||
45 | public function __construct($title, $message) |
||
50 | |||
51 | /** |
||
52 | * Set the security profile to use. |
||
53 | * |
||
54 | * @param string $profile |
||
55 | * |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function profile($profile) |
||
64 | |||
65 | /** |
||
66 | * Set the method of targeting users - tokens (default), user_ids, or emails. |
||
67 | * |
||
68 | * @param string $profile |
||
69 | * |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function sendTo($sendTo) |
||
78 | |||
79 | /** |
||
80 | * Set the security sound to use. |
||
81 | * |
||
82 | * @param string $sound |
||
83 | * |
||
84 | * @return $this |
||
85 | */ |
||
86 | public function sound($sound) |
||
92 | |||
93 | /** |
||
94 | * Send custom key/value data with your notifications. |
||
95 | * |
||
96 | * @param array $payload |
||
97 | * |
||
98 | * @return $this |
||
99 | */ |
||
100 | public function payload($payload) |
||
106 | |||
107 | /** |
||
108 | * Dynamically add device specific data. |
||
109 | * |
||
110 | * @param string $method |
||
111 | * @param array $args |
||
112 | * |
||
113 | * @return object |
||
114 | */ |
||
115 | public function __call($method, $args) |
||
129 | |||
130 | /** |
||
131 | * Get the method we want to use to send messages. |
||
132 | * |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getSendToType() |
||
139 | |||
140 | /** |
||
141 | * @return array |
||
142 | */ |
||
143 | public function toArray() |
||
168 | } |
||
169 |
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.