Skip to content

Commit

Permalink
refactor: Apply PHPStan rule to RouteCollection::__construct()
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsde committed Sep 16, 2023
1 parent 689c933 commit 5073e8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion system/Router/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public function __construct(FileLocator $locator, Modules $moduleConfig, Routing

// Normalize the path string in routeFiles array.
foreach ($this->routeFiles as $routeKey => $routesFile) {
$this->routeFiles[$routeKey] = realpath($routesFile) ?: $routesFile;
$realpath = realpath($routesFile);
$this->routeFiles[$routeKey] = ($realpath === false) ? $routesFile : $realpath;
}
}

Expand Down

0 comments on commit 5073e8b

Please sign in to comment.