Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 13 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
35 | public function __construct($orderToken, $product, array $options, $quantity) |
||
36 | { |
||
37 | Assert::string($orderToken, 'Expected order token to be string, got %s'); |
||
38 | Assert::string($product, 'Expected product code to be string, got %s'); |
||
39 | Assert::notEmpty($options, 'Options array cannot be empty'); |
||
40 | Assert::integer($quantity, 'Expected quantity to be integer, got %s'); |
||
41 | Assert::greaterThan($quantity, 0, 'Quantity should be greater than 0'); |
||
42 | |||
43 | $this->orderToken = $orderToken; |
||
44 | $this->product = $product; |
||
45 | $this->options = $options; |
||
46 | $this->quantity = $quantity; |
||
47 | } |
||
48 | |||
81 |