src/Loader.php
public function rule(string $type, string $key, array $item): Rule
    {
        if (!$this->validate($type)) {
            throw new Runtime(\sprintf('Undefined type `%s`', $type));
        }

        $class = $this->rules[$type];
        return new $class($key, $item, $this->parent);
    }
public function rule(string $type, string $key, array $item): Rule
    {
        if (!$this->validate($type)) {
            throw new Runtime(\sprintf('Undefined type `%s`', $type));
        }

        $class = $this->rules[$type];
        return new $class($key, $item, $this->parent);
    }
public function rule ( string $ type , string $ key , array $ item ) : Rule { if ( ! $ this -> validate ( $ type ) ) { throw new Runtime ( \ sprintf ( 'Undefined type `%s`' , $ type ) ) ; } $ class = $ this -> rules [ $ type ] ; return new $ class ( $ key , $ item , $ this -> parent ) ; }
@param string $type
@param string $key
@param array $item

@return Rule
@param string $type @param string $key @param array $item