@@ -41,12 +41,12 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA
41
41
42
42
$ values = array_values ($ parameters );
43
43
44
- $ shouldSkipValue = new \stdClass ;
44
+ $ skippableValue = new \stdClass ;
45
45
46
46
foreach ($ reflector ->getParameters () as $ key => $ parameter ) {
47
- $ instance = $ this ->transformDependency ($ parameter , $ parameters , $ shouldSkipValue );
47
+ $ instance = $ this ->transformDependency ($ parameter , $ parameters , $ skippableValue );
48
48
49
- if ($ instance !== $ shouldSkipValue ) {
49
+ if ($ instance !== $ skippableValue ) {
50
50
$ instanceCount ++;
51
51
52
52
$ this ->spliceIntoParameters ($ parameters , $ key , $ instance );
@@ -64,23 +64,23 @@ public function resolveMethodDependencies(array $parameters, ReflectionFunctionA
64
64
*
65
65
* @param \ReflectionParameter $parameter
66
66
* @param array $parameters
67
- * @param object $shouldSkipValue
67
+ * @param object $skippableValue
68
68
* @return mixed
69
69
*/
70
- protected function transformDependency (ReflectionParameter $ parameter , $ parameters , $ shouldSkipValue )
70
+ protected function transformDependency (ReflectionParameter $ parameter , $ parameters , $ skippableValue )
71
71
{
72
72
$ class = $ parameter ->getClass ();
73
73
74
74
// If the parameter has a type-hinted class, we will check to see if it is already in
75
75
// the list of parameters. If it is we will just skip it as it is probably a model
76
76
// binding and we do not want to mess with those; otherwise, we resolve it here.
77
77
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 );
81
81
}
82
82
83
- return $ shouldSkipValue ;
83
+ return $ skippableValue ;
84
84
}
85
85
86
86
/**
0 commit comments