File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/Illuminate/Support/Traits Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ trait ReflectsClosures
1212 /**
1313 * Get the class names / types of the parameters of the given Closure.
1414 *
15- * @param Closure $closure
15+ * @param \ Closure $closure
1616 * @return array
1717 *
1818 * @throws \ReflectionException
@@ -33,21 +33,21 @@ protected function closureParameterTypes(Closure $closure)
3333 /**
3434 * Get the class name of the first parameter of the given Closure.
3535 *
36- * @param Closure $closure
36+ * @param \ Closure $closure
3737 * @return string
3838 *
39- * @throws \ReflectionException|\RunTimeException
39+ * @throws \ReflectionException|\RuntimeException
4040 */
4141 protected function firstClosureParameterType (Closure $ closure )
4242 {
4343 $ types = $ this ->closureParameterTypes ($ closure );
4444
4545 if (! $ types ) {
46- throw new RunTimeException ('The given Closure has no parameters. ' );
46+ throw new RuntimeException ('The given Closure has no parameters. ' );
4747 }
4848
4949 if ($ types [0 ] === null ) {
50- throw new RunTimeException ('The first parameter of the given Closure is missing a type hint. ' );
50+ throw new RuntimeException ('The first parameter of the given Closure is missing a type hint. ' );
5151 }
5252
5353 return $ types [0 ];
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public function testReflectsClosures()
1212 {
1313 $ this ->assertParameterTypes ([ExampleParameter::class], function (ExampleParameter $ one ) {
1414 // assert the Closure isn't actually executed
15- throw new RunTimeException ();
15+ throw new RuntimeException ();
1616 });
1717
1818 $ this ->assertParameterTypes ([], function () {
You can’t perform that action at this time.
0 commit comments