From b4065b2f5aeb90f712b5ef8dea8a3c9c5575b7e1 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 6 Oct 2012 06:39:50 +0200 Subject: [PATCH 1/2] added doc comments --- Process.php | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Process.php b/Process.php index c542758d..8ced3e16 100644 --- a/Process.php +++ b/Process.php @@ -292,71 +292,141 @@ public function getStopSignal() return $this->status['stopsig']; } + /** + * Adds a line to the STDOUT stream + * + * @param string $line The line to append + */ public function addOutput($line) { $this->stdout .= $line; } + /** + * Adds a line to the STDERR stream + * + * @param string $line The line to append + */ public function addErrorOutput($line) { $this->stderr .= $line; } + /** + * Gets the command line to be executed + * + * @return string The command to execute + */ public function getCommandLine() { return $this->commandline; } + /** + * Sets the command line to be executed + * + * @param string $commandline The command to execute + */ public function setCommandLine($commandline) { $this->commandline = $commandline; } + /** + * Gets the process timeout + * + * @return integer The timeout in seconds + */ public function getTimeout() { return $this->timeout; } + /** + * Sets the process timeout + * + * @param integer|null $timeout The timeout in seconds + */ public function setTimeout($timeout) { $this->timeout = $timeout; } + /** + * Gets the working directory + * + * @return string The current working directory + */ public function getWorkingDirectory() { return $this->cwd; } + /** + * Sets the current working directory + * + * @param string $cwd The new working directory + */ public function setWorkingDirectory($cwd) { $this->cwd = $cwd; } + /** + * Gets the environment variables + * + * @return array The current environment variables + */ public function getEnv() { return $this->env; } + /** + * Sets the environment variables + * + * @param array $env The new environment variables + */ public function setEnv(array $env) { $this->env = $env; } + /** + * Gets the contents of STDIN + * + * @return string The current contents + */ public function getStdin() { return $this->stdin; } + /** + * Sets the contents of STDIN + * + * @param string $stdin The new contents + */ public function setStdin($stdin) { $this->stdin = $stdin; } + /** + * Gets the options for proc_open + * + * @return array The current options + */ public function getOptions() { return $this->options; } + /** + * Sets the options for proc_open + * + * @param array $options The new options + */ public function setOptions(array $options) { $this->options = $options; From 534f8396473e5ec45af023ca17dd7f6e89df1f63 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 6 Oct 2012 14:46:45 +0200 Subject: [PATCH 2/2] fixed CS --- Process.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Process.php b/Process.php index 8ced3e16..7c6d1355 100644 --- a/Process.php +++ b/Process.php @@ -279,7 +279,7 @@ public function hasBeenStopped() } /** - * Returns the number of the signal that caused the child process to stop its execution + * Returns the number of the signal that caused the child process to stop its execution. * * It is only meaningful if hasBeenStopped() returns true. * @@ -293,7 +293,7 @@ public function getStopSignal() } /** - * Adds a line to the STDOUT stream + * Adds a line to the STDOUT stream. * * @param string $line The line to append */ @@ -303,7 +303,7 @@ public function addOutput($line) } /** - * Adds a line to the STDERR stream + * Adds a line to the STDERR stream. * * @param string $line The line to append */ @@ -313,7 +313,7 @@ public function addErrorOutput($line) } /** - * Gets the command line to be executed + * Gets the command line to be executed. * * @return string The command to execute */ @@ -323,7 +323,7 @@ public function getCommandLine() } /** - * Sets the command line to be executed + * Sets the command line to be executed. * * @param string $commandline The command to execute */ @@ -333,7 +333,7 @@ public function setCommandLine($commandline) } /** - * Gets the process timeout + * Gets the process timeout. * * @return integer The timeout in seconds */ @@ -343,7 +343,7 @@ public function getTimeout() } /** - * Sets the process timeout + * Sets the process timeout. * * @param integer|null $timeout The timeout in seconds */ @@ -353,7 +353,7 @@ public function setTimeout($timeout) } /** - * Gets the working directory + * Gets the working directory. * * @return string The current working directory */ @@ -363,7 +363,7 @@ public function getWorkingDirectory() } /** - * Sets the current working directory + * Sets the current working directory. * * @param string $cwd The new working directory */ @@ -373,7 +373,7 @@ public function setWorkingDirectory($cwd) } /** - * Gets the environment variables + * Gets the environment variables. * * @return array The current environment variables */ @@ -383,7 +383,7 @@ public function getEnv() } /** - * Sets the environment variables + * Sets the environment variables. * * @param array $env The new environment variables */ @@ -393,7 +393,7 @@ public function setEnv(array $env) } /** - * Gets the contents of STDIN + * Gets the contents of STDIN. * * @return string The current contents */ @@ -403,7 +403,7 @@ public function getStdin() } /** - * Sets the contents of STDIN + * Sets the contents of STDIN. * * @param string $stdin The new contents */ @@ -413,7 +413,7 @@ public function setStdin($stdin) } /** - * Gets the options for proc_open + * Gets the options for proc_open. * * @return array The current options */ @@ -423,7 +423,7 @@ public function getOptions() } /** - * Sets the options for proc_open + * Sets the options for proc_open. * * @param array $options The new options */