Passed
Pull Request — master (#40)
by pablo
04:53
created
Block/Product/Simulator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -465,12 +465,12 @@
 block discarded – undo
465 465
         $minAmount = $this->getMinAmount();
466 466
         $finalPrice = $this->getFinalPrice();
467 467
 
468
-        if (isset($maxAmount, $minAmount, $finalPrice) && $maxAmount!='0') {
469
-            if ($finalPrice>=$minAmount && $finalPrice<=$maxAmount) {
468
+        if (isset($maxAmount, $minAmount, $finalPrice) && $maxAmount != '0') {
469
+            if ($finalPrice >= $minAmount && $finalPrice <= $maxAmount) {
470 470
                 $isValid = true;
471 471
             }
472
-        } elseif (isset($minAmount, $finalPrice) && $maxAmount=='0') {
473
-            if ($finalPrice>=$minAmount) {
472
+        } elseif (isset($minAmount, $finalPrice) && $maxAmount == '0') {
473
+            if ($finalPrice >= $minAmount) {
474 474
                 $isValid = true;
475 475
             }
476 476
         }
Please login to merge, or discard this patch.
Observer/PaymentMethodAvailable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function execute(\Magento\Framework\Event\Observer $observer)
17 17
     {
18 18
         try {
19
-            if ($observer->getEvent()->getMethodInstance()->getCode()=="pagantis") {
19
+            if ($observer->getEvent()->getMethodInstance()->getCode() == "pagantis") {
20 20
                 $checkResult = $observer->getEvent()->getResult();
21 21
                 $totalPrice  = (string) floor($observer->getEvent()->getQuote()->getGrandTotal());
22 22
                 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                 $availableCountry = (in_array(strtolower($locale), $allowedCountries));
29 29
                 $maxAmount = $extraConfig['PAGANTIS_DISPLAY_MAX_AMOUNT'];
30 30
                 $minAmount = $extraConfig['PAGANTIS_DISPLAY_MIN_AMOUNT'];
31
-                $validAmount = ($totalPrice>=$minAmount && ($totalPrice<=$maxAmount||$maxAmount=='0'));
31
+                $validAmount = ($totalPrice >= $minAmount && ($totalPrice <= $maxAmount || $maxAmount == '0'));
32 32
                 if (!isset($config['pagantis_public_key']) || $config['pagantis_public_key'] == '' ||
33 33
                     !isset($config['pagantis_private_key']) || $config['pagantis_private_key'] == '' ||
34 34
                     !$availableCountry || !$validAmount) {
Please login to merge, or discard this patch.