You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -561,7 +561,7 @@ public function add(Command $command)
561
561
}
562
562
563
563
if (!$command->getName()) {
564
-
thrownewLogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command)));
564
+
thrownewLogicException(\sprintf('The command defined in "%s" cannot have an empty name.', get_debug_type($command)));
565
565
}
566
566
567
567
$this->commands[$command->getName()] = $command;
@@ -585,12 +585,12 @@ public function get(string $name)
585
585
$this->init();
586
586
587
587
if (!$this->has($name)) {
588
-
thrownewCommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
588
+
thrownewCommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
589
589
}
590
590
591
591
// When the command has a different name than the one used at the command loader level
592
592
if (!isset($this->commands[$name])) {
593
-
thrownewCommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
593
+
thrownewCommandNotFoundException(\sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name));
594
594
}
595
595
596
596
$command = $this->commands[$name];
@@ -654,7 +654,7 @@ public function findNamespace(string $namespace): string
thrownewNamespaceNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
674
+
thrownewNamespaceNotFoundException(\sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
675
675
}
676
676
677
677
return$exact ? $namespace : reset($namespaces);
@@ -720,7 +720,7 @@ public function find(string $name)
720
720
$this->findNamespace(substr($name, 0, $pos));
721
721
}
722
722
723
-
$message = sprintf('Command "%s" is not defined.', $name);
723
+
$message = \sprintf('Command "%s" is not defined.', $name);
724
724
725
725
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
726
726
// remove hidden commands
@@ -775,14 +775,14 @@ public function find(string $name)
thrownewCommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
778
+
thrownewCommandNotFoundException(\sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands));
779
779
}
780
780
}
781
781
782
782
$command = $this->get(reset($commands));
783
783
784
784
if ($command->isHidden()) {
785
-
thrownewCommandNotFoundException(sprintf('The command "%s" does not exist.', $name));
785
+
thrownewCommandNotFoundException(\sprintf('The command "%s" does not exist.', $name));
786
786
}
787
787
788
788
return$command;
@@ -857,7 +857,7 @@ public function renderThrowable(\Throwable $e, OutputInterface $output): void
return$this->definition ?? thrownewLogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
449
+
return$this->definition ?? thrownewLogicException(\sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class));
450
450
}
451
451
452
452
/**
@@ -464,7 +464,7 @@ public function addArgument(string $name, ?int $mode = null, string $description
@@ -676,7 +676,7 @@ public function getSynopsis(bool $short = false): string
676
676
publicfunctionaddUsage(string$usage): static
677
677
{
678
678
if (!str_starts_with($usage, $this->name)) {
679
-
$usage = sprintf('%s %s', $this->name, $usage);
679
+
$usage = \sprintf('%s %s', $this->name, $usage);
680
680
}
681
681
682
682
$this->usages[] = $usage;
@@ -703,7 +703,7 @@ public function getUsages(): array
703
703
publicfunctiongetHelper(string$name): mixed
704
704
{
705
705
if (null === $this->helperSet) {
706
-
thrownewLogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
706
+
thrownewLogicException(\sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name));
707
707
}
708
708
709
709
return$this->helperSet->get($name);
@@ -719,7 +719,7 @@ public function getHelper(string $name): mixed
719
719
privatefunctionvalidateName(string$name): void
720
720
{
721
721
if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) {
722
-
thrownewInvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
722
+
thrownewInvalidArgumentException(\sprintf('Command name "%s" is invalid.', $name));
if ($version && version_compare($version, self::COMPLETION_API_VERSION, '<')) {
88
-
$message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
88
+
$message = \sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION);
89
89
$this->log($message);
90
90
91
91
$output->writeln($message.' Install the Symfony completion script again by using the "completion" command.');
@@ -99,7 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
99
99
}
100
100
101
101
if (!$completionOutput = $this->completionOutputs[$shell] ?? false) {
102
-
thrownew \RuntimeException(sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
102
+
thrownew \RuntimeException(\sprintf('Shell completion is not supported for your shell: "%s" (supported: "%s").', $shell, implode('", "', array_keys($this->completionOutputs))));
Copy file name to clipboardExpand all lines: Command/DumpCompletionCommand.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -108,9 +108,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
108
108
$output = $output->getErrorOutput();
109
109
}
110
110
if ($shell) {
111
-
$output->writeln(sprintf('<error>Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").</>', $shell, implode('", "', $supportedShells)));
111
+
$output->writeln(\sprintf('<error>Detected shell "%s", which is not supported by Symfony shell completion (supported shells: "%s").</>', $shell, implode('", "', $supportedShells)));
112
112
} else {
113
-
$output->writeln(sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', implode('", "', $supportedShells)));
113
+
$output->writeln(\sprintf('<error>Shell not detected, Symfony shell completion only supports "%s").</>', implode('", "', $supportedShells)));
0 commit comments