mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 17:10:05 +01:00
Fix code styling
This commit is contained in:
committed by
github-actions[bot]
parent
92c135e2dd
commit
f37a474700
@@ -168,7 +168,7 @@ public function sitePath(string $siteName): ?string
|
||||
|
||||
$dirs = [];
|
||||
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
if (is_dir($path.'/'.$file) && ! in_array($file, ['.', '..'])) {
|
||||
$dirs[] = $file;
|
||||
}
|
||||
@@ -178,12 +178,12 @@ public function sitePath(string $siteName): ?string
|
||||
|
||||
// Note: strtolower used below because Nginx only tells us lowercase names
|
||||
foreach ($dirs as $dir) {
|
||||
if (strtolower($dir) === $siteName) {
|
||||
if ($siteName === strtolower($dir)) {
|
||||
// early return when exact match for linked subdomain
|
||||
return $path.'/'.$dir;
|
||||
}
|
||||
|
||||
if (strtolower($dir) === $domain) {
|
||||
if ($domain === strtolower($dir)) {
|
||||
// no early return here because the foreach may still have some subdomains to process with higher priority
|
||||
$valetSitePath = $path.'/'.$dir;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user