/** @var string */
private $stdout;
+ /** @var string|null */
+ private $stderr;
+
/**
* @param int $exitCode
* @param string $stdout
+ * @param string|null $stderr
*/
- public function __construct( $exitCode, $stdout ) {
+ public function __construct( $exitCode, $stdout, $stderr = null ) {
$this->exitCode = $exitCode;
$this->stdout = $stdout;
+ $this->stderr = $stderr;
}
/**
public function getStdout() {
return $this->stdout;
}
+
+ /**
+ * Returns stderr of the process or null if the Command was configured to add stderr to stdout
+ * with includeStderr( true )
+ *
+ * @return string|null
+ */
+ public function getStderr() {
+ return $this->stderr;
+ }
}