1 | <?php |
||
10 | class ServerTariffCalculator implements ServerTariffCalculatorInterface |
||
11 | { |
||
12 | protected $tariffs; |
||
13 | |||
14 | function __construct($tariffs) |
||
18 | |||
19 | /** |
||
20 | * Calculates price for the model with $id |
||
21 | * |
||
22 | * @param $id |
||
23 | * |
||
24 | * @return Calculation |
||
25 | */ |
||
26 | public function getCalculation($id) |
||
30 | |||
31 | /** |
||
32 | * @param Tariff $tariff |
||
33 | * @return \hipanel\modules\finance\models\Calculation |
||
34 | */ |
||
35 | private function createCalculationFromTariff($tariff) |
||
57 | |||
58 | private function getTariffById($id) |
||
68 | |||
69 | /** |
||
70 | * Returns calculations for all passed models |
||
71 | * |
||
72 | * @return Calculation[] |
||
73 | */ |
||
74 | public function getCalculations() |
||
78 | } |
||
79 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.