wirecardBrasil /
magento2
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Copyright © Wirecard Brasil. All rights reserved. |
||
| 4 | * |
||
| 5 | * @author Bruno Elisei <[email protected]> |
||
| 6 | * See COPYING.txt for license details. |
||
| 7 | */ |
||
| 8 | |||
| 9 | declare(strict_types=1); |
||
| 10 | |||
| 11 | namespace Moip\Magento2\Observer; |
||
| 12 | |||
| 13 | use Magento\Framework\Event\ObserverInterface; |
||
|
0 ignored issues
–
show
|
|||
| 14 | use Moip\Magento2\Api\Data\MoipInterestInterface; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Class AddMoipInterestToOrderObserver - Converte quote total in order. |
||
| 18 | */ |
||
| 19 | class AddMoipInterestToOrderObserver implements ObserverInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @param \Magento\Framework\Event\Observer $observer |
||
| 23 | */ |
||
| 24 | public function execute(\Magento\Framework\Event\Observer $observer) |
||
|
0 ignored issues
–
show
The type
Magento\Framework\Event\Observer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 25 | { |
||
| 26 | /* @var \Magento\Sales\Model\Order $order */ |
||
| 27 | $order = $observer->getEvent()->getData('order'); |
||
| 28 | /* @var \Magento\Quote\Model\Quote $quote */ |
||
| 29 | $quote = $observer->getEvent()->getData('quote'); |
||
| 30 | |||
| 31 | $moipInterest = $quote->getData(MoipInterestInterface::MOIP_INTEREST_AMOUNT); |
||
| 32 | $baseMoipInterest = $quote->getData(MoipInterestInterface::BASE_MOIP_INTEREST_AMOUNT); |
||
| 33 | $order->setData(MoipInterestInterface::MOIP_INTEREST_AMOUNT, $moipInterest); |
||
| 34 | $order->setData(MoipInterestInterface::BASE_MOIP_INTEREST_AMOUNT, $baseMoipInterest); |
||
| 35 | |||
| 36 | return $this; |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths