PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer::ensureAreSeparate PHP Метод

ensureAreSeparate() приватный Метод

Force the given annotations to have one empty line between each other.
private ensureAreSeparate ( PhpCsFixer\DocBlock\DocBlock $doc, Annotation $first, Annotation $second )
$doc PhpCsFixer\DocBlock\DocBlock
$first PhpCsFixer\DocBlock\Annotation
$second PhpCsFixer\DocBlock\Annotation
    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();
        }
    }