File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
system/Commands/Utilities Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 18
18
use CodeIgniter \Commands \Utilities \Routes \AutoRouterImproved \AutoRouteCollector as AutoRouteCollectorImproved ;
19
19
use CodeIgniter \Commands \Utilities \Routes \FilterCollector ;
20
20
use CodeIgniter \Commands \Utilities \Routes \SampleURIGenerator ;
21
- use CodeIgniter \Exceptions \PageNotFoundException ;
22
21
use Config \Services ;
23
22
24
23
/**
@@ -100,15 +99,7 @@ public function run(array $params)
100
99
foreach ($ routes as $ route => $ handler ) {
101
100
if (is_string ($ handler ) || $ handler instanceof Closure) {
102
101
$ sampleUri = $ uriGenerator ->get ($ route );
103
-
104
- try {
105
- $ filters = $ filterCollector ->get ($ method , $ sampleUri );
106
- } catch (PageNotFoundException $ e ) {
107
- $ filters = [
108
- 'before ' => ['<unknown> ' ],
109
- 'after ' => ['<unknown> ' ],
110
- ];
111
- }
102
+ $ filters = $ filterCollector ->get ($ method , $ sampleUri );
112
103
113
104
$ tbody [] = [
114
105
strtoupper ($ method ),
Original file line number Diff line number Diff line change 11
11
12
12
namespace CodeIgniter \Commands \Utilities \Routes ;
13
13
14
+ use CodeIgniter \Exceptions \PageNotFoundException ;
14
15
use CodeIgniter \Filters \Filters ;
15
16
use CodeIgniter \Router \Exceptions \RedirectException ;
16
17
use CodeIgniter \Router \Router ;
@@ -67,6 +68,11 @@ public function find(string $uri): array
67
68
'before ' => [],
68
69
'after ' => [],
69
70
];
71
+ } catch (PageNotFoundException $ e ) {
72
+ return [
73
+ 'before ' => ['<unknown> ' ],
74
+ 'after ' => ['<unknown> ' ],
75
+ ];
70
76
}
71
77
}
72
78
}
You can’t perform that action at this time.
0 commit comments