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

Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2022-03-12 05:06:07 +00:00
parent eefc06b07f
commit e797774ade
2 changed files with 7 additions and 8 deletions

View File

@@ -71,7 +71,7 @@ public function uninstall()
/**
* Create (or re-create) the PHP FPM configuration files.
* Writes FPM config file, pointing to the correct .sock file, and log and ini files
* Writes FPM config file, pointing to the correct .sock file, and log and ini files.
*
* @param string|null $phpVersion
* @return void
@@ -93,7 +93,7 @@ public function createConfigurationFiles($phpVersion = null)
$this->files->put($fpmConfigFile, $contents);
// Set log and ini files
$destDir = dirname(dirname($fpmConfigFile)) . '/conf.d';
$destDir = dirname(dirname($fpmConfigFile)).'/conf.d';
$this->files->ensureDirExists($destDir, user());
$contents = $this->files->get(__DIR__.'/../stubs/php-memory-limits.ini');
@@ -191,7 +191,7 @@ public function stopIfUnused($phpVersion = null)
*/
public function isolateDirectoryToVersion($directory, $version)
{
if (!$site = $this->site->getSiteUrl($directory)) {
if (! $site = $this->site->getSiteUrl($directory)) {
throw new DomainException("The [{$directory}] site could not be found in Valet's site list.");
}
@@ -210,7 +210,7 @@ public function isolateDirectoryToVersion($directory, $version)
}
/**
* Remove PHP version isolation for a given directory
* Remove PHP version isolation for a given directory.
*
* @param string $directory
* @return void
@@ -219,7 +219,7 @@ public function unIsolateDirectory($directory)
{
$site = $this->site->getSiteUrl($directory);
if (!$site) {
if (! $site) {
throw new DomainException(
sprintf(
"The [%s] site could not be found in Valet's site list.",
@@ -303,7 +303,7 @@ public function normalizePhpVersion($version)
{
// @todo There's probably a way to incorporate this into the regex
if (strpos($version, 'php') === false) {
$version = 'php' . $version;
$version = 'php'.$version;
}
return preg_replace('/(php)([0-9+])(?:.)?([0-9+])/i', '$1@$2.$3', $version);
@@ -312,7 +312,7 @@ public function normalizePhpVersion($version)
/**
* Validate the requested version to be sure we can support it.
*
* @param string $version
* @param string $version
* @return string
*/
public function validateRequestedVersion($version)