Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PlaceOrderResponse extends AbstractResponse implements IPlaceOrderResponseInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var string $orderId |
||
12 | */ |
||
13 | private string $orderId; |
||
14 | |||
15 | /** |
||
16 | * @var string $orderLinkId |
||
17 | */ |
||
18 | private string $orderLinkId; |
||
19 | |||
20 | public function __construct(array $data) |
||
21 | { |
||
22 | $this |
||
23 | ->setOrderId($data['orderId']) |
||
24 | ->setOrderLinkId($data['orderLinkId']); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param string $orderId |
||
29 | * @return self |
||
30 | */ |
||
31 | private function setOrderId(string $orderId): self |
||
32 | { |
||
33 | $this->orderId = $orderId; |
||
34 | return $this; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return string|null |
||
39 | */ |
||
40 | public function getOrderId(): ?string |
||
41 | { |
||
42 | return $this->orderId; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param string $orderLinkId |
||
47 | * @return PlaceOrderResponse |
||
48 | */ |
||
49 | private function setOrderLinkId(string $orderLinkId): self |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getOrderLinkId(): string |
||
61 | } |
||
62 | } |
||
63 |