original_string: protected function from_db_records(array $results) : array {
          $entityfactory = $this->get_entity_factory();
  
          return array_map(function(array $result) use ($entityfactory) {
              [
                  'forum' => $forumrecord,
                  'course_module' => $coursemodule,
                  'course' => $course,
                  'context' => $context,
              ] = $result;
              return $entityfactory->get_forum_from_stdclass($forumrecord, $context, $coursemodule, $course);
          }, $results);
      }
code: protected function from_db_records(array $results) : array {
          $entityfactory = $this->get_entity_factory();
  
          return array_map(function(array $result) use ($entityfactory) {
              [
                  'forum' => $forumrecord,
                  'course_module' => $coursemodule,
                  'course' => $course,
                  'context' => $context,
              ] = $result;
              return $entityfactory->get_forum_from_stdclass($forumrecord, $context, $coursemodule, $course);
          }, $results);
      }
code_tokens: protected function from_db_records ( array $ results ) : array { $ entityfactory = $ this -> get_entity_factory ( ) ; return array_map ( function ( array $ result ) use ( $ entityfactory ) { [ 'forum' => $ forumrecord , 'course_module' => $ coursemodule , 'course' => $ course , 'context' => $ context , ] = $ result ; return $ entityfactory -> get_forum_from_stdclass ( $ forumrecord , $ context , $ coursemodule , $ course ) ; } , $ results ) ; }
docstring: Convert the DB records into forum entities.
  
  @param array $results The DB records
  @return forum_entity[]
docstring_tokens: Convert the DB records into forum entities .