src/Behat/Behat/Output/Node/Printer/CounterPrinter.php
public function printCounters(OutputPrinter $printer, $intro, array $stats)
    {
        $stats = array_filter($stats, function ($count) { return 0 !== $count; });

        if (0 === count($stats)) {
            $totalCount = 0;
        } else {
            $totalCount = array_sum($stats);
        }

        $detailedStats = array();
        foreach ($stats as $resultCode => $count) {
            $style = $this->resultConverter->convertResultCodeToString($resultCode);

            $transId = $style . '_count';
            $message = $this->translator->transChoice($transId, $count, array('%1%' => $count), 'output');

            $detailedStats[] = sprintf('{+%s}%s{-%s}', $style, $message, $style);
        }

        $message = $this->translator->transChoice($intro, $totalCount, array('%1%' => $totalCount), 'output');
        $printer->write($message);

        if (count($detailedStats)) {
            $printer->write(sprintf(' (%s)', implode(', ', $detailedStats)));
        }

        $printer->writeln();
    }
public function printCounters(OutputPrinter $printer, $intro, array $stats)
    {
        $stats = array_filter($stats, function ($count) { return 0 !== $count; });

        if (0 === count($stats)) {
            $totalCount = 0;
        } else {
            $totalCount = array_sum($stats);
        }

        $detailedStats = array();
        foreach ($stats as $resultCode => $count) {
            $style = $this->resultConverter->convertResultCodeToString($resultCode);

            $transId = $style . '_count';
            $message = $this->translator->transChoice($transId, $count, array('%1%' => $count), 'output');

            $detailedStats[] = sprintf('{+%s}%s{-%s}', $style, $message, $style);
        }

        $message = $this->translator->transChoice($intro, $totalCount, array('%1%' => $totalCount), 'output');
        $printer->write($message);

        if (count($detailedStats)) {
            $printer->write(sprintf(' (%s)', implode(', ', $detailedStats)));
        }

        $printer->writeln();
    }
public function printCounters ( OutputPrinter $ printer , $ intro , array $ stats ) { $ stats = array_filter ( $ stats , function ( $ count ) { return 0 !== $ count ; } ) ; if ( 0 === count ( $ stats ) ) { $ totalCount = 0 ; } else { $ totalCount = array_sum ( $ stats ) ; } $ detailedStats = array ( ) ; foreach ( $ stats as $ resultCode => $ count ) { $ style = $ this -> resultConverter -> convertResultCodeToString ( $ resultCode ) ; $ transId = $ style . '_count' ; $ message = $ this -> translator -> transChoice ( $ transId , $ count , array ( '%1%' => $ count ) , 'output' ) ; $ detailedStats [ ] = sprintf ( '{+%s}%s{-%s}' , $ style , $ message , $ style ) ; } $ message = $ this -> translator -> transChoice ( $ intro , $ totalCount , array ( '%1%' => $ totalCount ) , 'output' ) ; $ printer -> write ( $ message ) ; if ( count ( $ detailedStats ) ) { $ printer -> write ( sprintf ( ' (%s)' , implode ( ', ' , $ detailedStats ) ) ) ; } $ printer -> writeln ( ) ; }
Prints scenario and step counters.

@param OutputPrinter $printer
@param string        $intro
@param array         $stats
Prints scenario and step counters .