original_string: public function run($sql, array $params = array())
      {
          $sth = $this->pdo->prepare($sql);
  
          foreach ($params as $key => $value) {
              $key = is_numeric($key) ? $key + 1 : ":$key";
              $sth->bindValue($key, $value);
          }
  
          $sth->execute($params);
          $this->executed[] = $sql;
          return $sth;
      }
code: public function run($sql, array $params = array())
      {
          $sth = $this->pdo->prepare($sql);
  
          foreach ($params as $key => $value) {
              $key = is_numeric($key) ? $key + 1 : ":$key";
              $sth->bindValue($key, $value);
          }
  
          $sth->execute($params);
          $this->executed[] = $sql;
          return $sth;
      }
code_tokens: public function run ( $ sql , array $ params = array ( ) ) { $ sth = $ this -> pdo -> prepare ( $ sql ) ; foreach ( $ params as $ key => $ value ) { $ key = is_numeric ( $ key ) ? $ key + 1 : ":$key" ; $ sth -> bindValue ( $ key , $ value ) ; } $ sth -> execute ( $ params ) ; $ this -> executed [ ] = $ sql ; return $ sth ; }
docstring: Runs a SQL query with an array of placeholders
  @param string $sql
  @param array $params
  @return \PDOStatement
docstring_tokens: Runs a SQL query with an array of placeholders