@@ -29,7 +29,7 @@ public static function parse($uri, $action)
2929 // If the action is already a Closure instance, we will just set that instance
3030 // as the "uses" property, because there is nothing else we need to do when
3131 // it is available. Otherwise we will need to find it in the action list.
32- if (static ::isCallable ($ action )) {
32+ if (Reflector ::isCallable ($ action, true )) {
3333 return ! is_array ($ action ) ? ['uses ' => $ action ] : [
3434 'uses ' => $ action [0 ].'@ ' .$ action [1 ],
3535 'controller ' => $ action [0 ].'@ ' .$ action [1 ],
@@ -74,25 +74,10 @@ protected static function missingAction($uri)
7474 protected static function findCallable (array $ action )
7575 {
7676 return Arr::first ($ action , function ($ value , $ key ) {
77- return static ::isCallable ($ value ) && is_numeric ($ key );
77+ return Reflector ::isCallable ($ value ) && is_numeric ($ key );
7878 });
7979 }
8080
81- /**
82- * Determine if the given action is callable as a route.
83- *
84- * @param mixed $action
85- * @return bool
86- */
87- public static function isCallable ($ action )
88- {
89- if (! is_array ($ action )) {
90- return is_callable ($ action );
91- }
92-
93- return isset ($ action [0 ], $ action [1 ]) && is_string ($ action [0 ]) && is_string ($ action [1 ]) && Reflector::isMethodCallable ($ action [0 ], $ action [1 ]);
94- }
95-
9681 /**
9782 * Make an action for an invokable controller.
9883 *
0 commit comments