original_string: public function fetchRow(string $sql, array $params = [])
      {
          $stmt = $this->prepare($sql, $params);
          $result = $stmt->fetch(\PDO::FETCH_ASSOC);
  
          $this->ok();
          return $result;
      }
code: public function fetchRow(string $sql, array $params = [])
      {
          $stmt = $this->prepare($sql, $params);
          $result = $stmt->fetch(\PDO::FETCH_ASSOC);
  
          $this->ok();
          return $result;
      }
code_tokens: public function fetchRow ( string $ sql , array $ params = [ ] ) { $ stmt = $ this -> prepare ( $ sql , $ params ) ; $ result = $ stmt -> fetch ( \ PDO :: FETCH_ASSOC ) ; $ this -> ok ( ) ; return $ result ; }
docstring: Returns an array containing first row from the result set
  
  Example of usage
  <code>
  $db->fetchRow("SELECT name, email FROM users WHERE id = ". $db->quote($id));
  $db->fetchRow("SELECT name, email FROM users WHERE id = ?", [$id]);
  $db->fetchRow("SELECT name, email FROM users WHERE id = :id", [':id'=>$id]);
  </code>
  
  @param  string $sql     SQL query with placeholders
  "SELECT * FROM users WHERE name = :name AND pass = :pass"
  @param  array  $params  params for query placeholders (optional)
  array (':name' => 'John', ':pass' => '123456')
  
  @return array|false     array ('name' => 'John', 'email' => 'john@smith.com')
  @throws DbException
docstring_tokens: Returns an array containing first row from the result set