original_string: public function registerCustomDoctrineType($class, $name, $type)
      {
          if (! $this->connection->isDoctrineAvailable()) {
              throw new RuntimeException(
                  'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).'
              );
          }
  
          if (! Type::hasType($name)) {
              Type::addType($name, $class);
  
              $this->connection
                  ->getDoctrineSchemaManager()
                  ->getDatabasePlatform()
                  ->registerDoctrineTypeMapping($type, $name);
          }
      }
code: public function registerCustomDoctrineType($class, $name, $type)
      {
          if (! $this->connection->isDoctrineAvailable()) {
              throw new RuntimeException(
                  'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).'
              );
          }
  
          if (! Type::hasType($name)) {
              Type::addType($name, $class);
  
              $this->connection
                  ->getDoctrineSchemaManager()
                  ->getDatabasePlatform()
                  ->registerDoctrineTypeMapping($type, $name);
          }
      }
code_tokens: public function registerCustomDoctrineType ( $ class , $ name , $ type ) { if ( ! $ this -> connection -> isDoctrineAvailable ( ) ) { throw new RuntimeException ( 'Registering a custom Doctrine type requires Doctrine DBAL (doctrine/dbal).' ) ; } if ( ! Type :: hasType ( $ name ) ) { Type :: addType ( $ name , $ class ) ; $ this -> connection -> getDoctrineSchemaManager ( ) -> getDatabasePlatform ( ) -> registerDoctrineTypeMapping ( $ type , $ name ) ; } }
docstring: Register a custom Doctrine mapping type.
  
  @param  string  $class
  @param  string  $name
  @param  string  $type
  @return void
  
  @throws \Doctrine\DBAL\DBALException
docstring_tokens: Register a custom Doctrine mapping type .