src/Standards/BestIt/Sniffs/DocTags/AbstractRequiredTagsSniff.php
private function checkAndRegisterTagMinimumCounts(): void
    {
        $checkedRule = 'min';
        $rulesWithReq = $this->getRulesWithRequirement($checkedRule);

        array_walk(
            $rulesWithReq,
            function (array $tagRule, string $tag) use ($checkedRule): void {
                $minCount = $tagRule[$checkedRule];
                $tagCount = count($this->findTokensForTag($tag));

                if ($minCount > $tagCount) {
                    $fixCallback = $this->hasFixCallback($checkedRule, $tag);
                    $method = $fixCallback ? 'addFixableError' : 'addError';
                    $fixable = $this->file->{$method}(
                        self::MESSAGE_TAG_OCCURRENCE_MIN,
                        $this->getDocCommentPos(),
                        // We use an error code containing the tag name because we can't configure this rules from the
                        // outside and need  specific code to exclude the rule for this special tag.
                        static::CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst($tag),
                        [
                            $tag,
                            $minCount,
                            $tagCount
                        ]
                    );

                    if ($fixable && $fixCallback) {
                        $this->{$fixCallback}($this->getDocCommentPos(), $minCount, $tagCount, $tag);
                    }
                }
            }
        );
    }
private function checkAndRegisterTagMinimumCounts(): void
    {
        $checkedRule = 'min';
        $rulesWithReq = $this->getRulesWithRequirement($checkedRule);

        array_walk(
            $rulesWithReq,
            function (array $tagRule, string $tag) use ($checkedRule): void {
                $minCount = $tagRule[$checkedRule];
                $tagCount = count($this->findTokensForTag($tag));

                if ($minCount > $tagCount) {
                    $fixCallback = $this->hasFixCallback($checkedRule, $tag);
                    $method = $fixCallback ? 'addFixableError' : 'addError';
                    $fixable = $this->file->{$method}(
                        self::MESSAGE_TAG_OCCURRENCE_MIN,
                        $this->getDocCommentPos(),
                        // We use an error code containing the tag name because we can't configure this rules from the
                        // outside and need  specific code to exclude the rule for this special tag.
                        static::CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst($tag),
                        [
                            $tag,
                            $minCount,
                            $tagCount
                        ]
                    );

                    if ($fixable && $fixCallback) {
                        $this->{$fixCallback}($this->getDocCommentPos(), $minCount, $tagCount, $tag);
                    }
                }
            }
        );
    }
private function checkAndRegisterTagMinimumCounts ( ) : void { $ checkedRule = 'min' ; $ rulesWithReq = $ this -> getRulesWithRequirement ( $ checkedRule ) ; array_walk ( $ rulesWithReq , function ( array $ tagRule , string $ tag ) use ( $ checkedRule ) : void { $ minCount = $ tagRule [ $ checkedRule ] ; $ tagCount = count ( $ this -> findTokensForTag ( $ tag ) ) ; if ( $ minCount > $ tagCount ) { $ fixCallback = $ this -> hasFixCallback ( $ checkedRule , $ tag ) ; $ method = $ fixCallback ? 'addFixableError' : 'addError' ; $ fixable = $ this -> file -> { $ method } ( self :: MESSAGE_TAG_OCCURRENCE_MIN , $ this -> getDocCommentPos ( ) , // We use an error code containing the tag name because we can't configure this rules from the // outside and need  specific code to exclude the rule for this special tag. static :: CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst ( $ tag ) , [ $ tag , $ minCount , $ tagCount ] ) ; if ( $ fixable && $ fixCallback ) { $ this -> { $ fixCallback } ( $ this -> getDocCommentPos ( ) , $ minCount , $ tagCount , $ tag ) ; } } } ) ; }
Checks if the tag occurrences reaches their minimum counts.

@return void
Checks if the tag occurrences reaches their minimum counts .