| Conditions | 4 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | public function execute(Observer $observer) |
||
| 45 | { |
||
| 46 | if (!$this->configHelper->isApiEnabled()) { |
||
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** @var MagentoOrder $magentoOrder */ |
||
| 51 | $magentoOrder = $observer->getEvent()->getData('order'); |
||
| 52 | |||
| 53 | // do not export guest orders for now |
||
| 54 | if ($magentoOrder->getStatus() !== MagentoOrder::STATE_COMPLETE || $magentoOrder->getCustomerIsGuest()) { |
||
|
|
|||
| 55 | return; |
||
| 56 | } |
||
| 57 | |||
| 58 | $this->exportOrderService->export($magentoOrder); |
||
| 59 | } |
||
| 61 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: