Skip to content

Commit

Permalink
Merge pull request #565 from jesusgoku/fix/fpmConfigPath-method
Browse files Browse the repository at this point in the history
Fix return string with php-fpm config path for linked PHP
  • Loading branch information
adamwathan authored Apr 9, 2018
2 parents d32afd8 + 0da2c6f commit 38ab8e1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cli/Valet/PhpFpm.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ function stop()
*/
function fpmConfigPath()
{
return array_map(function ($version) {
$versionNormalized = preg_replace(
'/php@?(\d)\.?(\d)/',
'$1.$2',
$version === 'php' ? Brew::LATEST_PHP_VERSION : $version
);

return $versionNormalized === '5.6'
? '/usr/local/etc/php/5.6/php-fpm.conf'
: "/usr/local/etc/php/${versionNormalized}/php-fpm.d/www.conf";
}, Brew::SUPPORTED_PHP_VERSIONS);
$version = $this->brew->linkedPhp();

$versionNormalized = preg_replace(
'/php@?(\d)\.?(\d)/',
'$1.$2',
$version === 'php' ? Brew::LATEST_PHP_VERSION : $version
);

return $versionNormalized === '5.6'
? '/usr/local/etc/php/5.6/php-fpm.conf'
: "/usr/local/etc/php/${versionNormalized}/php-fpm.d/www.conf";
}
}

0 comments on commit 38ab8e1

Please sign in to comment.