File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 5
5
use ArrayIterator ;
6
6
use Closure ;
7
7
use DateTimeInterface ;
8
- use Generator ;
9
8
use Illuminate \Support \Traits \EnumeratesValues ;
10
9
use Illuminate \Support \Traits \Macroable ;
11
10
use IteratorAggregate ;
@@ -30,7 +29,7 @@ class LazyCollection implements Enumerable
30
29
*/
31
30
public function __construct ($ source = null )
32
31
{
33
- if ($ source instanceof Closure || $ source instanceof Generator || $ source instanceof self) {
32
+ if ($ source instanceof Closure || $ source instanceof self) {
34
33
$ this ->source = $ source ;
35
34
} elseif (is_null ($ source )) {
36
35
$ this ->source = static ::empty ();
@@ -1365,10 +1364,6 @@ public function count()
1365
1364
*/
1366
1365
protected function makeIterator ($ source )
1367
1366
{
1368
- if ($ source instanceof Generator) {
1369
- return $ source ;
1370
- }
1371
-
1372
1367
if ($ source instanceof IteratorAggregate) {
1373
1368
return $ source ->getIterator ();
1374
1369
}
You can’t perform that action at this time.
0 commit comments