src/Standards/BestIt/Sniffs/Commenting/AbstractDocSniff.php
private function validateDescriptions(): self
    {
        $commentPoss = TokenHelper::findNextAll(
            $this->file->getBaseFile(),
            [T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG],
            $this->getDocCommentPos(),
            $this->getDocHelper()->getBlockEndPosition()
        );

        foreach ($commentPoss as $index => $commentPos) {
            $commentToken = $this->tokens[$commentPos];
            $skipNewLineCheck = false;

            // We only search till the tags.
            if ($commentToken['code'] === T_DOC_COMMENT_TAG) {
                break;
            }

            if ($isFirstDocString = $index === 0) {
                $skipNewLineCheck = !$this->validateOneLineSummary();
            }

            $this->validateUCFirstDocComment($commentPos, $commentToken);

            if (!$skipNewLineCheck) {
                $this->validateNewLineAfterDocComment($commentPos, $commentToken, $isFirstDocString);
            }
        }

        return $this;

        ;
    }
private function validateDescriptions(): self
    {
        $commentPoss = TokenHelper::findNextAll(
            $this->file->getBaseFile(),
            [T_DOC_COMMENT_STRING, T_DOC_COMMENT_TAG],
            $this->getDocCommentPos(),
            $this->getDocHelper()->getBlockEndPosition()
        );

        foreach ($commentPoss as $index => $commentPos) {
            $commentToken = $this->tokens[$commentPos];
            $skipNewLineCheck = false;

            // We only search till the tags.
            if ($commentToken['code'] === T_DOC_COMMENT_TAG) {
                break;
            }

            if ($isFirstDocString = $index === 0) {
                $skipNewLineCheck = !$this->validateOneLineSummary();
            }

            $this->validateUCFirstDocComment($commentPos, $commentToken);

            if (!$skipNewLineCheck) {
                $this->validateNewLineAfterDocComment($commentPos, $commentToken, $isFirstDocString);
            }
        }

        return $this;

        ;
    }
private function validateDescriptions ( ) : self { $ commentPoss = TokenHelper :: findNextAll ( $ this -> file -> getBaseFile ( ) , [ T_DOC_COMMENT_STRING , T_DOC_COMMENT_TAG ] , $ this -> getDocCommentPos ( ) , $ this -> getDocHelper ( ) -> getBlockEndPosition ( ) ) ; foreach ( $ commentPoss as $ index => $ commentPos ) { $ commentToken = $ this -> tokens [ $ commentPos ] ; $ skipNewLineCheck = false ; // We only search till the tags. if ( $ commentToken [ 'code' ] === T_DOC_COMMENT_TAG ) { break ; } if ( $ isFirstDocString = $ index === 0 ) { $ skipNewLineCheck = ! $ this -> validateOneLineSummary ( ) ; } $ this -> validateUCFirstDocComment ( $ commentPos , $ commentToken ) ; if ( ! $ skipNewLineCheck ) { $ this -> validateNewLineAfterDocComment ( $ commentPos , $ commentToken , $ isFirstDocString ) ; } } return $ this ; ; }
Validates the descriptions in the file.

@return AbstractDocSniff
Validates the descriptions in the file .