original_string: public function fetchRelations(string $sql, array $params = [])
      {
          $stmt = $this->prepare($sql, $params);
  
          $result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
  
          // prepare results
          $result = Relations::fetch($result);
  
          $stmt->closeCursor();
          $this->ok();
          return $result;
      }
code: public function fetchRelations(string $sql, array $params = [])
      {
          $stmt = $this->prepare($sql, $params);
  
          $result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
  
          // prepare results
          $result = Relations::fetch($result);
  
          $stmt->closeCursor();
          $this->ok();
          return $result;
      }
code_tokens: public function fetchRelations ( string $ sql , array $ params = [ ] ) { $ stmt = $ this -> prepare ( $ sql , $ params ) ; $ result = $ stmt -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; // prepare results $ result = Relations :: fetch ( $ result ) ; $ stmt -> closeCursor ( ) ; $ this -> ok ( ) ; return $ result ; }
docstring: Returns an array of linked objects containing the result set
  
  @param  string $sql    SQL query with placeholders
  "SELECT '__users', u.*, '__users_profile', up.*
  FROM users u
  LEFT JOIN users_profile up ON up.userId = u.id
  WHERE u.name = :name"
  @param  array  $params params for query placeholders (optional)
  array (':name' => 'John')
  
  @return array|false
  @throws DbException
docstring_tokens: Returns an array of linked objects containing the result set