| Total Complexity | 9 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 90% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class OrderFixture |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var OrderInterface |
||
| 11 | */ |
||
| 12 | private $order; |
||
| 13 | |||
| 14 | 19 | public function __construct(OrderInterface $order) |
|
| 15 | { |
||
| 16 | 19 | $this->order = $order; |
|
| 17 | 19 | } |
|
| 18 | |||
| 19 | 18 | public function getId(): int |
|
| 20 | { |
||
| 21 | 18 | return (int) $this->order->getEntityId(); |
|
| 22 | } |
||
| 23 | |||
| 24 | 16 | public function getCustomerId(): int |
|
| 25 | { |
||
| 26 | 16 | return (int) $this->order->getCustomerId(); |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | public function getCustomerEmail(): string |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Obtain `qty_ordered` per order item, indexed with `item_id`. |
||
| 36 | * |
||
| 37 | * @return int[] |
||
| 38 | */ |
||
| 39 | 5 | public function getOrderItemQtys(): array |
|
| 40 | { |
||
| 41 | 5 | $qtys = []; |
|
| 42 | 5 | foreach ($this->order->getItems() as $item) { |
|
| 43 | 5 | $qtys[$item->getItemId()] = $item->getQtyOrdered(); |
|
| 44 | } |
||
| 45 | |||
| 46 | 5 | return $qtys; |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | public function getPaymentMethod(): string |
|
| 52 | } |
||
| 53 | |||
| 54 | 1 | public function getShippingMethod(): string |
|
| 57 | } |
||
| 58 | |||
| 59 | public function rollback(): void |
||
| 62 | } |
||
| 63 | } |
||
| 64 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.