mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-13 20:36:23 +01:00
9b5515a16d
4f4c416041
[CodeQuality] Skip UnusedForeachValueToArrayKeysRector when value used in compact (#100)
61 lines
1.8 KiB
PHP
61 lines
1.8 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 RectorPrefix20210525\Symfony\Component\Console\Event;
|
|
|
|
use RectorPrefix20210525\Symfony\Component\Console\Command\Command;
|
|
use RectorPrefix20210525\Symfony\Component\Console\Input\InputInterface;
|
|
use RectorPrefix20210525\Symfony\Component\Console\Output\OutputInterface;
|
|
use RectorPrefix20210525\Symfony\Contracts\EventDispatcher\Event;
|
|
/**
|
|
* Allows to inspect input and output of a command.
|
|
*
|
|
* @author Francesco Levorato <git@flevour.net>
|
|
*/
|
|
class ConsoleEvent extends \RectorPrefix20210525\Symfony\Contracts\EventDispatcher\Event
|
|
{
|
|
protected $command;
|
|
private $input;
|
|
private $output;
|
|
public function __construct(\RectorPrefix20210525\Symfony\Component\Console\Command\Command $command = null, \RectorPrefix20210525\Symfony\Component\Console\Input\InputInterface $input, \RectorPrefix20210525\Symfony\Component\Console\Output\OutputInterface $output)
|
|
{
|
|
$this->command = $command;
|
|
$this->input = $input;
|
|
$this->output = $output;
|
|
}
|
|
/**
|
|
* Gets the command that is executed.
|
|
*
|
|
* @return Command|null A Command instance
|
|
*/
|
|
public function getCommand()
|
|
{
|
|
return $this->command;
|
|
}
|
|
/**
|
|
* Gets the input instance.
|
|
*
|
|
* @return InputInterface An InputInterface instance
|
|
*/
|
|
public function getInput()
|
|
{
|
|
return $this->input;
|
|
}
|
|
/**
|
|
* Gets the output instance.
|
|
*
|
|
* @return OutputInterface An OutputInterface instance
|
|
*/
|
|
public function getOutput()
|
|
{
|
|
return $this->output;
|
|
}
|
|
}
|