[Process] - update @throws phpdoc
This commit is contained in:
parent
9b11c36bd2
commit
2be7029b70
@ -135,7 +135,7 @@ class Process implements \IteratorAggregate
|
|||||||
* @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
|
* @param mixed|null $input The input as stream resource, scalar or \Traversable, or null for no input
|
||||||
* @param int|float|null $timeout The timeout in seconds or null to disable
|
* @param int|float|null $timeout The timeout in seconds or null to disable
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When proc_open is not installed
|
* @throws LogicException When proc_open is not installed
|
||||||
*/
|
*/
|
||||||
public function __construct($command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
|
public function __construct($command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ class Process implements \IteratorAggregate
|
|||||||
*
|
*
|
||||||
* @return static
|
* @return static
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When proc_open is not installed
|
* @throws LogicException When proc_open is not installed
|
||||||
*/
|
*/
|
||||||
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
|
public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
|
||||||
{
|
{
|
||||||
@ -223,9 +223,11 @@ class Process implements \IteratorAggregate
|
|||||||
*
|
*
|
||||||
* @return int The exit status code
|
* @return int The exit status code
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When process can't be launched
|
* @throws RuntimeException When process can't be launched
|
||||||
* @throws RuntimeException When process stopped after receiving signal
|
* @throws RuntimeException When process is already running
|
||||||
* @throws LogicException In case a callback is provided and output has been disabled
|
* @throws ProcessTimedOutException When process timed out
|
||||||
|
* @throws ProcessSignaledException When process stopped after receiving signal
|
||||||
|
* @throws LogicException In case a callback is provided and output has been disabled
|
||||||
*
|
*
|
||||||
* @final
|
* @final
|
||||||
*/
|
*/
|
||||||
@ -390,9 +392,9 @@ class Process implements \IteratorAggregate
|
|||||||
*
|
*
|
||||||
* @return int The exitcode of the process
|
* @return int The exitcode of the process
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When process timed out
|
* @throws ProcessTimedOutException When process timed out
|
||||||
* @throws RuntimeException When process stopped after receiving signal
|
* @throws ProcessSignaledException When process stopped after receiving signal
|
||||||
* @throws LogicException When process is not yet started
|
* @throws LogicException When process is not yet started
|
||||||
*/
|
*/
|
||||||
public function wait(callable $callback = null)
|
public function wait(callable $callback = null)
|
||||||
{
|
{
|
||||||
@ -403,7 +405,7 @@ class Process implements \IteratorAggregate
|
|||||||
if (null !== $callback) {
|
if (null !== $callback) {
|
||||||
if (!$this->processPipes->haveReadSupport()) {
|
if (!$this->processPipes->haveReadSupport()) {
|
||||||
$this->stop(0);
|
$this->stop(0);
|
||||||
throw new \LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait"');
|
throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait"');
|
||||||
}
|
}
|
||||||
$this->callback = $this->buildCallback($callback);
|
$this->callback = $this->buildCallback($callback);
|
||||||
}
|
}
|
||||||
@ -433,8 +435,9 @@ class Process implements \IteratorAggregate
|
|||||||
* from the output in real-time while writing the standard input to the process.
|
* from the output in real-time while writing the standard input to the process.
|
||||||
* It allows to have feedback from the independent process during execution.
|
* It allows to have feedback from the independent process during execution.
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When process timed out
|
* @throws RuntimeException When process timed out
|
||||||
* @throws LogicException When process is not yet started
|
* @throws LogicException When process is not yet started
|
||||||
|
* @throws ProcessTimedOutException In case the timeout was reached
|
||||||
*/
|
*/
|
||||||
public function waitUntil(callable $callback): bool
|
public function waitUntil(callable $callback): bool
|
||||||
{
|
{
|
||||||
@ -443,7 +446,7 @@ class Process implements \IteratorAggregate
|
|||||||
|
|
||||||
if (!$this->processPipes->haveReadSupport()) {
|
if (!$this->processPipes->haveReadSupport()) {
|
||||||
$this->stop(0);
|
$this->stop(0);
|
||||||
throw new \LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".');
|
throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".');
|
||||||
}
|
}
|
||||||
$callback = $this->buildCallback($callback);
|
$callback = $this->buildCallback($callback);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user