original_string: private function resolveDatabaseType($type)
      {
          foreach ($this->getDatabases() as $database) {
              if ($database->type === $type) {
                  return $database;
              }
          }
          throw new \DomainException(sprintf('Unknown database type (%s). Please use mysqli, pgsql or mariadb.', $type));
      }
code: private function resolveDatabaseType($type)
      {
          foreach ($this->getDatabases() as $database) {
              if ($database->type === $type) {
                  return $database;
              }
          }
          throw new \DomainException(sprintf('Unknown database type (%s). Please use mysqli, pgsql or mariadb.', $type));
      }
code_tokens: private function resolveDatabaseType ( $ type ) { foreach ( $ this -> getDatabases ( ) as $ database ) { if ( $ database -> type === $ type ) { return $ database ; } } throw new \ DomainException ( sprintf ( 'Unknown database type (%s). Please use mysqli, pgsql or mariadb.' , $ type ) ) ; }
docstring: Resolve database class.
  
  @param string $type Database type
  
  @return AbstractDatabase
docstring_tokens: Resolve database class .