Skip to content

Commit

Permalink
Autoformat availeble.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinverschoor committed Aug 24, 2021
1 parent 7851788 commit 03852ad
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Model/Config/Source/Available/Available.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* Copyright © 2020 PAY. All rights reserved.
*/
Expand All @@ -11,7 +10,6 @@
use \Magento\Framework\Option\ArrayInterface;
use Magento\Payment\Model\Method\Factory as PaymentMethodFactory;
use Magento\Store\Model\ScopeInterface;

use \Paynl\Payment\Model\Config;
use Paynl\Payment\Model\Paymentmethod\PaymentMethod;
use \Paynl\Paymentmethods;
Expand Down Expand Up @@ -53,7 +51,8 @@ public function __construct(
ScopeConfigInterface $scopeConfig,
PaymentMethodFactory $paymentMethodFactory,
\Magento\Store\Model\StoreManagerInterface $storeManager
) {
)
{
$this->_config = $config;
$this->_request = $request;
$this->_scopeConfig = $scopeConfig;
Expand Down Expand Up @@ -85,8 +84,8 @@ public function toOptionArray()
public function toArray()
{
$storeId = $this->_request->getParam('store');
if($storeId){
$store = $this->_storeManager->getStore($storeId);
if ($storeId) {
$store = $this->_storeManager->getStore($storeId);
$this->_config->setStore($store);
}
$configured = $this->_config->configureSDK();
Expand All @@ -102,12 +101,13 @@ public function toArray()
} catch (\Exception $e) {
return [0 => 'Error: ' . $e->getMessage()];
}

}

protected function getPaymentOptionId()
{
$method = $this->_paymentmethodFactory->create($this->_class);
if ($method instanceof PaymentMethod) {
if($method instanceof PaymentMethod){
return $method->getPaymentOptionId();
}
return null;
Expand Down Expand Up @@ -135,8 +135,8 @@ protected function getConfigValue($path)
protected function _isAvailable()
{
$storeId = $this->_request->getParam('store');
if($storeId){
$store = $this->_storeManager->getStore($storeId);
if ($storeId) {
$store = $this->_storeManager->getStore($storeId);
$this->_config->setStore($store);
}
$configured = $this->_config->configureSDK();
Expand Down

0 comments on commit 03852ad

Please sign in to comment.