[2.3][Form] Cleanup & fix phpdocs

This commit is contained in:
Joseph Bielawski 2014-07-09 12:03:33 +02:00
parent 5955f8edfe
commit a67bc7612e
41 changed files with 208 additions and 211 deletions

View File

@ -51,7 +51,7 @@ class Button implements \IteratorAggregate, FormInterface
* *
* @param mixed $offset * @param mixed $offset
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function offsetExists($offset) public function offsetExists($offset)
{ {
@ -152,7 +152,7 @@ class Button implements \IteratorAggregate, FormInterface
* *
* @param string $name * @param string $name
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function has($name) public function has($name)
{ {
@ -254,7 +254,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Returns whether the button is submitted. * Returns whether the button is submitted.
* *
* @return bool true if the button was submitted. * @return bool true if the button was submitted.
*/ */
public function isSubmitted() public function isSubmitted()
{ {
@ -295,7 +295,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns true. * @return bool Always returns true.
*/ */
public function isValid() public function isValid()
{ {
@ -305,7 +305,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function isRequired() public function isRequired()
{ {
@ -327,7 +327,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns true. * @return bool Always returns true.
*/ */
public function isEmpty() public function isEmpty()
{ {
@ -337,7 +337,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns true. * @return bool Always returns true.
*/ */
public function isSynchronized() public function isSynchronized()
{ {
@ -418,7 +418,7 @@ class Button implements \IteratorAggregate, FormInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return int Always returns 0. * @return int Always returns 0.
*/ */
public function count() public function count()
{ {

View File

@ -75,9 +75,9 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param string|int|FormBuilderInterface $child * @param string|int|FormBuilderInterface $child
* @param string|FormTypeInterface $type * @param string|FormTypeInterface $type
* @param array $options * @param array $options
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -135,7 +135,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* @param string $name * @param string $name
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function has($name) public function has($name)
{ {
@ -283,7 +283,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Set whether the button is disabled. * Set whether the button is disabled.
* *
* @param bool $disabled Whether the button is disabled * @param bool $disabled Whether the button is disabled
* *
* @return ButtonBuilder The button builder. * @return ButtonBuilder The button builder.
*/ */
@ -313,7 +313,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $errorBubbling * @param bool $errorBubbling
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -327,7 +327,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $required * @param bool $required
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -355,7 +355,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $mapped * @param bool $mapped
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -369,7 +369,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $byReference * @param bool $byReference
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -383,7 +383,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $virtual * @param bool $virtual
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -397,7 +397,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $compound * @param bool $compound
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -439,7 +439,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* This method should not be invoked. * This method should not be invoked.
* *
* @param bool $locked * @param bool $locked
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -455,8 +455,6 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* @param FormFactoryInterface $formFactory * @param FormFactoryInterface $formFactory
* *
* @return void
*
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
public function setFormFactory(FormFactoryInterface $formFactory) public function setFormFactory(FormFactoryInterface $formFactory)
@ -503,7 +501,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @param bool $initialize * @param bool $initialize
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -519,7 +517,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @param bool $inheritData * @param bool $inheritData
* *
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@ -571,7 +569,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getMapped() public function getMapped()
{ {
@ -581,7 +579,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getByReference() public function getByReference()
{ {
@ -591,7 +589,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getVirtual() public function getVirtual()
{ {
@ -601,7 +599,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getCompound() public function getCompound()
{ {
@ -650,7 +648,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getRequired() public function getRequired()
{ {
@ -660,7 +658,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Returns whether the button is disabled. * Returns whether the button is disabled.
* *
* @return bool Whether the button is disabled. * @return bool Whether the button is disabled.
*/ */
public function getDisabled() public function getDisabled()
{ {
@ -670,7 +668,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getErrorBubbling() public function getErrorBubbling()
{ {
@ -701,7 +699,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* @param string $name The attribute name. * @param string $name The attribute name.
* *
* @return bool Whether the attribute exists. * @return bool Whether the attribute exists.
*/ */
public function hasAttribute($name) public function hasAttribute($name)
{ {
@ -742,7 +740,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getDataLocked() public function getDataLocked()
{ {
@ -788,7 +786,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getAutoInitialize() public function getAutoInitialize()
{ {
@ -798,7 +796,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return bool Always returns false. * @return bool Always returns false.
*/ */
public function getInheritData() public function getInheritData()
{ {
@ -820,7 +818,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
* *
* @param string $name The option name, * @param string $name The option name,
* *
* @return bool Whether the option exists. * @return bool Whether the option exists.
*/ */
public function hasOption($name) public function hasOption($name)
{ {
@ -843,7 +841,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
/** /**
* Unsupported method. * Unsupported method.
* *
* @return int Always returns 0. * @return int Always returns 0.
*/ */
public function count() public function count()
{ {

View File

@ -47,8 +47,8 @@ class CallbackTransformer implements DataTransformerInterface
* *
* @return mixed The value in the transformed representation * @return mixed The value in the transformed representation
* *
* @throws UnexpectedTypeException when the argument is not a string * @throws UnexpectedTypeException when the argument is not a string
* @throws TransformationFailedException when the transformation fails * @throws TransformationFailedException when the transformation fails
*/ */
public function transform($data) public function transform($data)
{ {
@ -63,8 +63,8 @@ class CallbackTransformer implements DataTransformerInterface
* *
* @return mixed The value in the original representation * @return mixed The value in the original representation
* *
* @throws UnexpectedTypeException when the argument is not of the expected type * @throws UnexpectedTypeException when the argument is not of the expected type
* @throws TransformationFailedException when the transformation fails * @throws TransformationFailedException when the transformation fails
*/ */
public function reverseTransform($data) public function reverseTransform($data)
{ {

View File

@ -21,7 +21,7 @@ interface ClickableInterface
/** /**
* Returns whether this element was clicked. * Returns whether this element was clicked.
* *
* @return bool Whether this element was clicked. * @return bool Whether this element was clicked.
*/ */
public function isClicked(); public function isClicked();
} }

View File

@ -75,10 +75,10 @@ class ChoiceList implements ChoiceListInterface
* the sub-hierarchy can be stored in the array * the sub-hierarchy can be stored in the array
* key pointing to the nested array. The topmost * key pointing to the nested array. The topmost
* level of the hierarchy may also be a \Traversable. * level of the hierarchy may also be a \Traversable.
* @param array $labels The array of labels. The structure of this array * @param array $labels The array of labels. The structure of this array
* should match the structure of $choices. * should match the structure of $choices.
* @param array $preferredChoices A flat array of choices that should be * @param array $preferredChoices A flat array of choices that should be
* presented to the user with priority. * presented to the user with priority.
* *
* @throws UnexpectedTypeException If the choices are not an array or \Traversable. * @throws UnexpectedTypeException If the choices are not an array or \Traversable.
*/ */
@ -255,7 +255,7 @@ class ChoiceList implements ChoiceListInterface
* @param array $labels The labels corresponding to the choices. * @param array $labels The labels corresponding to the choices.
* @param array $preferredChoices The preferred choices. * @param array $preferredChoices The preferred choices.
* *
* @throws InvalidArgumentException If the structures of the choices and labels array do not match. * @throws InvalidArgumentException If the structures of the choices and labels array do not match.
* @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(array &$bucketForPreferred, array &$bucketForRemaining, $choices, array $labels, array $preferredChoices) protected function addChoices(array &$bucketForPreferred, array &$bucketForRemaining, $choices, array $labels, array $preferredChoices)
@ -377,7 +377,7 @@ class ChoiceList implements ChoiceListInterface
* @param mixed $choice The choice to test. * @param mixed $choice The choice to test.
* @param array $preferredChoices An array of preferred choices. * @param array $preferredChoices An array of preferred choices.
* *
* @return bool Whether the choice is preferred. * @return bool Whether the choice is preferred.
*/ */
protected function isPreferred($choice, array $preferredChoices) protected function isPreferred($choice, array $preferredChoices)
{ {
@ -391,8 +391,8 @@ class ChoiceList implements ChoiceListInterface
* *
* @param mixed $choice The choice to create an index for * @param mixed $choice The choice to create an index for
* *
* @return int|string A unique index containing only ASCII letters, * @return int|string A unique index containing only ASCII letters,
* digits and underscores. * digits and underscores.
*/ */
protected function createIndex($choice) protected function createIndex($choice)
{ {
@ -451,7 +451,7 @@ class ChoiceList implements ChoiceListInterface
* *
* @param mixed $index The choice index. * @param mixed $index The choice index.
* *
* @return int|string The index as PHP array key. * @return int|string The index as PHP array key.
*/ */
protected function fixIndex($index) protected function fixIndex($index)
{ {

View File

@ -72,7 +72,7 @@ class ObjectChoiceList extends ChoiceList
* be a \Traversable. * be a \Traversable.
* @param string $labelPath A property path pointing to the property used * @param string $labelPath A property path pointing to the property used
* for the choice labels. The value is obtained * for the choice labels. The value is obtained
* by calling the getter on the object. If the * by calling the getter on the object. If the
* path is NULL, the object's __toString() method * path is NULL, the object's __toString() method
* is used instead. * is used instead.
* @param array $preferredChoices A flat array of choices that should be * @param array $preferredChoices A flat array of choices that should be
@ -105,7 +105,7 @@ class ObjectChoiceList extends ChoiceList
* @param array $preferredChoices The choices to display with priority. * @param array $preferredChoices The choices to display with priority.
* *
* @throws InvalidArgumentException When passing a hierarchy of choices and using * @throws InvalidArgumentException When passing a hierarchy of choices and using
* the "groupPath" option at the same time. * the "groupPath" option at the same time.
*/ */
protected function initialize($choices, array $labels, array $preferredChoices) protected function initialize($choices, array $labels, array $preferredChoices)
{ {
@ -157,7 +157,7 @@ class ObjectChoiceList extends ChoiceList
* *
* @param mixed $choice The choice to create a value for * @param mixed $choice The choice to create a value for
* *
* @return int|string A unique value without character limitations. * @return int|string A unique value without character limitations.
*/ */
protected function createValue($choice) protected function createValue($choice)
{ {

View File

@ -124,7 +124,7 @@ class SimpleChoiceList extends ChoiceList
* @param mixed $choice The choice to test. * @param mixed $choice The choice to test.
* @param array $preferredChoices An array of preferred choices. * @param array $preferredChoices An array of preferred choices.
* *
* @return bool Whether the choice is preferred. * @return bool Whether the choice is preferred.
*/ */
protected function isPreferred($choice, array $preferredChoices) protected function isPreferred($choice, array $preferredChoices)
{ {
@ -137,7 +137,7 @@ class SimpleChoiceList extends ChoiceList
* *
* @param mixed $choice The choice. * @param mixed $choice The choice.
* *
* @return string|int A valid PHP array key. * @return string|int A valid PHP array key.
*/ */
protected function fixChoice($choice) protected function fixChoice($choice)
{ {

View File

@ -35,7 +35,7 @@ abstract class BaseDateTimeTransformer implements DataTransformerInterface
* @param string $inputTimezone The name of the input timezone * @param string $inputTimezone The name of the input timezone
* @param string $outputTimezone The name of the output timezone * @param string $outputTimezone The name of the output timezone
* *
* @throws UnexpectedTypeException if a timezone is not a string * @throws UnexpectedTypeException if a timezone is not a string
* @throws InvalidArgumentException if a timezone is not valid * @throws InvalidArgumentException if a timezone is not valid
*/ */
public function __construct($inputTimezone = null, $outputTimezone = null) public function __construct($inputTimezone = null, $outputTimezone = null)

View File

@ -41,7 +41,7 @@ class BooleanToStringTransformer implements DataTransformerInterface
/** /**
* Transforms a Boolean into a string. * Transforms a Boolean into a string.
* *
* @param bool $value Boolean value. * @param bool $value Boolean value.
* *
* @return string String value. * @return string String value.
* *
@ -65,7 +65,7 @@ class BooleanToStringTransformer implements DataTransformerInterface
* *
* @param string $value String value. * @param string $value String value.
* *
* @return bool Boolean value. * @return bool Boolean value.
* *
* @throws TransformationFailedException If the given value is not a string. * @throws TransformationFailedException If the given value is not a string.
*/ */

View File

@ -29,10 +29,10 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
/** /**
* Constructor. * Constructor.
* *
* @param string $inputTimezone The input timezone * @param string $inputTimezone The input timezone
* @param string $outputTimezone The output timezone * @param string $outputTimezone The output timezone
* @param array $fields The date fields * @param array $fields The date fields
* @param bool $pad Whether to use padding * @param bool $pad Whether to use padding
* *
* @throws UnexpectedTypeException if a timezone is not a string * @throws UnexpectedTypeException if a timezone is not a string
*/ */

View File

@ -26,7 +26,7 @@ class DateTimeToTimestampTransformer extends BaseDateTimeTransformer
* *
* @param \DateTime $value A \DateTime object * @param \DateTime $value A \DateTime object
* *
* @return int A timestamp * @return int A timestamp
* *
* @throws TransformationFailedException If the given value is not an instance * @throws TransformationFailedException If the given value is not an instance
* of \DateTime or if the output * of \DateTime or if the output

View File

@ -21,7 +21,6 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
*/ */
class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransformer
{ {
private $divisor; private $divisor;
public function __construct($precision = null, $grouping = null, $roundingMode = null, $divisor = null) public function __construct($precision = null, $grouping = null, $roundingMode = null, $divisor = null)
@ -46,7 +45,7 @@ class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransform
/** /**
* Transforms a normalized format into a localized money string. * Transforms a normalized format into a localized money string.
* *
* @param number $value Normalized number * @param int|float $value Normalized number
* *
* @return string Localized money string. * @return string Localized money string.
* *
@ -71,7 +70,7 @@ class MoneyToLocalizedStringTransformer extends NumberToLocalizedStringTransform
* *
* @param string $value Localized money string * @param string $value Localized money string
* *
* @return number Normalized number * @return int|float Normalized number
* *
* @throws TransformationFailedException If the given value is not a string * @throws TransformationFailedException If the given value is not a string
* or if the value can not be transformed. * or if the value can not be transformed.

View File

@ -55,7 +55,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/** /**
* Transforms a number type into localized number. * Transforms a number type into localized number.
* *
* @param int|float $value Number value. * @param int|float $value Number value.
* *
* @return string Localized value. * @return string Localized value.
* *
@ -90,7 +90,7 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
* *
* @param string $value The localized value * @param string $value The localized value
* *
* @return int|float The numeric value * @return int|float The numeric value
* *
* @throws TransformationFailedException If the given value is not a string * @throws TransformationFailedException If the given value is not a string
* or if the value can not be transformed. * or if the value can not be transformed.

View File

@ -40,8 +40,8 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
* *
* @see self::$types for a list of supported types * @see self::$types for a list of supported types
* *
* @param int $precision The precision * @param int $precision The precision
* @param string $type One of the supported types * @param string $type One of the supported types
* *
* @throws UnexpectedTypeException if the given value of type is unknown * @throws UnexpectedTypeException if the given value of type is unknown
*/ */
@ -66,9 +66,9 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
/** /**
* Transforms between a normalized format (integer or float) into a percentage value. * Transforms between a normalized format (integer or float) into a percentage value.
* *
* @param number $value Normalized value * @param int|float $value Normalized value
* *
* @return number Percentage value * @return string Percentage value
* *
* @throws TransformationFailedException If the given value is not numeric or * @throws TransformationFailedException If the given value is not numeric or
* if the value could not be transformed. * if the value could not be transformed.
@ -101,9 +101,9 @@ class PercentToLocalizedStringTransformer implements DataTransformerInterface
/** /**
* Transforms between a percentage value into a normalized format (integer or float). * Transforms between a percentage value into a normalized format (integer or float).
* *
* @param number $value Percentage value. * @param string $value Percentage value.
* *
* @return number Normalized value. * @return int|float Normalized value.
* *
* @throws TransformationFailedException If the given value is not a string or * @throws TransformationFailedException If the given value is not a string or
* if the value could not be transformed. * if the value could not be transformed.

View File

@ -36,10 +36,10 @@ class MergeCollectionListener implements EventSubscriberInterface
/** /**
* Creates a new listener. * Creates a new listener.
* *
* @param bool $allowAdd Whether values might be added to the * @param bool $allowAdd Whether values might be added to the
* collection. * collection.
* @param bool $allowDelete Whether values might be removed from the * @param bool $allowDelete Whether values might be removed from the
* collection. * collection.
*/ */
public function __construct($allowAdd = false, $allowDelete = false) public function __construct($allowAdd = false, $allowDelete = false)
{ {

View File

@ -198,6 +198,7 @@ class FormBuilder extends FormConfigBuilder implements \IteratorAggregate, FormB
*/ */
public function getFormConfig() public function getFormConfig()
{ {
/** @var $config self */
$config = parent::getFormConfig(); $config = parent::getFormConfig();
$config->children = array(); $config->children = array();

View File

@ -23,9 +23,9 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
* If you add a nested group, this group should also be represented in the * If you add a nested group, this group should also be represented in the
* object hierarchy. * object hierarchy.
* *
* @param string|int|FormBuilderInterface $child * @param string|int|FormBuilderInterface $child
* @param string|FormTypeInterface $type * @param string|FormTypeInterface $type
* @param array $options * @param array $options
* *
* @return FormBuilderInterface The builder object. * @return FormBuilderInterface The builder object.
*/ */

View File

@ -186,7 +186,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
* @param array $options The form options * @param array $options The form options
* *
* @throws InvalidArgumentException If the data class is not a valid class or if * @throws InvalidArgumentException If the data class is not a valid class or if
* the name contains invalid characters. * the name contains invalid characters.
*/ */
public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, array $options = array()) public function __construct($name, $dataClass, EventDispatcherInterface $dispatcher, array $options = array())
{ {
@ -713,7 +713,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
/** /**
* Alias of {@link setInheritData()}. * Alias of {@link setInheritData()}.
* *
* @param bool $inheritData Whether the form should inherit its parent's data. * @param bool $inheritData Whether the form should inherit its parent's data.
* *
* @return FormConfigBuilder The configuration object. * @return FormConfigBuilder The configuration object.
* *
@ -879,9 +879,9 @@ class FormConfigBuilder implements FormConfigBuilderInterface
/** /**
* Validates whether the given variable is a valid form name. * Validates whether the given variable is a valid form name.
* *
* @param string|int $name The tested form name. * @param string|int $name The tested form name.
* *
* @throws UnexpectedTypeException If the name is not a string or an integer. * @throws UnexpectedTypeException If the name is not a string or an integer.
* @throws InvalidArgumentException If the name contains invalid characters. * @throws InvalidArgumentException If the name contains invalid characters.
*/ */
public static function validateName($name) public static function validateName($name)
@ -910,7 +910,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
* *
* @param string $name The tested form name. * @param string $name The tested form name.
* *
* @return bool Whether the name is valid. * @return bool Whether the name is valid.
*/ */
public static function isValidName($name) public static function isValidName($name)
{ {

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Form; namespace Symfony\Component\Form;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\PropertyAccess\PropertyPathInterface;
/** /**
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
@ -88,7 +89,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* Sets the value for an attribute. * Sets the value for an attribute.
* *
* @param string $name The name of the attribute * @param string $name The name of the attribute
* @param string $value The value of the attribute * @param mixed $value The value of the attribute
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -115,7 +116,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Set whether the form is disabled. * Set whether the form is disabled.
* *
* @param bool $disabled Whether the form is disabled * @param bool $disabled Whether the form is disabled
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -133,7 +134,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets whether errors bubble up to the parent. * Sets whether errors bubble up to the parent.
* *
* @param bool $errorBubbling * @param bool $errorBubbling
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -142,7 +143,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets whether this field is required to be filled out when submitted. * Sets whether this field is required to be filled out when submitted.
* *
* @param bool $required * @param bool $required
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -151,7 +152,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets the property path that the form should be mapped to. * Sets the property path that the form should be mapped to.
* *
* @param null|string|\Symfony\Component\PropertyAccess\PropertyPathInterface $propertyPath * @param null|string|PropertyPathInterface $propertyPath
* The property path or null if the path should be set * The property path or null if the path should be set
* automatically based on the form's name. * automatically based on the form's name.
* *
@ -163,7 +164,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* Sets whether the form should be mapped to an element of its * Sets whether the form should be mapped to an element of its
* parent's data. * parent's data.
* *
* @param bool $mapped Whether the form should be mapped. * @param bool $mapped Whether the form should be mapped.
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -172,7 +173,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets whether the form's data should be modified by reference. * Sets whether the form's data should be modified by reference.
* *
* @param bool $byReference Whether the data should be * @param bool $byReference Whether the data should be
* modified by reference. * modified by reference.
* *
* @return self The configuration object. * @return self The configuration object.
@ -182,7 +183,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets whether the form should read and write the data of its parent. * Sets whether the form should read and write the data of its parent.
* *
* @param bool $inheritData Whether the form should inherit its parent's data. * @param bool $inheritData Whether the form should inherit its parent's data.
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -191,7 +192,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
/** /**
* Sets whether the form should be compound. * Sets whether the form should be compound.
* *
* @param bool $compound Whether the form should be compound. * @param bool $compound Whether the form should be compound.
* *
* @return self The configuration object. * @return self The configuration object.
* *
@ -224,7 +225,7 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* this configuration. The data can only be modified then by * this configuration. The data can only be modified then by
* submitting the form. * submitting the form.
* *
* @param bool $locked Whether to lock the default data. * @param bool $locked Whether to lock the default data.
* *
* @return self The configuration object. * @return self The configuration object.
*/ */
@ -269,10 +270,10 @@ interface FormConfigBuilderInterface extends FormConfigInterface
* *
* Should be set to true only for root forms. * Should be set to true only for root forms.
* *
* @param bool $initialize True to initialize the form automatically, * @param bool $initialize True to initialize the form automatically,
* false to suppress automatic initialization. * false to suppress automatic initialization.
* In the second case, you need to call * In the second case, you need to call
* {@link FormInterface::initialize()} manually. * {@link FormInterface::initialize()} manually.
* *
* @return self The configuration object. * @return self The configuration object.
*/ */

View File

@ -11,6 +11,9 @@
namespace Symfony\Component\Form; namespace Symfony\Component\Form;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\PropertyAccess\PropertyPathInterface;
/** /**
* The configuration of a {@link Form} object. * The configuration of a {@link Form} object.
* *
@ -21,7 +24,7 @@ interface FormConfigInterface
/** /**
* Returns the event dispatcher used to dispatch form events. * Returns the event dispatcher used to dispatch form events.
* *
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface The dispatcher. * @return EventDispatcherInterface The dispatcher.
*/ */
public function getEventDispatcher(); public function getEventDispatcher();
@ -35,7 +38,7 @@ interface FormConfigInterface
/** /**
* Returns the property path that the form should be mapped to. * Returns the property path that the form should be mapped to.
* *
* @return null|\Symfony\Component\PropertyAccess\PropertyPathInterface The property path. * @return null|PropertyPathInterface The property path.
*/ */
public function getPropertyPath(); public function getPropertyPath();
@ -43,21 +46,21 @@ interface FormConfigInterface
* Returns whether the form should be mapped to an element of its * Returns whether the form should be mapped to an element of its
* parent's data. * parent's data.
* *
* @return bool Whether the form is mapped. * @return bool Whether the form is mapped.
*/ */
public function getMapped(); public function getMapped();
/** /**
* Returns whether the form's data should be modified by reference. * Returns whether the form's data should be modified by reference.
* *
* @return bool Whether to modify the form's data by reference. * @return bool Whether to modify the form's data by reference.
*/ */
public function getByReference(); public function getByReference();
/** /**
* Returns whether the form should read and write the data of its parent. * Returns whether the form should read and write the data of its parent.
* *
* @return bool Whether the form should inherit its parent's data. * @return bool Whether the form should inherit its parent's data.
*/ */
public function getInheritData(); public function getInheritData();
@ -68,7 +71,7 @@ interface FormConfigInterface
* children. A form can be compound and have no children at all, like * children. A form can be compound and have no children at all, like
* for example an empty collection form. * for example an empty collection form.
* *
* @return bool Whether the form is compound. * @return bool Whether the form is compound.
*/ */
public function getCompound(); public function getCompound();
@ -103,21 +106,21 @@ interface FormConfigInterface
/** /**
* Returns whether the form is required. * Returns whether the form is required.
* *
* @return bool Whether the form is required. * @return bool Whether the form is required.
*/ */
public function getRequired(); public function getRequired();
/** /**
* Returns whether the form is disabled. * Returns whether the form is disabled.
* *
* @return bool Whether the form is disabled. * @return bool Whether the form is disabled.
*/ */
public function getDisabled(); public function getDisabled();
/** /**
* Returns whether errors attached to the form will bubble to its parent. * Returns whether errors attached to the form will bubble to its parent.
* *
* @return bool Whether errors will bubble up. * @return bool Whether errors will bubble up.
*/ */
public function getErrorBubbling(); public function getErrorBubbling();
@ -138,17 +141,17 @@ interface FormConfigInterface
/** /**
* Returns whether the attribute with the given name exists. * Returns whether the attribute with the given name exists.
* *
* @param string $name The attribute name. * @param string $name The attribute name.
* *
* @return bool Whether the attribute exists. * @return bool Whether the attribute exists.
*/ */
public function hasAttribute($name); public function hasAttribute($name);
/** /**
* Returns the value of the given attribute. * Returns the value of the given attribute.
* *
* @param string $name The attribute name. * @param string $name The attribute name.
* @param mixed $default The value returned if the attribute does not exist. * @param mixed $default The value returned if the attribute does not exist.
* *
* @return mixed The attribute value. * @return mixed The attribute value.
*/ */
@ -175,7 +178,7 @@ interface FormConfigInterface
* this configuration. The data can only be modified then by * this configuration. The data can only be modified then by
* submitting the form. * submitting the form.
* *
* @return bool Whether the data is locked. * @return bool Whether the data is locked.
*/ */
public function getDataLocked(); public function getDataLocked();
@ -210,8 +213,8 @@ interface FormConfigInterface
/** /**
* Returns whether the form should be initialized upon creation. * Returns whether the form should be initialized upon creation.
* *
* @return bool Returns true if the form should be initialized * @return bool Returns true if the form should be initialized
* when created, false otherwise. * when created, false otherwise.
*/ */
public function getAutoInitialize(); public function getAutoInitialize();
@ -225,17 +228,17 @@ interface FormConfigInterface
/** /**
* Returns whether a specific option exists. * Returns whether a specific option exists.
* *
* @param string $name The option name, * @param string $name The option name,
* *
* @return bool Whether the option exists. * @return bool Whether the option exists.
*/ */
public function hasOption($name); public function hasOption($name);
/** /**
* Returns the value of a specific option. * Returns the value of a specific option.
* *
* @param string $name The option name. * @param string $name The option name.
* @param mixed $default The value returned if the option does not exist. * @param mixed $default The value returned if the option does not exist.
* *
* @return mixed The option value. * @return mixed The option value.
*/ */

View File

@ -47,11 +47,11 @@ class FormError
* Any array key in $messageParameters will be used as a placeholder in * Any array key in $messageParameters will be used as a placeholder in
* $messageTemplate. * $messageTemplate.
* *
* @param string $message The translated error message * @param string $message The translated error message
* @param string|null $messageTemplate The template for the error message * @param string|null $messageTemplate The template for the error message
* @param array $messageParameters The parameters that should be * @param array $messageParameters The parameters that should be
* substituted in the message template. * substituted in the message template.
* @param int|null $messagePluralization The value for error message pluralization * @param int|null $messagePluralization The value for error message pluralization
* *
* @see \Symfony\Component\Translation\Translator * @see \Symfony\Component\Translation\Translator
*/ */

View File

@ -32,7 +32,7 @@ interface FormExtensionInterface
* *
* @param string $name The name of the type * @param string $name The name of the type
* *
* @return bool Whether the type is supported by this extension * @return bool Whether the type is supported by this extension
*/ */
public function hasType($name); public function hasType($name);
@ -50,7 +50,7 @@ interface FormExtensionInterface
* *
* @param string $name The name of the type * @param string $name The name of the type
* *
* @return bool Whether the given type has extensions * @return bool Whether the given type has extensions
*/ */
public function hasTypeExtensions($name); public function hasTypeExtensions($name);

View File

@ -24,22 +24,22 @@ class FormFactoryBuilder implements FormFactoryBuilderInterface
private $resolvedTypeFactory; private $resolvedTypeFactory;
/** /**
* @var array * @var FormExtensionInterface[]
*/ */
private $extensions = array(); private $extensions = array();
/** /**
* @var array * @var FormTypeInterface[]
*/ */
private $types = array(); private $types = array();
/** /**
* @var array * @var FormTypeExtensionInterface[]
*/ */
private $typeExtensions = array(); private $typeExtensions = array();
/** /**
* @var array * @var FormTypeGuesserInterface[]
*/ */
private $typeGuessers = array(); private $typeGuessers = array();

View File

@ -30,7 +30,7 @@ class FormRegistry implements FormRegistryInterface
private $extensions = array(); private $extensions = array();
/** /**
* @var array * @var FormTypeInterface[]
*/ */
private $types = array(); private $types = array();
@ -74,11 +74,9 @@ class FormRegistry implements FormRegistryInterface
} }
if (!isset($this->types[$name])) { if (!isset($this->types[$name])) {
/** @var FormTypeInterface $type */
$type = null; $type = null;
foreach ($this->extensions as $extension) { foreach ($this->extensions as $extension) {
/* @var FormExtensionInterface $extension */
if ($extension->hasType($name)) { if ($extension->hasType($name)) {
$type = $extension->getType($name); $type = $extension->getType($name);
break; break;
@ -115,7 +113,6 @@ class FormRegistry implements FormRegistryInterface
$typeExtensions = array(); $typeExtensions = array();
foreach ($this->extensions as $extension) { foreach ($this->extensions as $extension) {
/* @var FormExtensionInterface $extension */
$typeExtensions = array_merge( $typeExtensions = array_merge(
$typeExtensions, $typeExtensions,
$extension->getTypeExtensions($type->getName()) $extension->getTypeExtensions($type->getName())
@ -156,7 +153,6 @@ class FormRegistry implements FormRegistryInterface
$guessers = array(); $guessers = array();
foreach ($this->extensions as $extension) { foreach ($this->extensions as $extension) {
/* @var FormExtensionInterface $extension */
$guesser = $extension->getTypeGuesser(); $guesser = $extension->getTypeGuesser();
if ($guesser) { if ($guesser) {

View File

@ -37,7 +37,7 @@ interface FormRegistryInterface
* *
* @param string $name The name of the type * @param string $name The name of the type
* *
* @return bool Whether the type is supported * @return bool Whether the type is supported
*/ */
public function hasType($name); public function hasType($name);

View File

@ -70,19 +70,15 @@ interface FormRendererEngineInterface
* The type of the resource is decided by the implementation. The resource * The type of the resource is decided by the implementation. The resource
* is later passed to {@link renderBlock()} by the rendering algorithm. * is later passed to {@link renderBlock()} by the rendering algorithm.
* *
* @param FormView $view The view for determining the * @param FormView $view The view for determining the used themes.
* used themes. First the themes * First the themes attached directly to
* attached directly to the view * the view with {@link setTheme()} are
* with {@link setTheme()} are * considered, then the ones of its parent etc.
* considered, then the ones of * @param array $blockNameHierarchy The block name hierarchy, with the root block
* its parent etc. * at the beginning.
* @param array $blockNameHierarchy The block name hierarchy, with * @param int $hierarchyLevel The level in the hierarchy at which to start
* the root block at the beginning. * looking. Level 0 indicates the root block, i.e.
* @param int $hierarchyLevel The level in the hierarchy at * the first element of $blockNameHierarchy.
* which to start looking. Level 0
* indicates the root block, i.e.
* the first element of
* $blockNameHierarchy.
* *
* @return mixed The renderer resource or false, if none was found. * @return mixed The renderer resource or false, if none was found.
*/ */
@ -114,19 +110,15 @@ interface FormRendererEngineInterface
* The type of the resource is decided by the implementation. The resource * The type of the resource is decided by the implementation. The resource
* is later passed to {@link renderBlock()} by the rendering algorithm. * is later passed to {@link renderBlock()} by the rendering algorithm.
* *
* @param FormView $view The view for determining the * @param FormView $view The view for determining the used themes.
* used themes. First the themes * First the themes attached directly to
* attached directly to the view * the view with {@link setTheme()} are
* with {@link setTheme()} are * considered, then the ones of its parent etc.
* considered, then the ones of * @param array $blockNameHierarchy The block name hierarchy, with the root block
* its parent etc. * at the beginning.
* @param array $blockNameHierarchy The block name hierarchy, with * @param int $hierarchyLevel The level in the hierarchy at which to start
* the root block at the beginning. * looking. Level 0 indicates the root block, i.e.
* @param int $hierarchyLevel The level in the hierarchy at * the first element of $blockNameHierarchy.
* which to start looking. Level 0
* indicates the root block, i.e.
* the first element of
* $blockNameHierarchy.
* *
* @return int|bool The hierarchy level or false, if no resource was found. * @return int|bool The hierarchy level or false, if no resource was found.
*/ */
@ -139,10 +131,10 @@ interface FormRendererEngineInterface
* or {@link getResourceForBlockHierarchy()}. The type of the resource is * or {@link getResourceForBlockHierarchy()}. The type of the resource is
* decided by the implementation. * decided by the implementation.
* *
* @param FormView $view The view to render. * @param FormView $view The view to render.
* @param mixed $resource The renderer resource. * @param mixed $resource The renderer resource.
* @param string $blockName The name of the block to render. * @param string $blockName The name of the block to render.
* @param array $variables The variables to pass to the template. * @param array $variables The variables to pass to the template.
* *
* @return string The HTML markup. * @return string The HTML markup.
*/ */

View File

@ -29,8 +29,8 @@ interface FormRendererInterface
* Sets the theme(s) to be used for rendering a view and its children. * Sets the theme(s) to be used for rendering a view and its children.
* *
* @param FormView $view The view to assign the theme(s) to. * @param FormView $view The view to assign the theme(s) to.
* @param mixed $themes The theme(s). The type of these themes * @param mixed $themes The theme(s). The type of these themes
* is open to the implementation. * is open to the implementation.
*/ */
public function setTheme(FormView $view, $themes); public function setTheme(FormView $view, $themes);

View File

@ -39,9 +39,9 @@ interface FormTypeExtensionInterface
* *
* @see FormTypeInterface::buildView() * @see FormTypeInterface::buildView()
* *
* @param FormView $view The view * @param FormView $view The view
* @param FormInterface $form The form * @param FormInterface $form The form
* @param array $options The options * @param array $options The options
*/ */
public function buildView(FormView $view, FormInterface $form, array $options); public function buildView(FormView $view, FormInterface $form, array $options);
@ -53,9 +53,9 @@ interface FormTypeExtensionInterface
* *
* @see FormTypeInterface::finishView() * @see FormTypeInterface::finishView()
* *
* @param FormView $view The view * @param FormView $view The view
* @param FormInterface $form The form * @param FormInterface $form The form
* @param array $options The options * @param array $options The options
*/ */
public function finishView(FormView $view, FormInterface $form, array $options); public function finishView(FormView $view, FormInterface $form, array $options);

View File

@ -85,7 +85,7 @@ class FormTypeGuesserChain implements FormTypeGuesserInterface
* return values * return values
* *
* @param \Closure $closure The closure to execute. Accepts a guesser * @param \Closure $closure The closure to execute. Accepts a guesser
* as argument and should return a Guess instance * as argument and should return a Guess instance
* *
* @return Guess|null The guess with the highest confidence * @return Guess|null The guess with the highest confidence
*/ */

View File

@ -43,9 +43,9 @@ interface FormTypeInterface
* *
* @see FormTypeExtensionInterface::buildView() * @see FormTypeExtensionInterface::buildView()
* *
* @param FormView $view The view * @param FormView $view The view
* @param FormInterface $form The form * @param FormInterface $form The form
* @param array $options The options * @param array $options The options
*/ */
public function buildView(FormView $view, FormInterface $form, array $options); public function buildView(FormView $view, FormInterface $form, array $options);
@ -62,9 +62,9 @@ interface FormTypeInterface
* *
* @see FormTypeExtensionInterface::finishView() * @see FormTypeExtensionInterface::finishView()
* *
* @param FormView $view The view * @param FormView $view The view
* @param FormInterface $form The form * @param FormInterface $form The form
* @param array $options The options * @param array $options The options
*/ */
public function finishView(FormView $view, FormInterface $form, array $options); public function finishView(FormView $view, FormInterface $form, array $options);

View File

@ -35,7 +35,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* The child views. * The child views.
* @var array * @var FormView[]
*/ */
public $children = array(); public $children = array();
@ -110,7 +110,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
* *
* @param string $name The child name * @param string $name The child name
* *
* @return bool Whether the child view exists * @return bool Whether the child view exists
*/ */
public function offsetExists($name) public function offsetExists($name)
{ {
@ -150,7 +150,7 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
/** /**
* Implements \Countable. * Implements \Countable.
* *
* @return int The number of children views * @return int The number of children views
*/ */
public function count() public function count()
{ {

View File

@ -86,7 +86,7 @@ abstract class Guess
/** /**
* Constructor. * Constructor.
* *
* @param int $confidence The confidence * @param int $confidence The confidence
* *
* @throws InvalidArgumentException if the given value of confidence is unknown * @throws InvalidArgumentException if the given value of confidence is unknown
*/ */
@ -103,8 +103,8 @@ abstract class Guess
/** /**
* Returns the confidence that the guessed value is correct. * Returns the confidence that the guessed value is correct.
* *
* @return int One of the constants VERY_HIGH_CONFIDENCE, * @return int One of the constants VERY_HIGH_CONFIDENCE, HIGH_CONFIDENCE,
* HIGH_CONFIDENCE, MEDIUM_CONFIDENCE and LOW_CONFIDENCE * MEDIUM_CONFIDENCE and LOW_CONFIDENCE
*/ */
public function getConfidence() public function getConfidence()
{ {

View File

@ -34,11 +34,11 @@ class TypeGuess extends Guess
/** /**
* Constructor * Constructor
* *
* @param string $type The guessed field type * @param string $type The guessed field type
* @param array $options The options for creating instances of the * @param array $options The options for creating instances of the
* guessed class * guessed class
* @param int $confidence The confidence that the guessed class name * @param int $confidence The confidence that the guessed class name
* is correct * is correct
*/ */
public function __construct($type, array $options, $confidence) public function __construct($type, array $options, $confidence)
{ {

View File

@ -27,9 +27,9 @@ class ValueGuess extends Guess
/** /**
* Constructor * Constructor
* *
* @param string $value The guessed value * @param string $value The guessed value
* @param int $confidence The confidence that the guessed class name * @param int $confidence The confidence that the guessed class name
* is correct * is correct
*/ */
public function __construct($value, $confidence) public function __construct($value, $confidence)
{ {

View File

@ -21,12 +21,12 @@ use Symfony\Component\Form\Exception\InvalidArgumentException;
class PreloadedExtension implements FormExtensionInterface class PreloadedExtension implements FormExtensionInterface
{ {
/** /**
* @var array * @var FormTypeInterface[]
*/ */
private $types = array(); private $types = array();
/** /**
* @var array * @var array[FormTypeExtensionInterface[]]
*/ */
private $typeExtensions = array(); private $typeExtensions = array();

View File

@ -158,7 +158,6 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$this->innerType->buildForm($builder, $options); $this->innerType->buildForm($builder, $options);
foreach ($this->typeExtensions as $extension) { foreach ($this->typeExtensions as $extension) {
/* @var FormTypeExtensionInterface $extension */
$extension->buildForm($builder, $options); $extension->buildForm($builder, $options);
} }
} }
@ -184,7 +183,6 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$this->innerType->buildView($view, $form, $options); $this->innerType->buildView($view, $form, $options);
foreach ($this->typeExtensions as $extension) { foreach ($this->typeExtensions as $extension) {
/* @var FormTypeExtensionInterface $extension */
$extension->buildView($view, $form, $options); $extension->buildView($view, $form, $options);
} }
} }
@ -235,7 +233,6 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$this->innerType->setDefaultOptions($this->optionsResolver); $this->innerType->setDefaultOptions($this->optionsResolver);
foreach ($this->typeExtensions as $extension) { foreach ($this->typeExtensions as $extension) {
/* @var FormTypeExtensionInterface $extension */
$extension->setDefaultOptions($this->optionsResolver); $extension->setDefaultOptions($this->optionsResolver);
} }
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Form; namespace Symfony\Component\Form;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
/** /**
* A wrapper for a form type and its extensions. * A wrapper for a form type and its extensions.
* *
@ -60,8 +62,8 @@ interface ResolvedFormTypeInterface
/** /**
* Creates a new form view for a form of this type. * Creates a new form view for a form of this type.
* *
* @param FormInterface $form The form to create a view for. * @param FormInterface $form The form to create a view for.
* @param FormView $parent The parent view or null. * @param FormView $parent The parent view or null.
* *
* @return FormView The created form view. * @return FormView The created form view.
*/ */
@ -100,7 +102,7 @@ interface ResolvedFormTypeInterface
/** /**
* Returns the configured options resolver used for this type. * Returns the configured options resolver used for this type.
* *
* @return \Symfony\Component\OptionsResolver\OptionsResolverInterface The options resolver. * @return OptionsResolverInterface The options resolver.
*/ */
public function getOptionsResolver(); public function getOptionsResolver();
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Form\Test; namespace Symfony\Component\Form\Test;
interface FormBuilderInterface extends \Iterator, \Symfony\Component\Form\FormBuilderInterface use Symfony\Component\Form\FormBuilderInterface as BaseFormBuilderInterface;
interface FormBuilderInterface extends \Iterator, BaseFormBuilderInterface
{ {
} }

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Form\Test; namespace Symfony\Component\Form\Test;
use Symfony\Component\Form\Forms; use Symfony\Component\Form\Forms;
use Symfony\Component\Form\FormFactoryInterface;
/** /**
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
@ -19,7 +20,7 @@ use Symfony\Component\Form\Forms;
abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
{ {
/** /**
* @var \Symfony\Component\Form\FormFactoryInterface * @var FormFactoryInterface
*/ */
protected $factory; protected $factory;

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Form\Test; namespace Symfony\Component\Form\Test;
interface FormInterface extends \Iterator, \Symfony\Component\Form\FormInterface use Symfony\Component\Form\FormInterface as BaseFormInterface;
interface FormInterface extends \Iterator, BaseFormInterface
{ {
} }

View File

@ -22,11 +22,12 @@ namespace Symfony\Component\Form\Test;
abstract class FormPerformanceTestCase extends FormIntegrationTestCase abstract class FormPerformanceTestCase extends FormIntegrationTestCase
{ {
/** /**
* @var int * @var int
*/ */
protected $maxRunningTime = 0; protected $maxRunningTime = 0;
/** /**
* {@inheritdoc}
*/ */
protected function runTest() protected function runTest()
{ {
@ -47,7 +48,8 @@ abstract class FormPerformanceTestCase extends FormIntegrationTestCase
} }
/** /**
* @param int $maxRunningTime * @param int $maxRunningTime
*
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function setMaxRunningTime($maxRunningTime) public function setMaxRunningTime($maxRunningTime)
@ -60,8 +62,9 @@ abstract class FormPerformanceTestCase extends FormIntegrationTestCase
} }
/** /**
* @since Method available since Release 2.3.0
*
* @return int * @return int
* @since Method available since Release 2.3.0
*/ */
public function getMaxRunningTime() public function getMaxRunningTime()
{ {