File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,13 @@ protected function normalize($data)
7070 return $ data ;
7171 }
7272
73- if (is_array ($ data ) || $ data instanceof \Traversable ) {
73+ if (is_array ($ data )) {
7474 $ normalized = array ();
7575
7676 $ count = 1 ;
77- if ($ data instanceof \Generator && !$ data ->valid ()) {
78- return array ('... ' => 'Generator is already consumed, aborting ' );
79- }
80-
8177 foreach ($ data as $ key => $ value ) {
8278 if ($ count ++ >= 1000 ) {
83- $ normalized ['... ' ] = 'Over 1000 items ( ' .( $ data instanceof \Generator ? ' generator function ' : count ($ data ).' total ' ). ' ), aborting normalization ' ;
79+ $ normalized ['... ' ] = 'Over 1000 items ( ' .count ($ data ).' total), aborting normalization ' ;
8480 break ;
8581 }
8682 $ normalized [$ key ] = $ this ->normalize ($ value );
You can’t perform that action at this time.
0 commit comments