Completed
Push — master ( 38498c...be9c40 )
by Marcus
02:53
created
src/Controller/Shop/Shoppingcart.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     }
225 225
 
226 226
     /**
227
-     * @return bool
227
+     * @return false|null
228 228
      */
229 229
     private function doCheckout()
230 230
     {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     }
330 330
 
331 331
     /**
332
-     * @param $iInsertID
332
+     * @param string $iInsertID
333 333
      * @param $sMailbody_us
334 334
      * @param $sMailbody_they
335 335
      * @param $aImagesToSend
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
     }
377 377
 
378 378
     /**
379
-     * @param $field
379
+     * @param string $field
380 380
      * @return string
381 381
      */
382 382
     private function getPostValue($field)
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 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
         }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             $sql = DBTools::buildPSInsertQuery($aDataOrder, 'orders');
243 243
             $hResult = $db->prepare($sql);
244 244
             foreach ($aDataOrder as $sKey => $sValue) {
245
-                $hResult->bindValue(':' . $sKey, $sValue);
245
+                $hResult->bindValue(':'.$sKey, $sValue);
246 246
             }
247 247
             $hResult->execute();
248 248
             $iInsertID = $db->lastInsertId();
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                 $sql = DBTools::buildPSInsertQuery($aV, 'orders_items');
278 278
                 $hResult = $db->prepare($sql);
279 279
                 foreach ($aV as $sKey => $sValue) {
280
-                    $hResult->bindValue(':' . $sKey, $sValue);
280
+                    $hResult->bindValue(':'.$sKey, $sValue);
281 281
                 }
282 282
                 $hResult->execute();
283 283
             }
@@ -315,15 +315,15 @@  discard block
 block discarded – undo
315 315
             && array_search('paypal', HelperConfig::$shop["paymentmethods"]) !== false
316 316
             && isset(HelperConfig::$shop["paypal_interactive"]) && HelperConfig::$shop["paypal_interactive"]
317 317
         ) {
318
-            header('Location: /_misc/paypal.html?id=' . $iInsertID);
318
+            header('Location: /_misc/paypal.html?id='.$iInsertID);
319 319
         } elseif (
320 320
             isset($this->post["paymentmethod"])
321 321
             && $this->post["paymentmethod"] == 'sofortueberweisung'
322 322
             && array_search('sofortueberweisung', HelperConfig::$shop["paymentmethods"]) !== false
323 323
         ) {
324
-            header('Location: /_misc/sofortueberweisung.html?id=' . $iInsertID);
324
+            header('Location: /_misc/sofortueberweisung.html?id='.$iInsertID);
325 325
         } else {
326
-            header('Location: /_misc/checkedout.html?id=' . $iInsertID);
326
+            header('Location: /_misc/checkedout.html?id='.$iInsertID);
327 327
         }
328 328
         die();
329 329
     }
@@ -351,14 +351,14 @@  discard block
 block discarded – undo
351 351
 
352 352
         Helper::mailWrapper(
353 353
             $this->post["email"],
354
-            $this->textcats->T("shoppingcart_mail_subject") . ' ' . $iInsertID,
354
+            $this->textcats->T("shoppingcart_mail_subject").' '.$iInsertID,
355 355
             $sMailbody_they,
356 356
             $aImagesToSend,
357 357
             $aFilesToSend
358 358
         );
359 359
         Helper::mailWrapper(
360 360
             HelperConfig::$core["email_sender"],
361
-            'Bestellung im Webshop Nr: ' . $iInsertID,
361
+            'Bestellung im Webshop Nr: '.$iInsertID,
362 362
             $sMailbody_us,
363 363
             $aImagesToSend
364 364
         );
@@ -369,9 +369,9 @@  discard block
 block discarded – undo
369 369
      */
370 370
     private function writeCheckoutToFile($sMailbody_us)
