| 1 | <?php |
||
| 5 | final class City |
||
| 6 | { |
||
| 7 | private const FIXED_LOAD_COST_IN_EUR = 5; |
||
| 8 | private const LOAD_COST_IN_EUR_PER_KM = 2; |
||
| 9 | |||
| 10 | private $name; |
||
| 11 | |||
| 12 | /** @var ShippingRule[] */ |
||
| 13 | private $shipping_rules; |
||
| 14 | private $distance; |
||
| 15 | |||
| 16 | 1 | public function __construct(string $a_name, array $some_shipping_rules, int $a_distance) |
|
| 22 | |||
| 23 | 1 | public function name() |
|
| 27 | |||
| 28 | 1 | public function productShippingRule(Product $a_product): ?ShippingRule |
|
| 40 | |||
| 41 | 1 | public function loadCost(): int |
|
| 45 | |||
| 46 | 1 | public function saleCostEveryThousandKmPercentage(): float |
|
| 51 | } |
||
| 52 |