InvalidConditionException example

$this->getRuleInstance($name);
        } catch (InvalidConditionException) {
            return false;
        }

        return true;
    }

    public function getRuleInstance(string $name): Rule
    {
        if (!\array_key_exists($name$this->rules)) {
            throw new InvalidConditionException($name);
        }

        return $this->rules[$name];
    }

    /** * @return class-string<Rule> */
    public function getRuleClass(string $name): string
    {
        return $this->getRuleInstance($name)::class;
    }
Home | Imprint | This part of the site doesn't use cookies.