original_string: private function validateEachObjectIn($collection, $propertyPath, array $groups, ExecutionContextInterface $context)
      {
          foreach ($collection as $key => $value) {
              if (\is_array($value)) {
                  // Also traverse nested arrays
                  $this->validateEachObjectIn(
                      $value,
                      $propertyPath.'['.$key.']',
                      $groups,
                      $context
                  );
  
                  continue;
              }
  
              // Scalar and null values in the collection are ignored
              if (\is_object($value)) {
                  $this->validateObject(
                      $value,
                      $propertyPath.'['.$key.']',
                      $groups,
                      TraversalStrategy::IMPLICIT,
                      $context
                  );
              }
          }
      }
code: private function validateEachObjectIn($collection, $propertyPath, array $groups, ExecutionContextInterface $context)
      {
          foreach ($collection as $key => $value) {
              if (\is_array($value)) {
                  // Also traverse nested arrays
                  $this->validateEachObjectIn(
                      $value,
                      $propertyPath.'['.$key.']',
                      $groups,
                      $context
                  );
  
                  continue;
              }
  
              // Scalar and null values in the collection are ignored
              if (\is_object($value)) {
                  $this->validateObject(
                      $value,
                      $propertyPath.'['.$key.']',
                      $groups,
                      TraversalStrategy::IMPLICIT,
                      $context
                  );
              }
          }
      }
code_tokens: private function validateEachObjectIn ( $ collection , $ propertyPath , array $ groups , ExecutionContextInterface $ context ) { foreach ( $ collection as $ key => $ value ) { if ( \ is_array ( $ value ) ) { // Also traverse nested arrays $ this -> validateEachObjectIn ( $ value , $ propertyPath . '[' . $ key . ']' , $ groups , $ context ) ; continue ; } // Scalar and null values in the collection are ignored if ( \ is_object ( $ value ) ) { $ this -> validateObject ( $ value , $ propertyPath . '[' . $ key . ']' , $ groups , TraversalStrategy :: IMPLICIT , $ context ) ; } } }
docstring: Validates each object in a collection against the constraints defined
  for their classes.
  
  Nested arrays are also iterated.
  
  @param iterable                  $collection   The collection
  @param string                    $propertyPath The current property path
  @param (string|GroupSequence)[]  $groups       The validated groups
  @param ExecutionContextInterface $context      The current execution context
docstring_tokens: Validates each object in a collection against the constraints defined for their classes .