From ffd87591e1b9f86cd176379960acaa94392d1926 Mon Sep 17 00:00:00 2001 From: woodspire Date: Wed, 5 Dec 2012 15:30:04 -0500 Subject: [PATCH] fix some formatting issue --- .../Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php | 7 +++---- src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php | 1 + .../Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index 0a2585fe16..8f00c6596e 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -76,10 +76,9 @@ class ModelChoiceList extends ObjectChoiceList $choices = array(); } - if (1 === count($this->identifier)) { - if ($this->isInteger(current($this->identifier))) { - $this->identifierAsIndex = true; - } + if ( 1 === count($this->identifier) + && $this->isInteger(current($this->identifier))) { + $this->identifierAsIndex = true; } parent::__construct($choices, $labelPath, array(), $groupPath); diff --git a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php index b86ed421fd..20c52d63e5 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php +++ b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ItemQuery.php @@ -33,6 +33,7 @@ class ItemQuery { $cm = new ColumnMap('id', $this); $cm->setType('INTEGER'); + return array('id' => $cm); } diff --git a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php index 974e923dc9..a356837e29 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php +++ b/src/Symfony/Bridge/Propel1/Tests/Fixtures/ReadOnlyItemQuery.php @@ -24,6 +24,7 @@ class ReadOnlyItemQuery { $cm = new ColumnMap('id', $this); $cm->setType('INTEGER'); + return array('id' => $cm); } }