diff --git a/src/NewCommand.php b/src/NewCommand.php index d1b5cec..34e3ae2 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -788,30 +788,6 @@ protected function isParked(string $directory) return $output !== false ? in_array(dirname($directory), json_decode($output)) : false; } - /** - * Runs the given command on "herd" or "valet" cli. - * - * @param string $command - * @return string|bool - */ - protected function runOnValetOrHerd(string $command) - { - foreach (['herd', 'valet'] as $tool) { - $process = new Process([$tool, $command, '-v']); - - try { - $process->run(); - - if ($process->isSuccessful()) { - return trim($process->getOutput()); - } - } catch (ProcessStartFailedException) { - } - } - - return false; - } - /** * Get the version that should be downloaded. * @@ -851,6 +827,30 @@ protected function phpBinary() : 'php'; } + /** + * Runs the given command on the "herd" or "valet" CLI. + * + * @param string $command + * @return string|bool + */ + protected function runOnValetOrHerd(string $command) + { + foreach (['herd', 'valet'] as $tool) { + $process = new Process([$tool, $command, '-v']); + + try { + $process->run(); + + if ($process->isSuccessful()) { + return trim($process->getOutput()); + } + } catch (ProcessStartFailedException) { + } + } + + return false; + } + /** * Run the given commands. *