Skip to content

Commit

Permalink
Remove extra method (#14103)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephSilber authored and taylorotwell committed Jun 22, 2016
1 parent d33d33f commit 946edc9
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/Illuminate/Routing/ControllerDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@ class ControllerDispatcher
* @return mixed
*/
public function dispatch(Route $route, $controller, $method)
{
return $this->call($route, $controller, $method);
}

/**
* Call the given controller instance method.
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Routing\Controller $controller
* @param string $method
* @return mixed
*/
protected function call($route, $controller, $method)
{
$parameters = $this->resolveClassMethodDependencies(
$route->parametersWithoutNulls(), $controller, $method
Expand All @@ -37,7 +24,7 @@ protected function call($route, $controller, $method)
return $controller->callAction($method, $parameters);
}

return call_user_func_array([$controller, $method], $parameters);
return $controller->$method(...$parameters);
}

/**
Expand Down

0 comments on commit 946edc9

Please sign in to comment.