@@ -24,8 +24,6 @@ class RestartHorizon extends Command
2424
2525 /**
2626 * Execute the console command.
27- *
28- * @return int
2927 */
3028 public function handle (): int
3129 {
@@ -41,7 +39,7 @@ public function handle(): int
4139 $ masterSupervisors = $ horizon ->all ();
4240
4341 // If none is running, we should start Horizon.
44- if ( count ($ masterSupervisors ) === 0 ) {
42+ if (count ($ masterSupervisors ) === 0 ) {
4543 $ this ->error ('Horizon is not running. ' );
4644
4745 return $ this ->startHorizon ();
@@ -51,12 +49,12 @@ public function handle(): int
5149 $ masterSupervisor = $ masterSupervisors [0 ];
5250
5351 // If paused, we can resume it.
54- if ( $ masterSupervisor ->status === 'paused ' ) {
52+ if ($ masterSupervisor ->status === 'paused ' ) {
5553 $ this ->warn ('Horizon is running, but the status is paused. ' );
56- if ( $ this ->option ('resume-if-paused ' ) ) {
54+ if ($ this ->option ('resume-if-paused ' )) {
5755 $ this ->info ('Resuming Horizon. ' );
5856 $ this ->call ('horizon:continue ' );
59- } else if ( ! $ this ->option ('silent ' ) && $ this ->confirm ('Do you want to resume Horizon? ' ) ) {
57+ } elseif ( ! $ this ->option ('silent ' ) && $ this ->confirm ('Do you want to resume Horizon? ' )) {
6058 $ this ->info ('Resuming Horizon. ' );
6159 $ this ->call ('horizon:continue ' );
6260 } else {
@@ -76,14 +74,14 @@ protected function startHorizon(): int
7674
7775 $ phpPath = $ this ->option ('php-path ' ) ?? 'php ' ;
7876
79- $ fp = popen ("{$ phpPath } artisan horizon " , " r " );
77+ $ fp = popen ("{$ phpPath } artisan horizon " , ' r ' );
8078
8179 while (! feof ($ fp )) {
8280 $ buffer = fgets ($ fp , 4096 );
8381 echo $ buffer ;
8482 }
8583
86- $ this ->error (" Horizon was terminated and could not be started " );
84+ $ this ->error (' Horizon was terminated and could not be started ' );
8785
8886 pclose ($ fp );
8987
0 commit comments