original_string: public function initialise_for_slot($slot, $question, $variant = null) {
          $newqstat = new calculated($question, $slot, $variant);
          if ($variant === null) {
              $this->questionstats[$slot] = $newqstat;
          } else {
              $this->questionstats[$slot]->variantstats[$variant] = $newqstat;
          }
      }
code: public function initialise_for_slot($slot, $question, $variant = null) {
          $newqstat = new calculated($question, $slot, $variant);
          if ($variant === null) {
              $this->questionstats[$slot] = $newqstat;
          } else {
              $this->questionstats[$slot]->variantstats[$variant] = $newqstat;
          }
      }
code_tokens: public function initialise_for_slot ( $ slot , $ question , $ variant = null ) { $ newqstat = new calculated ( $ question , $ slot , $ variant ) ; if ( $ variant === null ) { $ this -> questionstats [ $ slot ] = $ newqstat ; } else { $ this -> questionstats [ $ slot ] -> variantstats [ $ variant ] = $ newqstat ; } }
docstring: Set up a calculated instance ready to store a slot question's stats.
  
  @param int      $slot
  @param object   $question
  @param int|null $variant Is this to keep track of a variant's stats? If so what is the variant, if not null.
docstring_tokens: Set up a calculated instance ready to store a slot question s stats .