fix:更新已知bug,优化代码
This commit is contained in:
@@ -26,7 +26,7 @@ final class ConsoleCommandEvent extends ConsoleEvent
|
||||
/**
|
||||
* Indicates if the command should be run or skipped.
|
||||
*/
|
||||
private $commandShouldRun = true;
|
||||
private bool $commandShouldRun = true;
|
||||
|
||||
/**
|
||||
* Disables the command, so it won't be run.
|
||||
|
||||
@@ -22,8 +22,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*/
|
||||
final class ConsoleErrorEvent extends ConsoleEvent
|
||||
{
|
||||
private $error;
|
||||
private $exitCode;
|
||||
private \Throwable $error;
|
||||
private int $exitCode;
|
||||
|
||||
public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
|
||||
{
|
||||
|
||||
12
vendor/symfony/console/Event/ConsoleEvent.php
vendored
12
vendor/symfony/console/Event/ConsoleEvent.php
vendored
@@ -37,30 +37,24 @@ class ConsoleEvent extends Event
|
||||
|
||||
/**
|
||||
* Gets the command that is executed.
|
||||
*
|
||||
* @return Command|null
|
||||
*/
|
||||
public function getCommand()
|
||||
public function getCommand(): ?Command
|
||||
{
|
||||
return $this->command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the input instance.
|
||||
*
|
||||
* @return InputInterface
|
||||
*/
|
||||
public function getInput()
|
||||
public function getInput(): InputInterface
|
||||
{
|
||||
return $this->input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the output instance.
|
||||
*
|
||||
* @return OutputInterface
|
||||
*/
|
||||
public function getOutput()
|
||||
public function getOutput(): OutputInterface
|
||||
{
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*/
|
||||
final class ConsoleSignalEvent extends ConsoleEvent
|
||||
{
|
||||
private $handlingSignal;
|
||||
private int $handlingSignal;
|
||||
|
||||
public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
*/
|
||||
final class ConsoleTerminateEvent extends ConsoleEvent
|
||||
{
|
||||
private $exitCode;
|
||||
private int $exitCode;
|
||||
|
||||
public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user