Skip to content

Commit

Permalink
Apply Style CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Dec 14, 2016
1 parent 45306f6 commit a153c59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Illuminate/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ protected function getClosure($abstract, $concrete)
}

/**
* Bind a callback to resolve with Container::call
* Bind a callback to resolve with Container::call.
*
* @param string $method
* @param \Closure $concrete
Expand All @@ -252,23 +252,23 @@ public function bindMethod($method, $callback)
}

/**
* Call a method that has been bound to the container
* Call a method that has been bound to the container.
*
* @param callable $callback
* @param mixed $default
* @return mixed
*/
protected function callBoundMethod($callback, $default)
{
if (!is_array($callback)) {
if (! is_array($callback)) {
return value($default);
}

$class = is_string($callback[0]) ? $callback[0] : get_class($callback[0]);

$method = $this->normalize("{$class}@{$callback[1]}");

if (!isset($this->methodBindings[$method])) {
if (! isset($this->methodBindings[$method])) {
return value($default);
}

Expand Down Expand Up @@ -548,6 +548,7 @@ public function call($callback, array $parameters = [], $defaultMethod = null)

return $this->callBoundMethod($callback, function () use ($callback, $parameters) {
$dependencies = $this->getMethodDependencies($callback, $parameters);

return call_user_func_array($callback, $dependencies);
});
}
Expand Down

0 comments on commit a153c59

Please sign in to comment.