371 371
     {
372
-        $fp = fopen(PATH_LOGS . 'shoplog_' . date("Y-m-d") . '.html', 'a');
372
+        $fp = fopen(PATH_LOGS.'shoplog_'.date("Y-m-d").'.html', 'a');
373 373
         // Write $somecontent to our opened file.
374
-        fwrite($fp, $sMailbody_us . "\n\n-------------------------------------------------------------------------\n\n");
374
+        fwrite($fp, $sMailbody_us."\n\n-------------------------------------------------------------------------\n\n");
375 375
         fclose($fp);
376 376
     }
377 377
 
@@ -427,8 +427,8 @@  discard block
 block discarded – undo
427 427
             'cancellationdisclaimer' => $this->getPostValue('cancellationdisclaimer'),
428 428
             'paymentmethod' => $this->getPostValue('paymentmethod'),
429 429
             'shippingcost' => (!isset($_SESSION["shippingcost"]) || $_SESSION["shippingcost"] == 0 ? false : $_SESSION["shippingcost"]),
430
-            'paypallink' => (isset($this->post["paymentmethod"]) && $this->post["paymentmethod"] == 'paypal' ?  $_SERVER["SERVER_NAME"].'/_misc/paypal.html?id='.$iId : ''),
431
-            'sofortueberweisunglink' => (isset($this->post["paymentmethod"]) && $this->post["paymentmethod"] == 'sofortueberweisung' ?  $_SERVER["SERVER_NAME"].'/_misc/sofortueberweisung.html?id='.$iId : ''),
430
+            'paypallink' => (isset($this->post["paymentmethod"]) && $this->post["paymentmethod"] == 'paypal' ? $_SERVER["SERVER_NAME"].'/_misc/paypal.html?id='.$iId : ''),
431
+            'sofortueberweisunglink' => (isset($this->post["paymentmethod"]) && $this->post["paymentmethod"] == 'sofortueberweisung' ? $_SERVER["SERVER_NAME"].'/_misc/sofortueberweisung.html?id='.$iId : ''),
432 432
             'SESSION' => (!$bCust ? Tools::debug($_SESSION, '$_SESSION', true, true) : ''),
433 433
             'POST' => (!$bCust ? Tools::debug($this->post, '$this->post', true, true) : ''),
434 434
             'orderid' => $iId,
@@ -457,15 +457,15 @@  discard block
 block discarded – undo
457 457
                 || ($this->get["msg"] == 'removed')
458 458
                 && isset($this->get["cartkey"])
459 459
             ) {
460
-                $return .= $this->textcats->T("shoppingcart_msg_" . $this->get["msg"] . "_1") . ' ';
460
+                $return .= $this->textcats->T("shoppingcart_msg_".$this->get["msg"]."_1").' ';
461 461
                 if (isset(HelperConfig::$shop["custom_order_fields"]) && mb_strpos($this->get["cartkey"], '|') !== false) {
462 462
                     $mCartkeys = explode('|', $this->get["cartkey"]);
463 463
                     foreach ($mCartkeys as $sKey => $sValue) {
464 464
                         if ($sKey == 0) {
465
-                            $return .= $sValue . ', ';
465
+                            $return .= $sValue.', ';
466 466
                         } else {
467 467
                             $TMP = explode(':', $sValue);
468
-                            $return .= $this->textcats->T("shoppingcart_item_" . $TMP[0]) . ' ' . $TMP[1] . ', ';
468
+                            $return .= $this->textcats->T("shoppingcart_item_".$TMP[0]).' '.$TMP[1].', ';
469 469
                             unset($TMP);
470 470
                         }
471 471
                     }
@@ -473,9 +473,9 @@  discard block
 block discarded – undo
473 473
                 } else {
474 474
                     $return .= $this->get["cartkey"];
475 475
                 }
476
-                $return.= ' ' . $this->textcats->T("shoppingcart_msg_" . $this->get["msg"] . "_2");
476
+                $return .= ' '.$this->textcats->T("shoppingcart_msg_".$this->get["msg"]."_2");
477 477
                 if ($this->get["msg"] == 'updated') {
478
-                    $return .= ' ' . $this->get["amount"];
478
+                    $return .= ' '.$this->get["amount"];
479 479
                 }
480 480
                 $return .= '<br><br>';
481 481
             }
