| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class BoardingPassbook extends Passbook |
||
| 11 | { |
||
| 12 | protected const TYPE = 'boardingPass'; |
||
| 13 | |||
| 14 | private TransitType $transitType; |
||
| 15 | |||
| 16 | public function __construct(string $serialNumber, TransitType $transitType = null) |
||
| 17 | { |
||
| 18 | parent::__construct($serialNumber); |
||
| 19 | 2 | ||
| 20 | if ($transitType) { |
||
| 21 | 2 | $this->setTransitType($transitType); |
|
| 22 | 2 | } |
|
| 23 | } |
||
| 24 | |||
| 25 | |||
| 26 | public function setTransitType(TransitType $transitType): void |
||
| 27 | 7 | { |
|
| 28 | $this->transitType = $transitType; |
||
| 29 | 7 | } |
|
| 30 | |||
| 31 | 3 | /** |
|
| 32 | 1 | * @throws MissingRequiredDataException |
|
| 33 | */ |
||
| 34 | 2 | public function validate(): void |
|
| 40 | 2 | } |
|
| 41 | } |
||
| 42 | 2 | ||
| 43 | /** |
||
| 44 | * @return array<int|string, mixed> |
||
| 45 | */ |
||
| 46 | public function getData(): array |
||
| 52 | } |
||
| 53 | } |
||
| 54 |