Passed
Push — master ( 35732c...16ec59 )
by Cesar
02:44
created
paylater.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     exit;
12 12
 }
13 13
 
14
-define('_PS_PAYLATER_DIR', _PS_MODULE_DIR_. '/paylater');
14
+define('_PS_PAYLATER_DIR', _PS_MODULE_DIR_.'/paylater');
15 15
 define('PAYLATER_SHOPPER_URL', 'https://shopper.pagamastarde.com/prestashop/');
16 16
 
17 17
 require _PS_PAYLATER_DIR.'/vendor/autoload.php';
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $paymentOption
216 216
             ->setCallToActionText($this->l('Finance using Paylater'))
217 217
             ->setAction($link->getModuleLink('paylater', 'payment'))
218
-            ->setLogo($this->getPathUri(). 'logo.gif')
218
+            ->setLogo($this->getPathUri().'logo.gif')
219 219
             ->setModuleName(__CLASS__)
220 220
         ;
221 221
 
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
                             array(
257 257
                                 'id' => 'production',
258 258
                                 'value' => 1,
259
-                                'label' => $this->l('Production') . '<br>',
259
+                                'label' => $this->l('Production').'<br>',
260 260
                             ),
261 261
                             array(
262 262
                                 'id' => 'test',
263 263
                                 'value' => 0,
264
-                                'label' => $this->l('Test') . '<br>',
264
+                                'label' => $this->l('Test').'<br>',
265 265
                             ),
266 266
                         ),
267 267
                     ),
@@ -311,12 +311,12 @@  discard block
 block discarded – undo
311 311
                             array(
312 312
                                 'id' => 'true',
313 313
                                 'value' => 1,
314
-                                'label' => $this->l('The online commerce will cover the cost') . '<br>',
314
+                                'label' => $this->l('The online commerce will cover the cost').'<br>',
315 315
                             ),
316 316
                             array(
317 317
                                 'id' => 'false',
318 318
                                 'value' => 0,
319
-                                'label' => $this->l('The end client who buys will cover the cost') . '<br>',
319
+                                'label' => $this->l('The end client who buys will cover the cost').'<br>',
320 320
                             ),
321 321
                         ),
322 322
                     ),
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
                             array(
331 331
                                 'id' => 'frame',
332 332
                                 'value' => 1,
333
-                                'label' => $this->l('open on iFrame inside the page') . '<br>',
333
+                                'label' => $this->l('open on iFrame inside the page').'<br>',
334 334
                             ),
335 335
                             array(
336 336
                                 'id' => 'redirection',
337 337
                                 'value' => 0,
338
-                                'label' => $this->l('redirect the user to the payment page') . '<br>',
338
+                                'label' => $this->l('redirect the user to the payment page').'<br>',
339 339
                             ),
340 340
                         ),
341 341
                     ),
@@ -350,32 +350,32 @@  discard block
 block discarded – undo
350 350
                             array(
351 351
                                 'id' => 'product-page-hook',
352 352
                                 'value' => 'no',
353
-                                'label' => $this->l('Don\'t display'). '<br>'
353
+                                'label' => $this->l('Don\'t display').'<br>'
354 354
                             ),
355 355
                             array(
356 356
                                 'id' => 'product-page-hook',
357 357
                                 'value' => 'hookDisplayRightColumn',
358
-                                'label' => $this->l('display in right column'). '<br>'
358
+                                'label' => $this->l('display in right column').'<br>'
359 359
                             ),
360 360
                             array(
361 361
                                 'id' => 'product-page-hook',
362 362
                                 'value' => 'hookDisplayLeftColumn',
363
-                                'label' => $this->l('display in left column'). '<br>'
363
+                                'label' => $this->l('display in left column').'<br>'
364 364
                             ),
365 365
                             array(
366 366
                                 'id' => 'product-page-hook',
367 367
                                 'value' => 'hookDisplayRightColumnProduct',
368
-                                'label' => $this->l('display in right column of product'). '<br>'
368
+                                'label' => $this->l('display in right column of product').'<br>'
369 369
                             ),
