original_string: private function parseDefaultNode(\DOMElement $node, $path)
      {
          if ($this->isElementValueNull($node)) {
              return;
          }
  
          switch ($node->localName) {
              case 'bool':
                  return 'true' === trim($node->nodeValue) || '1' === trim($node->nodeValue);
              case 'int':
                  return (int) trim($node->nodeValue);
              case 'float':
                  return (float) trim($node->nodeValue);
              case 'string':
                  return trim($node->nodeValue);
              case 'list':
                  $list = [];
  
                  foreach ($node->childNodes as $element) {
                      if (!$element instanceof \DOMElement) {
                          continue;
                      }
  
                      if (self::NAMESPACE_URI !== $element->namespaceURI) {
                          continue;
                      }
  
                      $list[] = $this->parseDefaultNode($element, $path);
                  }
  
                  return $list;
              case 'map':
                  $map = [];
  
                  foreach ($node->childNodes as $element) {
                      if (!$element instanceof \DOMElement) {
                          continue;
                      }
  
                      if (self::NAMESPACE_URI !== $element->namespaceURI) {
                          continue;
                      }
  
                      $map[$element->getAttribute('key')] = $this->parseDefaultNode($element, $path);
                  }
  
                  return $map;
              default:
                  throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".', $node->localName, $path));
          }
      }
code: private function parseDefaultNode(\DOMElement $node, $path)
      {
          if ($this->isElementValueNull($node)) {
              return;
          }
  
          switch ($node->localName) {
              case 'bool':
                  return 'true' === trim($node->nodeValue) || '1' === trim($node->nodeValue);
              case 'int':
                  return (int) trim($node->nodeValue);
              case 'float':
                  return (float) trim($node->nodeValue);
              case 'string':
                  return trim($node->nodeValue);
              case 'list':
                  $list = [];
  
                  foreach ($node->childNodes as $element) {
                      if (!$element instanceof \DOMElement) {
                          continue;
                      }
  
                      if (self::NAMESPACE_URI !== $element->namespaceURI) {
                          continue;
                      }
  
                      $list[] = $this->parseDefaultNode($element, $path);
                  }
  
                  return $list;
              case 'map':
                  $map = [];
  
                  foreach ($node->childNodes as $element) {
                      if (!$element instanceof \DOMElement) {
                          continue;
                      }
  
                      if (self::NAMESPACE_URI !== $element->namespaceURI) {
                          continue;
                      }
  
                      $map[$element->getAttribute('key')] = $this->parseDefaultNode($element, $path);
                  }
  
                  return $map;
              default:
                  throw new \InvalidArgumentException(sprintf('Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".', $node->localName, $path));
          }
      }
code_tokens: private function parseDefaultNode ( \ DOMElement $ node , $ path ) { if ( $ this -> isElementValueNull ( $ node ) ) { return ; } switch ( $ node -> localName ) { case 'bool' : return 'true' === trim ( $ node -> nodeValue ) || '1' === trim ( $ node -> nodeValue ) ; case 'int' : return ( int ) trim ( $ node -> nodeValue ) ; case 'float' : return ( float ) trim ( $ node -> nodeValue ) ; case 'string' : return trim ( $ node -> nodeValue ) ; case 'list' : $ list = [ ] ; foreach ( $ node -> childNodes as $ element ) { if ( ! $ element instanceof \ DOMElement ) { continue ; } if ( self :: NAMESPACE_URI !== $ element -> namespaceURI ) { continue ; } $ list [ ] = $ this -> parseDefaultNode ( $ element , $ path ) ; } return $ list ; case 'map' : $ map = [ ] ; foreach ( $ node -> childNodes as $ element ) { if ( ! $ element instanceof \ DOMElement ) { continue ; } if ( self :: NAMESPACE_URI !== $ element -> namespaceURI ) { continue ; } $ map [ $ element -> getAttribute ( 'key' ) ] = $ this -> parseDefaultNode ( $ element , $ path ) ; } return $ map ; default : throw new \ InvalidArgumentException ( sprintf ( 'Unknown tag "%s" used in file "%s". Expected "bool", "int", "float", "string", "list", or "map".' , $ node -> localName , $ path ) ) ; } }
docstring: Recursively parses the value of a "default" element.
  
  @param \DOMElement $node The node value
  @param string      $path Full path of the XML file being processed
  
  @return array|bool|float|int|string The parsed value
  
  @throws \InvalidArgumentException when the XML is invalid
docstring_tokens: Recursively parses the value of a default element .