mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-19 06:18:07 +01:00
Updated Rector to commit d92de44cc5c26ce57fd745e6a4ce0214a23184be
d92de44cc5
use symfony/console with fixed covariant types (#378)
This commit is contained in:
parent
bb3e86de23
commit
2d78685dea
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '904a5a7a1c8dd041524cb51ec3a689ad4cbef436';
|
||||
public const PACKAGE_VERSION = 'd92de44cc5c26ce57fd745e6a4ce0214a23184be';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-07-04 23:04:09';
|
||||
public const RELEASE_DATE = '2021-07-04 22:34:37';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210704\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2::getLoader();
|
||||
return ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
class ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,15 +22,15 @@ class ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitba1128297356ef9f1033845735bc38c4::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
@ -42,19 +42,19 @@ class ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitba1128297356ef9f1033845735bc38c4::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2($fileIdentifier, $file);
|
||||
composerRequireba1128297356ef9f1033845735bc38c4($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2($fileIdentifier, $file)
|
||||
function composerRequireba1128297356ef9f1033845735bc38c4($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
class ComposerStaticInitba1128297356ef9f1033845735bc38c4
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
@ -3845,9 +3845,9 @@ class ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd12afff95d0d64dcd0dd26bf8b6c1fc2::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitba1128297356ef9f1033845735bc38c4::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitba1128297356ef9f1033845735bc38c4::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitba1128297356ef9f1033845735bc38c4::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
15
vendor/composer/installed.json
vendored
15
vendor/composer/installed.json
vendored
@ -1773,17 +1773,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony\/console",
|
||||
"version": "v5.3.2",
|
||||
"version_normalized": "5.3.2.0",
|
||||
"version": "5.3.x-dev",
|
||||
"version_normalized": "5.3.9999999.9999999-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/symfony\/console.git",
|
||||
"reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1"
|
||||
"reference": "8d91db2115506edcf6adef0a8ab2782498597126"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
|
||||
"reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
|
||||
"url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/8d91db2115506edcf6adef0a8ab2782498597126",
|
||||
"reference": "8d91db2115506edcf6adef0a8ab2782498597126",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1820,7 +1820,8 @@
|
||||
"symfony\/lock": "",
|
||||
"symfony\/process": ""
|
||||
},
|
||||
"time": "2021-06-12T09:42:48+00:00",
|
||||
"time": "2021-07-04T09:35:31+00:00",
|
||||
"default-branch": true,
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1854,7 +1855,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/v5.3.2"
|
||||
"source": "https:\/\/github.com\/symfony\/console\/tree\/5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false) && !interface_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false) && !trait_exists('ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\ComposerAutoloaderInitd12afff95d0d64dcd0dd26bf8b6c1fc2');
|
||||
if (!class_exists('ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4', false) && !interface_exists('ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4', false) && !trait_exists('ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\ComposerAutoloaderInitba1128297356ef9f1033845735bc38c4');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210704\Doctrine\Inflector\Inflector');
|
||||
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20210704\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2')) {
|
||||
function composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2() {
|
||||
return \RectorPrefix20210704\composerRequired12afff95d0d64dcd0dd26bf8b6c1fc2(...func_get_args());
|
||||
if (!function_exists('composerRequireba1128297356ef9f1033845735bc38c4')) {
|
||||
function composerRequireba1128297356ef9f1033845735bc38c4() {
|
||||
return \RectorPrefix20210704\composerRequireba1128297356ef9f1033845735bc38c4(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
10
vendor/symfony/console/Command/Command.php
vendored
10
vendor/symfony/console/Command/Command.php
vendored
@ -367,8 +367,8 @@ class Command
|
||||
/**
|
||||
* Adds an argument.
|
||||
*
|
||||
* @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
|
||||
* @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only)
|
||||
* @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
|
||||
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
|
||||
*
|
||||
* @throws InvalidArgumentException When argument mode is not valid
|
||||
*
|
||||
@ -385,9 +385,9 @@ class Command
|
||||
/**
|
||||
* Adds an option.
|
||||
*
|
||||
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||
* @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
|
||||
* @param string|string[]|bool|null $default The default value (must be null for InputOption::VALUE_NONE)
|
||||
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||
* @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
|
||||
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
|
||||
*
|
||||
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
||||
*
|
||||
|
@ -30,6 +30,7 @@ abstract class Descriptor implements \RectorPrefix20210704\Symfony\Component\Con
|
||||
protected $output;
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param object $object
|
||||
*/
|
||||
public function describe(\RectorPrefix20210704\Symfony\Component\Console\Output\OutputInterface $output, $object, array $options = [])
|
||||
{
|
||||
|
@ -19,8 +19,6 @@ use RectorPrefix20210704\Symfony\Component\Console\Output\OutputInterface;
|
||||
interface DescriptorInterface
|
||||
{
|
||||
/**
|
||||
* Describes an object if supported.
|
||||
*
|
||||
* @param object $object
|
||||
*/
|
||||
public function describe(\RectorPrefix20210704\Symfony\Component\Console\Output\OutputInterface $output, $object, array $options = []);
|
||||
|
@ -28,6 +28,7 @@ class MarkdownDescriptor extends \RectorPrefix20210704\Symfony\Component\Console
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param object $object
|
||||
*/
|
||||
public function describe(\RectorPrefix20210704\Symfony\Component\Console\Output\OutputInterface $output, $object, array $options = [])
|
||||
{
|
||||
|
8
vendor/symfony/console/Helper/Table.php
vendored
8
vendor/symfony/console/Helper/Table.php
vendored
@ -514,10 +514,10 @@ class Table
|
||||
}
|
||||
return new \RectorPrefix20210704\Symfony\Component\Console\Helper\TableRows(function () use($rows, $unmergedRows) : \Traversable {
|
||||
foreach ($rows as $rowKey => $row) {
|
||||
(yield $this->fillCells($row));
|
||||
(yield $row instanceof \RectorPrefix20210704\Symfony\Component\Console\Helper\TableSeparator ? $row : $this->fillCells($row));
|
||||
if (isset($unmergedRows[$rowKey])) {
|
||||
foreach ($unmergedRows[$rowKey] as $unmergedRow) {
|
||||
(yield $this->fillCells($unmergedRow));
|
||||
foreach ($unmergedRows[$rowKey] as $row) {
|
||||
(yield $row instanceof \RectorPrefix20210704\Symfony\Component\Console\Helper\TableSeparator ? $row : $this->fillCells($row));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -590,7 +590,7 @@ class Table
|
||||
/**
|
||||
* fill cells for a row that contains colspan > 1.
|
||||
*/
|
||||
private function fillCells($row)
|
||||
private function fillCells(iterable $row)
|
||||
{
|
||||
$newRow = [];
|
||||
foreach ($row as $column => $cell) {
|
||||
|
2
vendor/symfony/console/Input/Input.php
vendored
2
vendor/symfony/console/Input/Input.php
vendored
@ -111,7 +111,7 @@ abstract class Input implements \RectorPrefix20210704\Symfony\Component\Console\
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function hasArgument($name)
|
||||
public function hasArgument(string $name)
|
||||
{
|
||||
return $this->definition->hasArgument($name);
|
||||
}
|
||||
|
12
vendor/symfony/console/Input/InputArgument.php
vendored
12
vendor/symfony/console/Input/InputArgument.php
vendored
@ -27,10 +27,10 @@ class InputArgument
|
||||
private $default;
|
||||
private $description;
|
||||
/**
|
||||
* @param string $name The argument name
|
||||
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
|
||||
* @param string $description A description text
|
||||
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
|
||||
* @param string $name The argument name
|
||||
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
|
||||
* @param string $description A description text
|
||||
* @param mixed $default The default value (for self::OPTIONAL mode only)
|
||||
*
|
||||
* @throws InvalidArgumentException When argument mode is not valid
|
||||
*/
|
||||
@ -76,7 +76,7 @@ class InputArgument
|
||||
/**
|
||||
* Sets the default value.
|
||||
*
|
||||
* @param string|string[]|null $default The default value
|
||||
* @param mixed $default The default value
|
||||
*
|
||||
* @throws LogicException When incorrect default value is given
|
||||
*/
|
||||
@ -97,7 +97,7 @@ class InputArgument
|
||||
/**
|
||||
* Returns the default value.
|
||||
*
|
||||
* @return string|string[]|null The default value
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
|
12
vendor/symfony/console/Input/InputInterface.php
vendored
12
vendor/symfony/console/Input/InputInterface.php
vendored
@ -75,7 +75,7 @@ interface InputInterface
|
||||
/**
|
||||
* Returns the argument value for a given argument name.
|
||||
*
|
||||
* @return string|string[]|null The argument value
|
||||
* @return mixed
|
||||
*
|
||||
* @throws InvalidArgumentException When argument given doesn't exist
|
||||
*/
|
||||
@ -83,7 +83,7 @@ interface InputInterface
|
||||
/**
|
||||
* Sets an argument value by name.
|
||||
*
|
||||
* @param string|string[]|null $value The argument value
|
||||
* @param mixed $value The argument value
|
||||
*
|
||||
* @throws InvalidArgumentException When argument given doesn't exist
|
||||
*/
|
||||
@ -91,11 +91,9 @@ interface InputInterface
|
||||
/**
|
||||
* Returns true if an InputArgument object exists by name or position.
|
||||
*
|
||||
* @param string|int $name The InputArgument name or position
|
||||
*
|
||||
* @return bool true if the InputArgument object exists, false otherwise
|
||||
*/
|
||||
public function hasArgument($name);
|
||||
public function hasArgument(string $name);
|
||||
/**
|
||||
* Returns all the given options merged with the default values.
|
||||
*
|
||||
@ -105,7 +103,7 @@ interface InputInterface
|
||||
/**
|
||||
* Returns the option value for a given option name.
|
||||
*
|
||||
* @return string|string[]|bool|null The option value
|
||||
* @return mixed
|
||||
*
|
||||
* @throws InvalidArgumentException When option given doesn't exist
|
||||
*/
|
||||
@ -113,7 +111,7 @@ interface InputInterface
|
||||
/**
|
||||
* Sets an option value by name.
|
||||
*
|
||||
* @param string|string[]|bool|null $value The option value
|
||||
* @param mixed $value The option value
|
||||
*
|
||||
* @throws InvalidArgumentException When option given doesn't exist
|
||||
*/
|
||||
|
12
vendor/symfony/console/Input/InputOption.php
vendored
12
vendor/symfony/console/Input/InputOption.php
vendored
@ -45,11 +45,9 @@ class InputOption
|
||||
private $default;
|
||||
private $description;
|
||||
/**
|
||||
* @param string $name The option name
|
||||
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||
* @param int|null $mode The option mode: One of the VALUE_* constants
|
||||
* @param string $description A description text
|
||||
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
|
||||
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
|
||||
* @param int|null $mode The option mode: One of the VALUE_* constants
|
||||
* @param mixed $default The default value (must be null for self::VALUE_NONE)
|
||||
*
|
||||
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
||||
*/
|
||||
@ -153,7 +151,7 @@ class InputOption
|
||||
/**
|
||||
* Sets the default value.
|
||||
*
|
||||
* @param string|string[]|bool|null $default The default value
|
||||
* @param mixed $default The default value
|
||||
*
|
||||
* @throws LogicException When incorrect default value is given
|
||||
*/
|
||||
@ -174,7 +172,7 @@ class InputOption
|
||||
/**
|
||||
* Returns the default value.
|
||||
*
|
||||
* @return string|string[]|bool|null The default value
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDefault()
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ class ConsoleSectionOutput extends \RectorPrefix20210704\Symfony\Component\Conso
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doWrite($message, $newline)
|
||||
protected function doWrite(string $message, bool $newline)
|
||||
{
|
||||
if (!$this->isDecorated()) {
|
||||
parent::doWrite($message, $newline);
|
||||
|
6
vendor/symfony/console/Output/Output.php
vendored
6
vendor/symfony/console/Output/Output.php
vendored
@ -143,13 +143,11 @@ abstract class Output implements \RectorPrefix20210704\Symfony\Component\Console
|
||||
$message = \strip_tags($this->formatter->format($message));
|
||||
break;
|
||||
}
|
||||
$this->doWrite($message, $newline);
|
||||
$this->doWrite($message ?? '', $newline);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Writes a message to the output.
|
||||
* @param string $message
|
||||
* @param bool $newline
|
||||
*/
|
||||
protected abstract function doWrite($message, $newline);
|
||||
protected abstract function doWrite(string $message, bool $newline);
|
||||
}
|
||||
|
@ -58,10 +58,8 @@ class StreamOutput extends \RectorPrefix20210704\Symfony\Component\Console\Outpu
|
||||
}
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param string $message
|
||||
* @param bool $newline
|
||||
*/
|
||||
protected function doWrite($message, $newline)
|
||||
protected function doWrite(string $message, bool $newline)
|
||||
{
|
||||
if ($newline) {
|
||||
$message .= \PHP_EOL;
|
||||
|
@ -43,7 +43,7 @@ class TrimmedBufferOutput extends \RectorPrefix20210704\Symfony\Component\Consol
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function doWrite($message, $newline)
|
||||
protected function doWrite(string $message, bool $newline)
|
||||
{
|
||||
$this->buffer .= $message;
|
||||
if ($newline) {
|
||||
|
8
vendor/symfony/console/Question/Question.php
vendored
8
vendor/symfony/console/Question/Question.php
vendored
@ -85,13 +85,11 @@ class Question
|
||||
/**
|
||||
* Sets whether the user response must be hidden or not.
|
||||
*
|
||||
* @param bool $hidden
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws LogicException In case the autocompleter is also used
|
||||
*/
|
||||
public function setHidden($hidden)
|
||||
public function setHidden(bool $hidden)
|
||||
{
|
||||
if ($this->autocompleterCallback) {
|
||||
throw new \RectorPrefix20210704\Symfony\Component\Console\Exception\LogicException('A hidden question cannot use the autocompleter.');
|
||||
@ -111,11 +109,9 @@ class Question
|
||||
/**
|
||||
* Sets whether to fallback on non-hidden question if the response can not be hidden.
|
||||
*
|
||||
* @param bool $fallback
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHiddenFallback($fallback)
|
||||
public function setHiddenFallback(bool $fallback)
|
||||
{
|
||||
$this->hiddenFallback = (bool) $fallback;
|
||||
return $this;
|
||||
|
@ -74,7 +74,7 @@ interface StyleInterface
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function ask(string $question, ?string $default = null, callable $validator = null);
|
||||
public function ask(string $question, string $default = null, callable $validator = null);
|
||||
/**
|
||||
* Asks a question with the user input hidden.
|
||||
*
|
||||
|
@ -53,7 +53,7 @@ class SymfonyStyle extends \RectorPrefix20210704\Symfony\Component\Console\Style
|
||||
*
|
||||
* @param string|array $messages The message to write in the block
|
||||
*/
|
||||
public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = \false, bool $escape = \true)
|
||||
public function block($messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = \false, bool $escape = \true)
|
||||
{
|
||||
$messages = \is_array($messages) ? \array_values($messages) : [$messages];
|
||||
$this->autoPrependBlock();
|
||||
@ -227,7 +227,7 @@ class SymfonyStyle extends \RectorPrefix20210704\Symfony\Component\Console\Style
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function ask(string $question, ?string $default = null, $validator = null)
|
||||
public function ask(string $question, string $default = null, callable $validator = null)
|
||||
{
|
||||
$question = new \RectorPrefix20210704\Symfony\Component\Console\Question\Question($question, $default);
|
||||
$question->setValidator($validator);
|
||||
@ -236,7 +236,7 @@ class SymfonyStyle extends \RectorPrefix20210704\Symfony\Component\Console\Style
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function askHidden(string $question, $validator = null)
|
||||
public function askHidden(string $question, callable $validator = null)
|
||||
{
|
||||
$question = new \RectorPrefix20210704\Symfony\Component\Console\Question\Question($question);
|
||||
$question->setHidden(\true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user