Skip to content

Commit

Permalink
refactor: Use strict comparison (===)
Browse files Browse the repository at this point in the history
Changes made:
- Updated the 'forCli' method in RouteListCommand.php from loose (==) to strict (===) comparison.
  • Loading branch information
saMahmoudzadeh committed Mar 10, 2024
1 parent 5f1b120 commit 0407516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/RouteListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ protected function forCli($routes)
$routes = $routes->map(
fn ($route) => array_merge($route, [
'action' => $this->formatActionForCli($route),
'method' => $route['method'] == 'GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS' ? 'ANY' : $route['method'],
'uri' => $route['domain'] ? ($route['domain'].'/'.ltrim($route['uri'], '/')) : $route['uri'],
'method' => $route['method'] === 'GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS' ? 'ANY' : $route['method'],
'domain' => $route['domain'] ? ($route['domain'].'/'.ltrim($route['uri'], '/')) : $route['uri'],
]),
);

Expand Down

0 comments on commit 0407516

Please sign in to comment.