| Total Complexity | 11 | 
| Total Lines | 64 | 
| Duplicated Lines | 0 % | 
| Coverage | 80% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 8 | class OrderFixture  | 
            ||
| 9 | { | 
            ||
| 10 | /**  | 
            ||
| 11 | * @var Order  | 
            ||
| 12 | */  | 
            ||
| 13 | private $order;  | 
            ||
| 14 | |||
| 15 | 20 | public function __construct(Order $order)  | 
            |
| 18 | 20 | }  | 
            |
| 19 | |||
| 20 | public function getOrder(): Order  | 
            ||
| 21 |     { | 
            ||
| 22 | return $this->order;  | 
            ||
| 23 | }  | 
            ||
| 24 | |||
| 25 | 19 | public function getId(): int  | 
            |
| 26 |     { | 
            ||
| 27 | 19 | return (int) $this->order->getEntityId();  | 
            |
| 28 | }  | 
            ||
| 29 | |||
| 30 | 17 | public function getCustomerId(): int  | 
            |
| 33 | }  | 
            ||
| 34 | |||
| 35 | 2 | public function getCustomerEmail(): string  | 
            |
| 38 | }  | 
            ||
| 39 | |||
| 40 | /**  | 
            ||
| 41 | * Obtain `qty_ordered` per order item, indexed with `item_id`.  | 
            ||
| 42 | *  | 
            ||
| 43 | * @return float[]  | 
            ||
| 44 | */  | 
            ||
| 45 | 5 | public function getOrderItemQtys(): array  | 
            |
| 46 |     { | 
            ||
| 47 | 5 | $qtys = [];  | 
            |
| 48 | 5 |         foreach ($this->order->getItems() as $item) { | 
            |
| 49 | 5 | $qtys[$item->getItemId()] = (float)$item->getQtyOrdered();  | 
            |
| 50 | }  | 
            ||
| 51 | |||
| 52 | 5 | return $qtys;  | 
            |
| 53 | }  | 
            ||
| 54 | |||
| 55 | 1 | public function getPaymentMethod(): string  | 
            |
| 62 | }  | 
            ||
| 63 | |||
| 64 | 1 | public function getShippingMethod(): string  | 
            |
| 67 | }  | 
            ||
| 68 | |||
| 69 | public function rollback(): void  | 
            ||
| 72 | }  | 
            ||
| 73 | }  | 
            ||
| 74 |