| 1 | <?php |
||
| 5 | class Notification extends Resource |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The endpoint that will hit the API. |
||
| 9 | * |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | public function endpoint() |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Make a GET request to notifications/{id}/notification_items. |
||
| 19 | * @param int $id The resource's id. |
||
| 20 | * |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public function getNotificationItem($id, $page = 1, $per_page = 50) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Make a POST request to notifications/{id}/notification_items. |
||
| 30 | * |
||
| 31 | * @param int $id The resource's id. |
||
| 32 | * @param array. |
||
| 33 | * |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | public function setNotificationItem($id, array $form_params = []) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Make a DELETE request to notifications/{id}/notification_items. |
||
| 43 | * |
||
| 44 | * @param int $id The resource's id. |
||
| 45 | * @param int $item_id The resource's item id. |
||
| 46 | * |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | public function removeNotificationItem($id, $item_Id) |
||
| 53 | } |
||
| 54 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.