File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,10 +353,10 @@ public function migrate(): void
353353
354354 if ($ this ->validateBeforeMigrating ) {
355355 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 ();
360360 }
361361
362362 for ($ page = 1 ; $ page < PHP_INT_MAX ; $ page ++) {
@@ -370,10 +370,12 @@ public function migrate(): void
370370 $ dataRow ->validate ($ this ->validationRules );
371371 }
372372
373- $ this ->advanceProgressBar ();
373+ if (isset ($ progressBar )) {
374+ $ progressBar ->advance ()->display ();
375+ }
374376 }
375377
376- if ($ this -> showProgressBar ) {
378+ if (isset ( $ progressBar ) ) {
377379 $ this ->progressBar ->complete ();
378380 }
379381 }
You can’t perform that action at this time.
0 commit comments