diff --git a/src/Command/AnalyzeCommand.php b/src/Command/AnalyzeCommand.php index 4135991..dd734be 100644 --- a/src/Command/AnalyzeCommand.php +++ b/src/Command/AnalyzeCommand.php @@ -45,7 +45,7 @@ protected function configure() )->addOption( 'git', null, - InputOption::VALUE_OPTIONAL, + InputOption::VALUE_NONE, 'All files added to git index will be analyze.' ); } @@ -91,7 +91,10 @@ protected function execute(InputInterface $input, OutputInterface $output) $files = $input->getOption('files'); - $git = $input->getOption('git'); + $git = false; + if ($input->hasOption('git')) { + $git = $input->getOption('git'); + } if ($files && $git) { throw new \Exception('Options `files` and `git` can not used in combination.');