taxFee = $taxFee; parent::__construct($orderGoodsPrice,$weight); } function getKey() { return $this->taxFee->getCode(); } /** * @return float|int|mixed * @throws \app\common\exceptions\AppException */ function getPrice() { return $this->orderGoodsPrice->getPriceBefore($this->getKey()) + $this->taxFee->getAmount(); } }