Skip to content

Commit

Permalink
Create property for console output
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 11, 2023
1 parent d272e80 commit 9637621
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/framework/src/Console/Commands/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ class ServeCommand extends Command
/** @var string */
protected $description = 'Start the realtime compiler server.';

protected ConsoleOutput $console;

public function handle(): int
{
$this->configureOutput();
$this->printStartMessage();

$this->runServerProcess(sprintf('php -S %s:%d %s',
Expand Down Expand Up @@ -67,6 +70,13 @@ protected function getEnvironmentVariables(): array
];
}

protected function configureOutput(): void
{
if (! $this->useBasicOutput()) {
$this->console = new ConsoleOutput($this->output->isVerbose());
}
}

protected function printStartMessage(): void
{
$this->useBasicOutput()
Expand Down

0 comments on commit 9637621

Please sign in to comment.