370 370
                             array(
371 371
                                 'id' => 'product-page-hook',
372 372
                                 'value' => 'hookDisplayLeftColumnProduct',
373
-                                'label' => $this->l('display in left column of product'). '<br>'
373
+                                'label' => $this->l('display in left column of product').'<br>'
374 374
                             ),
375 375
                             array(
376 376
                                 'id' => 'product-page-hook',
377 377
                                 'value' => 'hookDisplayProductButtons',
378
-                                'label' => $this->l('display in product buttons (PS 1.7)'). '<br>'
378
+                                'label' => $this->l('display in product buttons (PS 1.7)').'<br>'
379 379
                             ),
380 380
                         ),
381 381
                     ),
@@ -390,22 +390,22 @@  discard block
 block discarded – undo
390 390
                             array(
391 391
                                 'id' => 'simulator',
392 392
                                 'value' => 1,
393
-                                'label' => $this->l('Mini simulator Paylater'). '<br>'
393
+                                'label' => $this->l('Mini simulator Paylater').'<br>'
394 394
                             ),
395 395
                             array(
396 396
                                 'id' => 'simulator',
397 397
                                 'value' => 2,
398
-                                'label' => $this->l('Complete simulator Paylater'). '<br>'
398
+                                'label' => $this->l('Complete simulator Paylater').'<br>'
399 399
                             ),
400 400
                             array(
401 401
                                 'id' => 'simulator',
402 402
                                 'value' => 3,
403
-                                'label' => $this->l('Selectable simulator Paylater'). '<br>'
403
+                                'label' => $this->l('Selectable simulator Paylater').'<br>'
404 404
                             ),
405 405
                             array(
406 406
                                 'id' => 'simulator',
407 407
                                 'value' => 4,
408
-                                'label' => $this->l('Descriptive text Paylater'). '<br>'
408
+                                'label' => $this->l('Descriptive text Paylater').'<br>'
409 409
                             ),
410 410
                         ),
411 411
                     ),
@@ -420,27 +420,27 @@  discard block
 block discarded – undo
420 420
                             array(
421 421
                                 'id' => 'simulator',
422 422
                                 'value' => 0,
423
-                                'label' => $this->l('Don\'t display'). '<br>'
423
+                                'label' => $this->l('Don\'t display').'<br>'
424 424
                             ),
425 425
                             array(
426 426
                                 'id' => 'simulator',
427 427
                                 'value' => 1,
428
-                                'label' => $this->l('Mini simulator Paylater'). '<br>'
428
+                                'label' => $this->l('Mini simulator Paylater').'<br>'
429 429
                             ),
430 430
                             array(
431 431
                                 'id' => 'simulator',
432 432
                                 'value' => 2,
433
-                                'label' => $this->l('Complete simulator Paylater'). '<br>'
433
+                                'label' => $this->l('Complete simulator Paylater').'<br>'
434 434
                             ),
435 435
                             array(
436 436
                                 'id' => 'simulator',
437 437
                                 'value' => 3,
438
-                                'label' => $this->l('Selectable simulator Paylater'). '<br>'
438
+                                'label' => $this->l('Selectable simulator Paylater').'<br>'
439 439
                             ),
440 440
                             array(
441 441
                                 'id' => 'simulator',
442 442
                                 'value' => 4,
443
-                                'label' => $this->l('Descriptive text Paylater'). '<br>'
443
+                                'label' => $this->l('Descriptive text Paylater').'<br>'
444 444
                             ),
445 445
                         ),
446 446
                     ),
@@ -466,12 +466,12 @@  discard block
 block discarded – undo
466 466
                             array(
467 467
                                 'id' => 'no',
468 468
                                 'value' => false,
469
-                                'label' => $this->l('Use friendly url'). '<br>'
469
+                                'label' => $this->l('Use friendly url').'<br>'
470 470
                             ),
471 471
                             array(
472 472
                                 'id' => 'yes',
473 473
                                 'value' => true,
474
-                                'label' => $this->l('Use canonical url'). '<br>'
474
+                                'label' => $this->l('Use canonical url').'<br>'
475 475
                             ),
