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
* 2.8:
Fix Clidumper tests
Enable the fixer enforcing fully-qualified calls for compiler-optimized functions
Apply fixers
Disable the native_constant_invocation fixer until it can be scoped
Update the list of excluded files for the CS fixer
@@ -451,11 +451,11 @@ public function add(Command $command)
451
451
}
452
452
453
453
if (null === $command->getDefinition()) {
454
-
thrownewLogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command)));
454
+
thrownewLogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', \get_class($command)));
455
455
}
456
456
457
457
if (!$command->getName()) {
458
-
thrownewLogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($command)));
458
+
thrownewLogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command)));
459
459
}
460
460
461
461
$this->commands[$command->getName()] = $command;
@@ -552,7 +552,7 @@ public function findNamespace($namespace)
552
552
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
553
553
554
554
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
555
-
if (1 == count($alternatives)) {
555
+
if (1 == \count($alternatives)) {
556
556
$message .= "\n\nDid you mean this?\n";
557
557
} else {
558
558
$message .= "\n\nDid you mean one of these?\n";
@@ -564,8 +564,8 @@ public function findNamespace($namespace)
thrownewCommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces));
570
570
}
571
571
@@ -598,7 +598,7 @@ public function find($name)
598
598
}
599
599
600
600
// if no commands matched or we just matched namespaces
601
-
if (empty($commands) || count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
601
+
if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) {
602
602
if (false !== $pos = strrpos($name, ':')) {
603
603
// check if a namespace exists and contains commands
604
604
$this->findNamespace(substr($name, 0, $pos));
@@ -607,7 +607,7 @@ public function find($name)
607
607
$message = sprintf('Command "%s" is not defined.', $name);
608
608
609
609
if ($alternatives = $this->findAlternatives($name, $allCommands)) {
610
-
if (1 == count($alternatives)) {
610
+
if (1 == \count($alternatives)) {
611
611
$message .= "\n\nDid you mean this?\n";
612
612
} else {
613
613
$message .= "\n\nDid you mean one of these?\n";
@@ -619,18 +619,18 @@ public function find($name)
619
619
}
620
620
621
621
// filter out aliases for commands which are already on the list
@@ -217,15 +217,15 @@ public function run(InputInterface $input, OutputInterface $output)
217
217
$this->initialize($input, $output);
218
218
219
219
if (null !== $this->processTitle) {
220
-
if (function_exists('cli_set_process_title')) {
220
+
if (\function_exists('cli_set_process_title')) {
221
221
if (!@cli_set_process_title($this->processTitle)) {
222
222
if ('Darwin' === PHP_OS) {
223
223
$output->writeln('<comment>Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.</comment>', OutputInterface::VERBOSITY_VERY_VERBOSE);
Copy file name to clipboardExpand all lines: Event/ConsoleErrorEvent.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ public function getError()
51
51
publicfunctionsetError($error)
52
52
{
53
53
if (!$errorinstanceof \Throwable && !$errorinstanceof \Exception) {
54
-
thrownewInvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', is_object($error) ? get_class($error) : gettype($error)));
54
+
thrownewInvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', \is_object($error) ? \get_class($error) : \gettype($error)));
55
55
}
56
56
57
57
$this->error = $error;
@@ -78,6 +78,6 @@ public function setExitCode($exitCode)
0 commit comments