original_string: public static function getDBHelper(string $driver): string
      {
          $drivers = [
              'pdo_mysql'  => MySQL::class,
              'mysql'      => MySQL::class,
              'mysql2'     => MySQL::class,
  
              'pdo_pgsql'  => PostgreSQL::class,
              'pgsql'      => PostgreSQL::class,
              'postgres'   => PostgreSQL::class,
              'postgresql' => PostgreSQL::class,
  
              'pdo_sqlsrv' => SQLServer::class,
              'mssql'      => SQLServer::class,
          ];
  
          if (!array_key_exists($driver, $drivers)) {
              throw new \InvalidArgumentException("$driver unknown");
          }
  
          return $drivers[$driver];
      }
code: public static function getDBHelper(string $driver): string
      {
          $drivers = [
              'pdo_mysql'  => MySQL::class,
              'mysql'      => MySQL::class,
              'mysql2'     => MySQL::class,
  
              'pdo_pgsql'  => PostgreSQL::class,
              'pgsql'      => PostgreSQL::class,
              'postgres'   => PostgreSQL::class,
              'postgresql' => PostgreSQL::class,
  
              'pdo_sqlsrv' => SQLServer::class,
              'mssql'      => SQLServer::class,
          ];
  
          if (!array_key_exists($driver, $drivers)) {
              throw new \InvalidArgumentException("$driver unknown");
          }
  
          return $drivers[$driver];
      }
code_tokens: public static function getDBHelper ( string $ driver ) : string { $ drivers = [ 'pdo_mysql' => MySQL :: class , 'mysql' => MySQL :: class , 'mysql2' => MySQL :: class , 'pdo_pgsql' => PostgreSQL :: class , 'pgsql' => PostgreSQL :: class , 'postgres' => PostgreSQL :: class , 'postgresql' => PostgreSQL :: class , 'pdo_sqlsrv' => SQLServer :: class , 'mssql' => SQLServer :: class , ] ; if ( ! array_key_exists ( $ driver , $ drivers ) ) { throw new \ InvalidArgumentException ( "$driver unknown" ) ; } return $ drivers [ $ driver ] ; }
docstring: Find the right local driver from a php extension
  
  @param  string $driver
  
  @throws \InvalidArgumentException
  
  @return string
docstring_tokens: Find the right local driver from a php extension