1 | <?php |
||
10 | class Nexmo extends Driver |
||
11 | { |
||
12 | /** |
||
13 | * Settings. |
||
14 | * |
||
15 | * @var object |
||
16 | */ |
||
17 | protected $settings; |
||
18 | |||
19 | /** |
||
20 | * Client. |
||
21 | * |
||
22 | * @var Client |
||
23 | */ |
||
24 | protected $client; |
||
25 | |||
26 | /** |
||
27 | * Construct the class with the relevant settings. |
||
28 | * |
||
29 | * SendSmsInterface constructor. |
||
30 | * @param $settings object |
||
31 | */ |
||
32 | public function __construct($settings) |
||
39 | |||
40 | /** |
||
41 | * Send text message and return response. |
||
42 | * |
||
43 | * @return object |
||
44 | */ |
||
45 | public function send() |
||
55 | } |
||
56 |
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
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.