Skip to content

Commit 48202bd

Browse files
committed
docs: format code docblocks and comment typings.
1 parent 9e54e05 commit 48202bd

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

cli/Valet/CommandLine.php

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CommandLine {
88
/**
99
* Pass the command to the command line and display the output.
1010
*
11-
* @param string $command
11+
* @param string $command
1212
* @return void
1313
*/
1414
public function passthru($command) {
@@ -32,8 +32,8 @@ public function sudo($valetCommand) {
3232
/**
3333
* Run the given command as the non-root user.
3434
*
35-
* @param string $command
36-
* @param callable $onError
35+
* @param string $command
36+
* @param callable|null $onError
3737
* @param boolean $realTimeOutput Set to `true` to get the output in real time as the command is running. Default: `false`
3838
* @return ProcessOutput
3939
*/
@@ -44,8 +44,8 @@ public function run($command, ?callable $onError = null, $realTimeOutput = false
4444
/**
4545
* Run the given command.
4646
*
47-
* @param string $command
48-
* @param callable $onError
47+
* @param string $command
48+
* @param callable|null $onError
4949
* @param boolean $realTimeOutput Set to `true` to get the output in real time as the command is running. Default: `false`
5050
* @return ProcessOutput
5151
*/
@@ -56,8 +56,8 @@ public function runAsUser($command, ?callable $onError = null, $realTimeOutput =
5656
/**
5757
* Run the given command with PowerShell.
5858
*
59-
* @param string $command
60-
* @param callable|null $onError
59+
* @param string $command
60+
* @param callable|null $onError
6161
* @param boolean $realTimeOutput Set to `true` to get the output in real time as the command is running. Default: `false`
6262
* @return ProcessOutput
6363
*/
@@ -68,12 +68,16 @@ public function powershell(string $command, ?callable $onError = null, $realTime
6868
/**
6969
* Run the given command and exit if fails.
7070
*
71-
* @param string $command
72-
* @param callable $onError (int $code, string $output)
71+
* @param string $command
72+
* @param callable|null $onError
7373
* @param boolean $realTimeOutput Set to `true` to get the output in real time as the command is running. Default: `false`
7474
* @return ProcessOutput
7575
*/
7676
public function runOrExit($command, ?callable $onError = null, $realTimeOutput = false) {
77+
/**
78+
* @param int $code Error code
79+
* @param string $output Error output
80+
*/
7781
return $this->run($command, function ($code, $output) use ($onError) {
7882
if ($onError) {
7983
$onError($code, $output);
@@ -86,8 +90,8 @@ public function runOrExit($command, ?callable $onError = null, $realTimeOutput =
8690
/**
8791
* Run the given command.
8892
*
89-
* @param string $command
90-
* @param callable $onError
93+
* @param string $command
94+
* @param callable|null $onError
9195
* @param boolean $realTimeOutput Set to `true` to get the output in real time as the command is running. Default: `false`
9296
* @return ProcessOutput|void Returns a ProcessOutput only if the real time is `false`, otherwise it doesn't return anything (void) as it's echoing out in real time.
9397
*/

0 commit comments

Comments
 (0)