From c666c424e8a60539a8fbd7cb5a3474785d9db22a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 12 Mar 2020 08:48:01 -0500 Subject: [PATCH] formatting --- .../Routing/RouteDependencyResolverTrait.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Illuminate/Routing/RouteDependencyResolverTrait.php b/src/Illuminate/Routing/RouteDependencyResolverTrait.php index dbfad1f8b453..4b30948cd180 100644 --- a/src/Illuminate/Routing/RouteDependencyResolverTrait.php +++ b/src/Illuminate/Routing/RouteDependencyResolverTrait.php @@ -41,12 +41,12 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA $values = array_values($parameters); - $shouldSkipValue = new \stdClass; + $skippableValue = new \stdClass; foreach ($reflector->getParameters() as $key => $parameter) { - $instance = $this->transformDependency($parameter, $parameters, $shouldSkipValue); + $instance = $this->transformDependency($parameter, $parameters, $skippableValue); - if ($instance !== $shouldSkipValue) { + if ($instance !== $skippableValue) { $instanceCount++; $this->spliceIntoParameters($parameters, $key, $instance); @@ -64,10 +64,10 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA * * @param \ReflectionParameter $parameter * @param array $parameters - * @param object $shouldSkipValue + * @param object $skippableValue * @return mixed */ - protected function transformDependency(ReflectionParameter $parameter, $parameters, $shouldSkipValue) + protected function transformDependency(ReflectionParameter $parameter, $parameters, $skippableValue) { $class = $parameter->getClass(); @@ -75,12 +75,12 @@ protected function transformDependency(ReflectionParameter $parameter, $paramete // the list of parameters. If it is we will just skip it as it is probably a model // binding and we do not want to mess with those; otherwise, we resolve it here. if ($class && ! $this->alreadyInParameters($class->name, $parameters)) { - // If it has a default value and is not already resolved, it's - // probably an optional model binding not present in the url. - return $parameter->isDefaultValueAvailable() ? null : $this->container->make($class->name); + return $parameter->isDefaultValueAvailable() + ? null + : $this->container->make($class->name); } - return $shouldSkipValue; + return $skippableValue; } /**