1 | <?php |
||
14 | class RssReader extends XmlReader { |
||
15 | public $title; |
||
16 | public $link; |
||
17 | public $description; |
||
18 | public $generator; |
||
19 | public $docs; |
||
20 | public $language; |
||
21 | public $pubDate; |
||
22 | public $lastBuildDate; |
||
23 | private $items = array(); |
||
24 | |||
25 | 1 | public function getItems() { |
|
28 | |||
29 | 1 | public function setItems($aItems) { |
|
32 | |||
33 | 1 | public function addItem(RssItem $oElement) { |
|
36 | |||
37 | /** |
||
38 | * @param integer $iIndex |
||
39 | * @return Base |
||
40 | */ |
||
41 | 1 | public function getItem($iIndex) { |
|
48 | |||
49 | 1 | public function buildObj() { |
|
57 | |||
58 | /** |
||
59 | * @param \DOMNodeList $aChildNodes |
||
60 | */ |
||
61 | 1 | public function parseToEntity($aChildNodes) { |
|
80 | } |
||
81 |
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.