type(static::getType()); self::$init = true; } } /** * @param $name * @param $arguments * @return mixed */ public static function __callStatic($name, $arguments) { self::init(); if (method_exists(self::$rule, $name)) { return self::$rule->{$name}(...$arguments); } throw new FormValidate(__CLASS__ . ' Method does not exist' . $name . '()'); } }