File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -353,10 +353,10 @@ public function migrate(): void
353
353
354
354
if ($ this ->validateBeforeMigrating ) {
355
355
if ($ this ->showProgressBar ) {
356
- $ this -> progressBar = new ProgressBar ();
357
- $ this -> progressBar ->setMessage ('Validating... ' );
358
- $ this -> progressBar ->setMaxProgress ($ this ->source ->countPages () * count ($ this ->destinationContainers ));
359
- $ this -> progressBar ->display ();
356
+ $ progressBar = new ProgressBar ();
357
+ $ progressBar ->setMessage ('Validating... ' );
358
+ $ progressBar ->setMaxProgress ($ this ->source ->countPages () * count ($ this ->destinationContainers ));
359
+ $ progressBar ->display ();
360
360
}
361
361
362
362
for ($ page = 1 ; $ page < PHP_INT_MAX ; $ page ++) {
@@ -370,10 +370,12 @@ public function migrate(): void
370
370
$ dataRow ->validate ($ this ->validationRules );
371
371
}
372
372
373
- $ this ->advanceProgressBar ();
373
+ if (isset ($ progressBar )) {
374
+ $ progressBar ->advance ()->display ();
375
+ }
374
376
}
375
377
376
- if ($ this -> showProgressBar ) {
378
+ if (isset ( $ progressBar ) ) {
377
379
$ this ->progressBar ->complete ();
378
380
}
379
381
}
You can’t perform that action at this time.
0 commit comments