fix: 优化 php8 兼容

This commit is contained in:
F4nniu
2024-02-18 22:09:20 +08:00
parent d0f6422a57
commit c769166eac
2 changed files with 2 additions and 2 deletions

View File

@@ -299,7 +299,7 @@ class Ask
$width = max(array_map('strlen', array_keys($this->question->getChoices())));
foreach ($this->question->getChoices() as $key => $value) {
$this->output->writeln(sprintf(" [<comment>%-${width}s</comment>] %s", $key, $value));
$this->output->writeln(sprintf(" [<comment>%-{$width}s</comment>] %s", $key, $value));
}
}