original_string: protected function applyOperation($value, $operator, $operand)
      {
          $processedValue = $value;
  
          switch ($operator) {
              case "div":
                  if ($operand !== 0) {
                      $processedValue = $processedValue / $operand;
                  }
                  break;
              case "mul":
                  $processedValue = $processedValue * $operand;
                  break;
              case "add":
                  $processedValue = $processedValue + $operand;
                  break;
              case "sub":
                  $processedValue = $processedValue - $operand;
                  break;
              default:
                  throw new UnknownOperatorException();
          }
  
          return $processedValue;
      }
code: protected function applyOperation($value, $operator, $operand)
      {
          $processedValue = $value;
  
          switch ($operator) {
              case "div":
                  if ($operand !== 0) {
                      $processedValue = $processedValue / $operand;
                  }
                  break;
              case "mul":
                  $processedValue = $processedValue * $operand;
                  break;
              case "add":
                  $processedValue = $processedValue + $operand;
                  break;
              case "sub":
                  $processedValue = $processedValue - $operand;
                  break;
              default:
                  throw new UnknownOperatorException();
          }
  
          return $processedValue;
      }
code_tokens: protected function applyOperation ( $ value , $ operator , $ operand ) { $ processedValue = $ value ; switch ( $ operator ) { case "div" : if ( $ operand !== 0 ) { $ processedValue = $ processedValue / $ operand ; } break ; case "mul" : $ processedValue = $ processedValue * $ operand ; break ; case "add" : $ processedValue = $ processedValue + $ operand ; break ; case "sub" : $ processedValue = $ processedValue - $ operand ; break ; default : throw new UnknownOperatorException ( ) ; } return $ processedValue ; }
docstring: Apply operation between value and operand by using operator
  
  @param double $value    Value to convert
  @param string $operator Operator to apply
  @param double $operand  Operand to use
  
  @return double
docstring_tokens: Apply operation between value and operand by using operator