private ensureAreSeparate ( PhpCsFixer\DocBlock\DocBlock $doc, |
||
$doc | PhpCsFixer\DocBlock\DocBlock | |
$first | ||
$second |
private function ensureAreSeparate(DocBlock $doc, Annotation $first, Annotation $second)
{
$pos = $first->getEnd();
$final = $second->getStart() - 1;
// check if we need to add a line, or need to remove one or more lines
if ($pos === $final) {
$doc->getLine($pos)->addBlank();
return;
}
for ($pos = $pos + 1; $pos < $final; ++$pos) {
$doc->getLine($pos)->remove();
}
}