@@ -62,6 +62,7 @@ class PHP_CodeCoverage_Report_Text
6262 protected $ lowUpperBound ;
6363 protected $ highLowerBound ;
6464 protected $ showUncoveredFiles ;
65+ protected $ showOnlySummary ;
6566
6667 protected $ colors = array (
6768 'green ' => "\x1b[30;42m " ,
@@ -72,18 +73,18 @@ class PHP_CodeCoverage_Report_Text
7273 'eol ' => "\x1b[2K " ,
7374 );
7475
75- public function __construct (PHPUnit_Util_Printer $ outputStream , $ lowUpperBound , $ highLowerBound , $ showUncoveredFiles )
76+ public function __construct (PHPUnit_Util_Printer $ outputStream , $ lowUpperBound , $ highLowerBound , $ showUncoveredFiles, $ showOnlySummary )
7677 {
7778 $ this ->outputStream = $ outputStream ;
7879 $ this ->lowUpperBound = $ lowUpperBound ;
7980 $ this ->highLowerBound = $ highLowerBound ;
8081 $ this ->showUncoveredFiles = $ showUncoveredFiles ;
82+ $ this ->showOnlySummary = $ showOnlySummary ;
8183 }
8284
8385 /**
8486 * @param PHP_CodeCoverage $coverage
85- * @param string $target
86- * @param string $name
87+ * @param bool $showColors
8788 * @return string
8889 */
8990 public function process (PHP_CodeCoverage $ coverage , $ showColors = FALSE )
@@ -134,6 +135,10 @@ public function process(PHP_CodeCoverage $coverage, $showColors = FALSE)
134135 . $ colors ['lines ' ] . $ colors ['eol ' ] . ' Lines: ' . PHP_CodeCoverage_Util::percent ($ report ->getNumExecutedLines (), $ report ->getNumExecutableLines (), TRUE )
135136 . ' ( ' . $ report ->getNumExecutedLines () . '/ ' . $ report ->getNumExecutableLines () . ') ' . PHP_EOL . $ colors ['reset ' ] . $ colors ['eol ' ];
136137
138+ if ($ this ->showOnlySummary ) {
139+ return $ this ->outputStream ->write ($ output . PHP_EOL );
140+ }
141+
137142 $ classCoverage = array ();
138143
139144 foreach ($ report as $ item ) {
0 commit comments