Skip to content

Commit

Permalink
[2.3][Form] Cleanup & fix phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Jul 9, 2014
1 parent 3e270fe commit 3645771
Show file tree
Hide file tree
Showing 41 changed files with 208 additions and 211 deletions.
16 changes: 8 additions & 8 deletions Button.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(FormConfigInterface $config)
*
* @param mixed $offset
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function offsetExists($offset)
{
Expand Down Expand Up @@ -152,7 +152,7 @@ public function get($name)
*
* @param string $name
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function has($name)
{
Expand Down Expand Up @@ -254,7 +254,7 @@ public function getConfig()
/**
* 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()
{
Expand Down Expand Up @@ -295,7 +295,7 @@ public function addError(FormError $error)
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true.
*/
public function isValid()
{
Expand All @@ -305,7 +305,7 @@ public function isValid()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function isRequired()
{
Expand All @@ -327,7 +327,7 @@ public function isDisabled()
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true.
*/
public function isEmpty()
{
Expand All @@ -337,7 +337,7 @@ public function isEmpty()
/**
* Unsupported method.
*
* @return bool Always returns true.
* @return bool Always returns true.
*/
public function isSynchronized()
{
Expand Down Expand Up @@ -418,7 +418,7 @@ public function createView(FormView $parent = null)
/**
* Unsupported method.
*
* @return int Always returns 0.
* @return int Always returns 0.
*/
public function count()
{
Expand Down
56 changes: 27 additions & 29 deletions ButtonBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public function __construct($name, array $options = array())
*
* This method should not be invoked.
*
* @param string|int|FormBuilderInterface $child
* @param string|FormTypeInterface $type
* @param array $options
* @param string|int|FormBuilderInterface $child
* @param string|FormTypeInterface $type
* @param array $options
*
* @throws BadMethodCallException
*/
Expand Down Expand Up @@ -135,7 +135,7 @@ public function remove($name)
*
* @param string $name
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function has($name)
{
Expand Down Expand Up @@ -283,7 +283,7 @@ public function setDataMapper(DataMapperInterface $dataMapper = null)
/**
* 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.
*/
Expand Down Expand Up @@ -313,7 +313,7 @@ public function setEmptyData($emptyData)
*
* This method should not be invoked.
*
* @param bool $errorBubbling
* @param bool $errorBubbling
*
* @throws BadMethodCallException
*/
Expand All @@ -327,7 +327,7 @@ public function setErrorBubbling($errorBubbling)
*
* This method should not be invoked.
*
* @param bool $required
* @param bool $required
*
* @throws BadMethodCallException
*/
Expand Down Expand Up @@ -355,7 +355,7 @@ public function setPropertyPath($propertyPath)
*
* This method should not be invoked.
*
* @param bool $mapped
* @param bool $mapped
*
* @throws BadMethodCallException
*/
Expand All @@ -369,7 +369,7 @@ public function setMapped($mapped)
*
* This method should not be invoked.
*
* @param bool $byReference
* @param bool $byReference
*
* @throws BadMethodCallException
*/
Expand All @@ -383,7 +383,7 @@ public function setByReference($byReference)
*
* This method should not be invoked.
*
* @param bool $virtual
* @param bool $virtual
*
* @throws BadMethodCallException
*/
Expand All @@ -397,7 +397,7 @@ public function setVirtual($virtual)
*
* This method should not be invoked.
*
* @param bool $compound
* @param bool $compound
*
* @throws BadMethodCallException
*/
Expand Down Expand Up @@ -439,7 +439,7 @@ public function setData($data)
*
* This method should not be invoked.
*
* @param bool $locked
* @param bool $locked
*
* @throws BadMethodCallException
*/
Expand All @@ -455,8 +455,6 @@ public function setDataLocked($locked)
*
* @param FormFactoryInterface $formFactory
*
* @return void
*
* @throws BadMethodCallException
*/
public function setFormFactory(FormFactoryInterface $formFactory)
Expand Down Expand Up @@ -503,7 +501,7 @@ public function setRequestHandler(RequestHandlerInterface $requestHandler)
/**
* Unsupported method.
*
* @param bool $initialize
* @param bool $initialize
*
* @throws BadMethodCallException
*/
Expand All @@ -519,7 +517,7 @@ public function setAutoInitialize($initialize)
/**
* Unsupported method.
*
* @param bool $inheritData
* @param bool $inheritData
*
* @throws BadMethodCallException
*/
Expand Down Expand Up @@ -571,7 +569,7 @@ public function getPropertyPath()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getMapped()
{
Expand All @@ -581,7 +579,7 @@ public function getMapped()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getByReference()
{
Expand All @@ -591,7 +589,7 @@ public function getByReference()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getVirtual()
{
Expand All @@ -601,7 +599,7 @@ public function getVirtual()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getCompound()
{
Expand Down Expand Up @@ -650,7 +648,7 @@ public function getDataMapper()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getRequired()
{
Expand All @@ -660,7 +658,7 @@ public function getRequired()
/**
* Returns whether the button is disabled.
*
* @return bool Whether the button is disabled.
* @return bool Whether the button is disabled.
*/
public function getDisabled()
{
Expand All @@ -670,7 +668,7 @@ public function getDisabled()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getErrorBubbling()
{
Expand Down Expand Up @@ -701,7 +699,7 @@ public function getAttributes()
*
* @param string $name The attribute name.
*
* @return bool Whether the attribute exists.
* @return bool Whether the attribute exists.
*/
public function hasAttribute($name)
{
Expand Down Expand Up @@ -742,7 +740,7 @@ public function getDataClass()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getDataLocked()
{
Expand Down Expand Up @@ -788,7 +786,7 @@ public function getRequestHandler()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getAutoInitialize()
{
Expand All @@ -798,7 +796,7 @@ public function getAutoInitialize()
/**
* Unsupported method.
*
* @return bool Always returns false.
* @return bool Always returns false.
*/
public function getInheritData()
{
Expand All @@ -820,7 +818,7 @@ public function getOptions()
*
* @param string $name The option name,
*
* @return bool Whether the option exists.
* @return bool Whether the option exists.
*/
public function hasOption($name)
{
Expand All @@ -843,7 +841,7 @@ public function getOption($name, $default = null)
/**
* Unsupported method.
*
* @return int Always returns 0.
* @return int Always returns 0.
*/
public function count()
{
Expand Down
8 changes: 4 additions & 4 deletions CallbackTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function __construct(\Closure $transform, \Closure $reverseTransform)
*
* @return mixed The value in the transformed representation
*
* @throws UnexpectedTypeException when the argument is not a string
* @throws TransformationFailedException when the transformation fails
* @throws UnexpectedTypeException when the argument is not a string
* @throws TransformationFailedException when the transformation fails
*/
public function transform($data)
{
Expand All @@ -63,8 +63,8 @@ public function transform($data)
*
* @return mixed The value in the original representation
*
* @throws UnexpectedTypeException when the argument is not of the expected type
* @throws TransformationFailedException when the transformation fails
* @throws UnexpectedTypeException when the argument is not of the expected type
* @throws TransformationFailedException when the transformation fails
*/
public function reverseTransform($data)
{
Expand Down
2 changes: 1 addition & 1 deletion ClickableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ClickableInterface
/**
* Returns whether this element was clicked.
*
* @return bool Whether this element was clicked.
* @return bool Whether this element was clicked.
*/
public function isClicked();
}
18 changes: 9 additions & 9 deletions Extension/Core/ChoiceList/ChoiceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ class ChoiceList implements ChoiceListInterface
* the sub-hierarchy can be stored in the array
* key pointing to the nested array. The topmost
* level of the hierarchy may also be a \Traversable.
* @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 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.
*
* @throws UnexpectedTypeException If the choices are not an array or \Traversable.
*/
Expand Down Expand Up @@ -255,7 +255,7 @@ public function getIndicesForValues(array $values)
* @param array $labels The labels corresponding to the 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.
*/
protected function addChoices(array &$bucketForPreferred, array &$bucketForRemaining, $choices, array $labels, array $preferredChoices)
Expand Down Expand Up @@ -377,7 +377,7 @@ protected function addChoice(array &$bucketForPreferred, array &$bucketForRemain
* @param mixed $choice The choice to test.
* @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)
{
Expand All @@ -391,8 +391,8 @@ protected function isPreferred($choice, array $preferredChoices)
*
* @param mixed $choice The choice to create an index for
*
* @return int|string A unique index containing only ASCII letters,
* digits and underscores.
* @return int|string A unique index containing only ASCII letters,
* digits and underscores.
*/
protected function createIndex($choice)
{
Expand Down Expand Up @@ -451,7 +451,7 @@ protected function fixValues(array $values)
*
* @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)
{
Expand Down
Loading

0 comments on commit 3645771

Please sign in to comment.