diff --git a/src/Symfony/Component/Form/ChoiceField.php b/src/Symfony/Component/Form/ChoiceField.php index 9e16eee718..c85710b159 100644 --- a/src/Symfony/Component/Form/ChoiceField.php +++ b/src/Symfony/Component/Form/ChoiceField.php @@ -205,11 +205,11 @@ class ChoiceField extends HybridField return new CheckboxField($choice, array( 'value' => $choice, )); - } else { - return new RadioField($choice, array( - 'value' => $choice, - )); } + + return new RadioField($choice, array( + 'value' => $choice, + )); } /** diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index d8a6e38174..aea839c65e 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -836,9 +836,9 @@ class Form extends Field implements \IteratorAggregate, FormInterface } return $length > $max; - } else { - return false; } + + return false; } /** diff --git a/src/Symfony/Component/Form/HybridField.php b/src/Symfony/Component/Form/HybridField.php index 7c097c06b2..54891ae59b 100644 --- a/src/Symfony/Component/Form/HybridField.php +++ b/src/Symfony/Component/Form/HybridField.php @@ -95,9 +95,9 @@ class HybridField extends Form { if ($this->mode === self::FORM) { return parent::getDisplayedData(); - } else { - return Field::getDisplayedData(); } + + return Field::getDisplayedData(); } /** @@ -131,8 +131,8 @@ class HybridField extends Form { if ($this->mode === self::FORM) { return parent::isEmpty(); - } else { - return Field::isEmpty(); } + + return Field::isEmpty(); } } \ No newline at end of file diff --git a/src/Symfony/Component/Form/PropertyPath.php b/src/Symfony/Component/Form/PropertyPath.php index 5eebc349f3..0a18d59079 100644 --- a/src/Symfony/Component/Form/PropertyPath.php +++ b/src/Symfony/Component/Form/PropertyPath.php @@ -246,9 +246,9 @@ class PropertyPath implements \IteratorAggregate if ($currentIndex < $this->length) { return $this->readPropertyPath($value, $currentIndex); - } else { - return $value; } + + return $value; } /**