| Total Complexity | 8 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class OrderFixture |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var OrderInterface |
||
| 11 | */ |
||
| 12 | private $order; |
||
| 13 | |||
| 14 | public function __construct(OrderInterface $order) |
||
| 15 | { |
||
| 16 | $this->order = $order; |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getId(): int |
||
| 20 | { |
||
| 21 | return (int) $this->order->getEntityId(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getCustomerId(): int |
||
| 25 | { |
||
| 26 | return (int) $this->order->getCustomerId(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getCustomerEmail(): string |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Obtain `qty_ordered` per order item, indexed with `item_id`. |
||
| 36 | * |
||
| 37 | * @return int[] |
||
| 38 | */ |
||
| 39 | public function getOrderItemQtys(): array |
||
| 40 | { |
||
| 41 | $qtys = []; |
||
| 42 | foreach ($this->order->getItems() as $item) { |
||
| 43 | $qtys[$item->getItemId()] = $item->getQtyOrdered(); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $qtys; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getPaymentMethod(): string |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getShippingMethod(): string |
||
| 57 | } |
||
| 58 | } |
||
| 59 |
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.