Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/console/Question/ChoiceQuestion.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/console/Question/ChoiceQuestion.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/console/Question/ChoiceQuestion.php Thu Feb 28 13:21:36 2019 +0000 @@ -144,19 +144,19 @@ } $selectedChoices = explode(',', $selectedChoices); } else { - $selectedChoices = array($selected); + $selectedChoices = [$selected]; } - $multiselectChoices = array(); + $multiselectChoices = []; foreach ($selectedChoices as $value) { - $results = array(); + $results = []; foreach ($choices as $key => $choice) { if ($choice === $value) { $results[] = $key; } } - 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))); }