File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 44
55use InvalidArgumentException ;
66use BadMethodCallException ;
7- use PivotPHP \Core \Utils \Arr ;
87use PivotPHP \Core \Utils \CallableResolver ;
98
109/**
@@ -200,13 +199,7 @@ public static function add(
200199 $ method = strtoupper ($ method );
201200
202201 // Validar e resolver o handler usando CallableResolver
203- try {
204- $ resolvedHandler = CallableResolver::resolve ($ handler );
205- } catch (InvalidArgumentException $ e ) {
206- throw new InvalidArgumentException (
207- "Route handler validation failed: {$ e ->getMessage ()}"
208- );
209- }
202+ $ resolvedHandler = CallableResolver::resolve ($ handler );
210203
211204 foreach ($ middlewares as $ mw ) {
212205 if (!is_callable ($ mw )) {
@@ -626,7 +619,7 @@ private static function getRoutesByPrefix(string $prefix): array
626619 {
627620 $ routes = [];
628621
629- foreach (self ::$ preCompiledRoutes as $ key => $ route ) {
622+ foreach (self ::$ preCompiledRoutes as $ route ) {
630623 if (strpos ($ route ['path ' ], $ prefix ) === 0 ) {
631624 $ routes [] = $ route ;
632625 }
You can’t perform that action at this time.
0 commit comments