diff --git a/Block/Adminhtml/System/Config/Fieldset/Base/Payment.php b/Block/Adminhtml/System/Config/Fieldset/Base/Payment.php
old mode 100755
new mode 100644
index 9e7e05b..1de8dda
--- a/Block/Adminhtml/System/Config/Fieldset/Base/Payment.php
+++ b/Block/Adminhtml/System/Config/Fieldset/Base/Payment.php
@@ -19,32 +19,38 @@
namespace EMerchantPay\Genesis\Block\Adminhtml\System\Config\Fieldset\Base;
+use Magento\Backend\Block\Context;
+use Magento\Backend\Model\Auth\Session;
+use Magento\Config\Block\System\Config\Form\Fieldset;
+use Magento\Config\Model\Config;
+use Magento\Framework\Data\Form\Element\AbstractElement;
+use Magento\Framework\View\Helper\Js;
+
/**
* Base Renderer for EMerchantPay Checkout & Direct Panel in System Configuration
*
* Class Payment
- * @package EMerchantPay\Genesis\Block\Adminhtml\System\Config\Fieldset\Base
*/
-abstract class Payment extends \Magento\Config\Block\System\Config\Form\Fieldset
+abstract class Payment extends Fieldset
{
/**
- * @var \Magento\Config\Model\Config
+ * @var Config
*/
protected $_backendConfig;
/**
- * @param \Magento\Backend\Block\Context $context
- * @param \Magento\Backend\Model\Auth\Session $authSession
- * @param \Magento\Framework\View\Helper\Js $jsHelper
- * @param \Magento\Config\Model\Config $backendConfig
- * @param array $data
+ * @param Context $context
+ * @param Session $authSession
+ * @param Js $jsHelper
+ * @param Config $backendConfig
+ * @param array $data
*/
public function __construct(
- \Magento\Backend\Block\Context $context,
- \Magento\Backend\Model\Auth\Session $authSession,
- \Magento\Framework\View\Helper\Js $jsHelper,
- \Magento\Config\Model\Config $backendConfig,
- array $data = []
+ Context $context,
+ Session $authSession,
+ Js $jsHelper,
+ Config $backendConfig,
+ array $data = []
) {
$this->_backendConfig = $backendConfig;
parent::__construct($context, $authSession, $jsHelper, $data);
@@ -52,6 +58,7 @@ public function __construct(
/**
* Retrieves the Module Panel Css Class
+ *
* @return string
*/
abstract protected function getBlockHeadCssClass();
@@ -59,7 +66,8 @@ abstract protected function getBlockHeadCssClass();
/**
* Add custom css class
*
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * @param AbstractElement $element
+ *
* @return string
*/
protected function _getFrontendClass($element)
@@ -70,8 +78,10 @@ protected function _getFrontendClass($element)
/**
* Return header title part of html for payment solution
*
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * @param AbstractElement $element
+ *
* @return string
+ *
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
protected function _getHeaderTitleHtml($element)
@@ -106,8 +116,10 @@ protected function _getHeaderTitleHtml($element)
/**
* Return header comment part of html for payment solution
*
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * @param AbstractElement $element
+ *
* @return string
+ *
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function _getHeaderCommentHtml($element)
@@ -118,8 +130,10 @@ protected function _getHeaderCommentHtml($element)
/**
* Get collapsed state on-load
*
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * @param AbstractElement $element
+ *
* @return bool
+ *
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
protected function _isCollapseState($element)
@@ -128,7 +142,10 @@ protected function _isCollapseState($element)
}
/**
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * Add jQuery to the payment page
+ *
+ * @param AbstractElement $element
+ *
* @return string
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
diff --git a/Block/Adminhtml/System/Config/Fieldset/CheckoutPayment.php b/Block/Adminhtml/System/Config/Fieldset/CheckoutPayment.php
old mode 100755
new mode 100644
index d90deee..ccf6da9
--- a/Block/Adminhtml/System/Config/Fieldset/CheckoutPayment.php
+++ b/Block/Adminhtml/System/Config/Fieldset/CheckoutPayment.php
@@ -23,12 +23,12 @@
* Renderer for EMerchantPay Checkout Panel in System Configuration
*
* Class CheckoutPayment
- * @package EMerchantPay\Genesis\Block\Adminhtml\System\Config\Fieldset
*/
class CheckoutPayment extends \EMerchantPay\Genesis\Block\Adminhtml\System\Config\Fieldset\Base\Payment
{
/**
* Retrieves the Module Panel Css Class
+ *
* @return string
*/
protected function getBlockHeadCssClass()
diff --git a/Block/Adminhtml/System/Config/Fieldset/Init.php b/Block/Adminhtml/System/Config/Fieldset/Init.php
old mode 100755
new mode 100644
index b7867de..0b4b93d
--- a/Block/Adminhtml/System/Config/Fieldset/Init.php
+++ b/Block/Adminhtml/System/Config/Fieldset/Init.php
@@ -19,11 +19,14 @@
namespace EMerchantPay\Genesis\Block\Adminhtml\System\Config\Fieldset;
+use Magento\Backend\Block\Template;
+use Magento\Framework\Data\Form\Element\AbstractElement;
+use Magento\Framework\Data\Form\Element\Renderer\RendererInterface;
+
/**
* Renderer for EMerchantPay banner in System Configuration
*/
-class Init extends \Magento\Backend\Block\Template implements
- \Magento\Framework\Data\Form\Element\Renderer\RendererInterface
+class Init extends Template implements RendererInterface
{
/**
* @var string
@@ -33,13 +36,13 @@ class Init extends \Magento\Backend\Block\Template implements
/**
* Render fieldset html
*
- * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
+ * @param AbstractElement $element
* @return string
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
// @codingStandardsIgnoreStart
- public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
+ public function render(AbstractElement $element)
{
return $this->toHtml();
}
diff --git a/Block/Frontend/Config.php b/Block/Frontend/Config.php
index 2cd388f..94c5e99 100644
--- a/Block/Frontend/Config.php
+++ b/Block/Frontend/Config.php
@@ -20,7 +20,7 @@
namespace EMerchantPay\Genesis\Block\Frontend;
use EMerchantPay\Genesis\Model\Config as BackendConfig;
-use EMerchantPay\Genesis\Model\Method\Checkout;
+use EMerchantPay\Genesis\Model\Method\Checkout as MethodCheckout;
use Magento\Framework\View\Element\Template;
/**
@@ -37,8 +37,8 @@ class Config extends Template
/**
* @param Template\Context $context
- * @param BackendConfig $backendConfig
- * @param array $data
+ * @param BackendConfig $backendConfig
+ * @param array $data
*/
public function __construct(
Template\Context $context,
@@ -56,7 +56,7 @@ public function __construct(
*/
public function isIframeProcessingEnabled(): bool
{
- $this->_backendConfig->setMethodCode(Checkout::CODE);
+ $this->_backendConfig->setMethodCode(MethodCheckout::CODE);
return $this->_backendConfig->isIframeProcessingEnabled();
}
diff --git a/Controller/AbstractAction.php b/Controller/AbstractAction.php
old mode 100755
new mode 100644
index 360745e..a6dc0bb
--- a/Controller/AbstractAction.php
+++ b/Controller/AbstractAction.php
@@ -19,39 +19,46 @@
namespace EMerchantPay\Genesis\Controller;
+use Magento\Framework\App\Action\Action;
+use Magento\Framework\App\Action\Context;
+use Magento\Framework\Message\ManagerInterface;
+use Magento\Framework\ObjectManagerInterface;
+use Psr\Log\LoggerInterface;
+
/**
* Base Controller Class
+ *
* Class AbstractAction
- * @package EMerchantPay\Genesis\Controller
*/
-abstract class AbstractAction extends \Magento\Framework\App\Action\Action
+abstract class AbstractAction extends Action
{
/**
- * @var \Magento\Framework\App\Action\Context
+ * @var Context
*/
protected $_context;
/**
- * @var \Psr\Log\LoggerInterface
+ * @var LoggerInterface
*/
protected $_logger;
/**
- * @param \Magento\Framework\App\Action\Context $context
- * @param \Psr\Log\LoggerInterface $logger
+ * @param Context $context
+ * @param LoggerInterface $logger
*/
public function __construct(
- \Magento\Framework\App\Action\Context $context,
- \Psr\Log\LoggerInterface $logger
+ Context $context,
+ LoggerInterface $logger
) {
parent::__construct($context);
$this->_context = $context;
- $this->_logger = $logger;
+ $this->_logger = $logger;
}
/**
* Get Instance of Magento Controller Action
- * @return \Magento\Framework\App\Action\Context
+ *
+ * @return Context
*/
protected function getContext()
{
@@ -60,7 +67,8 @@ protected function getContext()
/**
* Get Instance of Magento Object Manager
- * @return \Magento\Framework\ObjectManagerInterface
+ *
+ * @return ObjectManagerInterface
*/
protected function getObjectManager()
{
@@ -69,7 +77,8 @@ protected function getObjectManager()
/**
* Get Instance of Magento global Message Manager
- * @return \Magento\Framework\Message\ManagerInterface
+ *
+ * @return ManagerInterface
*/
protected function getMessageManager()
{
@@ -78,7 +87,8 @@ protected function getMessageManager()
/**
* Get Instance of Magento global Logger
- * @return \Psr\Log\LoggerInterface
+ *
+ * @return LoggerInterface
*/
protected function getLogger()
{
@@ -87,7 +97,9 @@ protected function getLogger()
/**
* Check if param exists in the post request
+ *
* @param string $key
+ *
* @return bool
*/
protected function isPostRequestExists($key)
@@ -99,7 +111,9 @@ protected function isPostRequestExists($key)
/**
* Get an array of the Submitted Post Request
+ *
* @param string|null $key
+ *
* @return null|array
*/
protected function getPostRequest($key = null)
diff --git a/Controller/AbstractCheckoutAction.php b/Controller/AbstractCheckoutAction.php
old mode 100755
new mode 100644
index 8dc2e26..3b912df
--- a/Controller/AbstractCheckoutAction.php
+++ b/Controller/AbstractCheckoutAction.php
@@ -22,27 +22,28 @@
use Magento\Checkout\Model\Session;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ResponseInterface;
-use Magento\Framework\Controller\Result\Raw;
use Magento\Framework\Controller\ResultFactory;
+use Magento\Framework\Controller\Result\Raw;
+use Magento\Framework\UrlInterface;
+use Magento\Sales\Model\Order;
use Magento\Sales\Model\OrderFactory;
use Psr\Log\LoggerInterface;
-use Magento\Framework\UrlInterface;
/**
* Base Checkout Controller Class
+ *
* Class AbstractCheckoutAction
- * @package EMerchantPay\Genesis\Controller
*/
-abstract class AbstractCheckoutAction extends \EMerchantPay\Genesis\Controller\AbstractAction
+abstract class AbstractCheckoutAction extends AbstractAction
{
- const ROUTE_PATTERN_CHECKOUT_ONEPAGE_SUCCESS_PATH = 'checkout/onepage/success';
- const ROUTE_PATTERN_CHECKOUT_ONEPAGE_SUCCESS_ARGS = [];
+ public const ROUTE_PATTERN_CHECKOUT_ONEPAGE_SUCCESS_PATH = 'checkout/onepage/success';
+ public const ROUTE_PATTERN_CHECKOUT_ONEPAGE_SUCCESS_ARGS = [];
- const ROUTE_PATTERN_CHECKOUT_CART_PATH = 'checkout/cart';
- const ROUTE_PATTERN_CHECKOUT_CART_ARGS = [];
+ public const ROUTE_PATTERN_CHECKOUT_CART_PATH = 'checkout/cart';
+ public const ROUTE_PATTERN_CHECKOUT_CART_ARGS = [];
- const ROUTE_PATTERN_CHECKOUT_FRAGMENT_PAYMENT_PATH = 'checkout';
- const ROUTE_PATTERN_CHECKOUT_FRAGMENT_PAYMENT_ARGS = ['_fragment' => 'payment'];
+ public const ROUTE_PATTERN_CHECKOUT_FRAGMENT_PAYMENT_PATH = 'checkout';
+ public const ROUTE_PATTERN_CHECKOUT_FRAGMENT_PAYMENT_ARGS = ['_fragment' => 'payment'];
/**
* @var Session
@@ -112,7 +113,8 @@ protected function getOrderFactory()
/**
* Get an Instance of the current Checkout Order Object
- * @return \Magento\Sales\Model\Order
+ *
+ * @return Order
*/
protected function getOrder()
{
@@ -135,6 +137,7 @@ protected function getOrder()
/**
* Does a redirect to the Checkout Payment Page
+ *
* @return void
*/
protected function redirectToCheckoutFragmentPayment()
@@ -185,7 +188,7 @@ protected function redirectToCheckoutCart(bool $iframeRedirect)
* Return html code with embedded js in