Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class RetrieveReservationDetailParametersFactory implements ValueObjectFactoryInterface |
||
9 | { |
||
10 | /** |
||
11 | * @param array $parameters |
||
12 | * @return RetrieveReservationDetailParameters |
||
13 | * @throws \Exception |
||
14 | */ |
||
15 | public static function createFromArray(array $parameters): RetrieveReservationDetailParameters |
||
16 | { |
||
17 | return new RetrieveReservationDetailParameters($parameters['UniqueId'], $parameters['Surname']); |
||
18 | } |
||
19 | |||
20 | |||
21 | /** |
||
22 | * @param string $json |
||
23 | * @return RetrieveReservationDetailParameters |
||
24 | * @throws InvalidArgumentException |
||
25 | * @throws \Exception |
||
26 | */ |
||
27 | public static function createFromJson(string $json): RetrieveReservationDetailParameters |
||
36 | } |
||
37 | } |
||
38 |