|  | @@ -199,7 +199,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 199 | 199 |       */ | 
                                                                                                            
                                                            | 200 | 200 |      protected function getRouteInformation(array $route, SampleURIGenerator $uriGenerator, MiddlewareCollector $middlewareCollector): ?array | 
                                                                                                            
                                                            | 201 | 201 |      { | 
                                                                                                            
                                                            | 202 |  | -        if (! isset($route['middleware'])) { | 
                                                                                                            
                                                            |  | 202 | +        if (!isset($route['middleware'])) { | 
                                                                                                            
                                                            | 203 | 203 |              $sampleUri           = $uriGenerator->get($route['route']); | 
                                                                                                            
                                                            | 204 | 204 |              $middlewares         = $middlewareCollector->get($route['method'], $sampleUri); | 
                                                                                                            
                                                            | 205 | 205 |              $route['middleware'] = implode(' ', array_map(Helpers::classBasename(...), $middlewares)); | 
                                                                                                                                                        
                                                        |  | @@ -224,8 +224,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 224 | 224 |      { | 
                                                                                                            
                                                            | 225 | 225 |          if ($route['handler'] instanceof Closure) { | 
                                                                                                            
                                                            | 226 | 226 |              $path = (new ReflectionFunction($route['handler']))->getFileName(); | 
                                                                                                            
                                                            | 227 |  | -        } elseif (is_string($route['handler']) && ! (str_contains($route['handler'], '(View) ') || str_contains($route['handler'], '(Closure) '))) { | 
                                                                                                            
                                                            | 228 |  | -            if (! class_exists($classname = explode('::', $route['handler'])[0])) { | 
                                                                                                            
                                                            |  | 227 | +        } elseif (is_string($route['handler']) && !(str_contains($route['handler'], '(View) ') || str_contains($route['handler'], '(Closure) '))) { | 
                                                                                                            
                                                            |  | 228 | +            if (!class_exists($classname = explode('::', $route['handler'])[0])) { | 
                                                                                                            
                                                            | 229 | 229 |                  return false; | 
                                                                                                            
                                                            | 230 | 230 |              } | 
                                                                                                            
                                                            | 231 | 231 |              $path = (new ReflectionClass($classname))->getFileName(); | 
                                                                                                                                                        
                                                        |  | @@ -241,13 +241,13 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 241 | 241 |       */ | 
                                                                                                            
                                                            | 242 | 242 |      protected function filterRoute(array $route): ?array | 
                                                                                                            
                                                            | 243 | 243 |      { | 
                                                                                                            
                                                            | 244 |  | -        if (($this->option('name') && ! Text::contains((string) $route['name'], $this->option('name'))) | 
                                                                                                            
                                                            | 245 |  | -            || ($this->option('handler') && isset($route['handler']) && is_string($route['handler']) && ! Text::contains($route['handler'], $this->option('handler'))) | 
                                                                                                            
                                                            | 246 |  | -            || ($this->option('path') && ! Text::contains($route['uri'], $this->option('path'))) | 
                                                                                                            
                                                            | 247 |  | -            || ($this->option('method') && ! Text::contains($route['method'], strtoupper($this->option('method')))) | 
                                                                                                            
                                                            | 248 |  | -            || ($this->option('domain') && ! Text::contains((string) $route['domain'], $this->option('domain'))) | 
                                                                                                            
                                                            |  | 244 | +        if (($this->option('name') && !Text::contains((string) $route['name'], $this->option('name'))) | 
                                                                                                            
                                                            |  | 245 | +            || ($this->option('handler') && isset($route['handler']) && is_string($route['handler']) && !Text::contains($route['handler'], $this->option('handler'))) | 
                                                                                                            
                                                            |  | 246 | +            || ($this->option('path') && !Text::contains($route['uri'], $this->option('path'))) | 
                                                                                                            
                                                            |  | 247 | +            || ($this->option('method') && !Text::contains($route['method'], strtoupper($this->option('method')))) | 
                                                                                                            
                                                            |  | 248 | +            || ($this->option('domain') && !Text::contains((string) $route['domain'], $this->option('domain'))) | 
                                                                                                            
                                                            | 249 | 249 |              || ($this->option('except-vendor') && $route['vendor']) | 
                                                                                                            
                                                            | 250 |  | -            || ($this->option('only-vendor') && ! $route['vendor'])) { | 
                                                                                                            
                                                            |  | 250 | +            || ($this->option('only-vendor') && !$route['vendor'])) { | 
                                                                                                            
                                                            | 251 | 251 |              return null; | 
                                                                                                            
                                                            | 252 | 252 |          } | 
                                                                                                            
                                                            | 253 | 253 |   | 
                                                                                                                                                        
                                                        |  | @@ -308,7 +308,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 308 | 308 |      protected function asJson(Collection $routes) | 
                                                                                                            
                                                            | 309 | 309 |      { | 
                                                                                                            
                                                            | 310 | 310 |          $this->json( | 
                                                                                                            
                                                            | 311 |  | -            $routes->map(static function ($route) { | 
                                                                                                            
                                                            |  | 311 | +            $routes->map(static function($route) { | 
                                                                                                            
                                                            | 312 | 312 |                  $route['middleware'] = empty($route['middleware']) ? [] : explode(' ', $route['middleware']); | 
                                                                                                            
                                                            | 313 | 313 |   | 
                                                                                                            
                                                            | 314 | 314 |                  return $route; | 
                                                                                                                                                        
                                                        |  | @@ -366,7 +366,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 366 | 366 |          $options = ['sep' => '-', 'second' => ['fg' => Color::GREEN]]; | 
                                                                                                            
                                                            | 367 | 367 |          $this->justify('Nombre total de routes définies', (string) $total, $options); | 
                                                                                                            
                                                            | 368 | 368 |          $this->justify('Nombre de routes affichées', (string) $routes->count(), $options); | 
                                                                                                            
                                                            | 369 |  | -        if (! $this->option('method')) { | 
                                                                                                            
                                                            |  | 369 | +        if (!$this->option('method')) { | 
                                                                                                            
                                                            | 370 | 370 |              $this->border(char: '.'); | 
                                                                                                            
                                                            | 371 | 371 |              $methods = $routes->map(static fn ($route) => $route['method'])->unique()->sort()->all(); | 
                                                                                                            
                                                            | 372 | 372 |   |