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

refactor code & tests

This commit is contained in:
NasirNobin
2022-03-22 19:07:45 +06:00
parent 245c68e708
commit 720fed1a43
3 changed files with 97 additions and 55 deletions

View File

@@ -564,7 +564,7 @@
/**
* Get PHP Birnary
*/
$app->command('which-php [site]', function ($site = null) {
$app->command('which-php [site] [--skip-cache]', function ($site, $skipCache) {
$host = Site::host($site ?: getcwd()).'.'.Configuration::read()['tld'];
$phpVersion = Site::customPhpVersion($host);
@@ -577,9 +577,10 @@
$phpVersion = $phpVersion ? PhpFpm::normalizePhpVersion($phpVersion) : null;
return output(Brew::getPhpBinaryPath($phpVersion));
return output(Brew::whichPhp($phpVersion, $skipCache));
})->descriptions('Get the PHP binary path for a given site', [
'site' => 'The site to get the PHP binary path for',
'--skip-cache' => 'Force a re-check of the PHP binary path',
]);
/**