1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2022-03-14 04:16:45 +00:00
parent 95aa03977c
commit 9b8c41e3d3
4 changed files with 14 additions and 14 deletions

View File

@@ -383,18 +383,18 @@ public function utilizedPhpVersions()
})->unique();
return $this->nginx->configuredSites()->map(function ($file) use ($fpmSockFiles) {
$content = $this->files->get(VALET_HOME_PATH.'/Nginx/'.$file);
$content = $this->files->get(VALET_HOME_PATH.'/Nginx/'.$file);
// Get the normalized PHP version for this config file, if it's defined
foreach ($fpmSockFiles as $sock) {
if (strpos($content, $sock) !== false) {
// Extract the PHP version number from a custom .sock path;
// for example, "valet74.sock" will output "php74"
$phpVersion = 'php'.str_replace(['valet', '.sock'], '', $sock);
// Get the normalized PHP version for this config file, if it's defined
foreach ($fpmSockFiles as $sock) {
if (strpos($content, $sock) !== false) {
// Extract the PHP version number from a custom .sock path;
// for example, "valet74.sock" will output "php74"
$phpVersion = 'php'.str_replace(['valet', '.sock'], '', $sock);
return $this->normalizePhpVersion($phpVersion); // Example output php@7.4
}
return $this->normalizePhpVersion($phpVersion); // Example output php@7.4
}
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->values()->toArray();
}
})->merge([$this->brew->getLinkedPhpFormula()])->filter()->unique()->values()->toArray();
}
}