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 | * @param array $data |
||
|
|||
34 | * |
||
35 | * @return static |
||
36 | */ |
||
37 | public static function create($title, $message) |
||
41 | |||
42 | /** |
||
43 | * @param string $title |
||
44 | * @param string $message |
||
45 | */ |
||
46 | public function __construct($title, $message) |
||
51 | |||
52 | /** |
||
53 | * Set the security profile to use. |
||
54 | * |
||
55 | * @param string $profile |
||
56 | * |
||
57 | * @return $this |
||
58 | */ |
||
59 | public function profile($profile) |
||
65 | |||
66 | /** |
||
67 | * Set the method of targeting users - tokens (default), user_ids, or emails. |
||
68 | * |
||
69 | * @param string $profile |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | 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) |
||
93 | |||
94 | /** |
||
95 | * Send custom key/value data with your notifications. |
||
96 | * |
||
97 | * @param array $payload |
||
98 | * |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function payload($payload) |
||
107 | |||
108 | /** |
||
109 | * Dynamically add query parameters or call API endpoints. |
||
110 | * |
||
111 | * @param string $method |
||
112 | * @param array $args |
||
113 | * |
||
114 | * @return object |
||
115 | */ |
||
116 | public function __call($method, $args) |
||
130 | |||
131 | /** |
||
132 | * @return array |
||
133 | */ |
||
134 | public function toArray() |
||
138 | } |
||
139 |
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.