private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context)
    {
        $violationCount = \count($context->getViolations());
        $cascadedGroups = $cascadedGroup ? [$cascadedGroup] : null;

        foreach ($groupSequence->groups as $groupInSequence) {
            $groups = (array) $groupInSequence;

            if ($metadata instanceof ClassMetadataInterface) {
                $this->validateClassNode(
                     $value,
                     $cacheKey,
                     $metadata,
                     $propertyPath,
                     $groups,
                     $cascadedGroups,
                     $traversalStrategy,
                     $context
                );
            } else {
                $this->validateGenericNode(
                     $value,
                     $object,
                     $cacheKey,
                     $metadata,
                     $propertyPath,
                     $groups,
                     $cascadedGroups,
                     $traversalStrategy,
                     $context
                );
            }

            // Abort sequence validation if a violation was generated
            if (\count($context->getViolations()) > $violationCount) {
                break;
            }
        }
    }
private function stepThroughGroupSequence($value, $object, $cacheKey, MetadataInterface $metadata = null, $propertyPath, $traversalStrategy, GroupSequence $groupSequence, $cascadedGroup, ExecutionContextInterface $context)
    {
        $violationCount = \count($context->getViolations());
        $cascadedGroups = $cascadedGroup ? [$cascadedGroup] : null;

        foreach ($groupSequence->groups as $groupInSequence) {
            $groups = (array) $groupInSequence;

            if ($metadata instanceof ClassMetadataInterface) {
                $this->validateClassNode(
                     $value,
                     $cacheKey,
                     $metadata,
                     $propertyPath,
                     $groups,
                     $cascadedGroups,
                     $traversalStrategy,
                     $context
                );
            } else {
                $this->validateGenericNode(
                     $value,
                     $object,
                     $cacheKey,
                     $metadata,
                     $propertyPath,
                     $groups,
                     $cascadedGroups,
                     $traversalStrategy,
                     $context
                );
            }

            // Abort sequence validation if a violation was generated
            if (\count($context->getViolations()) > $violationCount) {
                break;
            }
        }
    }
private function stepThroughGroupSequence ( $ value , $ object , $ cacheKey , MetadataInterface $ metadata = null , $ propertyPath , $ traversalStrategy , GroupSequence $ groupSequence , $ cascadedGroup , ExecutionContextInterface $ context ) { $ violationCount = \ count ( $ context -> getViolations ( ) ) ; $ cascadedGroups = $ cascadedGroup ? [ $ cascadedGroup ] : null ; foreach ( $ groupSequence -> groups as $ groupInSequence ) { $ groups = ( array ) $ groupInSequence ; if ( $ metadata instanceof ClassMetadataInterface ) { $ this -> validateClassNode ( $ value , $ cacheKey , $ metadata , $ propertyPath , $ groups , $ cascadedGroups , $ traversalStrategy , $ context ) ; } else { $ this -> validateGenericNode ( $ value , $ object , $ cacheKey , $ metadata , $ propertyPath , $ groups , $ cascadedGroups , $ traversalStrategy , $ context ) ; } // Abort sequence validation if a violation was generated if ( \ count ( $ context -> getViolations ( ) ) > $ violationCount ) { break ; } } }
Sequentially validates a node's value in each group of a group sequence.

If any of the constraints generates a violation, subsequent groups in the
group sequence are skipped.

@param mixed                     $value             The validated value
@param object|null               $object            The current object
@param string                    $cacheKey          The key for caching
the validated value
@param MetadataInterface         $metadata          The metadata of the
value
@param string                    $propertyPath      The property path leading
to the value
@param int                       $traversalStrategy The strategy used for
traversing the value
@param GroupSequence             $groupSequence     The group sequence
@param string|null               $cascadedGroup     The group that should
be passed to cascaded
objects instead of
the group sequence
@param ExecutionContextInterface $context           The execution context
Sequentially validates a node s value in each group of a group sequence .