MessagePack\Tests\Perf\Writer\TableWriter::writeRow PHP Method

writeRow() private method

private writeRow ( array $cells, $padChar = ' ' )
$cells array
    private function writeRow(array $cells, $padChar = ' ')
    {
        $title = array_shift($cells);
        echo $title;
        $paddingLen = $this->widths[0] - strlen($title);
        if ($this->widths[0] > 1) {
            echo ' ' . str_repeat($padChar, $paddingLen - 1);
        }
        $i = 1;
        foreach ($cells as $name => $value) {
            $multiplier = $this->widths[$i] - strlen($value) - 2;
            echo 1 === $i ? $padChar : ' ';
            echo str_repeat($padChar, $multiplier > 0 ? $multiplier : 0) . ' ';
            echo $value;
            $i++;
        }
        echo "\n";
    }