original_string: protected function parseNodes(array $nodes)
      {
          $values = [];
  
          foreach ($nodes as $name => $childNodes) {
              if (is_numeric($name) && \is_array($childNodes) && 1 === \count($childNodes)) {
                  $options = current($childNodes);
  
                  if (\is_array($options)) {
                      $options = $this->parseNodes($options);
                  }
  
                  $values[] = $this->newConstraint(key($childNodes), $options);
              } else {
                  if (\is_array($childNodes)) {
                      $childNodes = $this->parseNodes($childNodes);
                  }
  
                  $values[$name] = $childNodes;
              }
          }
  
          return $values;
      }
code: protected function parseNodes(array $nodes)
      {
          $values = [];
  
          foreach ($nodes as $name => $childNodes) {
              if (is_numeric($name) && \is_array($childNodes) && 1 === \count($childNodes)) {
                  $options = current($childNodes);
  
                  if (\is_array($options)) {
                      $options = $this->parseNodes($options);
                  }
  
                  $values[] = $this->newConstraint(key($childNodes), $options);
              } else {
                  if (\is_array($childNodes)) {
                      $childNodes = $this->parseNodes($childNodes);
                  }
  
                  $values[$name] = $childNodes;
              }
          }
  
          return $values;
      }
code_tokens: protected function parseNodes ( array $ nodes ) { $ values = [ ] ; foreach ( $ nodes as $ name => $ childNodes ) { if ( is_numeric ( $ name ) && \ is_array ( $ childNodes ) && 1 === \ count ( $ childNodes ) ) { $ options = current ( $ childNodes ) ; if ( \ is_array ( $ options ) ) { $ options = $ this -> parseNodes ( $ options ) ; } $ values [ ] = $ this -> newConstraint ( key ( $ childNodes ) , $ options ) ; } else { if ( \ is_array ( $ childNodes ) ) { $ childNodes = $ this -> parseNodes ( $ childNodes ) ; } $ values [ $ name ] = $ childNodes ; } } return $ values ; }
docstring: Parses a collection of YAML nodes.
  
  @param array $nodes The YAML nodes
  
  @return array An array of values or Constraint instances
docstring_tokens: Parses a collection of YAML nodes .