Skip to content

Commit 704abed

Browse files
jorritAthari
authored andcommitted
Add iterable to allowed input parameters for from()
iterable is an alias for array and Traversable, which are already allowed
1 parent b461ce7 commit 704abed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

YaLinqo/EnumerableGeneration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static function emptyEnum(): Enumerable
6464
* <li><b>IteratorAggregate</b>: Enumerable from Iterator returned from getIterator() method;
6565
* <li><b>Traversable</b>: Enumerable from the result of foreach over source.
6666
* </ul>
67-
* @param array|\Iterator|\IteratorAggregate|\Traversable|Enumerable $source Value to convert into Enumerable sequence.
67+
* @param array|\Iterator|\IteratorAggregate|\Traversable|Enumerable|iterable $source Value to convert into Enumerable sequence.
6868
* @throws \InvalidArgumentException If source is not array or Traversible or Enumerable.
6969
* @return Enumerable
7070
* @package YaLinqo\Generation
@@ -284,4 +284,4 @@ public static function split(string $subject, string $pattern, int $flags = 0):
284284
false
285285
);
286286
}
287-
}
287+
}

YaLinqo/Linq.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
if (!function_exists('from')) {
1414
/**
1515
* Create Enumerable from an array or any other traversible source.
16-
* @param array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable $source
16+
* @param array|\Iterator|\IteratorAggregate|\YaLinqo\Enumerable|iterable $source
1717
* @throws \InvalidArgumentException If source is not array or Traversible or Enumerable.
1818
* @return \YaLinqo\Enumerable
1919
* @see \YaLinqo\Enumerable::from
@@ -22,4 +22,4 @@ function from($source): \YaLinqo\Enumerable
2222
{
2323
return \YaLinqo\Enumerable::from($source);
2424
}
25-
}
25+
}

0 commit comments

Comments
 (0)