upgraded dependencies
This commit is contained in:
@@ -15,10 +15,8 @@ namespace Symfony\Component\Console\Event;
|
||||
* Allows to do things before the command is executed, like skipping the command or changing the input.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ConsoleCommandEvent extends ConsoleEvent
|
||||
final class ConsoleCommandEvent extends ConsoleEvent
|
||||
{
|
||||
/**
|
||||
* The return code for skipped commands, this will also be passed into the terminate event.
|
||||
@@ -32,30 +30,21 @@ class ConsoleCommandEvent extends ConsoleEvent
|
||||
|
||||
/**
|
||||
* Disables the command, so it won't be run.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function disableCommand()
|
||||
public function disableCommand(): bool
|
||||
{
|
||||
return $this->commandShouldRun = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the command.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function enableCommand()
|
||||
public function enableCommand(): bool
|
||||
{
|
||||
return $this->commandShouldRun = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the command is runnable, false otherwise.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function commandShouldRun()
|
||||
public function commandShouldRun(): bool
|
||||
{
|
||||
return $this->commandShouldRun;
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ namespace Symfony\Component\Console\Event;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Allows to inspect input and output of a command.
|
||||
@@ -38,7 +38,7 @@ class ConsoleEvent extends Event
|
||||
/**
|
||||
* Gets the command that is executed.
|
||||
*
|
||||
* @return Command|null A Command instance
|
||||
* @return Command|null
|
||||
*/
|
||||
public function getCommand()
|
||||
{
|
||||
@@ -48,7 +48,7 @@ class ConsoleEvent extends Event
|
||||
/**
|
||||
* Gets the input instance.
|
||||
*
|
||||
* @return InputInterface An InputInterface instance
|
||||
* @return InputInterface
|
||||
*/
|
||||
public function getInput()
|
||||
{
|
||||
@@ -58,7 +58,7 @@ class ConsoleEvent extends Event
|
||||
/**
|
||||
* Gets the output instance.
|
||||
*
|
||||
* @return OutputInterface An OutputInterface instance
|
||||
* @return OutputInterface
|
||||
*/
|
||||
public function getOutput()
|
||||
{
|
||||
|
35
vendor/symfony/console/Event/ConsoleSignalEvent.php
vendored
Normal file
35
vendor/symfony/console/Event/ConsoleSignalEvent.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Console\Event;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* @author marie <marie@users.noreply.github.com>
|
||||
*/
|
||||
final class ConsoleSignalEvent extends ConsoleEvent
|
||||
{
|
||||
private $handlingSignal;
|
||||
|
||||
public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $handlingSignal)
|
||||
{
|
||||
parent::__construct($command, $input, $output);
|
||||
$this->handlingSignal = $handlingSignal;
|
||||
}
|
||||
|
||||
public function getHandlingSignal(): int
|
||||
{
|
||||
return $this->handlingSignal;
|
||||
}
|
||||
}
|
@@ -19,10 +19,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
* Allows to manipulate the exit code of a command after its execution.
|
||||
*
|
||||
* @author Francesco Levorato <git@flevour.net>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ConsoleTerminateEvent extends ConsoleEvent
|
||||
final class ConsoleTerminateEvent extends ConsoleEvent
|
||||
{
|
||||
private $exitCode;
|
||||
|
||||
@@ -33,22 +31,12 @@ class ConsoleTerminateEvent extends ConsoleEvent
|
||||
$this->setExitCode($exitCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the exit code.
|
||||
*
|
||||
* @param int $exitCode The command exit code
|
||||
*/
|
||||
public function setExitCode($exitCode)
|
||||
public function setExitCode(int $exitCode): void
|
||||
{
|
||||
$this->exitCode = (int) $exitCode;
|
||||
$this->exitCode = $exitCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exit code.
|
||||
*
|
||||
* @return int The command exit code
|
||||
*/
|
||||
public function getExitCode()
|
||||
public function getExitCode(): int
|
||||
{
|
||||
return $this->exitCode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user