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 | |||
23 | /** @var array */ |
||
24 | protected $payload = []; |
||
25 | |||
26 | /** @var array */ |
||
27 | protected $iosData = []; |
||
28 | |||
29 | /** @var array */ |
||
30 | protected $androidData = []; |
||
31 | |||
32 | |||
33 | |||
34 | /** |
||
35 | * @param array $data |
||
|
|||
36 | * |
||
37 | * @return static |
||
38 | */ |
||
39 | public static function create($title, $message) |
||
43 | |||
44 | /** |
||
45 | * @param string $title |
||
46 | * @param string $message |
||
47 | */ |
||
48 | public function __construct($title, $message) |
||
53 | |||
54 | /** |
||
55 | * Set the security profile to use. |
||
56 | * |
||
57 | * @param string $profile |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function profile($profile) |
||
66 | |||
67 | /** |
||
68 | * Set the method of targeting users - tokens (default), user_ids, or emails. |
||
69 | * |
||
70 | * @param string $profile |
||
71 | * |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function sendTo($sendTo) |
||
79 | |||
80 | /** |
||
81 | * Set the security sound to use. |
||
82 | * |
||
83 | * @param string $sound |
||
84 | * |
||
85 | * @return $this |
||
86 | */ |
||
87 | 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) |
||
105 | |||
106 | |||
107 | /** |
||
108 | * Dynamically add query parameters or call API endpoints. |
||
109 | * |
||
110 | * @param string $method |
||
111 | * @param array $args |
||
112 | * |
||
113 | * @return object |
||
114 | */ |
||
115 | public function __call($method, $args) |
||
128 | |||
129 | /** |
||
130 | * @return array |
||
131 | */ |
||
132 | public function toArray() |
||
136 | } |
||
137 |
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.