src/Standards/BestIt/CodeSniffer/Helper/DocDescriptionHelper.php
private function checkCommentDescriptionUcFirst(int $descriptionStartPtr): void
    {
        $descStartToken = $this->tokens[$descriptionStartPtr];

        $descriptionContent = $descStartToken['content'];

        if (ucfirst($descriptionContent) === $descriptionContent) {
            return;
        }

        $fixUcFirst = $this->file->addFixableError(
            AbstractDocSniff::MESSAGE_DESCRIPTION_UC_FIRST,
            $descriptionStartPtr,
            AbstractDocSniff::CODE_DESCRIPTION_UC_FIRST
        );

        if ($fixUcFirst) {
            $this->fixDescriptionUcFirst($descriptionStartPtr);
        }
    }
private function checkCommentDescriptionUcFirst(int $descriptionStartPtr): void
    {
        $descStartToken = $this->tokens[$descriptionStartPtr];

        $descriptionContent = $descStartToken['content'];

        if (ucfirst($descriptionContent) === $descriptionContent) {
            return;
        }

        $fixUcFirst = $this->file->addFixableError(
            AbstractDocSniff::MESSAGE_DESCRIPTION_UC_FIRST,
            $descriptionStartPtr,
            AbstractDocSniff::CODE_DESCRIPTION_UC_FIRST
        );

        if ($fixUcFirst) {
            $this->fixDescriptionUcFirst($descriptionStartPtr);
        }
    }
private function checkCommentDescriptionUcFirst ( int $ descriptionStartPtr ) : void { $ descStartToken = $ this -> tokens [ $ descriptionStartPtr ] ; $ descriptionContent = $ descStartToken [ 'content' ] ; if ( ucfirst ( $ descriptionContent ) === $ descriptionContent ) { return ; } $ fixUcFirst = $ this -> file -> addFixableError ( AbstractDocSniff :: MESSAGE_DESCRIPTION_UC_FIRST , $ descriptionStartPtr , AbstractDocSniff :: CODE_DESCRIPTION_UC_FIRST ) ; if ( $ fixUcFirst ) { $ this -> fixDescriptionUcFirst ( $ descriptionStartPtr ) ; } }
Checks if the description starts with a capital letter.

@param int $descriptionStartPtr Pointer to the start of the description.

@return void
Checks if the description starts with a capital letter .