phplinter\Report\Bash::create PHP Method

create() public method

----------------------------------------------------------------------+
public create ( $report, $penaltys = null, $root = null )
    public function create($report, $penaltys = null, $root = null)
    {
        $format = "| {F} | {M} | `{W}` Line: {L}\n";
        $fcolors = array('E' => 'red', 'W' => 'blue', 'C' => 'brown', 'D' => array(2, 'brown'), 'I' => 'green', 'R' => 'purple', 'S' => 'cyan', 'P' => array(1, 'black'));
        foreach ($report as $node) {
            foreach ($node as $_) {
                $out = str_replace('{F}', $this->color(str_pad($_['flag'], 3), $fcolors[$_['flag'][0]]), $format);
                $out = str_replace('{M}', str_pad($_['message'], 50), $out);
                $out = str_replace('{W}', $_['where'], $out);
                $out = str_replace('{L}', $_['line'], $out);
                echo $out;
            }
        }
        if (is_numeric($penaltys)) {
            echo $this->score($penaltys);
        }
    }