Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Repeat a string
<?php str_repeat(string $string, int $times): string
<?php     {

        $length = $this->getFullWidth($columnWidths);



        return str_repeat('-', $length) . "\n";

    }



    private function makeDataRow(Collection $columns, array $widths): string
<?php     private function cellPadding()

    {

        return str_repeat(' ', $this->columnPadding);

    }



    private function centerText(array $columnWidths, string $text): string
<?php         $halfWidth = intdiv($width, 2);

        $halfTextWidth = intdiv(strlen($strippedText), 2);



        return str_repeat(' ', $halfWidth - $halfTextWidth) . $text . str_repeat(' ', $halfWidth - $halfTextWidth) . "\n";

    }



    private function getFullWidth(array $columnWidths): int