Please login to merge, or discard this patch.
src/Controller/Customer/Register.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                     $iRows = $hResult->rowCount();
52 52
 
53 53
                     if ($iRows == 0) {
54
-                        $sEmailVerificationcode = md5($_POST["email"] . time());
54
+                        $sEmailVerificationcode = md5($_POST["email"].time());
55 55
                         $aData = [
56 56
                             'cust_email' => $sEmail,
57 57
                             'cust_corp' => filter_var(trim(Tools::getFormfield("corpname")),
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
                         $hResult = $this->serviceManager->get('db')->prepare($sql);
86 86
                         foreach ($aData as $sKey => $sValue) {
87
-                            $hResult->bindValue(':' . $sKey, $sValue, \PDO::PARAM_STR);
87
+                            $hResult->bindValue(':'.$sKey, $sValue, \PDO::PARAM_STR);
88 88
                         }
89 89
                         $hResult->execute();
90 90
 
Please login to merge, or discard this patch.
src/Controller/Customer/Verifyemail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                 /** @var \PDOStatement $hResult */
76 76
                 $hResult = $this->db->prepare($sql);
77 77
                 foreach ($aData as $sKey => $sValue) {
78
-                    $hResult->bindValue(':' . $sKey, $sValue);
78
+                    $hResult->bindValue(':'.$sKey, $sValue);
79 79
                 }
80 80
                 $hResult->execute();
81 81
                 $this->P->oPayload->cl_html = $this->textcats->T("register_emailverificationsuccess");
Please login to merge, or discard this patch.
src/Controller/Customer/Resendverificationmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         if (CHelper::getUserData()) {
33 33
             $this->P->oPayload->cl_html = $this->serviceManager->get('textcats')->T("denied_default");
34 34
         } else {
35
-            $sql = 'SELECT ' . DB_ADDRESSFIELDS . ', cust_emailverificationcode FROM customer';
35
+            $sql = 'SELECT '.DB_ADDRESSFIELDS.', cust_emailverificationcode FROM customer';
36 36
             $sql .= ' WHERE cust_email = :email AND cust_emailverified = \'n\'';
37 37
 
38 38
             /** @var \PDOStatement $hResult */
Please login to merge, or discard this patch.
src/Controller/Shop/Paypal.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,17 +69,17 @@
 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
-                header('Location: ' . $sPaypalURL);
77
+                header('Location: '.$sPaypalURL);
78 78
                 die();
79 79
             }
80 80
 
81
-            $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_greeting") . '<br><br>';
82
-            $this->P->oPayload->cl_html .= '<a href="' . $sPaypalURL . '">' . $this->textcats->T("misc_paypaypal") . '</a>';
81
+            $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_greeting").'<br><br>';
82
+            $this->P->oPayload->cl_html .= '<a href="'.$sPaypalURL.'">'.$this->textcats->T("misc_paypaypal").'</a>';
83 83
         } else {
84 84
             $this->P->oPayload->cl_html = $this->textcats->T("misc_paypaypal_paymentnotavailable");
85 85
         }
Please login to merge, or discard this patch.
src/Controller/Shop/Updateshippingcost.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@
 block discarded – undo
42 42
 
43 43
         header("Content-Type: text/html; charset=UTF-8");
44 44
         $return = '<div>';
45
-        $return .= '<div id="shippingcostbrutto_new">' . number_format($_SESSION["cartpricesums"]["fVersandkostenbrutto"],
45
+        $return .= '<div id="shippingcostbrutto_new">'.number_format($_SESSION["cartpricesums"]["fVersandkostenbrutto"],
46 46
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
47
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
48
-        $return .= '<div id="vatfull_new">' . number_format(round($_SESSION["cartpricesums"]["fSteuervoll"], 2),
47
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
48
+        $return .= '<div id="vatfull_new">'.number_format(round($_SESSION["cartpricesums"]["fSteuervoll"], 2),
49 49
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
50
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
51
-        $return .= '<div id="totalbrutto_new">' . number_format(round($_SESSION["cartpricesums"]["fGesamtbrutto"], 2),
50
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
51
+        $return .= '<div id="totalbrutto_new">'.number_format(round($_SESSION["cartpricesums"]["fGesamtbrutto"], 2),
52 52
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
53
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
54
-        $return .= '<div id="shippingcostnetto_new">' . number_format($_SESSION["cartpricesums"]["fVersandkostennetto"],
53
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
54
+        $return .= '<div id="shippingcostnetto_new">'.number_format($_SESSION["cartpricesums"]["fVersandkostennetto"],
55 55
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
56
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
57
-        $return .= '<div id="vatreduced_new">' . number_format(round($_SESSION["cartpricesums"]["fSteuererm"], 2),
56
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
57
+        $return .= '<div id="vatreduced_new">'.number_format(round($_SESSION["cartpricesums"]["fSteuererm"], 2),
58 58
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
59
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
60
-        $return .= '<div id="totalnetto_new">' . number_format(round($_SESSION["cartpricesums"]["fGesamtnetto"], 2),
59
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
60
+        $return .= '<div id="totalnetto_new">'.number_format(round($_SESSION["cartpricesums"]["fGesamtnetto"], 2),
61 61
                 HelperConfig::$core['numberformat_decimals'], HelperConfig::$core['numberformat_decimal_point'],
62
-                HelperConfig::$core['numberformat_thousands_seperator']) . '</div>';
62
+                HelperConfig::$core['numberformat_thousands_seperator']).'</div>';
63 63
         $return .= '</div>';
64 64
         die($return);
65 65
     }
Please login to merge, or discard this patch.
src/Controller/Shop/Sofortueberweisung.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,14 +72,14 @@
 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
-                header('Location: ' . $sPURL);
77
+                header('Location: '.$sPURL);
78 78
                 die();
79 79
             }
80 80
 
81
-            $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_greeting") . '<br><br>';
82
-            $this->P->oPayload->cl_html .= '<a href="' . $sPURL . '">' . $this->textcats->T("misc_paysofortueberweisung") . '</a>';
81
+            $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_greeting").'<br><br>';
82
+            $this->P->oPayload->cl_html .= '<a href="'.$sPURL.'">'.$this->textcats->T("misc_paysofortueberweisung").'</a>';
83 83
         } else {
84 84
             $this->P->oPayload->cl_html = $this->textcats->T("misc_paysofortueberweisung_paymentnotavailable");
85 85
         }
Please login to merge, or discard this patch.
src/Controller/Glide.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                 'cache' => PATH_GLIDECACHE,
49 49
                 'max_image_size' => HelperConfig::$core['glide_max_imagesize'],
50 50
             ]);
51
-            $glideserver->setBaseUrl('/' . HelperConfig::$core['directory_images'] . '/');
51
+            $glideserver->setBaseUrl('/'.HelperConfig::$core['directory_images'].'/');
52 52
             // Generate a URL
53 53
 
54 54
             try {
Please login to merge, or discard this patch.
src/Controller/Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         } elseif (count(HelperConfig::$secrets['admin_users'])) {
81 81
 
82 82
             if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { // fix for php cgi mode
83
-                list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)));
83
+                list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)));
84 84
             }
85 85
 
86 86
             if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
             }
97 97
 
98 98
             if (!$validated) {
99
-                header('WWW-Authenticate: Basic realm="' . HelperConfig::$secrets['admin_authrealm'] . '"');
99
+                header('WWW-Authenticate: Basic realm="'.HelperConfig::$secrets['admin_authrealm'].'"');
100 100
                 header('HTTP/1.0 401 Unauthorized');
101 101
                 die("Not authorized");
102 102
             }
103 103
         } else {
104
-            header('WWW-Authenticate: Basic realm="' . HelperConfig::$secrets['admin_authrealm'] . '"');
104
+            header('WWW-Authenticate: Basic realm="'.HelperConfig::$secrets['admin_authrealm'].'"');
105 105
             header('HTTP/1.0 401 Unauthorized');
106 106
             die('Not authorized');
107 107
         }
Please login to merge, or discard this patch.