Passed
Pull Request — master (#18)
by Cesar
11:26
created
Controller/Notify/IndexV2.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             $this->checkPmtStatus(array('AUTHORIZED'));
263 263
         } catch (\Exception $e) {
264 264
             $this->getMagentoOrderId();
265
-            if ($this->magentoOrderId!='') {
265
+            if ($this->magentoOrderId != '') {
266 266
                 throw new AlreadyProcessedException();
267 267
             } else {
268 268
                 throw new WrongStatusException($this->pmtOrder->getStatus());
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     private function checkMerchantOrderStatus()
277 277
     {
278
-        if ($this->quote->getIsActive()=='0') {
278
+        if ($this->quote->getIsActive() == '0') {
279 279
             $this->getMagentoOrderId();
280 280
             throw new AlreadyProcessedException();
281 281
         }
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             $tableName    = $this->dbObject->getTableName(self::CONCURRENCY_TABLE);
398 398
             if ($mode == false) {
399 399
                 $dbConnection->delete($tableName, "timestamp<".(time() - 5));
400
-            } elseif ($this->quoteId!='') {
400
+            } elseif ($this->quoteId != '') {
401 401
                 $dbConnection->delete($tableName, "id=".$this->quoteId);
402 402
             }
403 403
         } catch (Exception $exception) {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     {
526 526
         //$returnUrl = 'checkout/#payment';
527 527
         $returnUrl = $this->_url->getUrl('checkout', ['_fragment' => 'payment']);
528
-        if ($this->magentoOrderId!='') {
528
+        if ($this->magentoOrderId != '') {
529 529
             /** @var Order $this->magentoOrder */
530 530
             $this->magentoOrder = $this->orderRepositoryInterface->get($this->magentoOrderId);
531 531
             if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
             $orderStatus    = strtolower($this->magentoOrder->getStatus());
543 543
             $acceptedStatus = array('processing', 'completed');
544 544
             if (in_array($orderStatus, $acceptedStatus)) {
545
-                if (isset($this->extraConfig['PMT_OK_URL']) &&  $this->extraConfig['PMT_OK_URL']!= '') {
545
+                if (isset($this->extraConfig['PMT_OK_URL']) && $this->extraConfig['PMT_OK_URL'] != '') {
546 546
                     $returnUrl = $this->extraConfig['PMT_OK_URL'];
547 547
                 } else {
548 548
                     $returnUrl = 'checkout/onepage/success';
Please login to merge, or discard this patch.
Controller/Payment/LogV2.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                     Table::TYPE_TIMESTAMP,
112 112
                     null,
113 113
                     array('nullable'=>false,
114
-                          'default'=>Table::TIMESTAMP_INIT)
114
+                            'default'=>Table::TIMESTAMP_INIT)
115 115
                 );
116 116
             return $dbConnection->createTable($table);
117 117
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
             $secretKey = $this->getRequest()->getParam('secret');
45 45
             $privateKey = isset($this->config['pmt_private_key']) ? $this->config['pmt_private_key'] : null;
46 46
 
47
-            if ($secretKey!='' && $privateKey!='') {
47
+            if ($secretKey != '' && $privateKey != '') {
48 48
                 $this->checkDbLogTable();
49 49
                 /** @var \Magento\Framework\DB\Adapter\AdapterInterface $dbConnection */
50 50
                 $dbConnection = $this->dbObject->getConnection();
Please login to merge, or discard this patch.
Controller/Payment/ConfigV2.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,20 +18,20 @@
 block discarded – undo
18 18
      * @var array $defaultConfigs
19 19
      */
20 20
     public $defaultConfigs = array('PMT_TITLE'=>'Instant Financing',
21
-                                   'PMT_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE',
22
-                                   'PMT_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE',
23
-                                   'PMT_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
24
-                                   'PMT_SIMULATOR_START_INSTALLMENTS'=>3,
25
-                                   'PMT_SIMULATOR_MAX_INSTALLMENTS'=>12,
26
-                                   'PMT_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
27
-                                   'PMT_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER',
28
-                                   'PMT_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
29
-                                   'PMT_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
30
-                                   'PMT_FORM_DISPLAY_TYPE'=>0,
31
-                                   'PMT_DISPLAY_MIN_AMOUNT'=>1,
32
-                                   'PMT_URL_OK'=>'',
33
-                                   'PMT_URL_KO'=>'',
34
-                                   'PMT_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente 
21
+                                    'PMT_SIMULATOR_DISPLAY_TYPE'=>'pmtSDK.simulator.types.SIMPLE',
22
+                                    'PMT_SIMULATOR_DISPLAY_SKIN'=>'pmtSDK.simulator.skins.BLUE',
23
+                                    'PMT_SIMULATOR_DISPLAY_POSITION'=>'hookDisplayProductButtons',
24
+                                    'PMT_SIMULATOR_START_INSTALLMENTS'=>3,
25
+                                    'PMT_SIMULATOR_MAX_INSTALLMENTS'=>12,
26
+                                    'PMT_SIMULATOR_CSS_POSITION_SELECTOR'=>'default',
27
+                                    'PMT_SIMULATOR_DISPLAY_CSS_POSITION'=>'pmtSDK.simulator.positions.INNER',
28
+                                    'PMT_SIMULATOR_CSS_PRICE_SELECTOR'=>'default',
29
+                                    'PMT_SIMULATOR_CSS_QUANTITY_SELECTOR'=>'default',
30
+                                    'PMT_FORM_DISPLAY_TYPE'=>0,
31
+                                    'PMT_DISPLAY_MIN_AMOUNT'=>1,
32
+                                    'PMT_URL_OK'=>'',
33
+                                    'PMT_URL_KO'=>'',
34
+                                    'PMT_TITLE_EXTRA' => 'Paga hasta en 12 cómodas cuotas con Paga+Tarde. Solicitud totalmente 
35 35
                             online y sin papeleos,¡y la respuesta es inmediata!'
36 36
     );
37 37
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
73 73
                 if (count($_POST)) {
74 74
                     foreach ($_POST as $config => $value) {
75
-                        if (isset($this->defaultConfigs[$config]) && $response['status']==null) {
75
+                        if (isset($this->defaultConfigs[$config]) && $response['status'] == null) {
76 76
                             $dbConnection->update(
77 77
                                 $tableName,
78 78
                                 array('value' => $value),
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
 
92 92
             $formattedResult = array();
93
-            if ($response['status']==null) {
93
+            if ($response['status'] == null) {
94 94
                 $dbResult = $dbConnection->fetchAll("select * from $tableName");
95 95
                 foreach ($dbResult as $value) {
96 96
                     $formattedResult[$value['config']] = $value['value'];
Please login to merge, or discard this patch.
Test/Buy/PaylaterMgBuyRegisteredTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
         $this->assertNotEmpty($orderUrl);
64 64
 
65 65
         $orderArray = explode('/', $orderUrl);
66
-        $magentoOrderId = (int)$orderArray['8'];
66
+        $magentoOrderId = (int) $orderArray['8'];
67 67
         $this->assertNotEmpty($magentoOrderId);
68 68
         $notifyFile = 'index/';
69
-        $quoteId=($magentoOrderId)-1;
69
+        $quoteId = ($magentoOrderId) - 1;
70 70
 
71 71
         if (version_compare($this->version, '23') >= 0) {
72 72
             $notifyFile = 'indexV2/';
73
-            $quoteId=$magentoOrderId;
73
+            $quoteId = $magentoOrderId;
74 74
         }
75 75
 
76 76
         $notifyUrl = sprintf(
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             "PR58=>".$notifyUrl.$quoteId." = ".$response->body->result
100 100
         );
101 101
 
102
-        $quoteId=0;
102
+        $quoteId = 0;
103 103
         $response = Request::post($notifyUrl.$quoteId)->expects('json')->send();
104 104
         $this->assertNotEmpty($response->body->result, print_r($response, true));
105 105
         $this->assertContains(
Please login to merge, or discard this patch.