src/Cli.php
public static function breakLines($text, $width, $addSpaces = true) {
        $rawLines = explode("\n", $text);
        $lines = [];

        foreach ($rawLines as $line) {
            // Check to see if the line needs to be broken.
            $sublines = static::breakString($line, $width, $addSpaces);
            $lines = array_merge($lines, $sublines);
        }

        return $lines;
    }
public static function breakLines($text, $width, $addSpaces = true) {
        $rawLines = explode("\n", $text);
        $lines = [];

        foreach ($rawLines as $line) {
            // Check to see if the line needs to be broken.
            $sublines = static::breakString($line, $width, $addSpaces);
            $lines = array_merge($lines, $sublines);
        }

        return $lines;
    }
public static function breakLines ( $ text , $ width , $ addSpaces = true ) { $ rawLines = explode ( "\n" , $ text ) ; $ lines = [ ] ; foreach ( $ rawLines as $ line ) { // Check to see if the line needs to be broken. $ sublines = static :: breakString ( $ line , $ width , $ addSpaces ) ; $ lines = array_merge ( $ lines , $ sublines ) ; } return $ lines ; }
Breaks a cell into several lines according to a given width.

@param string $text The text of the cell.
@param int $width The width of the cell.
@param bool $addSpaces Whether or not to right-pad the cell with spaces.
@return array Returns an array of strings representing the lines in the cell.
Breaks a cell into several lines according to a given width .