Skip to content

Commit

Permalink
code quality 70
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi committed Jul 17, 2024
1 parent c66da63 commit a433f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct(
$this->progressIndicator = new ProgressIndicator($this->io, 'very_verbose');
}

private static function formatTime(\DateTimeInterface $time): string
private function formatTime(\DateTimeInterface $time): string
{
return $time->format('Y-m-d H:i:s T');
}
Expand All @@ -68,7 +68,7 @@ public function beforeProcess(BeforeProcessEvent $event): void
$this->io->success('Starting batch process');

$this->io->definitionList(
['Start time' => self::formatTime($this->startTime)],
['Start time' => $this->formatTime($this->startTime)],
['Start page' => $event->getStartPageIdentifier() ?? '(first page)'],
['Progress file' => $this->progressFile ?? '(not used)'],
['Items per page' => $event->getPageable()->getItemsPerPage()],
Expand Down Expand Up @@ -209,13 +209,13 @@ private function showStats(AfterPageEvent|AfterProcessEvent|InterruptEvent|TimeL
$stats = [];

if ($this->startTime !== null) {
$stats[] = ['Start time' => self::formatTime($this->startTime)];
$stats[] = ['Start time' => $this->formatTime($this->startTime)];
}

if ($event instanceof AfterPageEvent) {
$stats[] = ['Current time' => self::formatTime(new \DateTimeImmutable())];
$stats[] = ['Current time' => $this->formatTime(new \DateTimeImmutable())];
} else {
$stats[] = ['End time' => self::formatTime(new \DateTimeImmutable())];
$stats[] = ['End time' => $this->formatTime(new \DateTimeImmutable())];
}

if ($processDuration !== null) {
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
->withRules([
// AddOverrideAttributeToOverriddenMethodsRector::class
])
->withCodeQualityLevel(59)
->withCodeQualityLevel(75)
->withSkip([
SimplifyUselessVariableRector::class => [
// used for demo
Expand Down

0 comments on commit a433f16

Please sign in to comment.