Completed
Push — master ( 152809...934151 )
by Marcus
02:26
created
src/Controller/Shop/Shoppingcart.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     }
327 327
 
328 328
     /**
329
-     * @param $iInsertID
329
+     * @param string $iInsertID
330 330
      * @param $sMailbody_us
331 331
      * @param $sMailbody_they
332 332
      * @param $aImagesToSend
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     }
376 376
 
377 377
     /**
378
-     * @param $field
378
+     * @param string $field
379 379
      * @return string
380 380
      */
381 381
     private function getPostValue($field)
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         if (HelperConfig::$shop['email_orderconfirmation_embed_itemimages_method'] === 'glide') {
144 144
             $sPathToImage = '/'.HelperConfig::$core['directory_images'].'/'.HelperConfig::$shop['directory_images_items'].'/';
145
-            $sImageroot = PATH_BASEDIR . HelperConfig::$core['directory_glide_master'];
145
+            $sImageroot = PATH_BASEDIR.HelperConfig::$core['directory_glide_master'];
146 146
 
147 147
             if (
148 148
                 is_file($sImageroot.substr($sPathToImage.$aV['img'], strlen(HelperConfig::$core['directory_images']) + 1))
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                     'cache' => PATH_GLIDECACHE,
154 154
                     'max_image_size' => HelperConfig::$core['glide_max_imagesize'],
155 155
                 ]);
156
-                $glideserver->setBaseUrl('/' . HelperConfig::$core['directory_images'] . '/');
156
+                $glideserver->setBaseUrl('/'.HelperConfig::$core['directory_images'].'/');
157 157
                 $base64Img = $glideserver->getImageAsBase64($sPathToImage.$aV['img'], HelperConfig::$shop['email_orderconfirmation_embed_itemimages_glideparams']);
158 158
                 $TMP = explode(',', $base64Img);
159 159
                 $binImg = base64_decode($TMP[1]);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 .HelperConfig::$shop['directory_images_items_email'].'/';
167 167
             if ($aImgInfo = getimagesize($sPathToImage.$aV['img'])) {
168 168
                 $binImg = file_get_contents($sPathToImage.$aV['img']);
169
-                $base64Img = 'data:' . $aImgInfo['mime'] . ';base64,';
169
+                $base64Img = 'data:'.$aImgInfo['mime'].';base64,';
170 170
                 $base64Img .= base64_encode($binImg);
171 171
             }
172 172
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             $sql = DBTools::buildPSInsertQuery($aDataOrder, 'orders');
240 240
             $hResult = $db->prepare($sql);
241 241
             foreach ($aDataOrder as $sKey => $sValue) {
242
-                $hResult->bindValue(':' . $sKey, $sValue);
242
+                $hResult->bindValue(':'.$sKey, $sValue);
243 243
             }
244 244
             $hResult->execute();
245 245
             $iInsertID = $db->lastInsertId();
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                 $sql = DBTools::buildPSInsertQuery($aV, 'orders_items');
275 275
                 $hResult = $db->prepare($sql);
276 276
                 foreach ($aV as $sKey => $sValue) {
277
-                    $hResult->bindValue(':' . $sKey, $sValue);
277
+                    $hResult->bindValue(':'.$sKey, $sValue);
278 278
                 }
279 279
                 $hResult->execute();
280 280
             }
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
             && array_search('paypal', HelperConfig::$shop['paymentmethods']) !== false
313 313
             && HelperConfig::$shop['paypal_interactive']
314 314
         ) {
315
-            $redirectto = '/_misc/paypal.html?id=' . $iInsertID;
315
+            $redirectto = '/_misc/paypal.html?id='.$iInsertID;
316 316
         } elseif (
317 317
             isset($this->post['paymentmethod'])
318 318
             && $this->post['paymentmethod'] === 'sofortueberweisung'
319 319
             && array_search('sofortueberweisung', HelperConfig::$shop['paymentmethods']) !== false
320 320
         ) {
321
-            $redirectto = '/_misc/sofortueberweisung.html?id=' . $iInsertID;
321
+            $redirectto = '/_misc/sofortueberweisung.html?id='.$iInsertID;
322 322
         } else {
323
-            $redirectto = '/_misc/checkedout.html?id=' . $iInsertID;
323
+            $redirectto = '/_misc/checkedout.html?id='.$iInsertID;
324 324
         }
325 325
         \HaaseIT\HCSF\Helper::redirectToPage($redirectto);
326 326
     }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     private function sendCheckoutMails($iInsertID, $sMailbody_us, $sMailbody_they, $aImagesToSend)
