original_string: public function calculate(&$total, $data, &$components, array $price_rule)
      {
          try {
              $callback = Handler::get($this->getTypes(), $price_rule['value_type'], 'calculate');
              call_user_func_array($callback, array(&$total, &$components, $price_rule, $data));
          } catch (Exception $ex) {
              trigger_error($ex->getMessage());
          }
      }
code: public function calculate(&$total, $data, &$components, array $price_rule)
      {
          try {
              $callback = Handler::get($this->getTypes(), $price_rule['value_type'], 'calculate');
              call_user_func_array($callback, array(&$total, &$components, $price_rule, $data));
          } catch (Exception $ex) {
              trigger_error($ex->getMessage());
          }
      }
code_tokens: public function calculate ( & $ total , $ data , & $ components , array $ price_rule ) { try { $ callback = Handler :: get ( $ this -> getTypes ( ) , $ price_rule [ 'value_type' ] , 'calculate' ) ; call_user_func_array ( $ callback , array ( & $ total , & $ components , $ price_rule , $ data ) ) ; } catch ( Exception $ ex ) { trigger_error ( $ ex -> getMessage ( ) ) ; } }
docstring: Calculate a price rule
  @param int $total
  @param array $data
  @param array $components
  @param array $price_rule
docstring_tokens: Calculate a price rule