diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php
index ee8019a0fd..0b6adca6bd 100644
--- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php
+++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php
@@ -11,10 +11,8 @@
namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
-use Symfony\Component\Form\Util\PropertyPath;
use Symfony\Component\Form\Exception\FormException;
use Symfony\Component\Form\Exception\StringCastException;
-use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
use Doctrine\Common\Persistence\ObjectManager;
diff --git a/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php b/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php
index 2fa93356e4..3fa5c5eccf 100644
--- a/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php
+++ b/src/Symfony/Bridge/Doctrine/Form/DataTransformer/CollectionToArrayTransformer.php
@@ -11,9 +11,7 @@
namespace Symfony\Bridge\Doctrine\Form\DataTransformer;
-use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
-use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\DataTransformerInterface;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
@@ -46,7 +44,7 @@ class CollectionToArrayTransformer implements DataTransformerInterface
/**
* Transforms choice keys into entities.
*
- * @param mixed $keys An array of entities
+ * @param mixed $array An array of entities
*
* @return Collection A collection of entities
*/
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
index 6ac8bf4619..9fe6a66411 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
@@ -68,4 +68,4 @@
No logs available.
{% endif %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php
index b620d6290e..e048264dad 100644
--- a/src/Symfony/Component/DomCrawler/Form.php
+++ b/src/Symfony/Component/DomCrawler/Form.php
@@ -469,6 +469,7 @@ class FormFieldRegistry
{
try {
$this->get($name);
+
return true;
} catch (\InvalidArgumentException $e) {
return false;
diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php
index 311e0f7361..c8cd44ccd8 100644
--- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php
+++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
use Symfony\Component\Form\Form;
-use Symfony\Component\Form\Util\FormUtil;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Exception\InvalidConfigurationException;
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
@@ -98,19 +97,19 @@ class ChoiceList implements ChoiceListInterface
/**
* Creates a new choice list.
*
- * @param array|\Traversable $choices The array of choices. Choices may also be given
- * as hierarchy of unlimited depth. Hierarchies are
- * created by creating nested arrays. The title of
- * the sub-hierarchy can be stored in the array
- * key pointing to the nested array.
- * @param array $labels The array of labels. The structure of this array
- * should match the structure of $choices.
- * @param array $preferredChoices A flat array of choices that should be
- * presented to the user with priority.
- * @param integer $valueStrategy The strategy used to create choice values.
- * One of COPY_CHOICE and GENERATE.
- * @param integer $indexStrategy The strategy used to create choice indices.
- * One of COPY_CHOICE and GENERATE.
+ * @param array|\Traversable $choices The array of choices. Choices may also be given
+ * as hierarchy of unlimited depth. Hierarchies are
+ * created by creating nested arrays. The title of
+ * the sub-hierarchy can be stored in the array
+ * key pointing to the nested array.
+ * @param array $labels The array of labels. The structure of this array
+ * should match the structure of $choices.
+ * @param array $preferredChoices A flat array of choices that should be
+ * presented to the user with priority.
+ * @param integer $valueStrategy The strategy used to create choice values.
+ * One of COPY_CHOICE and GENERATE.
+ * @param integer $indexStrategy The strategy used to create choice indices.
+ * One of COPY_CHOICE and GENERATE.
*/
public function __construct($choices, array $labels, array $preferredChoices = array(), $valueStrategy = self::GENERATE, $indexStrategy = self::GENERATE)
{
diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
index f59827e7d8..748f8397c0 100644
--- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
+++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php
@@ -11,7 +11,6 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
-use Symfony\Component\Form\Util\FormUtil;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
@@ -28,19 +27,20 @@ class SimpleChoiceList extends ChoiceList
/**
* Creates a new simple choice list.
*
- * @param array $choices The array of choices with the choices as keys and
- * the labels as values. Choices may also be given
- * as hierarchy of unlimited depth. Hierarchies are
- * created by creating nested arrays. The title of
- * the sub-hierarchy is stored in the array
- * key pointing to the nested array.
- * @param array $preferredChoices A flat array of choices that should be
- * presented to the user with priority.
- * @param integer $indexStrategy The strategy used to create choice indices.
- * One of COPY_CHOICE and GENERATE.
+ * @param array $choices The array of choices with the choices as keys and
+ * the labels as values. Choices may also be given
+ * as hierarchy of unlimited depth. Hierarchies are
+ * created by creating nested arrays. The title of
+ * the sub-hierarchy is stored in the array
+ * key pointing to the nested array.
+ * @param array $preferredChoices A flat array of choices that should be
+ * presented to the user with priority.
+ * @param integer $valueStrategy The strategy used to create choice values.
+ * One of COPY_CHOICE and GENERATE.
+ * @param integer $indexStrategy The strategy used to create choice indices.
+ * One of COPY_CHOICE and GENERATE.
*/
- public function __construct(array $choices, array $preferredChoices = array(),
- $valueStrategy = self::COPY_CHOICE, $indexStrategy = self::GENERATE)
+ public function __construct(array $choices, array $preferredChoices = array(), $valueStrategy = self::COPY_CHOICE, $indexStrategy = self::GENERATE)
{
// Flip preferred choices to speed up lookup
parent::__construct($choices, $choices, array_flip($preferredChoices), $valueStrategy, $indexStrategy);
diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToBooleanArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToBooleanArrayTransformer.php
index 4b92f0d788..a13fbf7334 100644
--- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToBooleanArrayTransformer.php
+++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoiceToBooleanArrayTransformer.php
@@ -15,7 +15,6 @@ use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
-use Symfony\Component\Form\Util\FormUtil;
/**
* @author Bernhard Schussek
@@ -42,10 +41,10 @@ class ChoiceToBooleanArrayTransformer implements DataTransformerInterface
* depending on whether a given option is selected. If this field is rendered
* as select tag, the value is not modified.
*
- * @param mixed $value An array if "multiple" is set to true, a scalar
+ * @param mixed $choice An array if "multiple" is set to true, a scalar
* value otherwise.
*
- * @return mixed An array
+ * @return mixed An array
*
* @throws UnexpectedTypeException if the given value is not scalar
* @throws TransformationFailedException if the choices can not be retrieved
@@ -74,9 +73,9 @@ class ChoiceToBooleanArrayTransformer implements DataTransformerInterface
* values, depending on whether a given choice is selected. The output
* is the selected choice.
*
- * @param array $value An array of values
+ * @param array $values An array of values
*
- * @return mixed $value A scalar value
+ * @return mixed A scalar value
*
* @throws new UnexpectedTypeException if the given value is not an array
*/
diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
index eafc6c3f82..715a91e3ff 100644
--- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
+++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php
@@ -38,7 +38,7 @@ class ChoicesToBooleanArrayTransformer implements DataTransformerInterface
*
* @param mixed $array An array
*
- * @return mixed An array
+ * @return mixed An array
*
* @throws UnexpectedTypeException if the given value is not an array
* @throws TransformationFailedException if the choices can not be retrieved
@@ -75,9 +75,9 @@ class ChoicesToBooleanArrayTransformer implements DataTransformerInterface
* values, depending on whether a given choice is selected. The output
* is an array with the selected choices.
*
- * @param mixed $value An array
+ * @param mixed $values An array
*
- * @return mixed $value An array
+ * @return mixed An array
*
* @throws UnexpectedTypeException if the given value is not an array
*/
diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php
index e722c47065..f439bd9211 100644
--- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php
+++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\DataTransformer;
use Symfony\Component\Form\Exception\TransformationFailedException;
-use Symfony\Component\Form\Util\FormUtil;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
index 358c4317b6..088043eacb 100644
--- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
+++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
@@ -15,10 +15,8 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\Exception\FormException;
-use Symfony\Component\Form\Extension\Core\ChoiceList\Loader\ChoiceListLoaderInterface;
use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceList;
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
-use Symfony\Component\Form\Extension\Core\ChoiceList\LazyChoiceList;
use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\Extension\Core\EventListener\FixRadioInputListener;
use Symfony\Component\Form\FormView;
diff --git a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
index 8c2af29e7f..b98a222e3e 100644
--- a/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
+++ b/src/Symfony/Component/Form/Extension/Core/Type/DateType.php
@@ -17,7 +17,6 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\Exception\CreationException;
-use Symfony\Component\Form\Extension\Core\ChoiceList\Loader\MonthChoiceListLoader;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToLocalizedStringTransformer;
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToArrayTransformer;
diff --git a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php
index 233db68f51..2500e66c38 100644
--- a/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php
+++ b/src/Symfony/Component/Form/Extension/Core/Type/RadioType.php
@@ -13,8 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormInterface;
-use Symfony\Component\Form\FormBuilder;
-use Symfony\Component\Form\Extension\Core\DataTransformer\BooleanToStringTransformer;
use Symfony\Component\Form\FormView;
class RadioType extends AbstractType
diff --git a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php
index 4e04247900..7e37c7dcc7 100644
--- a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php
+++ b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php
@@ -63,4 +63,4 @@ class ChoiceView
{
return $this->label;
}
-}
\ No newline at end of file
+}
diff --git a/src/Symfony/Component/Form/FormInterface.php b/src/Symfony/Component/Form/FormInterface.php
index 75088731dd..c0d6eac121 100644
--- a/src/Symfony/Component/Form/FormInterface.php
+++ b/src/Symfony/Component/Form/FormInterface.php
@@ -48,9 +48,9 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
/**
* Returns the child with the given name.
- *
+ *
* @param string $name The name of the child
- *
+ *
* @return FormInterface The child form
*/
function get($name);
diff --git a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
index b3c41bd279..6656ae90fd 100644
--- a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
+++ b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\HttpKernel\Debug;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\FlattenException;
-use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
if (!defined('ENT_SUBSTITUTE')) {
define('ENT_SUBSTITUTE', 8);
diff --git a/tests/Symfony/Tests/Component/DomCrawler/FormTest.php b/tests/Symfony/Tests/Component/DomCrawler/FormTest.php
index f36113eb7f..39d4814f2c 100644
--- a/tests/Symfony/Tests/Component/DomCrawler/FormTest.php
+++ b/tests/Symfony/Tests/Component/DomCrawler/FormTest.php
@@ -108,6 +108,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
$values,
array_map(function ($field) {
$class = get_class($field);
+
return array(substr($class, strrpos($class, '\\') + 1), $field->getValue());
},
$form->all()
diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php
index cf26d5ea29..e30839a041 100644
--- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php
+++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php
@@ -12,9 +12,7 @@
namespace Symfony\Tests\Component\Form\Extension\Core\Type;
use Symfony\Component\Form\Extension\Core\ChoiceList\ObjectChoiceList;
-use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
-use Symfony\Component\Form\Exception\UnexpectedTypeException;
class ChoiceTypeTest extends TypeTestCase
{