src/Reporter/Coverage.php
public function stop($summary)
    {
        $this->write("Coverage Summary\n----------------\n");

        $verbosity = $this->_verbosity;
        $metrics = is_numeric($this->_verbosity) ? $this->metrics() : $this->metrics()->get($verbosity);

        if (!$metrics) {
            $this->write("\nUnexisting namespace/reference: `{$this->_verbosity}`, coverage can't be generated.\n\n", "n;yellow");
            return;
        }

        $this->_renderMetrics($metrics, $verbosity);
        $this->write("\n");

        if (is_string($verbosity)) {
            $this->_renderCoverage($metrics);
            $this->write("\n");
        }

        // Output the original stored metrics object (the total coverage)
        $name = $metrics->name();
        $stats = $metrics->data();
        $percent = number_format($stats['percent'], 2);
        $this->write(str_repeat('  ', substr_count($name, '\\')));

        $this->write('Total: ');
        $this->write("{$percent}% ", $this->_style($percent));
        $this->write("({$stats['cloc']}/{$stats['lloc']})");
        $this->write("\n");

        // Output the time to collect coverage
        $time = number_format($this->_time, 3);
        $this->write("\nCoverage collected in {$time} seconds\n\n\n");
    }
public function stop($summary)
    {
        $this->write("Coverage Summary\n----------------\n");

        $verbosity = $this->_verbosity;
        $metrics = is_numeric($this->_verbosity) ? $this->metrics() : $this->metrics()->get($verbosity);

        if (!$metrics) {
            $this->write("\nUnexisting namespace/reference: `{$this->_verbosity}`, coverage can't be generated.\n\n", "n;yellow");
            return;
        }

        $this->_renderMetrics($metrics, $verbosity);
        $this->write("\n");

        if (is_string($verbosity)) {
            $this->_renderCoverage($metrics);
            $this->write("\n");
        }

        // Output the original stored metrics object (the total coverage)
        $name = $metrics->name();
        $stats = $metrics->data();
        $percent = number_format($stats['percent'], 2);
        $this->write(str_repeat('  ', substr_count($name, '\\')));

        $this->write('Total: ');
        $this->write("{$percent}% ", $this->_style($percent));
        $this->write("({$stats['cloc']}/{$stats['lloc']})");
        $this->write("\n");

        // Output the time to collect coverage
        $time = number_format($this->_time, 3);
        $this->write("\nCoverage collected in {$time} seconds\n\n\n");
    }
public function stop ( $ summary ) { $ this -> write ( "Coverage Summary\n----------------\n" ) ; $ verbosity = $ this -> _verbosity ; $ metrics = is_numeric ( $ this -> _verbosity ) ? $ this -> metrics ( ) : $ this -> metrics ( ) -> get ( $ verbosity ) ; if ( ! $ metrics ) { $ this -> write ( "\nUnexisting namespace/reference: `{$this->_verbosity}`, coverage can't be generated.\n\n" , "n;yellow" ) ; return ; } $ this -> _renderMetrics ( $ metrics , $ verbosity ) ; $ this -> write ( "\n" ) ; if ( is_string ( $ verbosity ) ) { $ this -> _renderCoverage ( $ metrics ) ; $ this -> write ( "\n" ) ; } // Output the original stored metrics object (the total coverage) $ name = $ metrics -> name ( ) ; $ stats = $ metrics -> data ( ) ; $ percent = number_format ( $ stats [ 'percent' ] , 2 ) ; $ this -> write ( str_repeat ( '  ' , substr_count ( $ name , '\\' ) ) ) ; $ this -> write ( 'Total: ' ) ; $ this -> write ( "{$percent}% " , $ this -> _style ( $ percent ) ) ; $ this -> write ( "({$stats['cloc']}/{$stats['lloc']})" ) ; $ this -> write ( "\n" ) ; // Output the time to collect coverage $ time = number_format ( $ this -> _time , 3 ) ; $ this -> write ( "\nCoverage collected in {$time} seconds\n\n\n" ) ; }
Callback called at the end of the process.

@param object $summary The execution summary instance.
Callback called at the end of the process .