File tree Expand file tree Collapse file tree 4 files changed +12
-4
lines changed
Expand file tree Collapse file tree 4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public function __construct(
2727
2828 public function load (): \Generator
2929 {
30- $ line = yield ;
30+ $ line = yield new EmptyResultBucket () ;
3131 try {
3232 $ this ->writer ->addRow (
3333 new Row (array_map (fn ($ value ) => new Cell ($ value ), array_keys ($ line )), null )
@@ -41,6 +41,7 @@ public function load(): \Generator
4141 );
4242 }
4343
44+ /* @phpstan-ignore-next-line */
4445 while (true ) {
4546 try {
4647 $ this ->writer ->addRow (
@@ -53,6 +54,7 @@ public function load(): \Generator
5354 $ exception ,
5455 $ line
5556 );
57+ continue ;
5658 }
5759
5860 $ line = yield new AcceptanceResultBucket ($ line );
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ public function load(): \Generator
4242 );
4343 }
4444
45- while ($ line ) {
45+ /* @phpstan-ignore-next-line */
46+ while (true ) {
4647 try {
4748 $ this ->writer ->addRow ($ this ->orderColumns ($ headers , $ line ));
4849 } catch (IOException |WriterNotOpenedException $ exception ) {
@@ -52,6 +53,7 @@ public function load(): \Generator
5253 $ exception ,
5354 $ line
5455 );
56+ continue ;
5557 }
5658
5759 $ line = yield new AcceptanceResultBucket ($ line );
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ public function load(): \Generator
4646 );
4747 }
4848
49- while ($ line ) {
49+ /* @phpstan-ignore-next-line */
50+ while (true ) {
5051 try {
5152 $ this ->writer ->addRow (
5253 new Row (array_map (fn ($ value ) => new Cell ($ value ), $ line ), null )
@@ -58,6 +59,7 @@ public function load(): \Generator
5859 $ exception ,
5960 $ line
6061 );
62+ continue ;
6163 }
6264
6365 $ line = yield new AcceptanceResultBucket ($ line );
Original file line number Diff line number Diff line change @@ -46,7 +46,8 @@ public function load(): \Generator
4646 );
4747 }
4848
49- while ($ line ) {
49+ /* @phpstan-ignore-next-line */
50+ while (true ) {
5051 try {
5152 $ this ->writer ->addRow ($ this ->orderColumns ($ headers , $ line ));
5253 } catch (IOException |WriterNotOpenedException $ exception ) {
@@ -56,6 +57,7 @@ public function load(): \Generator
5657 $ exception ,
5758 $ line
5859 );
60+ continue ;
5961 }
6062
6163 $ line = yield new AcceptanceResultBucket ($ line );
You can’t perform that action at this time.
0 commit comments