ParaTest\Runners\PHPUnit\ResultPrinter::getDefects PHP Method

getDefects() protected method

Method that returns a formatted string for a collection of errors or failures
protected getDefects ( array $defects, $type ) : string
$defects array
$type
return string
    protected function getDefects(array $defects, $type)
    {
        $count = sizeof($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 <= sizeof($defects); $i++) {
            $output .= sprintf("\n%d) %s\n", $i, $defects[$i - 1]);
        }
        return $output;
    }