app/Application.php
public function dispatch($object, string $method)
    {
        $reflector = new ReflectionMethod($object, $method);

        $parameters = $this->makeParameters($reflector->getParameters());

        return $reflector->invoke($object, ...$parameters);
    }
public function dispatch($object, string $method)
    {
        $reflector = new ReflectionMethod($object, $method);

        $parameters = $this->makeParameters($reflector->getParameters());

        return $reflector->invoke($object, ...$parameters);
    }
public function dispatch ( $ object , string $ method ) { $ reflector = new ReflectionMethod ( $ object , $ method ) ; $ parameters = $ this -> makeParameters ( $ reflector -> getParameters ( ) ) ; return $ reflector -> invoke ( $ object , ... $ parameters ) ; }
Call an object's method, injecting all its dependencies.

@param object $object
@param string $method

@return mixed
Call an object s method injecting all its dependencies .