original_string: protected static function get_assignment_output($assignmentdata) {
          $assignment = (object) [
              'name' => $assignmentdata->name,
              'intro' => $assignmentdata->intro,
              'assignmenttype' => $assignmentdata->assignmenttype,
              'grade' => $assignmentdata->grade,
              'timemodified' => transform::datetime($assignmentdata->timemodified)
          ];
  
          if ($assignmentdata->timeavailable != 0) {
              $assignment->timeavailable = transform::datetime($assignmentdata->timeavailable);
          }
  
          if ($assignmentdata->timedue != 0) {
              $assignment->timedue = transform::datetime($assignmentdata->timedue);
          }
  
          return $assignment;
      }
code: protected static function get_assignment_output($assignmentdata) {
          $assignment = (object) [
              'name' => $assignmentdata->name,
              'intro' => $assignmentdata->intro,
              'assignmenttype' => $assignmentdata->assignmenttype,
              'grade' => $assignmentdata->grade,
              'timemodified' => transform::datetime($assignmentdata->timemodified)
          ];
  
          if ($assignmentdata->timeavailable != 0) {
              $assignment->timeavailable = transform::datetime($assignmentdata->timeavailable);
          }
  
          if ($assignmentdata->timedue != 0) {
              $assignment->timedue = transform::datetime($assignmentdata->timedue);
          }
  
          return $assignment;
      }
code_tokens: protected static function get_assignment_output ( $ assignmentdata ) { $ assignment = ( object ) [ 'name' => $ assignmentdata -> name , 'intro' => $ assignmentdata -> intro , 'assignmenttype' => $ assignmentdata -> assignmenttype , 'grade' => $ assignmentdata -> grade , 'timemodified' => transform :: datetime ( $ assignmentdata -> timemodified ) ] ; if ( $ assignmentdata -> timeavailable != 0 ) { $ assignment -> timeavailable = transform :: datetime ( $ assignmentdata -> timeavailable ) ; } if ( $ assignmentdata -> timedue != 0 ) { $ assignment -> timedue = transform :: datetime ( $ assignmentdata -> timedue ) ; } return $ assignment ; }
docstring: Helper function generate assignment output object for exporting.
  
  @param object $assignmentdata    Object containing assignment data.
  @return object                   Formatted assignment output object for exporting.
docstring_tokens: Helper function generate assignment output object for exporting .