original_string: protected function parseNamespaces(ClassMetadata $metadata, $config)
      {
          if (!isset($config['namespaces'])) {
              return;
          }
  
          if (!is_array($config)) {
              throw new \RuntimeException(sprintf('Invalid YAML configuration for "%s" : "namespaces" property need to be an array.', $metadata->name));
          }
  
          foreach ($config['namespaces'] as $prefix => $uri) {
              $metadata->addGraphNamespace(new NamespaceNode([
                  'prefix' => $prefix,
                  'uri'    => $uri,
              ]));
          }
      }
code: protected function parseNamespaces(ClassMetadata $metadata, $config)
      {
          if (!isset($config['namespaces'])) {
              return;
          }
  
          if (!is_array($config)) {
              throw new \RuntimeException(sprintf('Invalid YAML configuration for "%s" : "namespaces" property need to be an array.', $metadata->name));
          }
  
          foreach ($config['namespaces'] as $prefix => $uri) {
              $metadata->addGraphNamespace(new NamespaceNode([
                  'prefix' => $prefix,
                  'uri'    => $uri,
              ]));
          }
      }
code_tokens: protected function parseNamespaces ( ClassMetadata $ metadata , $ config ) { if ( ! isset ( $ config [ 'namespaces' ] ) ) { return ; } if ( ! is_array ( $ config ) ) { throw new \ RuntimeException ( sprintf ( 'Invalid YAML configuration for "%s" : "namespaces" property need to be an array.' , $ metadata -> name ) ) ; } foreach ( $ config [ 'namespaces' ] as $ prefix => $ uri ) { $ metadata -> addGraphNamespace ( new NamespaceNode ( [ 'prefix' => $ prefix , 'uri' => $ uri , ] ) ) ; } }
docstring: Parse namespaces configuration
  
  @param ClassMetadata $metadata
  @param mixed         $config
docstring_tokens: Parse namespaces configuration