public function getData() { switch ($this->operator) { case TES4BinaryExpressionOperator::OPERATOR_ADD(): return $this->leftValue->getData() + $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_DIVIDE(): return $this->leftValue->getData() / $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_MULTIPLY(): return $this->leftValue->getData() * $this->rightValue->getData(); case TES4BinaryExpressionOperator::OPERATOR_SUBSTRACT(): return $this->leftValue->getData() - $this->rightValue->getData(); } throw new ConversionException("Unknown TES4BinaryExpressionOperator"); }