private function checkLinesBetweenAnnotationsTypes($annotations)
    {
        if (empty($annotations)) {
            return;
        }

        $previousAnnotation = null;

        foreach ($annotations as $annotation) {
            if ($previousAnnotation === null) {
                $previousAnnotation = $annotation;
                continue;
            }

            $lines = $this->countLinesBetweenAnnotations($annotation, $previousAnnotation);
            $currentName = $this->getAnnotationName($annotation);
            $previousName = $this->getAnnotationName($previousAnnotation);

            $currentName === $previousName
                ? $this->checkSameAnnotations($annotation, $lines)
                : $this->checkDifferentAnnotations($annotation, $lines);

            $previousAnnotation = $annotation;
        }
    }
private function checkLinesBetweenAnnotationsTypes($annotations)
    {
        if (empty($annotations)) {
            return;
        }

        $previousAnnotation = null;

        foreach ($annotations as $annotation) {
            if ($previousAnnotation === null) {
                $previousAnnotation = $annotation;
                continue;
            }

            $lines = $this->countLinesBetweenAnnotations($annotation, $previousAnnotation);
            $currentName = $this->getAnnotationName($annotation);
            $previousName = $this->getAnnotationName($previousAnnotation);

            $currentName === $previousName
                ? $this->checkSameAnnotations($annotation, $lines)
                : $this->checkDifferentAnnotations($annotation, $lines);

            $previousAnnotation = $annotation;
        }
    }
private function checkLinesBetweenAnnotationsTypes ( $ annotations ) { if ( empty ( $ annotations ) ) { return ; } $ previousAnnotation = null ; foreach ( $ annotations as $ annotation ) { if ( $ previousAnnotation === null ) { $ previousAnnotation = $ annotation ; continue ; } $ lines = $ this -> countLinesBetweenAnnotations ( $ annotation , $ previousAnnotation ) ; $ currentName = $ this -> getAnnotationName ( $ annotation ) ; $ previousName = $ this -> getAnnotationName ( $ previousAnnotation ) ; $ currentName === $ previousName ? $ this -> checkSameAnnotations ( $ annotation , $ lines ) : $ this -> checkDifferentAnnotations ( $ annotation , $ lines ) ; $ previousAnnotation = $ annotation ; } }
Check lines between annotations.

@param \SlevomatCodingStandard\Helpers\Annotation[] $annotations

@throws \SlevomatCodingStandard\Helpers\EmptyFileException
Check lines between annotations .