original_string: public function get_first_discussion_in_forum(forum_entity $forum) : ?discussion_entity {
          $records = $this->get_db()->get_records(self::TABLE, [
              'forum' => $forum->get_id(),
          ], 'timemodified ASC', '*', 0, 1);
  
          $records = $this->transform_db_records_to_entities($records);
          return count($records) ? array_shift($records) : null;
      }
code: public function get_first_discussion_in_forum(forum_entity $forum) : ?discussion_entity {
          $records = $this->get_db()->get_records(self::TABLE, [
              'forum' => $forum->get_id(),
          ], 'timemodified ASC', '*', 0, 1);
  
          $records = $this->transform_db_records_to_entities($records);
          return count($records) ? array_shift($records) : null;
      }
code_tokens: public function get_first_discussion_in_forum ( forum_entity $ forum ) : ? discussion_entity { $ records = $ this -> get_db ( ) -> get_records ( self :: TABLE , [ 'forum' => $ forum -> get_id ( ) , ] , 'timemodified ASC' , '*' , 0 , 1 ) ; $ records = $ this -> transform_db_records_to_entities ( $ records ) ; return count ( $ records ) ? array_shift ( $ records ) : null ; }
docstring: Get the first discussion in the specified forum.
  
  @param   forum_entity $forum
  @return  discussion_entity|null
docstring_tokens: Get the first discussion in the specified forum .