src/Standards/BestIt/Sniffs/Commenting/RequiredDocBlockSniff.php
private function checkAndRegisterMissingDocBlock(): void
    {
        if (!$this->getDocCommentPos()) {
            $tokenIdent = $this->getTokenName();

            $exception = (new CodeError(
                static::CODE_MISSING_DOC_BLOCK_PREFIX . ucfirst($tokenIdent),
                self::MESSAGE_MISSING_DOC_BLOCK,
                $this->stackPos
            ))->setPayload([lcfirst($tokenIdent)]);

            throw $exception;
        }
    }
private function checkAndRegisterMissingDocBlock(): void
    {
        if (!$this->getDocCommentPos()) {
            $tokenIdent = $this->getTokenName();

            $exception = (new CodeError(
                static::CODE_MISSING_DOC_BLOCK_PREFIX . ucfirst($tokenIdent),
                self::MESSAGE_MISSING_DOC_BLOCK,
                $this->stackPos
            ))->setPayload([lcfirst($tokenIdent)]);

            throw $exception;
        }
    }
private function checkAndRegisterMissingDocBlock ( ) : void { if ( ! $ this -> getDocCommentPos ( ) ) { $ tokenIdent = $ this -> getTokenName ( ) ; $ exception = ( new CodeError ( static :: CODE_MISSING_DOC_BLOCK_PREFIX . ucfirst ( $ tokenIdent ) , self :: MESSAGE_MISSING_DOC_BLOCK , $ this -> stackPos ) ) -> setPayload ( [ lcfirst ( $ tokenIdent ) ] ) ; throw $ exception ; } }
Checks for a missing doc block and throws an error if the doc is missing.

@throws CodeWarning

@return void
Checks for a missing doc block and throws an error if the doc is missing .