original_string: public function create(PDO $pdo)
      {
          switch ($pdo->getDatabaseType()) {
              case 'mysql':
                  $connection = new MySqlConnection($pdo);
                  break;
              case 'pgsql':
                  $connection = new PostgreSqlConnection($pdo);
                  break;
              case 'sqlite':
                  $connection = new SQLiteConnection($pdo);
                  break;
              default:
                  throw new InvalidDriverException('Not implemented driver: ' . $pdo->getDatabaseType());
          }
  
          return $connection;
      }
code: public function create(PDO $pdo)
      {
          switch ($pdo->getDatabaseType()) {
              case 'mysql':
                  $connection = new MySqlConnection($pdo);
                  break;
              case 'pgsql':
                  $connection = new PostgreSqlConnection($pdo);
                  break;
              case 'sqlite':
                  $connection = new SQLiteConnection($pdo);
                  break;
              default:
                  throw new InvalidDriverException('Not implemented driver: ' . $pdo->getDatabaseType());
          }
  
          return $connection;
      }
code_tokens: public function create ( PDO $ pdo ) { switch ( $ pdo -> getDatabaseType ( ) ) { case 'mysql' : $ connection = new MySqlConnection ( $ pdo ) ; break ; case 'pgsql' : $ connection = new PostgreSqlConnection ( $ pdo ) ; break ; case 'sqlite' : $ connection = new SQLiteConnection ( $ pdo ) ; break ; default : throw new InvalidDriverException ( 'Not implemented driver: ' . $ pdo -> getDatabaseType ( ) ) ; } return $ connection ; }
docstring: Create a new Connection based on the config
  
  @param PDO $pdo
  
  @return Connection
  @throws InvalidDriverException
docstring_tokens: Create a new Connection based on the config