rector/vendor/symfony/console/Event/ConsoleCommandEvent.php
Tomas Votruba 84f68c601f Updated Rector to commit daa44253f9b2f28c488d2b39d6f661a9356ff571
daa44253f9 [DowngradePhp74][DowngradePhp80] Apply ternary with method_exists on DowngradeReflectionGetTypeRector + DowngradeReflectionGetAttributesRector (#1530)
2021-12-20 12:13:23 +00:00

47 lines
1.3 KiB
PHP

<?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 RectorPrefix20211220\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 class ConsoleCommandEvent extends \RectorPrefix20211220\Symfony\Component\Console\Event\ConsoleEvent
{
/**
* The return code for skipped commands, this will also be passed into the terminate event.
*/
public const RETURN_CODE_DISABLED = 113;
/**
* Indicates if the command should be run or skipped.
*/
private bool $commandShouldRun = \true;
/**
* Disables the command, so it won't be run.
*/
public function disableCommand() : bool
{
return $this->commandShouldRun = \false;
}
public function enableCommand() : bool
{
return $this->commandShouldRun = \true;
}
/**
* Returns true if the command is runnable, false otherwise.
*/
public function commandShouldRun() : bool
{
return $this->commandShouldRun;
}
}