1 | <?php |
||
12 | abstract class AbstractRequest extends BaseAbstractRequest |
||
13 | { |
||
14 | /** |
||
15 | * Default API version |
||
16 | */ |
||
17 | const DEFAULT_VERSION = '2016-05-19'; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $endpoint = 'https://gateway.watsonplatform.net/tone-analyzer/api/v3'; |
||
23 | |||
24 | /** |
||
25 | * Get API version |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | public function getVersion() |
||
33 | |||
34 | /** |
||
35 | * Set API version |
||
36 | * |
||
37 | * @param string $value |
||
38 | * @return $this |
||
39 | */ |
||
40 | public function setVersion($value) |
||
44 | |||
45 | /** |
||
46 | * Get request text to analyze |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getText() |
||
54 | |||
55 | /** |
||
56 | * Set request text to analyze |
||
57 | * |
||
58 | * @param string $value |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function setText($value) |
||
65 | } |
||
66 |
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.