Skip to content

Commit

Permalink
Exceptions annotations (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 19, 2022
1 parent 1b03f26 commit 0ce640b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Application/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@

namespace FastyBird\Plugin\WebServer\Application;

use Exception;
use FastyBird\Plugin\WebServer\Commands;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input;
use Symfony\Component\Console\Output;
use Throwable;
use Symfony\Component\Console as SymfonyConsole;

/**
* Console application
Expand All @@ -32,20 +30,24 @@
class Console
{

private Application $application;
private SymfonyConsole\Application $application;

public function __construct(Application|null $application = null)
public function __construct(SymfonyConsole\Application|null $application = null)
{
$this->application = $application ?? new Application();
$this->application = $application ?? new SymfonyConsole\Application();
}

/**
* @throws Throwable
* @throws Exception
* @throws SymfonyConsole\Exception\InvalidArgumentException
*/
public function run(Input\InputInterface|null $input = null, Output\OutputInterface|null $output = null): int
public function run(
SymfonyConsole\Input\InputInterface|null $input = null,
SymfonyConsole\Output\OutputInterface|null $output = null,
): int
{
if ($input === null) {
$input = new Input\ArrayInput([
$input = new SymfonyConsole\Input\ArrayInput([
'command' => Commands\HttpServer::NAME,
]);

Expand Down

0 comments on commit 0ce640b

Please sign in to comment.