src/Standards/BestIt/Sniffs/DocTags/AbstractDisallowedTagsSniff.php
private function checkAndRegisterDisallowedTagsError(): void
    {
        $disallowedTags = $this->getDisallowedTags();
        $tags = $this->getAllTags();

        foreach ($tags as $tagPos => $tag) {
            $tagContent = $tag['content'];

            if (in_array(substr($tagContent, 1), $disallowedTags)) {
                $this->file->addError(
                    self::MESSAGE_TAG_NOT_ALLOWED,
                    $tagPos,
                    static::CODE_TAG_NOT_ALLOWED,
                    [$tagContent]
                );
            }
        }
    }
private function checkAndRegisterDisallowedTagsError(): void
    {
        $disallowedTags = $this->getDisallowedTags();
        $tags = $this->getAllTags();

        foreach ($tags as $tagPos => $tag) {
            $tagContent = $tag['content'];

            if (in_array(substr($tagContent, 1), $disallowedTags)) {
                $this->file->addError(
                    self::MESSAGE_TAG_NOT_ALLOWED,
                    $tagPos,
                    static::CODE_TAG_NOT_ALLOWED,
                    [$tagContent]
                );
            }
        }
    }
private function checkAndRegisterDisallowedTagsError ( ) : void { $ disallowedTags = $ this -> getDisallowedTags ( ) ; $ tags = $ this -> getAllTags ( ) ; foreach ( $ tags as $ tagPos => $ tag ) { $ tagContent = $ tag [ 'content' ] ; if ( in_array ( substr ( $ tagContent , 1 ) , $ disallowedTags ) ) { $ this -> file -> addError ( self :: MESSAGE_TAG_NOT_ALLOWED , $ tagPos , static :: CODE_TAG_NOT_ALLOWED , [ $ tagContent ] ) ; } } }
Checks and registers errors for the disallowed tags.

@return void
Checks and registers errors for the disallowed tags .