| Total Complexity | 4 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class CompletePurchase implements CommandInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $purchaseId; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Delegate[] |
||
| 24 | */ |
||
| 25 | private $delegateInformation; |
||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $purchaseEmail; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * CompletePurchase constructor. |
||
| 33 | * @param string $purchaseId |
||
| 34 | * @param string $purchaseEmail |
||
| 35 | * @param Delegate[] ...$delegateInformation |
||
| 36 | */ |
||
| 37 | public function __construct(string $purchaseId, string $purchaseEmail, Delegate ...$delegateInformation) |
||
| 38 | { |
||
| 39 | $this->purchaseId = $purchaseId; |
||
| 40 | $this->delegateInformation = $delegateInformation; |
||
| 41 | $this->purchaseEmail = $purchaseEmail; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getPurchaseId(): string |
||
| 48 | { |
||
| 49 | return $this->purchaseId; |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getPurchaseEmail(): string |
||
| 56 | { |
||
| 57 | return $this->purchaseEmail; |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return Delegate[] |
||
| 62 | */ |
||
| 63 | public function getDelegateInformation(): array |
||
| 66 | } |
||
| 67 | } |