@@ -20,7 +20,7 @@ class ChildProcess
20
20
21
21
public function __construct (protected Client $ client ) {}
22
22
23
- public function get (string $ alias = null ): ?static
23
+ public function get (? string $ alias = null ): ?static
24
24
{
25
25
$ alias = $ alias ?? $ this ->alias ;
26
26
@@ -35,7 +35,7 @@ public function get(string $alias = null): ?static
35
35
36
36
public function all (): array
37
37
{
38
- $ processes = $ this ->client ->get (" child-process/ " )->json ();
38
+ $ processes = $ this ->client ->get (' child-process/ ' )->json ();
39
39
40
40
if (empty ($ processes )) {
41
41
return [];
@@ -57,8 +57,7 @@ public function start(
57
57
?string $ cwd = null ,
58
58
?array $ env = null ,
59
59
bool $ persistent = false
60
- ): static
61
- {
60
+ ): static {
62
61
$ process = $ this ->client ->post ('child-process/start ' , [
63
62
'alias ' => $ alias ,
64
63
'cmd ' => $ cmd ,
@@ -70,14 +69,14 @@ public function start(
70
69
return $ this ->fromRuntimeProcess ($ process );
71
70
}
72
71
73
- public function stop (string $ alias = null ): void
72
+ public function stop (? string $ alias = null ): void
74
73
{
75
74
$ this ->client ->post ('child-process/stop ' , [
76
75
'alias ' => $ alias ?? $ this ->alias ,
77
76
])->json ();
78
77
}
79
78
80
- public function restart (string $ alias = null ): ?static
79
+ public function restart (? string $ alias = null ): ?static
81
80
{
82
81
$ process = $ this ->client ->post ('child-process/restart ' , [
83
82
'alias ' => $ alias ?? $ this ->alias ,
@@ -90,7 +89,7 @@ public function restart(string $alias = null): ?static
90
89
return $ this ->fromRuntimeProcess ($ process );
91
90
}
92
91
93
- public function message (string $ message , string $ alias = null ): static
92
+ public function message (string $ message , ? string $ alias = null ): static
94
93
{
95
94
$ this ->client ->post ('child-process/message ' , [
96
95
'alias ' => $ alias ?? $ this ->alias ,
0 commit comments