src/Runners/PHPUnit/ResultPrinter.php
protected function getDefects(array $defects, string $type): string
    {
        $count = \count($defects);
        if ($count === 0) {
            return '';
        }
        $output = sprintf(
            "There %s %d %s%s:\n",
            ($count === 1) ? 'was' : 'were',
            $count,
            $type,
            ($count === 1) ? '' : 's'
        );

        for ($i = 1; $i <= \count($defects); ++$i) {
            $output .= sprintf("\n%d) %s\n", $i, $defects[$i - 1]);
        }

        return $output;
    }
protected function getDefects(array $defects, string $type): string
    {
        $count = \count($defects);
        if ($count === 0) {
            return '';
        }
        $output = sprintf(
            "There %s %d %s%s:\n",
            ($count === 1) ? 'was' : 'were',
            $count,
            $type,
            ($count === 1) ? '' : 's'
        );

        for ($i = 1; $i <= \count($defects); ++$i) {
            $output .= sprintf("\n%d) %s\n", $i, $defects[$i - 1]);
        }

        return $output;
    }
protected function getDefects ( array $ defects , string $ type ) : string { $ count = \ count ( $ defects ) ; if ( $ count === 0 ) { return '' ; } $ output = sprintf ( "There %s %d %s%s:\n" , ( $ count === 1 ) ? 'was' : 'were' , $ count , $ type , ( $ count === 1 ) ? '' : 's' ) ; for ( $ i = 1 ; $ i <= \ count ( $ defects ) ; ++ $ i ) { $ output .= sprintf ( "\n%d) %s\n" , $ i , $ defects [ $ i - 1 ] ) ; } return $ output ; }
Method that returns a formatted string
for a collection of errors or failures.

@param array $defects
@param $type

@return string
Method that returns a formatted string for a collection of errors or failures .