protected function applyReversedOperation($value, $operator, $operand)
    {
        $processedValue = $value;

        switch ($operator) {
            case "div":
                $processedValue = $processedValue * $operand;
                break;
            case "mul":
                if ($operand !== 0) {
                    $processedValue = $processedValue / $operand;
                }
                break;
            case "add":
                $processedValue = $processedValue - $operand;
                break;
            case "sub":
                $processedValue = $processedValue + $operand;
                break;
            default:
                throw new UnknownOperatorException();
        }

        return $processedValue;
    }
protected function applyReversedOperation($value, $operator, $operand)
    {
        $processedValue = $value;

        switch ($operator) {
            case "div":
                $processedValue = $processedValue * $operand;
                break;
            case "mul":
                if ($operand !== 0) {
                    $processedValue = $processedValue / $operand;
                }
                break;
            case "add":
                $processedValue = $processedValue - $operand;
                break;
            case "sub":
                $processedValue = $processedValue + $operand;
                break;
            default:
                throw new UnknownOperatorException();
        }

        return $processedValue;
    }
protected function applyReversedOperation ( $ value , $ operator , $ operand ) { $ processedValue = $ value ; switch ( $ operator ) { case "div" : $ processedValue = $ processedValue * $ operand ; break ; case "mul" : if ( $ operand !== 0 ) { $ processedValue = $ processedValue / $ operand ; } break ; case "add" : $ processedValue = $ processedValue - $ operand ; break ; case "sub" : $ processedValue = $ processedValue + $ operand ; break ; default : throw new UnknownOperatorException ( ) ; } return $ processedValue ; }
Apply reversed 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
Apply reversed operation between value and operand by using operator