original_string: public function end_progress() {
          if (!count($this->descriptions)) {
              throw new \coding_exception('end_progress() without start_progress()');
          }
          array_pop($this->descriptions);
          array_pop($this->maxes);
          array_pop($this->currents);
          $parentcount = array_pop($this->parentcounts);
          if (!empty($this->descriptions)) {
              $lastmax = end($this->maxes);
              if ($lastmax != self::INDETERMINATE) {
                  $lastvalue = end($this->currents);
                  $this->currents[key($this->currents)] = $lastvalue + $parentcount;
              }
          }
          $this->update_progress();
      }
code: public function end_progress() {
          if (!count($this->descriptions)) {
              throw new \coding_exception('end_progress() without start_progress()');
          }
          array_pop($this->descriptions);
          array_pop($this->maxes);
          array_pop($this->currents);
          $parentcount = array_pop($this->parentcounts);
          if (!empty($this->descriptions)) {
              $lastmax = end($this->maxes);
              if ($lastmax != self::INDETERMINATE) {
                  $lastvalue = end($this->currents);
                  $this->currents[key($this->currents)] = $lastvalue + $parentcount;
              }
          }
          $this->update_progress();
      }
code_tokens: public function end_progress ( ) { if ( ! count ( $ this -> descriptions ) ) { throw new \ coding_exception ( 'end_progress() without start_progress()' ) ; } array_pop ( $ this -> descriptions ) ; array_pop ( $ this -> maxes ) ; array_pop ( $ this -> currents ) ; $ parentcount = array_pop ( $ this -> parentcounts ) ; if ( ! empty ( $ this -> descriptions ) ) { $ lastmax = end ( $ this -> maxes ) ; if ( $ lastmax != self :: INDETERMINATE ) { $ lastvalue = end ( $ this -> currents ) ; $ this -> currents [ key ( $ this -> currents ) ] = $ lastvalue + $ parentcount ; } } $ this -> update_progress ( ) ; }
docstring: Marks the end of an operation that will display progress.
  
  This must be paired with each {@link start_progress} call.
  
  If there is a parent progress section, its progress will be increased
  automatically to reflect the end of the child section.
  
  @throws \coding_exception If progress hasn't been started
docstring_tokens: Marks the end of an operation that will display progress .