private function checkLinesBetweenDescriptionAndFirstAnnotation(
        int $startPointer,
        int $endPointer,
        ?Annotation $firstAnnotation
    ) {
        if ($firstAnnotation === null || $startPointer === $firstAnnotation->getStartPointer()) {
            return;
        }

        \preg_match('~(\\s+)$~', $this->tokens[$endPointer]['content'], $matches);

        $lines = $matches[1] ?? '';
        $lines .= TokenHelper::getContent(
            $this->phpcsFile,
            $endPointer + 1,
            $firstAnnotation->getStartPointer() - 1
        );

        $linesCount = $this->countLines($lines);

        if ($linesCount === 1) {
            return;
        }

        $this->phpcsFile->addError(
            \sprintf('Expected 1 lines between description and annotations, found %d.', $linesCount),
            $firstAnnotation->getStartPointer(),
            'LinesBetweenDescriptionAndFirstAnnotation'
        );
    }
private function checkLinesBetweenDescriptionAndFirstAnnotation(
        int $startPointer,
        int $endPointer,
        ?Annotation $firstAnnotation
    ) {
        if ($firstAnnotation === null || $startPointer === $firstAnnotation->getStartPointer()) {
            return;
        }

        \preg_match('~(\\s+)$~', $this->tokens[$endPointer]['content'], $matches);

        $lines = $matches[1] ?? '';
        $lines .= TokenHelper::getContent(
            $this->phpcsFile,
            $endPointer + 1,
            $firstAnnotation->getStartPointer() - 1
        );

        $linesCount = $this->countLines($lines);

        if ($linesCount === 1) {
            return;
        }

        $this->phpcsFile->addError(
            \sprintf('Expected 1 lines between description and annotations, found %d.', $linesCount),
            $firstAnnotation->getStartPointer(),
            'LinesBetweenDescriptionAndFirstAnnotation'
        );
    }
private function checkLinesBetweenDescriptionAndFirstAnnotation ( int $ startPointer , int $ endPointer , ? Annotation $ firstAnnotation ) { if ( $ firstAnnotation === null || $ startPointer === $ firstAnnotation -> getStartPointer ( ) ) { return ; } \ preg_match ( '~(\\s+)$~' , $ this -> tokens [ $ endPointer ] [ 'content' ] , $ matches ) ; $ lines = $ matches [ 1 ] ?? '' ; $ lines .= TokenHelper :: getContent ( $ this -> phpcsFile , $ endPointer + 1 , $ firstAnnotation -> getStartPointer ( ) - 1 ) ; $ linesCount = $ this -> countLines ( $ lines ) ; if ( $ linesCount === 1 ) { return ; } $ this -> phpcsFile -> addError ( \ sprintf ( 'Expected 1 lines between description and annotations, found %d.' , $ linesCount ) , $ firstAnnotation -> getStartPointer ( ) , 'LinesBetweenDescriptionAndFirstAnnotation' ) ; }
Check lines between description and first annotation.

@param int $startPointer
@param int $endPointer
@param null|\SlevomatCodingStandard\Helpers\Annotation $firstAnnotation

@return void

@throws \SlevomatCodingStandard\Helpers\EmptyFileException
Check lines between description and first annotation .