original_string: public function stop($key='default')
    {
      if ( isset($this->measures[$key], $this->measures[$key]['start']) ){
        $this->measures[$key]['num']++;
        $time = $this->measure($key);
        $this->measures[$key]['sum'] += $time;
        unset($this->measures[$key]['start']);
        return $time;
      }
      else{
        die("Missing a start declaration for timer $key");
      }
    }
code: public function stop($key='default')
    {
      if ( isset($this->measures[$key], $this->measures[$key]['start']) ){
        $this->measures[$key]['num']++;
        $time = $this->measure($key);
        $this->measures[$key]['sum'] += $time;
        unset($this->measures[$key]['start']);
        return $time;
      }
      else{
        die("Missing a start declaration for timer $key");
      }
    }
code_tokens: public function stop ( $ key = 'default' ) { if ( isset ( $ this -> measures [ $ key ] , $ this -> measures [ $ key ] [ 'start' ] ) ) { $ this -> measures [ $ key ] [ 'num' ] ++ ; $ time = $ this -> measure ( $ key ) ; $ this -> measures [ $ key ] [ 'sum' ] += $ time ; unset ( $ this -> measures [ $ key ] [ 'start' ] ) ; return $ time ; } else { die ( "Missing a start declaration for timer $key" ) ; } }
docstring: Stops a timer for a given key
  
  @return int
docstring_tokens: Stops a timer for a given key