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;
        }
    }