From d1cac8424ac0483fdc80cf339d6cc4c30e73bb21 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 26 May 2016 08:38:28 +0200 Subject: [PATCH] Hopefully fix --text option --- src/BaseCommand.php | 5 +++-- src/ExecuteCommand.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/BaseCommand.php b/src/BaseCommand.php index 78eea03..5dfa560 100644 --- a/src/BaseCommand.php +++ b/src/BaseCommand.php @@ -141,8 +141,9 @@ protected function handleReports(CodeCoverage $coverage, InputInterface $input, } if ($input->getOption('text')) { - $writer = new TextReport; - $writer->process($coverage, $input->getOption('text')); + $report = new TextReport; + + $output->write($report->process($coverage)); } if ($input->getOption('xml')) { diff --git a/src/ExecuteCommand.php b/src/ExecuteCommand.php index fca060b..c399909 100644 --- a/src/ExecuteCommand.php +++ b/src/ExecuteCommand.php @@ -83,8 +83,8 @@ protected function configure() ->addOption( 'text', null, - InputOption::VALUE_REQUIRED, - 'Generate code coverage report in text format' + InputOption::VALUE_NONE, + 'Write code coverage report in text format to STDOUT' ) ->addOption( 'xml',