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

Fix styleci & drop typehint for php5.6 compatibility

This commit is contained in:
Cristian Calara
2022-01-08 11:05:41 +02:00
parent 9e3a89c742
commit 70335bade8
2 changed files with 5 additions and 6 deletions

View File

@@ -384,7 +384,7 @@ public function getAllRunningServices()
/**
* Get the currently running brew services as root.
* i.e. /Library/LaunchDaemons (started at boot)
* i.e. /Library/LaunchDaemons (started at boot).
*
* @return \Illuminate\Support\Collection
*/
@@ -395,7 +395,7 @@ public function getRunningServicesAsRoot()
/**
* Get the currently running brew services.
* i.e. ~/Library/LaunchAgents (started at login)
* i.e. ~/Library/LaunchAgents (started at login).
*
* @return \Illuminate\Support\Collection
*/
@@ -410,7 +410,7 @@ public function getRunningServicesAsUser()
* @param bool $asUser
* @return \Illuminate\Support\Collection
*/
public function getRunningServices(bool $asUser = false)
public function getRunningServices($asUser = false)
{
$command = 'brew services list | grep started | awk \'{ print $1; }\'';
$onError = function ($exitCode, $errorOutput) {
@@ -421,7 +421,7 @@ public function getRunningServices(bool $asUser = false)
return collect(array_filter(explode(PHP_EOL, $asUser
? $this->cli->runAsUser($command, $onError)
: $this->cli->run('sudo ' . $command, $onError)
: $this->cli->run('sudo '.$command, $onError)
)));
}

View File

@@ -348,7 +348,6 @@ public function test_getAllRunningServices_will_return_both_root_and_user_servic
], array_values($result->all()));
}
public function test_getAllRunningServices_will_return_unique_services()
{
$cli = Mockery::mock(CommandLine::class);
@@ -361,7 +360,7 @@ public function test_getAllRunningServices_will_return_unique_services()
'service1',
'service2',
'service3',
'service4'
'service4',
], array_values($result->all()));
}