@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @var $type |
18 | 18 | */ |
19 | - public $type='route'; |
|
19 | + public $type = 'route'; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var array |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * @var $commandRule |
35 | 35 | */ |
36 | - public $commandRule=[]; |
|
36 | + public $commandRule = []; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @return bool |
@@ -42,24 +42,24 @@ discard block |
||
42 | 42 | |
43 | 43 | echo $this->info('All Route Controller Lists :'); |
44 | 44 | |
45 | - $this->table->setHeaders(['no','endpoint','http','namespace','method','definition','beforeMiddleware','afterMiddleware','routeCache','doc','status']); |
|
45 | + $this->table->setHeaders(['no', 'endpoint', 'http', 'namespace', 'method', 'definition', 'beforeMiddleware', 'afterMiddleware', 'routeCache', 'doc', 'status']); |
|
46 | 46 | |
47 | 47 | $routes = Router::getRoutes(); |
48 | 48 | $routeData = isset($routes['data']) ? $routes['data'] : []; |
49 | 49 | $routePattern = isset($routes['pattern']) ? $routes['pattern'] : []; |
50 | 50 | |
51 | - $counter=0; |
|
51 | + $counter = 0; |
|
52 | 52 | |
53 | 53 | $application = app(); |
54 | 54 | |
55 | 55 | $application->loadIfNotExistBoot(['middleware']); |
56 | 56 | $middlewareProvider = $application['middleware']; |
57 | 57 | |
58 | - foreach($routeData as $key=>$data){ |
|
58 | + foreach ($routeData as $key=>$data) { |
|
59 | 59 | |
60 | - $middlewareProvider->setKeyOdds('endpoint',$data['endpoint']); |
|
61 | - $middlewareProvider->setKeyOdds('method',$data['method']); |
|
62 | - $middlewareProvider->setKeyOdds('http',$data['http']); |
|
60 | + $middlewareProvider->setKeyOdds('endpoint', $data['endpoint']); |
|
61 | + $middlewareProvider->setKeyOdds('method', $data['method']); |
|
62 | + $middlewareProvider->setKeyOdds('http', $data['http']); |
|
63 | 63 | |
64 | 64 | $middlewareProvider->handleMiddlewareProcess(); |
65 | 65 | $beforeMiddleware = $middlewareProvider->getShow(); |
@@ -76,22 +76,22 @@ discard block |
||
76 | 76 | $reflection = app()['reflection']($controllerNamespace); |
77 | 77 | $methodDocument = $reflection->reflectionMethodParams($data['method'])->document; |
78 | 78 | |
79 | - $isRouteCache = ($reflection->isAvailableMethodDocument($data['method'],'cache')) ? |
|
79 | + $isRouteCache = ($reflection->isAvailableMethodDocument($data['method'], 'cache')) ? |
|
80 | 80 | 'available' : ''; |
81 | 81 | |
82 | 82 | $methodDefinition = ''; |
83 | 83 | |
84 | - if(preg_match('@#define:(.*?)\n@is',$methodDocument,$definition)){ |
|
85 | - if(isset($definition[1])){ |
|
84 | + if (preg_match('@#define:(.*?)\n@is', $methodDocument, $definition)) { |
|
85 | + if (isset($definition[1])) { |
|
86 | 86 | $methodDefinition = rtrim($definition[1]); |
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | - $endpointData = $endpoint.'/'.implode("/",$routePattern[$key]); |
|
90 | + $endpointData = $endpoint.'/'.implode("/", $routePattern[$key]); |
|
91 | 91 | |
92 | - if(isset($this->argument['filter'])){ |
|
92 | + if (isset($this->argument['filter'])) { |
|
93 | 93 | |
94 | - if(preg_match('@'.$this->argument['filter'].'@is',$endpointData)){ |
|
94 | + if (preg_match('@'.$this->argument['filter'].'@is', $endpointData)) { |
|
95 | 95 | |
96 | 96 | $this->table->addRow([ |
97 | 97 | ++$counter, |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | $controllerNamespace, |
101 | 101 | $data['method'], |
102 | 102 | $methodDefinition, |
103 | - implode(",",$beforeMiddleware), |
|
104 | - implode(",",$afterMiddleware), |
|
103 | + implode(",", $beforeMiddleware), |
|
104 | + implode(",", $afterMiddleware), |
|
105 | 105 | $isRouteCache, |
106 | 106 | '', |
107 | 107 | '', |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ]); |
110 | 110 | } |
111 | 111 | } |
112 | - else{ |
|
112 | + else { |
|
113 | 113 | |
114 | 114 | $this->table->addRow([ |
115 | 115 | ++$counter, |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | $controllerNamespace, |
119 | 119 | $data['method'], |
120 | 120 | $methodDefinition, |
121 | - implode(",",$beforeMiddleware), |
|
122 | - implode(",",$afterMiddleware), |
|
121 | + implode(",", $beforeMiddleware), |
|
122 | + implode(",", $afterMiddleware), |
|
123 | 123 | $isRouteCache, |
124 | 124 | '', |
125 | 125 | true |