1 | <?php |
||
11 | trait ChainTrait |
||
12 | { |
||
13 | /** |
||
14 | * Returns an iterator that returns elements from the first iterable |
||
15 | * until it is exhausted, then proceeds to the next iterable, until |
||
16 | * all the iterables are exhausted. |
||
17 | * |
||
18 | * Used for creating consecutive sequences as a single sequence. |
||
19 | * |
||
20 | * Note that the keys of the returned ChainIterator follow 0, 1, etc, |
||
21 | * regardless of the keys given in the iterables. |
||
22 | * |
||
23 | * > iter\iterable([1, 2, 3], [4, 5, 6])->chain() |
||
24 | * 1 2 3 4 5 6 |
||
25 | * |
||
26 | * > iter\iterable('ABC', 'DEF')->chain() |
||
27 | * A B C D E F |
||
28 | * |
||
29 | * @param array|string|\Iterator $iterable |
||
|
|||
30 | * @param array|string|\Iterator $iterable2 |
||
31 | * @return iter\lib\ChainIterator |
||
32 | */ |
||
33 | 2 | public function chain(/* $iterable, $iterable2, ... */) |
|
37 | } |
||
38 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.