public function register(string $name, callable $callback): ResolverInterface
    {
        //if it's not callable
        if (!is_callable($callback)) {
            throw ResolverException::forInvalidCallback();
        }

        $this->registry[$name] = $callback;
        return $this;
    }
public function register(string $name, callable $callback): ResolverInterface
    {
        //if it's not callable
        if (!is_callable($callback)) {
            throw ResolverException::forInvalidCallback();
        }

        $this->registry[$name] = $callback;
        return $this;
    }
public function register ( string $ name , callable $ callback ) : ResolverInterface { //if it's not callable if ( ! is_callable ( $ callback ) ) { throw ResolverException :: forInvalidCallback ( ) ; } $ this -> registry [ $ name ] = $ callback ; return $ this ; }
Registers a resolver callback

@param *string   $name     Name of Resolver
@param *callable $callback What to execute when we need resolving

@return ResolverInterface
Registers a resolver callback