Skip to content

Commit

Permalink
update: 修复输出
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZEX committed Oct 31, 2023
1 parent ca0a48a commit ffa629c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Command/AnnotationMigrationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ($handle->isModified()) {
$output->writeln("Rewrite\t{$item->getRealPath()}");
if (!$isDryRun) {
file_put_contents($item->getRealPath(), $handle->rewriteCode());
if ($isAnnotationRewrite) {
$code = $handle->execPrintStmt();
} else {
$code = $handle->rewriteCode();
}
file_put_contents($item->getRealPath(), $code);
}
} else {
$output->writeln("Skip\t{$item->getRealPath()}");
Expand Down

0 comments on commit ffa629c

Please sign in to comment.