original_string: protected function get_item_time_created($item) {
          if (!empty($item->created)) {
              return $item->created; // The forum_posts table has created instead of timecreated.
          } else if (!empty($item->timecreated)) {
              return $item->timecreated;
          } else {
              return null;
          }
      }
code: protected function get_item_time_created($item) {
          if (!empty($item->created)) {
              return $item->created; // The forum_posts table has created instead of timecreated.
          } else if (!empty($item->timecreated)) {
              return $item->timecreated;
          } else {
              return null;
          }
      }
code_tokens: protected function get_item_time_created ( $ item ) { if ( ! empty ( $ item -> created ) ) { return $ item -> created ; // The forum_posts table has created instead of timecreated. } else if ( ! empty ( $ item -> timecreated ) ) { return $ item -> timecreated ; } else { return null ; } }
docstring: Gets the time the given item was created
  
  TODO: MDL-31511 - Find a better solution for this, its not ideal to test for fields really we should be
  asking the component the item belongs to what field to look for or even the value we
  are looking for.
  
  @param stdClass $item
  @return int|null return null if the created time is unavailable, otherwise return a timestamp
docstring_tokens: Gets the time the given item was created