src/Utility/Formatter.php
public static function indentLines($text, $indent, $skipFirstLine = false)
    {
        $lines = explode(PHP_EOL, $text);

        // (つ◕.◕)つ━☆ﾟ.*･｡ﾟ
        !$skipFirstLine || $preparedLines[] = array_shift($lines);

        foreach ($lines as $line) {
            $preparedLines[] = self::indent($indent) . rtrim($line);
        }

        return implode(PHP_EOL, $preparedLines);
    }
public static function indentLines($text, $indent, $skipFirstLine = false)
    {
        $lines = explode(PHP_EOL, $text);

        // (つ◕.◕)つ━☆ﾟ.*･｡ﾟ
        !$skipFirstLine || $preparedLines[] = array_shift($lines);

        foreach ($lines as $line) {
            $preparedLines[] = self::indent($indent) . rtrim($line);
        }

        return implode(PHP_EOL, $preparedLines);
    }
public static function indentLines ( $ text , $ indent , $ skipFirstLine = false ) { $ lines = explode ( PHP_EOL , $ text ) ; // (つ◕.◕)つ━☆ﾟ.*･｡ﾟ ! $ skipFirstLine || $ preparedLines [ ] = array_shift ( $ lines ) ; foreach ( $ lines as $ line ) { $ preparedLines [ ] = self :: indent ( $ indent ) . rtrim ( $ line ) ; } return implode ( PHP_EOL , $ preparedLines ) ; }
Add indents to multiline text

@param string $text
@param integer $indent indent in spaces
@param bool $skipFirstLine = false not apply indent to the first line of text
@return array
Add indents to multiline text