Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/Console/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ final class ConsoleApplication extends Application
/**
* @param Command[] $commands
*/
public function __construct(array $commands, private readonly SymfonyStyle $symfonyStyle)
{
public function __construct(
array $commands,
private readonly SymfonyStyle $symfonyStyle
) {
parent::__construct(self::NAME, VersionResolver::PACKAGE_VERSION);

Assert::notEmpty($commands);
Expand Down Expand Up @@ -66,7 +68,8 @@ public function doRun(InputInterface $input, OutputInterface $output): int
// bin/rector src
// bin/rector --only "RemovePhpVersionIdCheckRector"
// file_exists() can check directory and file
if ((file_exists($commandName) || isset($_SERVER['argv'][1])
if ((
file_exists($commandName) || isset($_SERVER['argv'][1])
&& $commandName !== $_SERVER['argv'][1]
// ensure verify has parameter option, eg: --only
&& $input->hasParameterOption($_SERVER['argv'][1])
Expand Down