335 335
     {
336 336
         if (
337
-            isset(HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_' .HelperConfig::$lang])
337
+            isset(HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_'.HelperConfig::$lang])
338 338
             && file_exists(
339 339
                 PATH_DOCROOT.HelperConfig::$core['directory_emailattachments']
340 340
                 .'/'.HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_'
@@ -343,21 +343,21 @@  discard block
 block discarded – undo
343 343
         ) {
344 344
             $aFilesToSend[] =
345 345
                 PATH_DOCROOT.HelperConfig::$core['directory_emailattachments'].'/'
346
-                .HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_' .HelperConfig::$lang];
346
+                .HelperConfig::$shop['email_orderconfirmation_attachment_cancellationform_'.HelperConfig::$lang];
347 347
         } else {
348 348
             $aFilesToSend = [];
349 349
         }
350 350
 
351 351
         Helper::mailWrapper(
352 352
             $this->post['email'],
353
-            $this->textcats->T('shoppingcart_mail_subject') . ' ' . $iInsertID,
353
+            $this->textcats->T('shoppingcart_mail_subject').' '.$iInsertID,
354 354
             $sMailbody_they,
355 355
             $aImagesToSend,
356 356
             $aFilesToSend
357 357
         );
358 358
         Helper::mailWrapper(
359 359
             HelperConfig::$core['email_sender'],
360
-            'Bestellung im Webshop Nr: ' . $iInsertID,
360
+            'Bestellung im Webshop Nr: '.$iInsertID,
361 361
             $sMailbody_us,
362 362
             $aImagesToSend
363 363
         );
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
      */
369 369
     private function writeCheckoutToFile($sMailbody_us)
370 370
     {
371
-        $fp = fopen(PATH_LOGS . 'shoplog_' . date('Y-m-d') . '.html', 'a');
371
+        $fp = fopen(PATH_LOGS.'shoplog_'.date('Y-m-d').'.html', 'a');
372 372
         // Write $somecontent to our opened file.
373
-        fwrite($fp, $sMailbody_us . "\n\n-------------------------------------------------------------------------\n\n");
373
+        fwrite($fp, $sMailbody_us."\n\n-------------------------------------------------------------------------\n\n");
374 374
         fclose($fp);
375 375
     }
376 376
 
@@ -412,9 +412,9 @@  discard block
 block discarded – undo
412 412
             'country' => isset($this->post['country']) && trim($this->post['country']) != '' ?
413 413
             (
414 414
                 isset(
415
-                    HelperConfig::$countries['countries_' .HelperConfig::$lang][$this->post['country']]
415
+                    HelperConfig::$countries['countries_'.HelperConfig::$lang][$this->post['country']]
416 416
                 )
417
-                    ? HelperConfig::$countries['countries_' .HelperConfig::$lang][$this->post['country']]
417
+                    ? HelperConfig::$countries['countries_'.HelperConfig::$lang][$this->post['country']]
418 418
                     : $this->post['country'])
419 419
             : '',
420 420
             'remarks' => $this->getPostValue('remarks'),
@@ -422,8 +422,8 @@  discard block
 block discarded – undo
422 422
             'cancellationdisclaimer' => $this->getPostValue('cancellationdisclaimer'),
423 423
             'paymentmethod' => $this->getPostValue('paymentmethod'),
424 424
             'shippingcost' => !isset($_SESSION['shippingcost']) || $_SESSION['shippingcost'] == 0 ? false : $_SESSION['shippingcost'],
425
-            'paypallink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'paypal' ?  $_SERVER['SERVER_NAME'].'/_misc/paypal.html?id='.$iId : '',
426
-            'sofortueberweisunglink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'sofortueberweisung' ?  $_SERVER['SERVER_NAME'].'/_misc/sofortueberweisung.html?id='.$iId : '',
425
+            'paypallink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'paypal' ? $_SERVER['SERVER_NAME'].'/_misc/paypal.html?id='.$iId : '',
426
+            'sofortueberweisunglink' => isset($this->post['paymentmethod']) && $this->post['paymentmethod'] == 'sofortueberweisung' ? $_SERVER['SERVER_NAME'].'/_misc/sofortueberweisung.html?id='.$iId : '',
427 427
             'SESSION' => !$bCust ? Tools::debug($_SESSION, '$_SESSION', true, true) : '',
428 428
             'POST' => !$bCust ? Tools::debug($this->post, '$this->post', true, true) : '',
429 429
             'orderid' => $iId,
@@ -451,15 +451,15 @@  discard block
 block discarded – undo
451 451
                 ($this->get['msg'] === 'updated' && isset($this->get['cartkey'], $this->get['amount']))
452 452
                 || ($this->get['msg'] === 'removed' && isset($this->get['cartkey']))
453 453
             ) {
454
-                $return .= $this->textcats->T('shoppingcart_msg_' . $this->get['msg'] . '_1') . ' ';
454
+                $return .= $this->textcats->T('shoppingcart_msg_'.$this->get['msg'].'_1').' ';
455 455
                 if (isset(HelperConfig::$shop['custom_order_fields']) && mb_strpos($this->get['cartkey'], '|') !== false) {
456 456
                     $mCartkeys = explode('|', $this->get['cartkey']);
457 457
                     foreach ($mCartkeys as $sKey => $sValue) {
458 458
                         if ($sKey == 0) {
459
-                            $return .= $sValue . ', ';
459
+                            $return .= $sValue.', ';
460 460
                         } else {
461 461
                             $TMP = explode(':', $sValue);
462
-                            $return .= $this->textcats->T('shoppingcart_item_' . $TMP[0]) . ' ' . $TMP[1] . ', ';
462
+                            $return .= $this->textcats->T('shoppingcart_item_'.$TMP[0]).' '.$TMP[1].', ';
463 463
                             unset($TMP);
464 464
                         }
465 465
                     }
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
                 } else {
468 468
                     $return .= $this->get['cartkey'];
469 469
                 }
470
-                $return.= ' ' . $this->textcats->T('shoppingcart_msg_' . $this->get['msg'] . '_2');
470
+                $return .= ' '.$this->textcats->T('shoppingcart_msg_'.$this->get['msg'].'_2');
471 471
                 if ($this->get['msg'] == 'updated') {
472
-                    $return .= ' ' . $this->get['amount'];
472
+                    $return .= ' '.$this->get['amount'];
473 473
                 }
474 474
                 $return .= '<br><br>';
475 475
             }
Please login to merge, or discard this patch.
src/Controller/Shop/Sofortueberweisung.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@
 block discarded – undo
72 72
                 .'&amp;project_id='.HelperConfig::$shop['sofortueberweisung']['project_id'].'&amp;amount='
73 73
                 .number_format($fGesamtbrutto, 2, '.', '')
74 74
                 .'&amp;currency_id='.HelperConfig::$shop['sofortueberweisung']['currency_id'].'&amp;reason_1='
75
-                .urlencode($this->textcats->T('misc_paysofortueberweisung_ueberweisungsbetreff') . ' ').$iId;
75
+                .urlencode($this->textcats->T('misc_paysofortueberweisung_ueberweisungsbetreff').' ').$iId;
76 76
             if (HelperConfig::$shop['interactive_paymentmethods_redirect_immediately']) {
77 77
                 \HaaseIT\HCSF\Helper::redirectToPage($sPURL);
78 78
             }
79 79
 
80
-            $this->P->oPayload->cl_html = $this->textcats->T('misc_paysofortueberweisung_greeting') . '<br><br>';
81
-            $this->P->oPayload->cl_html .= '<a href="' . $sPURL . '">' . $this->textcats->T('misc_paysofortueberweisung') . '</a>';
80
+            $this->P->oPayload->cl_html = $this->textcats->T('misc_paysofortueberweisung_greeting').'<br><br>';
81
+            $this->P->oPayload->cl_html .= '<a href="'.$sPURL.'">'.$this->textcats->T('misc_paysofortueberweisung').'</a>';
82 82
         } else {
83 83
             $this->P->oPayload->cl_html = $this->textcats->T('misc_paysofortueberweisung_paymentnotavailable');
84 84
         }
Please login to merge, or discard this patch.
src/Controller/Shop/Paypal.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,16 +69,16 @@
 block discarded – undo
69 69
 
70 70
             $sPaypalURL = HelperConfig::$shop['paypal']['url']
71 71
                 .'?cmd=_xclick&rm=2&custom='
72
-                .$iId . '&business='.HelperConfig::$shop['paypal']['business'];
73
-            $sPaypalURL .= '&notify_url=http://' . $_SERVER['SERVER_NAME'] . '/_misc/paypal_notify.html&item_name=' . $this->textcats->T('misc_paypaypal_paypaltitle') . ' ' . $iId;
74
-            $sPaypalURL .= '&currency_code=' . HelperConfig::$shop['paypal']['currency_id']
75
-                .'&amount=' . str_replace(',', '.', number_format($fGesamtbrutto, 2, '.', ''));
72
+                .$iId.'&business='.HelperConfig::$shop['paypal']['business'];
73
+            $sPaypalURL .= '&notify_url=http://'.$_SERVER['SERVER_NAME'].'/_misc/paypal_notify.html&item_name='.$this->textcats->T('misc_paypaypal_paypaltitle').' '.$iId;
74
+            $sPaypalURL .= '&currency_code='.HelperConfig::$shop['paypal']['currency_id']
75
+                .'&amount='.str_replace(',', '.', number_format($fGesamtbrutto, 2, '.', ''));
76 76
             if (HelperConfig::$shop['interactive_paymentmethods_redirect_immediately']) {
77 77
                 \HaaseIT\HCSF\Helper::redirectToPage($sPaypalURL);
78 78
             }
79 79
 
80
-            $this->P->oPayload->cl_html = $this->textcats->T('misc_paypaypal_greeting') . '<br><br>';
81
-            $this->P->oPayload->cl_html .= '<a href="' . $sPaypalURL . '">' . $this->textcats->T('misc_paypaypal') . '</a>';
80
+            $this->P->oPayload->cl_html = $this->textcats->T('misc_paypaypal_greeting').'<br><br>';
81
+            $this->P->oPayload->cl_html .= '<a href="'.$sPaypalURL.'">'.$this->textcats->T('misc_paypaypal').'</a>';
82 82
         } else {
83 83
             $this->P->oPayload->cl_html = $this->textcats->T('misc_paypaypal_paymentnotavailable');
84 84
         }
Please login to merge, or discard this patch.
src/Controller/Customer/Login.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
         } else {
46 46
             $mLogin = $this->getLogin();
47 47
             if (isset($mLogin['status']) && $mLogin['status'] === 'success') {
48
-                $this->P->oPayload->cl_html = $textcats->T('login_success') . '<br>';
48
+                $this->P->oPayload->cl_html = $textcats->T('login_success').'<br>';
49 49
                 \HaaseIT\HCSF\Helper::redirectToPage('/_misc/userhome.html?login=true');
50 50
             } elseif (isset($mLogin['status']) && $mLogin['status'] === 'tosnotaccepted') {
51
-                $this->P->oPayload->cl_html = $textcats->T('login_fail_tosnotaccepted') . '<br>';
51
+                $this->P->oPayload->cl_html = $textcats->T('login_fail_tosnotaccepted').'<br>';
52 52
                 $this->P->cb_customcontenttemplate = 'customer/login';
53 53
             } elseif (isset($mLogin['status']) && $mLogin['status'] === 'emailnotverified') {
54
-                $this->P->oPayload->cl_html = $textcats->T('login_fail_emailnotverified') . '<br><br>';
54
+                $this->P->oPayload->cl_html = $textcats->T('login_fail_emailnotverified').'<br><br>';
55 55
                 $this->P->oPayload->cl_html .= '<a href="/_misc/resendverificationmail.html?email='
56
-                    . $mLogin['data']['cust_email'] . '">' . $textcats->T('login_fail_emailnotverifiedresend') . '</a>';
56
+                    . $mLogin['data']['cust_email'].'">'.$textcats->T('login_fail_emailnotverifiedresend').'</a>';
57 57
                 $this->P->cb_customcontenttemplate = 'customer/login';
58 58
             } elseif (isset($mLogin['status']) && $mLogin['status'] === 'accountinactive') {
59
-                $this->P->oPayload->cl_html = $textcats->T('login_fail_accountinactive') . '<br>';
59
+                $this->P->oPayload->cl_html = $textcats->T('login_fail_accountinactive').'<br>';
60 60
                 $this->P->cb_customcontenttemplate = 'customer/login';
61 61
             } else {
62 62
                 $this->P->oPayload->cl_html = $textcats->T('login_fail');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $hResult->execute();
111 111
 
112 112
         $iRows = $hResult->rowCount();
113
-        if($iRows == 1) {
113
+        if ($iRows == 1) {
114 114
             $aRow = $hResult->fetch();
115 115
 
116 116
             if (password_verify($_POST['password'], $aRow['cust_password'])) {
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
                 } elseif ($aRow['cust_tosaccepted'] === 'n') {
121 121
                     return ['status' => 'tosnotaccepted'];
122 122
                 } elseif ($aRow['cust_emailverified'] === 'n') {
123
-                    return ['status' => 'emailnotverified', 'data' => $aRow,];
123
+                    return ['status' => 'emailnotverified', 'data' => $aRow, ];
124 124
                 } elseif ($aRow['cust_active'] === 'n') {
125
-                    return ['status' => 'accountinactive',];
125
+                    return ['status' => 'accountinactive', ];
126 126
                 }
127 127
             }
128 128
         }
Please login to merge, or discard this patch.