mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-23 19:39:10 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -151,7 +151,7 @@ class ChoiceQuestion extends Question
|
||||
}
|
||||
}
|
||||
|
||||
if (count($results) > 1) {
|
||||
if (\count($results) > 1) {
|
||||
throw new InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results)));
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class ConfirmationQuestion extends Question
|
||||
$regex = $this->trueAnswerRegex;
|
||||
|
||||
return function ($answer) use ($default, $regex) {
|
||||
if (is_bool($answer)) {
|
||||
if (\is_bool($answer)) {
|
||||
return $answer;
|
||||
}
|
||||
|
||||
|
||||
6
vendor/symfony/console/Question/Question.php
vendored
6
vendor/symfony/console/Question/Question.php
vendored
@@ -136,11 +136,11 @@ class Question
|
||||
*/
|
||||
public function setAutocompleterValues($values)
|
||||
{
|
||||
if (is_array($values)) {
|
||||
if (\is_array($values)) {
|
||||
$values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values);
|
||||
}
|
||||
|
||||
if (null !== $values && !is_array($values) && !$values instanceof \Traversable) {
|
||||
if (null !== $values && !\is_array($values) && !$values instanceof \Traversable) {
|
||||
throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.');
|
||||
}
|
||||
|
||||
@@ -241,6 +241,6 @@ class Question
|
||||
|
||||
protected function isAssoc($array)
|
||||
{
|
||||
return (bool) count(array_filter(array_keys($array), 'is_string'));
|
||||
return (bool) \count(array_filter(array_keys($array), 'is_string'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user