original_string: protected function assertValidMappingConfiguration(array $mappingConfig, $objectManagerName)
      {
          if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) {
              throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName));
          }
  
          if (!is_dir($mappingConfig['dir'])) {
              throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
          }
  
          if (!\in_array($mappingConfig['type'], ['xml', 'yml', 'annotation', 'php', 'staticphp'])) {
              throw new \InvalidArgumentException(sprintf('Can only configure "xml", "yml", "annotation", "php" or '.
                  '"staticphp" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. '.
                  'You can register them by adding a new driver to the '.
                  '"%s" service definition.', $this->getObjectManagerElementName($objectManagerName.'_metadata_driver')
              ));
          }
      }
code: protected function assertValidMappingConfiguration(array $mappingConfig, $objectManagerName)
      {
          if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) {
              throw new \InvalidArgumentException(sprintf('Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.', $objectManagerName));
          }
  
          if (!is_dir($mappingConfig['dir'])) {
              throw new \InvalidArgumentException(sprintf('Specified non-existing directory "%s" as Doctrine mapping source.', $mappingConfig['dir']));
          }
  
          if (!\in_array($mappingConfig['type'], ['xml', 'yml', 'annotation', 'php', 'staticphp'])) {
              throw new \InvalidArgumentException(sprintf('Can only configure "xml", "yml", "annotation", "php" or '.
                  '"staticphp" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. '.
                  'You can register them by adding a new driver to the '.
                  '"%s" service definition.', $this->getObjectManagerElementName($objectManagerName.'_metadata_driver')
              ));
          }
      }
code_tokens: protected function assertValidMappingConfiguration ( array $ mappingConfig , $ objectManagerName ) { if ( ! $ mappingConfig [ 'type' ] || ! $ mappingConfig [ 'dir' ] || ! $ mappingConfig [ 'prefix' ] ) { throw new \ InvalidArgumentException ( sprintf ( 'Mapping definitions for Doctrine manager "%s" require at least the "type", "dir" and "prefix" options.' , $ objectManagerName ) ) ; } if ( ! is_dir ( $ mappingConfig [ 'dir' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Specified non-existing directory "%s" as Doctrine mapping source.' , $ mappingConfig [ 'dir' ] ) ) ; } if ( ! \ in_array ( $ mappingConfig [ 'type' ] , [ 'xml' , 'yml' , 'annotation' , 'php' , 'staticphp' ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Can only configure "xml", "yml", "annotation", "php" or ' . '"staticphp" through the DoctrineBundle. Use your own bundle to configure other metadata drivers. ' . 'You can register them by adding a new driver to the ' . '"%s" service definition.' , $ this -> getObjectManagerElementName ( $ objectManagerName . '_metadata_driver' ) ) ) ; } }
docstring: Assertion if the specified mapping information is valid.
  
  @param array  $mappingConfig
  @param string $objectManagerName
  
  @throws \InvalidArgumentException
docstring_tokens: Assertion if the specified mapping information is valid .