composer update, composer corelibs update, admin pages update
This commit is contained in:
12
vendor/symfony/console/Question/Question.php
vendored
12
vendor/symfony/console/Question/Question.php
vendored
@@ -146,12 +146,11 @@ class Question
|
||||
if (\is_array($values)) {
|
||||
$values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
|
||||
|
||||
$callback = static function () use ($values) {
|
||||
return $values;
|
||||
};
|
||||
$callback = static fn () => $values;
|
||||
} elseif ($values instanceof \Traversable) {
|
||||
$valueCache = null;
|
||||
$callback = static function () use ($values, &$valueCache) {
|
||||
$callback = static function () use ($values) {
|
||||
static $valueCache;
|
||||
|
||||
return $valueCache ??= iterator_to_array($values, false);
|
||||
};
|
||||
} else {
|
||||
@@ -267,6 +266,9 @@ class Question
|
||||
return $this->normalizer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
protected function isAssoc(array $array)
|
||||
{
|
||||
return (bool) \count(array_filter(array_keys($array), 'is_string'));
|
||||
|
||||
Reference in New Issue
Block a user