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 . ' */';
}