1 | <?php |
||
10 | final class CalculateLoadBenefit |
||
11 | { |
||
12 | /** |
||
13 | * @param Load $a_load |
||
14 | * @param Destination $a_destination |
||
15 | * @param PriceRule[] $some_price_rules |
||
16 | * |
||
17 | * @return float |
||
18 | */ |
||
19 | 4 | public function __invoke(Load $a_load, Destination $a_destination, array $some_price_rules): float |
|
31 | |||
32 | /** |
||
33 | * @param Destination $a_destination |
||
34 | * @param PriceRule[] $some_price_rules |
||
35 | * @param LoadLine $load_line |
||
36 | * @param float $benefits |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | 4 | private function recalculateLoadLineBenefits(Destination $a_destination, array $some_price_rules, LoadLine $load_line, float &$benefits): void |
|
47 | |||
48 | 4 | private function recalculateLoadLineBenefitsIfMatchPriceRules(Destination $a_destination, LoadLine $load_line, PriceRule $price_rule, float &$benefits): void |
|
55 | |||
56 | 4 | private function currentProductMatchPriceRule(LoadLine $load_line, PriceRule $price_rule): bool |
|
60 | |||
61 | 4 | private function currentDestinationMatchPriceRule(Destination $a_destination, PriceRule $price_rule): bool |
|
65 | |||
66 | 4 | private function currentProductAndDestinationMatchPriceRule(Destination $a_destination, LoadLine $load_line, PriceRule $price_rule): bool |
|
70 | } |