Skip to content

Commit

Permalink
compatible with Illuminate\Console\Application::call($command, array …
Browse files Browse the repository at this point in the history
…$parameters = Array, $outputBuffer = NULL)
  • Loading branch information
recca0120 committed Dec 18, 2017
1 parent 18ccee0 commit a81960f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Application.php
Expand Up @@ -15,15 +15,16 @@ class Application extends ConsoleApplication
*
* @param string $command
* @param array $parameters
* @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer
* @return int
*/
public function call($command, array $parameters = [])
public function call($command, array $parameters = [], $outputBuffer = null)
{
if ($this->ajax() === true) {
$this->lastOutput = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true, new OutputFormatter(true));
$this->lastOutput = $outputBuffer ?: new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true, new OutputFormatter(true));
$this->setCatchExceptions(true);
} else {
$this->lastOutput = new BufferedOutput();
$this->lastOutput = $outputBuffer ?: new BufferedOutput();
$this->setCatchExceptions(false);
}

Expand Down

0 comments on commit a81960f

Please sign in to comment.