@@ -41,12 +41,12 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA
4141
4242 $ values = array_values ($ parameters );
4343
44- $ shouldSkipValue = new \stdClass ;
44+ $ skippableValue = new \stdClass ;
4545
4646 foreach ($ reflector ->getParameters () as $ key => $ parameter ) {
47- $ instance = $ this ->transformDependency ($ parameter , $ parameters , $ shouldSkipValue );
47+ $ instance = $ this ->transformDependency ($ parameter , $ parameters , $ skippableValue );
4848
49- if ($ instance !== $ shouldSkipValue ) {
49+ if ($ instance !== $ skippableValue ) {
5050 $ instanceCount ++;
5151
5252 $ this ->spliceIntoParameters ($ parameters , $ key , $ instance );
@@ -64,23 +64,23 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA
6464 *
6565 * @param \ReflectionParameter $parameter
6666 * @param array $parameters
67- * @param object $shouldSkipValue
67+ * @param object $skippableValue
6868 * @return mixed
6969 */
70- protected function transformDependency (ReflectionParameter $ parameter , $ parameters , $ shouldSkipValue )
70+ protected function transformDependency (ReflectionParameter $ parameter , $ parameters , $ skippableValue )
7171 {
7272 $ class = $ parameter ->getClass ();
7373
7474 // If the parameter has a type-hinted class, we will check to see if it is already in
7575 // the list of parameters. If it is we will just skip it as it is probably a model
7676 // binding and we do not want to mess with those; otherwise, we resolve it here.
7777 if ($ class && ! $ this ->alreadyInParameters ($ class ->name , $ parameters )) {
78- // If it has a default value and is not already resolved, it's
79- // probably an optional model binding not present in the url.
80- return $ parameter -> isDefaultValueAvailable () ? null : $ this ->container ->make ($ class ->name );
78+ return $ parameter -> isDefaultValueAvailable ()
79+ ? null
80+ : $ this ->container ->make ($ class ->name );
8181 }
8282
83- return $ shouldSkipValue ;
83+ return $ skippableValue ;
8484 }
8585
8686 /**
0 commit comments