mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 13:40:00 +09:00
Update to laravel 7
This commit is contained in:
@@ -29,8 +29,6 @@ class ApplicationTester
|
||||
use TesterTrait;
|
||||
|
||||
private $application;
|
||||
private $input;
|
||||
private $statusCode;
|
||||
|
||||
public function __construct(Application $application)
|
||||
{
|
||||
@@ -47,31 +45,21 @@ class ApplicationTester
|
||||
* * verbosity: Sets the output verbosity flag
|
||||
* * capture_stderr_separately: Make output of stdOut and stdErr separately available
|
||||
*
|
||||
* @param array $input An array of arguments and options
|
||||
* @param array $options An array of options
|
||||
*
|
||||
* @return int The command exit code
|
||||
*/
|
||||
public function run(array $input, $options = [])
|
||||
public function run(array $input, array $options = [])
|
||||
{
|
||||
$this->input = new ArrayInput($input);
|
||||
if (isset($options['interactive'])) {
|
||||
$this->input->setInteractive($options['interactive']);
|
||||
}
|
||||
|
||||
$shellInteractive = getenv('SHELL_INTERACTIVE');
|
||||
|
||||
if ($this->inputs) {
|
||||
$this->input->setStream(self::createStream($this->inputs));
|
||||
putenv('SHELL_INTERACTIVE=1');
|
||||
}
|
||||
|
||||
$this->initOutput($options);
|
||||
|
||||
$this->statusCode = $this->application->run($this->input, $this->output);
|
||||
|
||||
putenv($shellInteractive ? "SHELL_INTERACTIVE=$shellInteractive" : 'SHELL_INTERACTIVE');
|
||||
|
||||
return $this->statusCode;
|
||||
return $this->statusCode = $this->application->run($this->input, $this->output);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user