Passed
Pull Request — master (#40)
by pablo
04:42
created
Gateway/Response/FraudHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
         $payment->setAdditionalInformation(
40 40
             self::FRAUD_MSG_LIST,
41
-            (array)$response[self::FRAUD_MSG_LIST]
41
+            (array) $response[self::FRAUD_MSG_LIST]
42 42
         );
43 43
 
44 44
         /** @var $payment Payment */
Please login to merge, or discard this patch.
Controller/Payment/ConfigV2.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             } elseif ($this->_request->isPost()) {
90 90
                 if (count($_POST)) {
91 91
                     foreach ($_POST as $config => $value) {
92
-                        if (isset($this->defaultConfigs[$config]) && $response['status']==null) {
92
+                        if (isset($this->defaultConfigs[$config]) && $response['status'] == null) {
93 93
                             $dbConnection->update(
94 94
                                 $tableName,
95 95
                                 array('value' => $value),
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             }
108 108
 
109 109
             $formattedResult = array();
110
-            if ($response['status']==null) {
110
+            if ($response['status'] == null) {
111 111
                 $dbResult = $dbConnection->fetchAll("select * from $tableName");
112 112
                 foreach ($dbResult as $value) {
113 113
                     $formattedResult[$value['config']] = $value['value'];
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -24,21 +24,21 @@
 block discarded – undo
24 24
      * @var array $defaultConfigs
25 25
      */
26 26
     public $defaultConfigs = array('PAGANTIS_TITLE'=>'Paga en cuotas',
27
-                                   'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE',
28
-                                   'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE',
29
-                                   'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
30
-                                   'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
31
-                                   'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
32
-                                   'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
33
-                                   'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER',
34
-                                   'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
35
-                                   'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
36
-                                   'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
37
-                                   'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
38
-                                   'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
39
-                                   'PAGANTIS_URL_OK'=>'',
40
-                                   'PAGANTIS_URL_KO'=>'',
41
-                                   'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!'
27
+                                    'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'pgSDK.simulator.types.SIMPLE',
28
+                                    'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'pgSDK.simulator.skins.BLUE',
29
+                                    'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
30
+                                    'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
31
+                                    'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
32
+                                    'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
33
+                                    'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'pgSDK.simulator.positions.INNER',
34
+                                    'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
35
+                                    'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
36
+                                    'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
37
+                                    'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
38
+                                    'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
39
+                                    'PAGANTIS_URL_OK'=>'',
40
+                                    'PAGANTIS_URL_KO'=>'',
41
+                                    'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!'
42 42
     );
43 43
 
44 44
     /**
Please login to merge, or discard this patch.
Setup/InstallData.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,26 +16,26 @@
 block discarded – undo
16 16
      * @var array $defaultConfigs
17 17
      */
18 18
     public $defaultConfigs = array(
19
-       'PAGANTIS_TITLE'=>'Pago en cuotas',
20
-       'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.SELECTABLE_TEXT_CUSTOM',
21
-       'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE',
22
-       'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
23
-       'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
24
-       'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
25
-       'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
26
-       'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER',
27
-       'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
28
-       'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
29
-       'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
30
-       'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
31
-       'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
32
-       'PAGANTIS_URL_OK'=>'',
33
-       'PAGANTIS_URL_KO'=>'',
34
-       'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!',
35
-       'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}',
36
-       'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pg-no-interest">without interest!</span></p>',
37
-       'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.',
38
-       'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ','
19
+        'PAGANTIS_TITLE'=>'Pago en cuotas',
20
+        'PAGANTIS_SIMULATOR_DISPLAY_TYPE'=>'sdk.simulator.types.SELECTABLE_TEXT_CUSTOM',
21
+        'PAGANTIS_SIMULATOR_DISPLAY_SKIN'=>'sdk.simulator.skins.BLUE',
22
+        'PAGANTIS_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
23
+        'PAGANTIS_SIMULATOR_START_INSTALLMENTS'=>3,
24
+        'PAGANTIS_SIMULATOR_MAX_INSTALLMENTS'=>12,
25
+        'PAGANTIS_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
26
+        'PAGANTIS_SIMULATOR_DISPLAY_CSS_POSITION'=>'sdk.simulator.positions.INNER',
27
+        'PAGANTIS_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
28
+        'PAGANTIS_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
29
+        'PAGANTIS_FORM_DISPLAY_TYPE'=>0,
30
+        'PAGANTIS_DISPLAY_MIN_AMOUNT'=>1,
31
+        'PAGANTIS_DISPLAY_MAX_AMOUNT'=>0,
32
+        'PAGANTIS_URL_OK'=>'',
33
+        'PAGANTIS_URL_KO'=>'',
34
+        'PAGANTIS_TITLE_EXTRA' => 'Pay up to 12 comfortable installments with Pagantis. Completely online and sympathetic request, and the answer is immediate!',
35
+        'PAGANTIS_ALLOWED_COUNTRIES' => 'a:3:{i:0;s:2:"es";i:1;s:2:"it";i:2;s:2:"fr";}',
36
+        'PAGANTIS_PROMOTION_EXTRA' => '<p class="promoted">Finance this product <span class="pg-no-interest">without interest!</span></p>',
37
+        'PAGANTIS_SIMULATOR_THOUSANDS_SEPARATOR' => '.',
38
+        'PAGANTIS_SIMULATOR_DECIMAL_SEPARATOR' => ','
39 39
     );
40 40
 
41 41
     /**
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.
Block/Product/Simulator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -464,6 +464,6 @@
 block discarded – undo
464 464
         $minAmount = $this->getMinAmount();
465 465
         $totalPrice = (string) floor($this->getFinalPrice());
466 466
 
467
-        return ($totalPrice>=$minAmount && ($totalPrice<=$maxAmount||$maxAmount=='0'));
467
+        return ($totalPrice >= $minAmount && ($totalPrice <= $maxAmount || $maxAmount == '0'));
468 468
     }
469 469
 }
Please login to merge, or discard this patch.