| 1 | <?php |
||
| 5 | class City |
||
| 6 | { |
||
| 7 | private $city_id; |
||
| 8 | private $name; |
||
| 9 | private $distance; |
||
| 10 | private $devaluation_cost; |
||
| 11 | |||
| 12 | public function __construct(int $city_id, string $name, int $distance) |
||
| 19 | |||
| 20 | private function calculateDevaluationCostForCity(int $distance): float |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return int |
||
| 27 | */ |
||
| 28 | public function getCityId(): int |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | public function getName(): string |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return int |
||
| 43 | */ |
||
| 44 | public function getDistance(): int |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return float |
||
| 51 | */ |
||
| 52 | public function getDevaluationCost(): float |
||
| 56 | |||
| 57 | |||
| 58 | } |
||
| 59 |