Skip to content

Commit 5073e8b

Browse files
committed
refactor: Apply PHPStan rule to RouteCollection::__construct()
1 parent 689c933 commit 5073e8b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/Router/RouteCollection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ public function __construct(FileLocator $locator, Modules $moduleConfig, Routing
302302

303303
// Normalize the path string in routeFiles array.
304304
foreach ($this->routeFiles as $routeKey => $routesFile) {
305-
$this->routeFiles[$routeKey] = realpath($routesFile) ?: $routesFile;
305+
$realpath = realpath($routesFile);
306+
$this->routeFiles[$routeKey] = ($realpath === false) ? $routesFile : $realpath;
306307
}
307308
}
308309

0 commit comments

Comments
 (0)