This repository was archived by the owner on Dec 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public static function toArray($src)
41
41
if (is_array ($ src )) {
42
42
return $ src ;
43
43
}
44
- while ($ src instanceof \IteratorAggregate) {
44
+ if ($ src instanceof \IteratorAggregate) {
45
45
$ src = $ src ->getIterator ();
46
46
}
47
47
if ($ src instanceof \ArrayIterator) {
@@ -76,7 +76,7 @@ public static function toList($src)
76
76
if (is_array ($ src )) {
77
77
return array_values ($ src );
78
78
}
79
- while ($ src instanceof \IteratorAggregate) {
79
+ if ($ src instanceof \IteratorAggregate) {
80
80
$ src = $ src ->getIterator ();
81
81
}
82
82
if ($ src instanceof \ArrayIterator) {
@@ -111,7 +111,7 @@ public static function count($src)
111
111
if (is_array ($ src )) {
112
112
return count ($ src );
113
113
}
114
- while ($ src instanceof \IteratorAggregate) {
114
+ if ($ src instanceof \IteratorAggregate) {
115
115
$ src = $ src ->getIterator ();
116
116
}
117
117
if ($ src instanceof \Countable) {
@@ -134,7 +134,7 @@ public static function isEmpty($src)
134
134
if (is_array ($ src )) {
135
135
return empty ($ src );
136
136
}
137
- while ($ src instanceof \IteratorAggregate) {
137
+ if ($ src instanceof \IteratorAggregate) {
138
138
$ src = $ src ->getIterator ();
139
139
}
140
140
if ($ src instanceof \Countable) {
You can’t perform that action at this time.
0 commit comments