Skip to content

Commit

Permalink
less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed May 31, 2024
1 parent 38e3315 commit c3295b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Command/PrivatizeConstantsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private function privatizeClassConstants(array $phpFileInfos): void
{
$this->symfonyStyle->note(sprintf('Found %d PHP files, turning constants to private', count($phpFileInfos)));

$this->symfonyStyle->title('Files with privatized constants');
$privatizedFileCount = 0;

foreach ($phpFileInfos as $phpFileInfo) {
$originalFileContent = $phpFileInfo->getContents();
Expand All @@ -135,10 +135,10 @@ private function privatizeClassConstants(array $phpFileInfos): void
}

FileSystem::write($phpFileInfo->getRealPath(), $fileContent);
$this->symfonyStyle->writeln(' * ' . PathHelper::relativeToCwd($phpFileInfo->getRealPath()));
++$privatizedFileCount;
}

$this->symfonyStyle->newLine();
$this->symfonyStyle->success(sprintf('Constants in %d files turned to private', $privatizedFileCount));
}

private function makeClassConstantsPrivate(string $fileContents): string
Expand Down

0 comments on commit c3295b7

Please sign in to comment.