diff --git a/src/Command/MagicCommand.php b/src/Command/MagicCommand.php index 4db9677..3be6e74 100644 --- a/src/Command/MagicCommand.php +++ b/src/Command/MagicCommand.php @@ -41,7 +41,7 @@ protected function configure() * @param OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->callForContribute(); return 0; diff --git a/src/Command/RunCommand.php b/src/Command/RunCommand.php index e7f4019..4777bbc 100644 --- a/src/Command/RunCommand.php +++ b/src/Command/RunCommand.php @@ -63,7 +63,7 @@ protected function configure() * * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('debug')) { error_reporting(E_ALL); diff --git a/src/Command/Server/StartCommand.php b/src/Command/Server/StartCommand.php index 5e8281b..3db4e73 100644 --- a/src/Command/Server/StartCommand.php +++ b/src/Command/Server/StartCommand.php @@ -47,7 +47,7 @@ protected function configure() * @param OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->info('Running "server:start" command ... [' . $input->getOption('env') . ']'); @@ -55,14 +55,12 @@ protected function execute(InputInterface $input, OutputInterface $output) $port = $input->getOption('port'); $env = $input->getOption('env'); - $publicDir = $this->getApplication()->getWorkingPath() . DS . 'public'; - // setup BLUZ_ENV to environment // enable BLUZ_DEBUG // use public/routing.php $process = Process::fromShellCommandline( "export BLUZ_ENV=$env && export BLUZ_DEBUG=1 && export BLUZ_LOG=1 && php -S $host:$port routing.php", - $publicDir + $this->getApplication()->getWorkingPath() . DS . 'public' ); $this->write("Server has been started at $host:$port"); diff --git a/src/Command/Server/StatusCommand.php b/src/Command/Server/StatusCommand.php index 9125233..c0b395d 100644 --- a/src/Command/Server/StatusCommand.php +++ b/src/Command/Server/StatusCommand.php @@ -45,7 +45,7 @@ protected function configure() * @param OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->info('Running "server:status" command'); try { diff --git a/src/Command/Server/StopCommand.php b/src/Command/Server/StopCommand.php index 88dc3a9..bbb258e 100644 --- a/src/Command/Server/StopCommand.php +++ b/src/Command/Server/StopCommand.php @@ -45,7 +45,7 @@ protected function configure() * @param OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->info('Running "server:stop" command');