private function countLinesBetweenAnnotations(Annotation $current, Annotation $previous)
    {
        $tokens = $this->tokens;

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

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

        return $this->countLines($lines);
    }
private function countLinesBetweenAnnotations(Annotation $current, Annotation $previous)
    {
        $tokens = $this->tokens;

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

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

        return $this->countLines($lines);
    }
private function countLinesBetweenAnnotations ( Annotation $ current , Annotation $ previous ) { $ tokens = $ this -> tokens ; \ preg_match ( '~(\\s+)$~' , $ tokens [ $ previous -> getEndPointer ( ) ] [ 'content' ] , $ matches ) ; $ lines = $ matches [ 1 ] ?? '' ; $ lines .= TokenHelper :: getContent ( $ this -> phpcsFile , $ previous -> getEndPointer ( ) + 1 , $ current -> getStartPointer ( ) - 1 ) ; return $ this -> countLines ( $ lines ) ; }
Count lines between current and previous annotations.

@param \SlevomatCodingStandard\Helpers\Annotation $current
@param \SlevomatCodingStandard\Helpers\Annotation $previous

@return int

@throws \SlevomatCodingStandard\Helpers\EmptyFileException
Count lines between current and previous annotations .