476 476
                         ),
477 477
                     ),
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
             $message = $this->displayError($error);
573 573
         }
574 574
 
575
-        $logo = $this->getPathUri(). 'views/img/logo_pagamastarde.png';
575
+        $logo = $this->getPathUri().'views/img/logo_pagamastarde.png';
576 576
         $css = 'https://shopper.pagamastarde.com/css/paylater-modal.min.css';
577 577
         $prestashopCss = 'https://shopper.pagamastarde.com/css/paylater-prestashop.min.css';
578 578
         $tpl = $this->local_path.'views/templates/admin/config-info.tpl';
@@ -731,10 +731,10 @@  discard block
 block discarded – undo
731 731
      */
732 732
     public function checkLogoExists()
733 733
     {
734
-        $logo = _PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments/'. Tools::strtolower(__CLASS__). '.png';
735
-        if (!file_exists($logo) && is_dir(_PS_MODULE_DIR_ . '/onepagecheckoutps/views/img/payments')) {
734
+        $logo = _PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments/'.Tools::strtolower(__CLASS__).'.png';
735
+        if (!file_exists($logo) && is_dir(_PS_MODULE_DIR_.'/onepagecheckoutps/views/img/payments')) {
736 736
             copy(
737
-                _PS_PAYLATER_DIR . '/views/img/logo-64x64.png',
737
+                _PS_PAYLATER_DIR.'/views/img/logo-64x64.png',
738 738
                 $logo
739 739
             );
740 740
         }
Please login to merge, or discard this patch.
controllers/front/payment.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
         $okUrl = $link->getModuleLink('paylater', 'notify', $query);
46 46
         if ($canonicalUrl) {
47 47
             $okUrl = _PS_BASE_URL_.__PS_BASE_URI__
48
-                     .'index.php?canonical=true&fc=module&module=paylater&controller=notify&'
49
-                     .http_build_query($query)
48
+                        .'index.php?canonical=true&fc=module&module=paylater&controller=notify&'
49
+                        .http_build_query($query)
50 50
             ;
51 51
         }
52 52
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $billingAddress = new Address($cart->id_address_invoice);
55 55
         $discount = Configuration::get('PAYLATER_DISCOUNT');
56 56
         $link = Tools::getHttpHost(true).__PS_BASE_URI__;
57
-        $spinner = $link . ('modules/paylater/views/img/spinner.gif');
57
+        $spinner = $link.('modules/paylater/views/img/spinner.gif');
58 58
         $css = 'https://shopper.pagamastarde.com/css/paylater-modal.min.css';
59 59
         $prestashopCss = 'https://shopper.pagamastarde.com/css/paylater-prestashop.min.css';
60 60
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
         $shopperClient = new \ShopperLibrary\ShopperClient(PAYLATER_SHOPPER_URL);
85 85
         $shopperClient->setObjectModule($prestashopObjectModule);
86 86
         $response = $shopperClient->getPaymentForm();
87
-        $url    = "";
87
+        $url = "";
88 88
         if ($response) {
89 89
             $paymentForm = json_decode($response);
90 90
             if (is_object($paymentForm) && is_object($paymentForm->data)) {
91
-                $url    = $paymentForm->data->url;
91
+                $url = $paymentForm->data->url;
92 92
             }
93 93
         }
94 94
 
Please login to merge, or discard this patch.
controllers/front/notify.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function postProcess()
31 31
     {
32 32
         //unlock cart_id locked for more than 10 seconds
33
-        Db::getInstance()->delete('pmt_cart_process', 'timestamp < ' . (time() - 10));
33
+        Db::getInstance()->delete('pmt_cart_process', 'timestamp < '.(time() - 10));
34 34
 
35 35
         try {
36 36
             $this->processValidation();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
 
70 70
         header('Content-Type: application/json', true);
71
-        header('Content-Length: ' . Tools::strlen($result));
71
+        header('Content-Length: '.Tools::strlen($result));
72 72
 
73 73
         echo $result;
74 74
         exit();
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $secureKey = Tools::getValue('key');
121 121
         $paylaterProd = Configuration::get('PAYLATER_PROD');
122 122
         $paylaterMode = $paylaterProd == 1 ? 'PROD' : 'TEST';
123
-        $privateKey = Configuration::get('PAYLATER_PRIVATE_KEY_'. $paylaterMode);
123
+        $privateKey = Configuration::get('PAYLATER_PRIVATE_KEY_'.$paylaterMode);
124 124
         $cart = new Cart((int) $cartId);
125 125
 
126 126
         if ($secureKey && $cartId && Module::isEnabled('paylater')) {
Please login to merge, or discard this patch.
controllers/front/api.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         header('HTTP/1.1 200 Ok', true, 200);
75 75
         header('Content-Type: application/json', true);
76
-        header('Content-Length: ' . Tools::strlen($result));
76
+        header('Content-Length: '.Tools::strlen($result));
77 77
 
78 78
         echo $result;
79 79
         exit();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $paylaterProd = Configuration::get('PAYLATER_PROD');
88 88
         $paylaterMode = $paylaterProd == 1 ? 'PROD' : 'TEST';
89
-        $privateKey = Configuration::get('PAYLATER_PRIVATE_KEY_'. $paylaterMode);
89
+        $privateKey = Configuration::get('PAYLATER_PRIVATE_KEY_'.$paylaterMode);
90 90
 
91 91
         if (Tools::getValue('secret', false) == $privateKey) {
92 92
             return true;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         header('HTTP/1.1 403 Forbidden', true, 403);
101 101
         header('Content-Type: application/json', true);
102
-        header('Content-Length: ' . Tools::strlen($result));
102
+        header('Content-Length: '.Tools::strlen($result));
103 103
 
104 104
         echo $result;
105 105
         exit();
Please login to merge, or discard this patch.
lib/CustomerExport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
                 'dob' => $customerCore->birthday,
25 25
                 'firstName' => $customerCore->firstname,
26 26
                 'lastName' => $customerCore->lastname,
27
-                'fullName'    => $customerCore->firstname. ' ' .$customerCore->lastname,
27
+                'fullName'    => $customerCore->firstname.' '.$customerCore->lastname,
28 28
                 'isGuest' => $customerCore->is_guest,
29 29
                 'memberSince' => $customerCore->date_add,
30 30
                 'customer' => json_decode(json_encode($customerCore)),
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
                 'dob' => $customerCore->birthday,
41 41
                 'firstName' => $customerCore->firstname,
42 42
                 'lastName' => $customerCore->lastname,
43
-                'fullName'    => $customerCore->firstname. ' ' .$customerCore->lastname,
43
+                'fullName'    => $customerCore->firstname.' '.$customerCore->lastname,
44 44
                 'isGuest' => $customerCore->is_guest,
45 45
                 'memberSince' => $customerCore->date_add,
46 46
                 'customer' => json_decode(json_encode($customerCore)),
Please login to merge, or discard this patch.
lib/AddressExport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                 'dni'         => $addressCore->dni,
22 22
                 'firstName'   => $addressCore->firstname,
23 23
                 'lastName'    => $addressCore->lastname,
24
-                'fullName'    => $addressCore->firstname. ' ' .$addressCore->lastname,
24
+                'fullName'    => $addressCore->firstname.' '.$addressCore->lastname,
25 25
                 'mobilePhone' => $addressCore->phone_mobile,
26 26
                 'phone'       => $addressCore->phone,
27 27
                 'zipCode'     => $addressCore->postcode,
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 'dni'         => $addressCore->dni,
37 37
                 'firstName'   => $addressCore->firstname,
38 38
                 'lastName'    => $addressCore->lastname,
39
-                'fullName'    => $addressCore->firstname. ' ' .$addressCore->lastname,
39
+                'fullName'    => $addressCore->firstname.' '.$addressCore->lastname,
40 40
                 'mobilePhone' => $addressCore->phone_mobile,
41 41
                 'phone'       => $addressCore->phone,
42 42
                 'zipCode'     => $addressCore->postcode,
Please login to merge, or discard this patch.