Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Dec 4, 2014
1 parent 94d4e28 commit d7be1a9
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 67 deletions.
16 changes: 8 additions & 8 deletions ConstraintValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ protected function buildViolation($message, array $parameters = array())
* supports the 2.4 context API.
*
* @param ExecutionContextInterface $context The context to use
* @param string $message The violation message
* @param array $parameters The message parameters
* @param string $message The violation message
* @param array $parameters The message parameters
*
* @return ConstraintViolationBuilderInterface The violation builder
*
Expand Down Expand Up @@ -126,9 +126,9 @@ protected function formatTypeOf($value)
* won't know what an "object", "array" or "resource" is and will be
* confused by the violation message.
*
* @param mixed $value The value to format as string
* @param int $format A bitwise combination of the format
* constants in this class
* @param mixed $value The value to format as string
* @param int $format A bitwise combination of the format
* constants in this class
*
* @return string The string representation of the passed value
*/
Expand Down Expand Up @@ -186,9 +186,9 @@ protected function formatValue($value, $format = 0)
* Each of the values is converted to a string using
* {@link formatValue()}. The values are then concatenated with commas.
*
* @param array $values A list of values
* @param int $format A bitwise combination of the format
* constants in this class
* @param array $values A list of values
* @param int $format A bitwise combination of the format
* constants in this class
*
* @return string The string representation of the value list
*
Expand Down
14 changes: 7 additions & 7 deletions Constraints/GroupSequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public function getIterator()
/**
* Returns whether the given offset exists in the sequence.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @return bool Whether the offset exists
* @return bool Whether the offset exists
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
Expand All @@ -125,7 +125,7 @@ public function offsetExists($offset)
/**
* Returns the group at the given offset.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @return string The group a the given offset
*
Expand All @@ -149,8 +149,8 @@ public function offsetGet($offset)
/**
* Sets the group at the given offset.
*
* @param int $offset The offset
* @param string $value The group name
* @param int $offset The offset
* @param string $value The group name
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
Expand All @@ -169,7 +169,7 @@ public function offsetSet($offset, $value)
/**
* Removes the group at the given offset.
*
* @param int $offset The offset
* @param int $offset The offset
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
Expand All @@ -182,7 +182,7 @@ public function offsetUnset($offset)
/**
* Returns the number of groups in the sequence.
*
* @return int The number of groups
* @return int The number of groups
*
* @deprecated Implemented for backwards compatibility with Symfony < 2.5.
* To be removed in Symfony 3.0.
Expand Down
14 changes: 7 additions & 7 deletions Context/ExecutionContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ class ExecutionContext implements ExecutionContextInterface
/**
* Creates a new execution context.
*
* @param ValidatorInterface $validator The validator
* @param mixed $root The root value of the
* validated object graph
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
* @param ValidatorInterface $validator The validator
* @param mixed $root The root value of the
* validated object graph
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
*
* @internal Called by {@link ExecutionContextFactory}. Should not be used
* in user code.
Expand Down
8 changes: 4 additions & 4 deletions Context/ExecutionContextFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class ExecutionContextFactory implements ExecutionContextFactoryInterface
/**
* Creates a new context factory.
*
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
* @param TranslatorInterface $translator The translator
* @param string|null $translationDomain The translation domain to
* use for translating
* violation messages
*/
public function __construct(TranslatorInterface $translator, $translationDomain = null)
{
Expand Down
22 changes: 11 additions & 11 deletions Context/ExecutionContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public function setGroup($group);
/**
* Marks an object as validated in a specific validation group.
*
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
*
* @internal Used by the validator engine. Should not be called by user
* code.
Expand All @@ -151,12 +151,12 @@ public function markGroupAsValidated($cacheKey, $groupHash);
/**
* Returns whether an object was validated in a specific validation group.
*
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
* @param string $cacheKey The hash of the object
* @param string $groupHash The group's name or hash, if it is group
* sequence
*
* @return bool Whether the object was already validated for that
* group
* @return bool Whether the object was already validated for that
* group
*
* @internal Used by the validator engine. Should not be called by user
* code.
Expand All @@ -166,7 +166,7 @@ public function isGroupValidated($cacheKey, $groupHash);
/**
* Marks a constraint as validated for an object.
*
* @param string $cacheKey The hash of the object
* @param string $cacheKey The hash of the object
* @param string $constraintHash The hash of the constraint
*
* @internal Used by the validator engine. Should not be called by user
Expand All @@ -177,10 +177,10 @@ public function markConstraintAsValidated($cacheKey, $constraintHash);
/**
* Returns whether a constraint was validated for an object.
*
* @param string $cacheKey The hash of the object
* @param string $cacheKey The hash of the object
* @param string $constraintHash The hash of the constraint
*
* @return bool Whether the constraint was already validated
* @return bool Whether the constraint was already validated
*
* @internal Used by the validator engine. Should not be called by user
* code.
Expand Down
6 changes: 3 additions & 3 deletions Mapping/ClassMetadataInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getConstrainedProperties();
*
* If it is, you can access the group sequence with {@link getGroupSequence()}.
*
* @return bool Returns true if the "Default" group is overridden
* @return bool Returns true if the "Default" group is overridden
*
* @see \Symfony\Component\Validator\Constraints\GroupSequence
*/
Expand All @@ -71,8 +71,8 @@ public function getGroupSequence();
* This interface will be used to obtain the group sequence when an object
* of this class is validated.
*
* @return bool Returns true if the "Default" group is overridden by
* a dynamic group sequence
* @return bool Returns true if the "Default" group is overridden by
* a dynamic group sequence
*
* @see \Symfony\Component\Validator\GroupSequenceProviderInterface
*/
Expand Down
2 changes: 1 addition & 1 deletion Mapping/Factory/LazyLoadingMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getMetadataFor($value)
*
* @param string|object $value A class name or an object
*
* @return bool Whether metadata can be returned for that class
* @return bool Whether metadata can be returned for that class
*/
public function hasMetadataFor($value)
{
Expand Down
4 changes: 2 additions & 2 deletions Mapping/MetadataInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface MetadataInterface extends LegacyMetadataInterface
/**
* Returns the strategy for cascading objects.
*
* @return int The cascading strategy
* @return int The cascading strategy
*
* @see CascadingStrategy
*/
Expand All @@ -43,7 +43,7 @@ public function getCascadingStrategy();
/**
* Returns the strategy for traversing traversable objects.
*
* @return int The traversal strategy
* @return int The traversal strategy
*
* @see TraversalStrategy
*/
Expand Down
36 changes: 18 additions & 18 deletions Validator/RecursiveContextualValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,17 +313,17 @@ protected function normalizeGroups($groups)
* traversal, the object will be iterated and each nested object will be
* validated instead.
*
* @param object $object The object to cascade
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param int $traversalStrategy The strategy for traversing the
* cascaded object
* @param ExecutionContextInterface $context The current execution context
* @param object $object The object to cascade
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param int $traversalStrategy The strategy for traversing the
* cascaded object
* @param ExecutionContextInterface $context The current execution context
*
* @throws NoSuchMetadataException If the object has no associated metadata
* and does not implement {@link \Traversable}
* or if traversal is disabled via the
* $traversalStrategy argument
* @throws NoSuchMetadataException If the object has no associated metadata
* and does not implement {@link \Traversable}
* or if traversal is disabled via the
* $traversalStrategy argument
* @throws UnsupportedMetadataException If the metadata returned by the
* metadata factory does not implement
* {@link ClassMetadataInterface}
Expand Down Expand Up @@ -384,11 +384,11 @@ private function validateObject($object, $propertyPath, array $groups, $traversa
* @param array|\Traversable $collection The collection
* @param string $propertyPath The current property path
* @param string[] $groups The validated groups
* @param bool $stopRecursion Whether to disable
* @param bool $stopRecursion Whether to disable
* recursive iteration. For
* backwards compatibility
* with Symfony < 2.5.
* @param ExecutionContextInterface $context The current execution context
* @param ExecutionContextInterface $context The current execution context
*
* @see ClassNode
* @see CollectionNode
Expand Down Expand Up @@ -832,12 +832,12 @@ private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataIn
/**
* Validates a node's value against all constraints in the given group.
*
* @param mixed $value The validated value
* @param string $cacheKey The key for caching the
* validated value
* @param MetadataInterface $metadata The metadata of the value
* @param string $group The group to validate
* @param ExecutionContextInterface $context The execution context
* @param mixed $value The validated value
* @param string $cacheKey The key for caching the
* validated value
* @param MetadataInterface $metadata The metadata of the value
* @param string $group The group to validate
* @param ExecutionContextInterface $context The execution context
*/
private function validateInGroup($value, $cacheKey, MetadataInterface $metadata, $group, ExecutionContextInterface $context)
{
Expand Down
2 changes: 1 addition & 1 deletion ValidatorBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor)
/**
* Sets the API version that the returned validator should support.
*
* @param int $apiVersion The required API version
* @param int $apiVersion The required API version
*
* @return ValidatorBuilderInterface The builder object
*
Expand Down
2 changes: 1 addition & 1 deletion Violation/ConstraintViolationBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function setInvalidValue($invalidValue);
* Sets the number which determines how the plural form of the violation
* message is chosen when it is translated.
*
* @param int $number The number for determining the plural form
* @param int $number The number for determining the plural form
*
* @return ConstraintViolationBuilderInterface This builder
*
Expand Down
4 changes: 0 additions & 4 deletions Violation/LegacyConstraintViolationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

namespace Symfony\Component\Validator\Violation;

use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\ExecutionContextInterface;
use Symfony\Component\Validator\Util\PropertyPath;

Expand Down

0 comments on commit d7be1a9

Please sign in to comment.