Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
45 | public function execute(Observer $observer) |
||
46 | { |
||
47 | if (!$this->configHelper->isEnabled() || !$this->configHelper->isOrderExportEnabled()) { |
||
48 | return; |
||
49 | } |
||
50 | |||
51 | /** @var MagentoOrder $magentoOrder */ |
||
52 | $magentoOrder = $observer->getEvent()->getData('order'); |
||
53 | |||
54 | if ($magentoOrder->getCustomerIsGuest()) { |
||
|
|||
55 | return; |
||
56 | } |
||
57 | |||
58 | $this->publisher->publish( |
||
59 | Topics::SALES_ORDER_EXPORT, |
||
60 | json_encode(['magento_order_id' => $magentoOrder->getId()]) |
||
61 | ); |
||
64 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: