From 2695f3db7b0d5cc0236c6e79f43b62e96925db9a Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Sun, 26 Jul 2015 03:18:23 -0700 Subject: [PATCH 1/2] Update git InputOption definiton --- src/Command/AnalyzeCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/AnalyzeCommand.php b/src/Command/AnalyzeCommand.php index 4135991..02e00ef 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.' ); } From bf65a1f2ee8d05ebbbe097f3c3129ebf7610afeb Mon Sep 17 00:00:00 2001 From: Jesus Manuel Olivas Date: Sun, 26 Jul 2015 03:19:00 -0700 Subject: [PATCH 2/2] Update git option reading --- src/Command/AnalyzeCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Command/AnalyzeCommand.php b/src/Command/AnalyzeCommand.php index 02e00ef..dd734be 100644 --- a/src/Command/AnalyzeCommand.php +++ b/src/Command/AnalyzeCommand.php @@ -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.');