original_string: protected function from_db_records(array $results) {
          $entityfactory = $this->get_entity_factory();
  
          return array_map(function(array $result) use ($entityfactory) {
              [
                  'discussion' => $discussion,
                  'firstpost' => $firstpost,
                  'firstpostauthor' => $firstpostauthor,
                  'latestpostauthor' => $latestpostauthor,
              ] = $result;
              return $entityfactory->get_discussion_summary_from_stdclass(
                  $discussion,
                  $firstpost,
                  $firstpostauthor,
                  $latestpostauthor
              );
          }, $results);
      }
code: protected function from_db_records(array $results) {
          $entityfactory = $this->get_entity_factory();
  
          return array_map(function(array $result) use ($entityfactory) {
              [
                  'discussion' => $discussion,
                  'firstpost' => $firstpost,
                  'firstpostauthor' => $firstpostauthor,
                  'latestpostauthor' => $latestpostauthor,
              ] = $result;
              return $entityfactory->get_discussion_summary_from_stdclass(
                  $discussion,
                  $firstpost,
                  $firstpostauthor,
                  $latestpostauthor
              );
          }, $results);
      }
code_tokens: protected function from_db_records ( array $ results ) { $ entityfactory = $ this -> get_entity_factory ( ) ; return array_map ( function ( array $ result ) use ( $ entityfactory ) { [ 'discussion' => $ discussion , 'firstpost' => $ firstpost , 'firstpostauthor' => $ firstpostauthor , 'latestpostauthor' => $ latestpostauthor , ] = $ result ; return $ entityfactory -> get_discussion_summary_from_stdclass ( $ discussion , $ firstpost , $ firstpostauthor , $ latestpostauthor ) ; } , $ results ) ; }
docstring: Convert the DB records into discussion list entities.
  
  @param array $results The DB records
  @return discussion_list[]
docstring_tokens: Convert the DB records into discussion list entities .