| 1 | <?php |
||
| 5 | abstract class StaticCollection implements CollectionInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | protected $set; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | 12 | protected $position = 0; |
|
| 16 | |||
| 17 | 12 | /** |
|
| 18 | * @return array |
||
| 19 | */ |
||
| 20 | public function all() |
||
| 24 | |||
| 25 | 37 | /** |
|
| 26 | * @param int $start |
||
| 27 | * @param int $length |
||
| 28 | * @return self |
||
| 29 | */ |
||
| 30 | public function slice($start, $length) |
||
| 40 | |||
| 41 | 103 | /** |
|
| 42 | 103 | * @return int |
|
| 43 | */ |
||
| 44 | public function count() |
||
| 48 | |||
| 49 | 3 | /** |
|
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function bottom() |
||
| 56 | |||
| 57 | 39 | /** |
|
| 58 | * @return bool |
||
| 59 | */ |
||
| 60 | public function isNull() |
||
| 64 | |||
| 65 | 102 | /** |
|
| 66 | 102 | * @return void |
|
| 67 | */ |
||
| 68 | public function rewind() |
||
| 72 | |||
| 73 | 103 | /** |
|
| 74 | * @return mixed |
||
| 75 | */ |
||
| 76 | public function current() |
||
| 80 | 30 | ||
| 81 | /** |
||
| 82 | 30 | * @return int |
|
| 83 | */ |
||
| 84 | public function key() |
||
| 88 | 3 | ||
| 89 | /** |
||
| 90 | 3 | * @return void |
|
| 91 | */ |
||
| 92 | public function next() |
||
| 96 | |||
| 97 | 12 | /** |
|
| 98 | * @return bool |
||
| 99 | 12 | */ |
|
| 100 | 6 | public function valid() |
|
| 104 | |||
| 105 | /** |
||
| 106 | * @param int $offset |
||
| 107 | * @return bool |
||
| 108 | */ |
||
| 109 | 6 | public function offsetExists($offset) |
|
| 113 | |||
| 114 | /** |
||
| 115 | * @param int $offset |
||
| 116 | */ |
||
| 117 | public function offsetUnset($offset) |
||
| 121 | |||
| 122 | /** |
||
| 123 | * @param int $offset |
||
| 124 | * @return mixed |
||
| 125 | */ |
||
| 126 | public function offsetGet($offset) |
||
| 134 | |||
| 135 | /** |
||
| 136 | * @param int $offset |
||
| 137 | * @param mixed $value |
||
| 138 | */ |
||
| 139 | public function offsetSet($offset, $value) |
||
| 143 | } |
||
| 144 |
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.