| @@ 142-149 (lines=8) @@ | ||
| 139 | return $this; |
|
| 140 | } |
|
| 141 | ||
| 142 | protected function calculator() |
|
| 143 | { |
|
| 144 | if (!isset($this->_calculator)) { |
|
| 145 | $this->_calculator = Yii::createObject(ServerTariffCalculatorInterface::class, [[$this->tariff]]); |
|
| 146 | } |
|
| 147 | ||
| 148 | return $this->_calculator; |
|
| 149 | } |
|
| 150 | ||
| 151 | protected function parentCalculator() |
|
| 152 | { |
|
| @@ 151-158 (lines=8) @@ | ||
| 148 | return $this->_calculator; |
|
| 149 | } |
|
| 150 | ||
| 151 | protected function parentCalculator() |
|
| 152 | { |
|
| 153 | if (!isset($this->_parentCalculator)) { |
|
| 154 | $this->_parentCalculator = Yii::createObject(ServerTariffCalculatorInterface::class, [[$this->parentTariff]]); |
|
| 155 | } |
|
| 156 | ||
| 157 | return $this->_parentCalculator; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||