public function save(FormulasInterface $formula): FormulasResults
    {
        if ($this->isValid($formula)) {
            $this->results[get_class($formula)] = $formula->getResult();
        }

        //the stack contains all the formulas called (a callstack)
        $this->stack[] = $formula;

        return $this;
    }
public function save(FormulasInterface $formula): FormulasResults
    {
        if ($this->isValid($formula)) {
            $this->results[get_class($formula)] = $formula->getResult();
        }

        //the stack contains all the formulas called (a callstack)
        $this->stack[] = $formula;

        return $this;
    }
public function save ( FormulasInterface $ formula ) : FormulasResults { if ( $ this -> isValid ( $ formula ) ) { $ this -> results [ get_class ( $ formula ) ] = $ formula -> getResult ( ) ; } //the stack contains all the formulas called (a callstack) $ this -> stack [ ] = $ formula ; return $ this ; }
Save the results of a given formula to keep in the history
@param FormulasInterface $formula
@return FormulasResults
Save the results of a given formula to keep in the history