PhpCsFixer\Fixer\Comment\HeaderCommentFixer::encloseTextInComment PHP Method

encloseTextInComment() private method

Enclose the given text in a comment block.
private encloseTextInComment ( string $header, integer $type ) : string
$header string
$type integer
return string
    private function encloseTextInComment($header, $type)
    {
        $lineEnding = $this->whitespacesConfig->getLineEnding();
        $comment = (self::HEADER_COMMENT === $type ? '/*' : '/**') . $lineEnding;
        $lines = explode("\n", str_replace("\r", '', $header));
        foreach ($lines as $line) {
            $comment .= rtrim(' * ' . $line) . $lineEnding;
        }
        return $comment . ' */';
    }