From ddfc28938e2867413d4bc1f283bd1fa1950fca78 Mon Sep 17 00:00:00 2001 From: woutse Date: Fri, 4 Jun 2021 16:38:11 +0200 Subject: [PATCH] Removed construct inserts --- Model/Paymentmethod/PaymentMethod.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Model/Paymentmethod/PaymentMethod.php b/Model/Paymentmethod/PaymentMethod.php index 40c609f7..45de5281 100644 --- a/Model/Paymentmethod/PaymentMethod.php +++ b/Model/Paymentmethod/PaymentMethod.php @@ -12,13 +12,11 @@ use Magento\Framework\Data\Collection\AbstractDb; use Magento\Framework\Model\Context; use Magento\Framework\Model\ResourceModel\AbstractResource; -use Magento\Framework\Message\ManagerInterface; use Magento\Framework\Registry; use Magento\Payment\Helper\Data; use Magento\Payment\Model\InfoInterface; use Magento\Payment\Model\Method\AbstractMethod; use Magento\Payment\Model\Method\Logger; -use Psr\Log\LoggerInterface; use Magento\Sales\Model\Order; use Magento\Sales\Model\OrderRepository; use Paynl\Payment\Model\Config; @@ -82,9 +80,7 @@ public function __construct( Config $paynlConfig, AbstractResource $resource = null, AbstractDb $resourceCollection = null, - array $data = [], - ManagerInterface $messageManager, - LoggerInterface $logger + array $data = [] ) { parent::__construct( @@ -92,12 +88,13 @@ public function __construct( $paymentData, $scopeConfig, $methodLogger, $resource, $resourceCollection, $data); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); - $this->messageManager = $messageManager; + + $this->messageManager = $objectManager->get(\Magento\Framework\Message\ManagerInterface::class); $this->helper = $objectManager->create('Paynl\Payment\Helper\PayHelper'); $this->paynlConfig = $paynlConfig; $this->orderRepository = $orderRepository; $this->orderConfig = $orderConfig; - $this->logger = $logger; + $this->logger = $objectManager->get(\Psr\Log\LoggerInterface::class); } protected function getState($status)