PhpBrew\Command\VariantsCommand::wrapLine PHP Method

wrapLine() public method

public wrapLine ( $line, $prefix = ' ', $indent = ' ' )
    public function wrapLine($line, $prefix = '  ', $indent = '  ')
    {
        $lineX = 0;
        $newLine = $prefix;
        for ($i = 0; $i < strlen($line); $i++ && $lineX++) {
            $c = $line[$i];
            $newLine .= $c;
            if ($lineX > 68 && $c === ' ') {
                $newLine .= "\n" . $indent;
                $lineX = 0;
            }
        }
        return $newLine;
    }