protected function performOperationOnExpressionEngine($operation, $number)
    {
        $this->currentOperation = $operation;
        if (is_array($number)) {
            foreach ($number as $actualNumber) {
                $this->{$operation}($actualNumber);
            }
        } else {
            $this->addToHistory($operation, $number);
            $this->setCurrentValue($this->expressionEngine->{$operation}($this->getCurrentValue(), $number));
        }
    }
protected function performOperationOnExpressionEngine($operation, $number)
    {
        $this->currentOperation = $operation;
        if (is_array($number)) {
            foreach ($number as $actualNumber) {
                $this->{$operation}($actualNumber);
            }
        } else {
            $this->addToHistory($operation, $number);
            $this->setCurrentValue($this->expressionEngine->{$operation}($this->getCurrentValue(), $number));
        }
    }
protected function performOperationOnExpressionEngine ( $ operation , $ number ) { $ this -> currentOperation = $ operation ; if ( is_array ( $ number ) ) { foreach ( $ number as $ actualNumber ) { $ this -> { $ operation } ( $ actualNumber ) ; } } else { $ this -> addToHistory ( $ operation , $ number ) ; $ this -> setCurrentValue ( $ this -> expressionEngine -> { $ operation } ( $ this -> getCurrentValue ( ) , $ number ) ) ; } }
Helper function to recursively call a method on the FluentCalculator
and the underlying expression engine.

@param $operation
@param $number
Helper function to recursively call a method on the FluentCalculator and the underlying expression engine .