| Total Complexity | 4 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class PackageTransportCostPart |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Part name |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $name; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Part cost |
||
| 16 | * |
||
| 17 | * @var float |
||
| 18 | */ |
||
| 19 | private $cost; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Currency code |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $currencyCode; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * PackageTransportCost constructor |
||
| 30 | * |
||
| 31 | * @param string $name |
||
| 32 | * @param float $cost |
||
| 33 | * @param string $currencyCode |
||
| 34 | */ |
||
| 35 | 4 | public function __construct(string $name, float $cost, string $currencyCode) |
|
| 36 | { |
||
| 37 | 4 | $this->name = $name; |
|
| 38 | 4 | $this->cost = $cost; |
|
| 39 | 4 | $this->currencyCode = $currencyCode; |
|
| 40 | 4 | } |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 1 | public function getName(): string |
|
| 46 | { |
||
| 47 | 1 | return $this->name; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return float |
||
| 52 | */ |
||
| 53 | 1 | public function getCost(): float |
|
| 54 | { |
||
| 55 | 1 | return $this->cost; |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 1 | public function getCurrencyCode(): string |
|
| 64 | } |
||
| 65 | } |
||
| 66 |