From c769166eacd98afb5732b57332e6e5976e7e063b Mon Sep 17 00:00:00 2001 From: F4nniu Date: Sun, 18 Feb 2024 22:09:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20php8=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/console/output/Ask.php | 2 +- library/think/console/output/Descriptor.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/console/output/Ask.php b/library/think/console/output/Ask.php index 3933eb29..7304af90 100644 --- a/library/think/console/output/Ask.php +++ b/library/think/console/output/Ask.php @@ -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(" [%-${width}s] %s", $key, $value)); + $this->output->writeln(sprintf(" [%-{$width}s] %s", $key, $value)); } } diff --git a/library/think/console/output/Descriptor.php b/library/think/console/output/Descriptor.php index 23dc6481..b4d1bc2a 100644 --- a/library/think/console/output/Descriptor.php +++ b/library/think/console/output/Descriptor.php @@ -219,7 +219,7 @@ class Descriptor $width = $this->getColumnWidth($description->getCommands()); foreach ($description->getCommands() as $command) { - $this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options); + $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); $this->writeText("\n"); } } else {