src/Package.php
public function addMethod(string $name, Closure $callback): Package
    {
        $this->methods[$name] = $callback->bindTo($this, get_class($this));

        return $this;
    }
public function addMethod(string $name, Closure $callback): Package
    {
        $this->methods[$name] = $callback->bindTo($this, get_class($this));

        return $this;
    }
public function addMethod ( string $ name , Closure $ callback ) : Package { $ this -> methods [ $ name ] = $ callback -> bindTo ( $ this , get_class ( $ this ) ) ; return $ this ; }
Registers a method to be used

@param *string  $name     The class route name
@param *Closure $callback The callback handler

@return Package
Registers a method to be used