[Form] add type hint in ChoiceList

This commit is contained in:
Tobias Schultze 2012-07-26 00:23:16 +02:00
parent 805393303c
commit a3cbf6bbf6
2 changed files with 4 additions and 4 deletions

View File

@ -256,7 +256,7 @@ class ChoiceList implements ChoiceListInterface
* *
* @throws InvalidConfigurationException If no valid value or index could be created for a choice. * @throws InvalidConfigurationException If no valid value or index could be created for a choice.
*/ */
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, $choices, array $labels, array $preferredChoices) protected function addChoices(array &$bucketForPreferred, array &$bucketForRemaining, $choices, array $labels, array $preferredChoices)
{ {
// Add choices to the nested buckets // Add choices to the nested buckets
foreach ($choices as $group => $choice) { foreach ($choices as $group => $choice) {
@ -298,7 +298,7 @@ class ChoiceList implements ChoiceListInterface
* *
* @throws InvalidConfigurationException If no valid value or index could be created for a choice. * @throws InvalidConfigurationException If no valid value or index could be created for a choice.
*/ */
protected function addChoiceGroup($group, &$bucketForPreferred, &$bucketForRemaining, array $choices, array $labels, array $preferredChoices) protected function addChoiceGroup($group, array &$bucketForPreferred, array &$bucketForRemaining, array $choices, array $labels, array $preferredChoices)
{ {
// If this is a choice group, create a new level in the choice // If this is a choice group, create a new level in the choice
// key hierarchy // key hierarchy
@ -335,7 +335,7 @@ class ChoiceList implements ChoiceListInterface
* *
* @throws InvalidConfigurationException If no valid value or index could be created. * @throws InvalidConfigurationException If no valid value or index could be created.
*/ */
protected function addChoice(&$bucketForPreferred, &$bucketForRemaining, $choice, $label, array $preferredChoices) protected function addChoice(array &$bucketForPreferred, array &$bucketForRemaining, $choice, $label, array $preferredChoices)
{ {
$index = $this->createIndex($choice); $index = $this->createIndex($choice);

View File

@ -86,7 +86,7 @@ class SimpleChoiceList extends ChoiceList
* @param array $labels Ignored. * @param array $labels Ignored.
* @param array $preferredChoices The preferred choices. * @param array $preferredChoices The preferred choices.
*/ */
protected function addChoices(&$bucketForPreferred, &$bucketForRemaining, $choices, array $labels, array $preferredChoices) protected function addChoices(array &$bucketForPreferred, array &$bucketForRemaining, $choices, array $labels, array $preferredChoices)
{ {
// Add choices to the nested buckets // Add choices to the nested buckets
foreach ($choices as $choice => $label) { foreach ($choices as $choice => $label) {