@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @internal |
34 | - * @param \Closure|\Iterator $iterator |
|
34 | + * @param \Closure $iterator |
|
35 | 35 | * @param bool $isClosure |
36 | 36 | */ |
37 | 37 | private function __construct($iterator, $isClosure = true) |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | * <p>Three methods are defined to extend the type {@link OrderedEnumerable}, which is the return type of this method. These three methods, namely {@link OrderedEnumerable::thenBy thenBy}, {@link OrderedEnumerable::thenByDescending thenByDescending} and {@link OrderedEnumerable::thenByDir thenByDir}, enable you to specify additional sort criteria to sort a sequence. These methods also return an OrderedEnumerable, which means any number of consecutive calls to thenBy, thenByDescending or thenByDir can be made. |
214 | 214 | * <p>Because OrderedEnumerable inherits from Enumerable, you can call {@link orderBy}, {@link orderByDescending} or {@link orderByDir} on the results of a call to orderBy, orderByDescending, orderByDir, thenBy, thenByDescending or thenByDir. Doing this introduces a new primary ordering that ignores the previously established ordering. |
215 | 215 | * <p>This method performs an unstable sort; that is, if the keys of two elements are equal, the order of the elements is not preserved. In contrast, a stable sort preserves the order of elements that have the same key. Internally, {@link usort} is used. |
216 | - * @param int|bool $sortOrder A direction in which to order the elements: false or SORT_DESC for ascending (by increasing value), true or SORT_ASC for descending (by decreasing value). |
|
216 | + * @param boolean $sortOrder A direction in which to order the elements: false or SORT_DESC for ascending (by increasing value), true or SORT_ASC for descending (by decreasing value). |
|
217 | 217 | * @param callable|null $keySelector {(v, k) ==> key} A function to extract a key from an element. Default: value. |
218 | 218 | * @param callable|int|null $comparer {(a, b) ==> diff} Difference between a and b: <0 if a<b; 0 if a==b; >0 if a>b. Can also be a combination of SORT_ flags. |
219 | 219 | * @return OrderedEnumerable |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | |
921 | 921 | /** |
922 | 922 | * Proc for {@link toArrayDeep}. |
923 | - * @param $enum \Traversable Source sequence. |
|
923 | + * @param Enumerable $enum \Traversable Source sequence. |
|
924 | 924 | * @return array An array that contains the elements from the input sequence. |
925 | 925 | * @package YaLinqo\Conversion |
926 | 926 | */ |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | |
971 | 971 | /** |
972 | 972 | * Proc for {@link toListDeep}. |
973 | - * @param $enum \Traversable Source sequence. |
|
973 | + * @param Enumerable $enum \Traversable Source sequence. |
|
974 | 974 | * @return array An array that contains the elements from the input sequence. |
975 | 975 | * @package YaLinqo\Conversion |
976 | 976 | */ |
@@ -140,7 +140,7 @@ |
||
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Increment function: returns incremental integers starting from 0. |
143 | - * @return callable |
|
143 | + * @return \Closure |
|
144 | 144 | */ |
145 | 145 | public static function increment() |
146 | 146 | { |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | * <p>If source contains fewer than count elements, an empty sequence is returned. If count is less than or equal to zero, all elements of source are yielded. |
395 | 395 | * <p>The {@link take} and skip methods are functional complements. Given a sequence coll and an integer n, concatenating the results of coll->take(n) and coll->skip(n) yields the same sequence as coll. |
396 | 396 | * @param int $count The number of elements to skip before returning the remaining elements. |
397 | - * @return Enumerable A sequence that contains the elements that occur after the specified index in the input sequence. |
|
397 | + * @return EnumerablePagination A sequence that contains the elements that occur after the specified index in the input sequence. |
|
398 | 398 | * @package YaLinqo\Pagination |
399 | 399 | */ |
400 | 400 | public function skip(int $count) |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | * <p>This method tests each element of source by using predicate and skips the element if the result is true. After the predicate function returns false for an element, that element and the remaining elements in source are yielded and there are no more invocations of predicate. If predicate returns true for all elements in the sequence, an empty sequence is returned. |
418 | 418 | * <p>The {@link takeWhile} and skipWhile methods are functional complements. Given a sequence coll and a pure function p, concatenating the results of coll->takeWhile(p) and coll->skipWhile(p) yields the same sequence as coll. |
419 | 419 | * @param callable $predicate {(v, k) ==> result} A function to test each element for a condition. |
420 | - * @return Enumerable A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. |
|
420 | + * @return EnumerablePagination A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. |
|
421 | 421 | * @package YaLinqo\Pagination |
422 | 422 | */ |
423 | 423 | public function skipWhile($predicate) |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | * <p>Take enumerates source and yields elements until count elements have been yielded or source contains no more elements. If count is less than or equal to zero, source is not enumerated and an empty sequence is returned. |
442 | 442 | * <p>The take and {@link skip} methods are functional complements. Given a sequence coll and an integer n, concatenating the results of coll->take(n) and coll->skip(n) yields the same sequence as coll. |
443 | 443 | * @param int $count The number of elements to return. |
444 | - * @return Enumerable A sequence that contains the specified number of elements from the start of the input sequence. |
|
444 | + * @return EnumerablePagination A sequence that contains the specified number of elements from the start of the input sequence. |
|
445 | 445 | * @package YaLinqo\Pagination |
446 | 446 | */ |
447 | 447 | public function take(int $count) |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | * <p>The takeWhile method tests each element of source by using predicate and yields the element if the result is true. Enumeration stops when the predicate function returns false for an element or when source contains no more elements. |
465 | 465 | * <p>The takeWhile and {@link skipWhile} methods are functional complements. Given a sequence coll and a pure function p, concatenating the results of coll->takeWhile(p) and coll->skipWhile(p) yields the same sequence as coll. |
466 | 466 | * @param callable $predicate {(v, k) ==> result} A function to test each element for a condition. |
467 | - * @return Enumerable A sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. |
|
467 | + * @return EnumerablePagination A sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. |
|
468 | 468 | * @package YaLinqo\Pagination |
469 | 469 | */ |
470 | 470 | public function takeWhile($predicate) |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * <p>Three methods are defined to extend the type OrderedEnumerable, which is the return type of this method. These three methods, namely {@link thenBy}, {@link thenByDescending} and {@link thenByDir}, enable you to specify additional sort criteria to sort a sequence. These methods also return an OrderedEnumerable, which means any number of consecutive calls to thenBy, thenByDescending or thenByDir can be made. |
66 | 66 | * <p>Because OrderedEnumerable inherits from {@link Enumerable}, you can call {@link Enumerable::orderBy orderBy}, {@link Enumerable::orderByDescending orderByDescending} or {@link Enumerable::orderByDir orderByDir} on the results of a call to orderBy, orderByDescending, orderByDir, thenBy, thenByDescending or thenByDir. Doing this introduces a new primary ordering that ignores the previously established ordering. |
67 | 67 | * <p>This method performs an unstable sort; that is, if the keys of two elements are equal, the order of the elements is not preserved. In contrast, a stable sort preserves the order of elements that have the same key. Internally, {@link usort} is used. |
68 | - * @param int|bool $sortOrder A direction in which to order the elements: false or SORT_DESC for ascending (by increasing value), true or SORT_ASC for descending (by decreasing value). |
|
68 | + * @param boolean $sortOrder A direction in which to order the elements: false or SORT_DESC for ascending (by increasing value), true or SORT_ASC for descending (by decreasing value). |
|
69 | 69 | * @param callable|null $keySelector {(v, k) ==> key} A function to extract a key from an element. Default: value. |
70 | 70 | * @param callable|int|null $comparer {(a, b) ==> diff} Difference between a and b: <0 if a<b; 0 if a==b; >0 if a>b. Can also be a combination of SORT_ flags. |
71 | 71 | * @return \YaLinqo\OrderedEnumerable |