src/Standards/BestIt/Sniffs/Commenting/AbstractDocSniff.php
private function validateOneLineSummary(): bool
    {
        $isValid = true;
        $summaryPos = $this->getSummaryPosition();
        $nextPossiblePos = $this->loadNextDocBlockContent($summaryPos);

        if ($nextPossiblePos > -1) {
            $nextToken = $this->tokens[$nextPossiblePos];

            if (($nextToken['code'] === T_DOC_COMMENT_STRING) && !$this->isNextLineEmpty($summaryPos)) {
                $isValid = false;

                $this->file->addWarning(
                    self::MESSAGE_SUMMARY_TOO_LONG,
                    $nextPossiblePos,
                    static::CODE_SUMMARY_TOO_LONG
                );
            }
        }

        return $isValid;
    }
private function validateOneLineSummary(): bool
    {
        $isValid = true;
        $summaryPos = $this->getSummaryPosition();
        $nextPossiblePos = $this->loadNextDocBlockContent($summaryPos);

        if ($nextPossiblePos > -1) {
            $nextToken = $this->tokens[$nextPossiblePos];

            if (($nextToken['code'] === T_DOC_COMMENT_STRING) && !$this->isNextLineEmpty($summaryPos)) {
                $isValid = false;

                $this->file->addWarning(
                    self::MESSAGE_SUMMARY_TOO_LONG,
                    $nextPossiblePos,
                    static::CODE_SUMMARY_TOO_LONG
                );
            }
        }

        return $isValid;
    }
private function validateOneLineSummary ( ) : bool { $ isValid = true ; $ summaryPos = $ this -> getSummaryPosition ( ) ; $ nextPossiblePos = $ this -> loadNextDocBlockContent ( $ summaryPos ) ; if ( $ nextPossiblePos > - 1 ) { $ nextToken = $ this -> tokens [ $ nextPossiblePos ] ; if ( ( $ nextToken [ 'code' ] === T_DOC_COMMENT_STRING ) && ! $ this -> isNextLineEmpty ( $ summaryPos ) ) { $ isValid = false ; $ this -> file -> addWarning ( self :: MESSAGE_SUMMARY_TOO_LONG , $ nextPossiblePos , static :: CODE_SUMMARY_TOO_LONG ) ; } } return $ isValid ; }
Checks if the summary is on line or registers a warning.

@return bool We can skip the new line error, so return true if the one line summary is true.
Checks if the summary is on line or registers a warning .