src/RuleChecker.php
private function checkTokenForOnlyRule(RuleInterface $rule, $token): bool
    {
        $fitRuleRequirements = false;
        foreach ($rule->getRequirements() as $req) {
            if (false !== strpos($token, $req)) {
                $fitRuleRequirements = true;
            }
        }

        return $fitRuleRequirements;
    }
private function checkTokenForOnlyRule(RuleInterface $rule, $token): bool
    {
        $fitRuleRequirements = false;
        foreach ($rule->getRequirements() as $req) {
            if (false !== strpos($token, $req)) {
                $fitRuleRequirements = true;
            }
        }

        return $fitRuleRequirements;
    }
private function checkTokenForOnlyRule ( RuleInterface $ rule , $ token ) : bool { $ fitRuleRequirements = false ; foreach ( $ rule -> getRequirements ( ) as $ req ) { if ( false !== strpos ( $ token , $ req ) ) { $ fitRuleRequirements = true ; } } return $ fitRuleRequirements ; }
Checks if a token fits a "only" rule or not.
Checks if a token fits a only rule or not .