Skip to content

Commit 2733fc7

Browse files
authored
Add method to retrieve the command (#56886)
1 parent 0a823dc commit 2733fc7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Illuminate/Process/FakeInvokedProcess.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ public function id()
7979
return $this->process->processId;
8080
}
8181

82+
/**
83+
* Get the command line for the process.
84+
*
85+
* @return string
86+
*/
87+
public function command()
88+
{
89+
return $this->command;
90+
}
91+
8292
/**
8393
* Send a signal to the process.
8494
*

src/Illuminate/Process/InvokedProcess.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ public function id()
3636
return $this->process->getPid();
3737
}
3838

39+
/**
40+
* Get the command line for the process.
41+
*
42+
* @return string
43+
*/
44+
public function command()
45+
{
46+
return $this->process->getCommandLine();
47+
}
48+
3949
/**
4050
* Send a signal to the process.
4151
*

0 commit comments

Comments
 (0)