X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FGroupSequence.php;fp=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FGroupSequence.php;h=1f6f512811ec78178f013d4207791a22778d8020;hp=319eff0eda966058dfc100f6ff3715ab10007ef2;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/symfony/validator/Constraints/GroupSequence.php b/vendor/symfony/validator/Constraints/GroupSequence.php index 319eff0ed..1f6f51281 100644 --- a/vendor/symfony/validator/Constraints/GroupSequence.php +++ b/vendor/symfony/validator/Constraints/GroupSequence.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Constraints; -use Symfony\Component\Validator\Exception\OutOfBoundsException; - /** * A sequence of validation groups. * @@ -53,15 +51,13 @@ use Symfony\Component\Validator\Exception\OutOfBoundsException; * @Target({"CLASS", "ANNOTATION"}) * * @author Bernhard Schussek - * - * Implementing \ArrayAccess, \IteratorAggregate and \Countable is @deprecated since 2.5 and will be removed in 3.0. */ -class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable +class GroupSequence { /** * The groups in the sequence. * - * @var string[]|GroupSequence[] + * @var string[]|array[]|GroupSequence[] */ public $groups; @@ -91,121 +87,4 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable // Support for Doctrine annotations $this->groups = isset($groups['value']) ? $groups['value'] : $groups; } - - /** - * Returns an iterator for this group. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @return \Traversable The iterator - * - * @see \IteratorAggregate::getIterator() - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function getIterator() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - return new \ArrayIterator($this->groups); - } - - /** - * Returns whether the given offset exists in the sequence. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @param int $offset The offset - * - * @return bool Whether the offset exists - * - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function offsetExists($offset) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - return isset($this->groups[$offset]); - } - - /** - * Returns the group at the given offset. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @param int $offset The offset - * - * @return string The group a the given offset - * - * @throws OutOfBoundsException If the object does not exist - * - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function offsetGet($offset) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - if (!isset($this->groups[$offset])) { - throw new OutOfBoundsException(sprintf( - 'The offset "%s" does not exist.', - $offset - )); - } - - return $this->groups[$offset]; - } - - /** - * Sets the group at the given offset. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @param int $offset The offset - * @param string $value The group name - * - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function offsetSet($offset, $value) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - if (null !== $offset) { - $this->groups[$offset] = $value; - - return; - } - - $this->groups[] = $value; - } - - /** - * Removes the group at the given offset. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @param int $offset The offset - * - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function offsetUnset($offset) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - unset($this->groups[$offset]); - } - - /** - * Returns the number of groups in the sequence. - * - * Implemented for backwards compatibility with Symfony < 2.5. - * - * @return int The number of groups - * - * @deprecated since version 2.5, to be removed in 3.0. - */ - public function count() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - - return count($this->groups); - } }