Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/webshop/Basket.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      * @param integer $product_id Product to remove
88 88
      * @param integer $quantity   How many should be removed
89 89
      *
90
-     * @return boelean
90
+     * @return boolean
91 91
      */
92 92
     public function remove($product_id, $quantity = 1)
93 93
     {
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $this->webshop = $webshop;
59
-        $this->sql_extra = " session_id = '" . safeToDb($session_id) . "'";
59
+        $this->sql_extra = " session_id = '".safeToDb($session_id)."'";
60 60
 
61 61
         // rydder op i databasen efter fx to timer
62 62
         $clean_up_after = 2; // timer
63 63
 
64 64
         $db = new DB_Sql;
65
-        $db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL " . $clean_up_after . " HOUR) < NOW()");
65
+        $db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL ".$clean_up_after." HOUR) < NOW()");
66 66
     }
67 67
 
68 68
     /**
@@ -128,27 +128,27 @@  discard block
 block discarded – undo
128 128
         }
129 129
 
130 130
         $db->query("SELECT id, quantity FROM basket WHERE product_id = $product_id
131
-                AND product_detail_id = " . $product_detail_id . "
132
-                AND basketevaluation_product = " . $basketevaluation . "
133
-                AND " . $this->sql_extra. "
131
+                AND product_detail_id = ".$product_detail_id."
132
+                AND basketevaluation_product = " . $basketevaluation."
133
+                AND " . $this->sql_extra."
134 134
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
135 135
 
136 136
         if ($db->nextRecord()) {
137 137
             if ($quantity == 0) {
138 138
                 $db->query("DELETE FROM basket
139
-                    WHERE id = ".$db->f('id') . "
140
-                        AND basketevaluation_product = " . $basketevaluation . "
141
-                        AND " . $this->sql_extra . "
139
+                    WHERE id = ".$db->f('id')."
140
+                        AND basketevaluation_product = " . $basketevaluation."
141
+                        AND " . $this->sql_extra."
142 142
                         AND intranet_id = " . $this->webshop->kernel->intranet->get("id"));
143 143
             } else {
144 144
                 $db->query("UPDATE basket SET
145 145
                     quantity = $quantity,
146 146
                     date_changed = NOW(),
147 147
                     text = '".$text."'
148
-                    WHERE id = ".$db->f('id') . "
149
-                        AND basketevaluation_product = " . $basketevaluation . "
148
+                    WHERE id = ".$db->f('id')."
149
+                        AND basketevaluation_product = " . $basketevaluation."
150 150
 
151
-                        AND " . $this->sql_extra . "
151
+                        AND " . $this->sql_extra."
152 152
                         AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
153 153
             }
154 154
             return true;
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
                         quantity = $quantity,
159 159
                         date_changed = NOW(),
160 160
                         text = '".$text."',
161
-                        basketevaluation_product = " . $basketevaluation . ",
161
+                        basketevaluation_product = " . $basketevaluation.",
162 162
                         product_id = $product_id,
163 163
                         product_detail_id = ".$product_detail_id.",
164
-                        intranet_id = " . $this->webshop->kernel->intranet->get('id') . ",
164
+                        intranet_id = " . $this->webshop->kernel->intranet->get('id').",
165 165
                         " . $this->sql_extra);
166 166
             return true;
167 167
         }
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
         settype($input['email'], 'string');
187 187
         settype($input['phone'], 'string');
188 188
 
189
-        $sql = "name = \"".safeToDb($input['name'])."\"," .
190
-            "contactperson = \"".safeToDb($input['contactperson'])."\", " .
191
-            "address = \"".safeToDb($input['address'])."\", " .
192
-            "postcode = \"".safeToDb($input['postcode'])."\", " .
189
+        $sql = "name = \"".safeToDb($input['name'])."\",".
190
+            "contactperson = \"".safeToDb($input['contactperson'])."\", ".
191
+            "address = \"".safeToDb($input['address'])."\", ".
192
+            "postcode = \"".safeToDb($input['postcode'])."\", ".
193 193
             "city = \"".safeToDb($input['city'])."\", ".
194 194
             "country = \"".safeToDb($input['country'])."\", ".
195 195
             "cvr = \"".safeToDb($input['cvr'])."\", ".
@@ -252,13 +252,13 @@  discard block
 block discarded – undo
252 252
     {
253 253
 
254 254
         $db = new DB_Sql;
255
-        $db->query("SELECT id FROM basket_details WHERE " . $this->sql_extra. "
255
+        $db->query("SELECT id FROM basket_details WHERE ".$this->sql_extra."
256 256
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
257 257
         if ($db->nextRecord()) {
258 258
             $db->query("UPDATE basket_details SET ".$sql.",
259 259
                 date_changed = NOW()
260
-                WHERE id = ".$db->f('id') . "
261
-                    AND " . $this->sql_extra . "
260
+                WHERE id = ".$db->f('id')."
261
+                    AND " . $this->sql_extra."
262 262
                     AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
263 263
             return true;
264 264
         } else {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                     SET ".$sql.",
267 267
                         date_changed = NOW(),
268 268
                            date_created = NOW(),
269
-                        intranet_id = " . $this->webshop->kernel->intranet->get('id') . ",
269
+                        intranet_id = " . $this->webshop->kernel->intranet->get('id').",
270 270
                         " . $this->sql_extra);
271 271
 
272 272
             return true;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $db = new DB_Sql;
286 286
         $db->query("SELECT *
287 287
             FROM basket_details
288
-            WHERE " . $this->sql_extra . "
288
+            WHERE " . $this->sql_extra."
289 289
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
290 290
         if (!$db->nextRecord()) {
291 291
             return array();
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $db = new DB_Sql;
315 315
         $db->query("SELECT customer_coupon
316 316
             FROM basket_details
317
-            WHERE " . $this->sql_extra . "
317
+            WHERE " . $this->sql_extra."
318 318
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
319 319
         if (!$db->nextRecord()) {
320 320
             return array();
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         $db = new DB_Sql;
336 336
         $db->query("SELECT customer_ean
337 337
             FROM basket_details
338
-            WHERE " . $this->sql_extra . "
338
+            WHERE " . $this->sql_extra."
339 339
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
340 340
         if (!$db->nextRecord()) {
341 341
             return array();
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         $db = new DB_Sql;
357 357
         $db->query("SELECT customer_comment
358 358
             FROM basket_details
359
-            WHERE " . $this->sql_extra . "
359
+            WHERE " . $this->sql_extra."
360 360
                 AND intranet_id = " . $this->webshop->kernel->intranet->get('id'));
361 361
         if (!$db->nextRecord()) {
362 362
             return array();
@@ -379,9 +379,9 @@  discard block
 block discarded – undo
379 379
         $db = new DB_Sql;
380 380
         $db->query("SELECT *
381 381
             FROM basket
382
-            WHERE " . $this->sql_extra . "
383
-                AND product_id = " . $product_id . "
384
-                AND intranet_id = " . $this->webshop->kernel->intranet->get('id') . "
382
+            WHERE " . $this->sql_extra."
383
+                AND product_id = " . $product_id."
384
+                AND intranet_id = " . $this->webshop->kernel->intranet->get('id')."
385 385
       AND quantity > 0 LIMIT 1");
386 386
 
387 387
         if (!$db->nextRecord()) {
@@ -401,14 +401,14 @@  discard block
 block discarded – undo
401 401
         $price = 0;
402 402
 
403 403
         $db = new DB_Sql;
404
-        $db->query("SELECT product_id, quantity FROM basket WHERE " . $this->sql_extra);
404
+        $db->query("SELECT product_id, quantity FROM basket WHERE ".$this->sql_extra);
405 405
 
406 406
         while ($db->nextRecord()) {
407 407
             $product = new Product($this->webshop->kernel, $db->f("product_id"));
408 408
             if ($type == 'exclusive_vat') {
409
-                $price += $product->get('price') * $db->f("quantity");
409
+                $price += $product->get('price')*$db->f("quantity");
410 410
             } else {
411
-                $price += $product->get('price_incl_vat') * $db->f("quantity");
411
+                $price += $product->get('price_incl_vat')*$db->f("quantity");
412 412
             }
413 413
         }
414 414
 
@@ -432,9 +432,9 @@  discard block
 block discarded – undo
432 432
                 ON product.id = basket.product_id
433 433
             INNER JOIN product_detail
434 434
                 ON product.id = product_detail.product_id
435
-            WHERE " . $this->sql_extra . "
435
+            WHERE " . $this->sql_extra."
436 436
                 AND product_detail.active = 1
437
-                AND basket.intranet_id = " . $this->webshop->kernel->intranet->get("id") . "
437
+                AND basket.intranet_id = " . $this->webshop->kernel->intranet->get("id")."
438 438
                 AND basket.quantity > 0
439 439
             ");
440 440
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         $weight = 0;
443 443
 
444 444
         while ($db->nextRecord()) {
445
-            $weight += $db->f('weight') * $db->f('quantity');
445
+            $weight += $db->f('weight')*$db->f('quantity');
446 446
         }
447 447
 
448 448
         return $weight;
@@ -471,9 +471,9 @@  discard block
 block discarded – undo
471 471
                 ON product.id = basket.product_id
472 472
             INNER JOIN product_detail
473 473
                 ON product.id = product_detail.product_id
474
-            WHERE " . $this->sql_extra . "
474
+            WHERE " . $this->sql_extra."
475 475
                 AND product_detail.active = 1
476
-                AND basket.intranet_id = " . $this->webshop->kernel->intranet->get("id") . "
476
+                AND basket.intranet_id = " . $this->webshop->kernel->intranet->get("id")."
477 477
             ORDER BY product_detail.vat DESC, basket.basketevaluation_product");
478 478
 
479 479
         $i = 0;
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
 
494 494
             // basket specific
495 495
             $items[$i]['quantity'] = $db->f('quantity');
496
-            $items[$i]['totalprice'] = $db->f('quantity') * $items[$i]['price'];
497
-            $items[$i]['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['price_incl_vat'];
496
+            $items[$i]['totalprice'] = $db->f('quantity')*$items[$i]['price'];
497
+            $items[$i]['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['price_incl_vat'];
498 498
 
499 499
             $i++;
500 500
         }
@@ -511,10 +511,10 @@  discard block
 block discarded – undo
511 511
     public function removeEvaluationProducts()
512 512
     {
513 513
         $db = new DB_Sql;
514
-        $db->query("DELETE FROM basket " .
515
-                "WHERE basketevaluation_product = 1 " .
516
-                    "AND " . $this->sql_extra . " " .
517
-                    "AND intranet_id = " . $this->webshop->kernel->intranet->get("id"));
514
+        $db->query("DELETE FROM basket ".
515
+                "WHERE basketevaluation_product = 1 ".
516
+                    "AND ".$this->sql_extra." ".
517
+                    "AND intranet_id = ".$this->webshop->kernel->intranet->get("id"));
518 518
         return true;
519 519
 
520 520
     }
@@ -527,8 +527,8 @@  discard block
 block discarded – undo
527 527
     public function reset()
528 528
     {
529 529
         $db = new DB_Sql;
530
-        $db->query("UPDATE basket SET session_id = '' WHERE " . $this->sql_extra . " AND intranet_id = " . $this->webshop->kernel->intranet->get("id"));
531
-        $db->query("UPDATE basket_details SET session_id = '' WHERE " . $this->sql_extra . " AND intranet_id = " . $this->webshop->kernel->intranet->get("id"));
530
+        $db->query("UPDATE basket SET session_id = '' WHERE ".$this->sql_extra." AND intranet_id = ".$this->webshop->kernel->intranet->get("id"));
531
+        $db->query("UPDATE basket_details SET session_id = '' WHERE ".$this->sql_extra." AND intranet_id = ".$this->webshop->kernel->intranet->get("id"));
532 532
 
533 533
         return true;
534 534
     }
Please login to merge, or discard this patch.
src/Intraface/modules/webshop/BasketEvaluation.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -112,6 +112,9 @@
 block discarded – undo
112 112
         return true;
113 113
     }
114 114
 
115
+    /**
116
+     * @param Struct $input
117
+     */
115 118
     function validate($input)
116 119
     {
117 120
         $validator = new Intraface_Validator($this->error);
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -153,15 +153,15 @@
 block discarded – undo
153 153
         }
154 154
 
155 155
         $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
156
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
164
-                 "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
156
+                    "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
+                    "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
+                    "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
+                    "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
+                    "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
+                    "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
+                    "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
+                    "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
164
+                    "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
165 165
 
166 166
         if ($this->id != 0) {
167 167
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             die($this->db->getMessage());
56 56
         }
57 57
 
58
-        $this->value['settings'] = array (
58
+        $this->value['settings'] = array(
59 59
             'evaluate_target' => array(
60 60
                 0 => 'price',
61 61
                 1 => 'weight',
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->kernel->intranet->get('id'), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
95 95
 
96 96
         if (PEAR::isError($result)) {
97
-            throw new Exception($result->getMessage() . $result->getUserInfo());
97
+            throw new Exception($result->getMessage().$result->getUserInfo());
98 98
         }
99 99
 
100 100
         if ($result->numRows() == 0) {
@@ -152,35 +152,35 @@  discard block
 block discarded – undo
152 152
             return false;
153 153
         }
154 154
 
155
-        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
156
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
155
+        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", ".
156
+                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", ".
157
+                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", ".
158
+                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", ".
159
+                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", ".
160
+                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", ".
161
+                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", ".
162
+                 "action_value = ".$this->db->quote($input['action_value'], 'text').", ".
163
+                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", ".
164 164
                  "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
165 165
 
166 166
         if ($this->id != 0) {
167 167
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
168 168
 
169 169
             if (PEAR::isError($result)) {
170
-                throw new Exception($result->getMessage() . $result->getUserInfo());
170
+                throw new Exception($result->getMessage().$result->getUserInfo());
171 171
                 return false;
172 172
             }
173 173
         } else {
174 174
             $result = $this->db->query("INSERT INTO webshop_basket_evaluation SET ".$sql.", intranet_id = ".$this->kernel->intranet->get('id').", id = ".$this->id);
175 175
 
176 176
             if (PEAR::isError($result)) {
177
-                throw new Exception($result->getMessage() . $result->getUserInfo());
177
+                throw new Exception($result->getMessage().$result->getUserInfo());
178 178
                 return false;
179 179
             }
180 180
 
181 181
             $this->id = $this->db->lastInsertID();
182 182
             if (PEAR::isError($this->id)) {
183
-                throw new Exception($result->getMessage() . $result->getUserInfo());
183
+                throw new Exception($result->getMessage().$result->getUserInfo());
184 184
             }
185 185
         }
186 186
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         $result = $this->db->exec("UPDATE webshop_basket_evaluation SET active = 0 WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
198 198
         if (PEAR::isError($result)) {
199
-            throw new Exception($result->getMessage() . $result->getUserInfo());
199
+            throw new Exception($result->getMessage().$result->getUserInfo());
200 200
             return false;
201 201
         }
202 202
         return true;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->kernel->intranet->get('id').' ORDER BY running_index');
213 213
 
214 214
         if (PEAR::isError($this->id)) {
215
-            throw new Exception($result->getMessage() . $result->getUserInfo());
215
+            throw new Exception($result->getMessage().$result->getUserInfo());
216 216
         }
217 217
 
218 218
         $i = 0;
Please login to merge, or discard this patch.
src/Intraface/modules/webshop/Webshop.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * Construktor
55 55
      *
56
-     * @param object $kernel     Kernel object
56
+     * @param Intraface_Kernel $kernel     Kernel object
57 57
      * @param string $session_id Unikt session id
58 58
      *
59 59
      * @return void
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     /**
80 80
      * Convenience method to create the basket
81 81
      *
82
-     * @return object
82
+     * @return Basket
83 83
      */
84 84
     private function createBasket()
85 85
     {
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
      * @param integer $order_id
326 326
      * @param integer $transaction_number
327 327
      * @param integer $transaction_status
328
-     * @param float   $transaction_amount
328
+     * @param integer $amount
329 329
      *
330
-     * @return boolean
330
+     * @return integer
331 331
      */
332 332
     public function addOnlinePayment($order_id, $transaction_number, $transaction_status, $amount)
333 333
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
             if ($value['message'] != '') {
187 187
                 $value['message'] .= "\n\n";
188 188
             }
189
-            $value['message'] .= "Kundekupon:". $input['customer_coupon'];
189
+            $value['message'] .= "Kundekupon:".$input['customer_coupon'];
190 190
         }
191 191
 
192 192
         if (isset($input['customer_comment']) && $input['customer_comment'] != '') {
193 193
             if ($value['message'] != '') {
194 194
                 $value['message'] .= "\n\n";
195 195
             }
196
-            $value['message'] .= "Kommentar:\n". $input['customer_comment'];
196
+            $value['message'] .= "Kommentar:\n".$input['customer_comment'];
197 197
         }
198 198
 
199 199
 
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
         $email = new Email($this->kernel);
302 302
 
303 303
         if (!$email->save(array('contact_id' => $this->contact->get('id'),
304
-                                'subject' => 'Bekræftelse på bestilling #' . $order_id,
305
-                                'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text') . "\n" . $this->contact->getLoginUrl() . "\n\nVenlig hilsen\n" . $this->kernel->intranet->address->get('name'),
304
+                                'subject' => 'Bekræftelse på bestilling #'.$order_id,
305
+                                'body' => $this->kernel->setting->get('intranet', 'webshop.confirmation_text')."\n".$this->contact->getLoginUrl()."\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name'),
306 306
                                 'from_email' => $this->kernel->intranet->address->get('email'),
307 307
                                 'from_name' => $this->kernel->intranet->address->get('name'),
308 308
                                 'type_id' => 12, // webshop
Please login to merge, or discard this patch.
src/Intraface/Redirect.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     /**
143 143
      * Creates a redirect object on the go page
144 144
      *
145
-     * @param object $kernel kernel
145
+     * @param FakeRedirectKernel $kernel kernel
146 146
      * @param string $query_variable the variable used in the querystring for going to the redirect page
147 147
      * @param string $query_return_variable the variable  used in the querystring when returning from the redirect page.
148 148
      *
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      * @param string $query_variable the variable used in the querystring for going to the redirect page
192 192
      * @param string $query_return_variable the variable  used in the querystring when returning from the redirect page.
193 193
      *
194
-     * @return object
194
+     * @return string
195 195
      */
196 196
     static function factory($kernel, $type, $query_variable = 'redirect_id', $query_return_variable = 'return_redirect_id')
197 197
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     public function __construct($kernel, $id = 0)
132 132
     {
133 133
         $options = array(
134
-             'extra_db_condition' => array('intranet_id = '.$kernel->intranet->get('id'))
134
+                'extra_db_condition' => array('intranet_id = '.$kernel->intranet->get('id'))
135 135
         );
136 136
 
137 137
         $db = MDB2::singleton(DB_DSN);
Please login to merge, or discard this patch.
src/Intraface/Setting.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -115,6 +115,7 @@
 block discarded – undo
115 115
      * @param string  $type    Can be either system, intranet, user
116 116
      * @param string  $setting The actual setting
117 117
      * @param integer $sub_id  @todo What is this exactly
118
+     * @param integer $value
118 119
      *
119 120
      * @return boolean
120 121
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         global $_setting;
55 55
 
56
-        require_once dirname(__FILE__) . '/config/setting_kernel.php';
56
+        require_once dirname(__FILE__).'/config/setting_kernel.php';
57 57
 
58 58
         $this->db = new DB_Sql;
59 59
         $this->system = &$_setting; // don't remove the & - otherwise it will not work
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     private function loadSettings()
171 171
     {
172 172
         $this->settings = array();
173
-        $this->db->query("SELECT setting, value, sub_id, user_id FROM setting WHERE intranet_id = " . $this->db->quote($this->intranet_id, 'integer')." AND (user_id = ".$this->db->quote($this->user_id, 'integer')." OR user_id = 0)");
173
+        $this->db->query("SELECT setting, value, sub_id, user_id FROM setting WHERE intranet_id = ".$this->db->quote($this->intranet_id, 'integer')." AND (user_id = ".$this->db->quote($this->user_id, 'integer')." OR user_id = 0)");
174 174
         while ($this->db->nextRecord()) {
175 175
             $this->settings[$this->intranet_id][$this->db->f('user_id')][$this->db->f('setting')][$this->db->f('sub_id')] = $this->db->f('value');
176 176
         }
Please login to merge, or discard this patch.
src/Intraface/shared/keyword/Keyword.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
     /**
273 273
      * Adds keyword to object
274 274
      *
275
-     * @param integer $keyword_id
275
+     * @param integer $keyword
276 276
      *
277 277
      * @return boolean
278 278
      */
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $condition['keyword.type'] = $this->type;
64 64
 
65 65
         foreach ($condition as $column => $value) {
66
-            $c[] = $column . " = '" . $value . "'";
66
+            $c[] = $column." = '".$value."'";
67 67
         }
68 68
 
69 69
         $db = new DB_Sql;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $condition['active'] = 1;
128 128
 
129 129
         foreach ($condition as $column => $value) {
130
-            $c[] = $column . " = '" . $value . "'";
130
+            $c[] = $column." = '".$value."'";
131 131
         }
132 132
 
133 133
         $db = new DB_Sql;
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
             $condition['type'] = $this->type;
149 149
 
150 150
             foreach ($condition as $column => $value) {
151
-                $c[] = $column . " = '" . $value . "'";
151
+                $c[] = $column." = '".$value."'";
152 152
             }
153 153
 
154 154
             $sql_type = 'UPDATE ';
155
-            $sql_end = ' WHERE ' . implode(' AND ', $c);
155
+            $sql_end = ' WHERE '.implode(' AND ', $c);
156 156
         } else {
157 157
             $c = array();
158 158
             $condition = array();
@@ -160,14 +160,14 @@  discard block
 block discarded – undo
160 160
             $condition['type'] = $this->type;
161 161
 
162 162
             foreach ($condition as $column => $value) {
163
-                $c[] = $column . " = '" . $value . "'";
163
+                $c[] = $column." = '".$value."'";
164 164
             }
165 165
 
166 166
             $sql_type = "INSERT INTO ";
167
-            $sql_end = ", " . implode(', ', $c);
167
+            $sql_end = ", ".implode(', ', $c);
168 168
         }
169 169
 
170
-        $sql = $sql_type . "keyword SET keyword = '".$var['keyword']."'" . $sql_end;
170
+        $sql = $sql_type."keyword SET keyword = '".$var['keyword']."'".$sql_end;
171 171
         $db->query($sql);
172 172
 
173 173
         if ($this->id == 0) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $condition['id'] = $this->id;
193 193
         $condition['type'] = $this->type;
194 194
         foreach ($condition as $column => $value) {
195
-            $c[] = $column . " = '" . $value . "'";
195
+            $c[] = $column." = '".$value."'";
196 196
         }
197 197
 
198 198
         $db = new DB_Sql;
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
         $condition['keyword.type'] = $this->type;
216 216
         $condition['keyword.active'] = 1;
217 217
         foreach ($condition as $column => $value) {
218
-            $c[] = $column . " = '" . $value . "'";
218
+            $c[] = $column." = '".$value."'";
219 219
         }
220 220
 
221 221
         $sql = "SELECT * FROM keyword
222
-            WHERE " . implode(' AND ', $c) . "
222
+            WHERE " . implode(' AND ', $c)."
223 223
             ORDER BY keyword ASC";
224 224
         $db = new DB_Sql;
225 225
         $db->query($sql);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
284 284
 
285 285
         foreach ($condition as $column => $value) {
286
-            $c[] = $column . " = '" . $value . "'";
286
+            $c[] = $column." = '".$value."'";
287 287
         }
288 288
 
289 289
         $sql = "SELECT * FROM keyword_x_object
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $condition['keyword.active'] = 1;
334 334
 
335 335
         foreach ($condition as $column => $value) {
336
-            $c[] = $column . " = '" . $value . "'";
336
+            $c[] = $column." = '".$value."'";
337 337
         }
338 338
 
339 339
         $db = new DB_Sql;
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             FROM keyword_x_object x
342 342
             INNER JOIN keyword keyword
343 343
                 ON x.keyword_id = keyword.id
344
-            WHERE " . implode(' AND ', $c) . "
344
+            WHERE " . implode(' AND ', $c)."
345 345
             ORDER BY keyword ASC");
346 346
 
347 347
         $i = 0;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
375 375
 
376 376
         foreach ($condition as $column => $value) {
377
-            $c[] = $column . " = '" . $value . "'";
377
+            $c[] = $column." = '".$value."'";
378 378
         }
379 379
 
380 380
         $db = new DB_Sql;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
                 FROM keyword_x_object
383 383
                 INNER JOIN keyword
384 384
                     ON keyword_x_object.keyword_id = keyword.id
385
-                WHERE " . implode(' AND ', $c) . " AND keyword.keyword != ''
385
+                WHERE " . implode(' AND ', $c)." AND keyword.keyword != ''
386 386
                 ORDER BY keyword.keyword";
387 387
         $db->query($sql);
388 388
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
415 415
 
416 416
         foreach ($condition as $column => $value) {
417
-            $c[] = $column . " = '" . $value . "'";
417
+            $c[] = $column." = '".$value."'";
418 418
         }
419 419
 
420 420
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         $result = array();
503 503
 
504 504
         while (list($arg, $val) = each($getstrings)) {
505
-            if ($instring==1) {
505
+            if ($instring == 1) {
506 506
                 //Add the whole string, untouched to the result array.
507 507
                 if (!empty($val)) {
508 508
                     $result[] = $val;
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
             } else {
512 512
                 //Break up the string according to the delimiter character
513 513
                 //Each string has extraneous delimiters around it (inc the ones we added above), so they need to be stripped off
514
-                $temparray = explode($splitter, substr($val, $delimlen, strlen($val)-$delimlen-$delimlen));
514
+                $temparray = explode($splitter, substr($val, $delimlen, strlen($val) - $delimlen - $delimlen));
515 515
 
516 516
                 while (list($iarg, $ival) = each($temparray)) {
517 517
                     if (!empty($ival)) {
Please login to merge, or discard this patch.
src/Intraface/User.php 2 patches
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Load
106 106
      *
107
-     * @return void
107
+     * @return integer
108 108
      */
109 109
     protected function load()
110 110
     {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      * @param integer $module
257 257
      * @param integer $intranet_id
258 258
      *
259
-     * @return integer
259
+     * @return boolean
260 260
      */
261 261
     public function hasModuleAccess($module, $intranet_id = 0)
262 262
     {
@@ -459,6 +459,7 @@  discard block
 block discarded – undo
459 459
     /**
460 460
      * Sets active intranet_id
461 461
      *
462
+     * @param integer $id
462 463
      * @return boolean
463 464
      */
464 465
     public function setActiveIntranetId($id)
@@ -500,7 +501,7 @@  discard block
 block discarded – undo
500 501
      *
501 502
      * @param array $input
502 503
      *
503
-     * @return boolean
504
+     * @return boolean|null
504 505
      */
505 506
     protected function validate(&$input)
506 507
     {
@@ -553,6 +554,9 @@  discard block
 block discarded – undo
553 554
         return true;
554 555
     }
555 556
 
557
+    /**
558
+     * @param string $email
559
+     */
556 560
     function generateNewPassword($email)
557 561
     {
558 562
         if (!Validate::email($email)) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $this->error       = $this->getError();
86 86
 
87 87
         if (PEAR::isError($this->db)) {
88
-            throw new Exception($this->db->getMessage() . $this->db->getUserInfo());
88
+            throw new Exception($this->db->getMessage().$this->db->getUserInfo());
89 89
         }
90 90
 
91 91
         if ($this->id > 0) {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     protected function load()
110 110
     {
111
-        $result = $this->db->query("SELECT id, email, disabled FROM user WHERE id = " . $this->db->quote($this->id, 'integer'));
111
+        $result = $this->db->query("SELECT id, email, disabled FROM user WHERE id = ".$this->db->quote($this->id, 'integer'));
112 112
 
113 113
         if (PEAR::isError($result)) {
114 114
             throw new Exception($result->getUserInfo());
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         if (!empty($this->modules[$module])) {
201 201
             return $module_id = $this->modules[$module];
202 202
         } else {
203
-            throw new Exception('user says unknown module ' . $module);
203
+            throw new Exception('user says unknown module '.$module);
204 204
         }
205 205
     }
206 206
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     public function hasModuleAccess($module, $intranet_id = 0)
262 262
     {
263
-        $filename = PATH_INCLUDE_MODULE . $module . '/Main' . ucfirst($module) . '.php';
263
+        $filename = PATH_INCLUDE_MODULE.$module.'/Main'.ucfirst($module).'.php';
264 264
         if (file_exists($filename)) {
265 265
             require_once $filename;
266 266
             $module_class = 'Main'.ucfirst($module);
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     {
466 466
         $id = intval($id);
467 467
         if ($this->hasIntranetAccess($id)) {
468
-            $this->db->exec("UPDATE user SET active_intranet_id = ". $this->db->quote($id, 'integer')." WHERE id = ". $this->db->quote($this->get('id'), 'integer'));
468
+            $this->db->exec("UPDATE user SET active_intranet_id = ".$this->db->quote($id, 'integer')." WHERE id = ".$this->db->quote($this->get('id'), 'integer'));
469 469
             return $id;
470 470
         }
471 471
         return false;
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
         $row = $result->fetchRow(MDB2_FETCHMODE_ASSOC);
570 570
         $new_password = Intraface_Kernel::randomKey(8);
571 571
 
572
-        $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =" . $row['id']);
572
+        $db->exec("UPDATE user SET password = '".md5($new_password)."' WHERE id =".$row['id']);
573 573
 
574 574
         return $new_password;
575 575
     }
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
             return false;
581 581
         }
582 582
 
583
-        $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = " . $this->get('id'));
583
+        $result = $this->db->query("SELECT * FROM user WHERE password = '".safeToDb(md5($old_password))."' AND id = ".$this->get('id'));
584 584
         if ($result->numRows() < 1) {
585 585
             $this->error->set('error in old password');
586 586
         }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
             return false;
597 597
         }
598 598
 
599
-        $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = " . $this->get('id'));
599
+        $this->db->query("UPDATE user SET password = '".safeToDb(md5($new_password))."' WHERE id = ".$this->get('id'));
600 600
 
601 601
         return true;
602 602
 
Please login to merge, or discard this patch.
src/Intraface/Weblogin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Constructor
27 27
      *
28
-     * @param $session_id Session id
28
+     * @param string $session_id Session id
29 29
      * @param $intranet   Intranet
30 30
      *
31 31
      * @return void
Please login to merge, or discard this patch.
src/Intraface/XMLRPC/Shop/Server.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      * @param string  $text              Extra text to the itemline
261 261
      * @param integer $product_detail_id Product detail id
262 262
      *
263
-     * @return mixed
263
+     * @return boolean
264 264
      */
265 265
     public function changeProductInBasket($credentials, $product_id, $quantity, $text = '', $product_detail_id = 0)
266 266
     {
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
      *
608 608
      * @param struct $credentials Credentials to use the server
609 609
      *
610
-     * @return array
610
+     * @return boolean
611 611
      */
612 612
     private function checkCredentials($credentials)
613 613
     {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         return $product->getRelatedProducts();
155 155
     }
156 156
 
157
-   /**
157
+    /**
158 158
      * Gets featured products
159 159
      *
160 160
      * Method is experimental and only used by discimport.dk. If you need to use it
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
     }
201 201
 
202
-   /**
202
+    /**
203 203
      * Gets product keywords which can be used to sort ones webshop
204 204
      *
205 205
      * Method is experimental and only used by nylivsstil.dk. If you need to use it
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -57,34 +57,34 @@  discard block
 block discarded – undo
57 57
 
58 58
 
59 59
         // sublevel has to be used so other searches are not overwritten
60
-        $product->getDBQuery()->storeResult('use_stored', 'webshop_' . $area . '_' .  md5($this->credentials['session_id']), 'sublevel');
60
+        $product->getDBQuery()->storeResult('use_stored', 'webshop_'.$area.'_'.md5($this->credentials['session_id']), 'sublevel');
61 61
         $debug2 = serialize($mixed);
62 62
         if (isset($mixed['offset']) and array_key_exists('offset', $mixed) and is_numeric($mixed['offset'])) {
63 63
             $product->getDBQuery()->useStored(true);
64 64
             $product->getDBQuery()->setPagingOffset((int)$mixed['offset']);
65
-            $debug2 .= 'offset ' . $mixed['offset'];
65
+            $debug2 .= 'offset '.$mixed['offset'];
66 66
         } elseif (isset($mixed['use_stored']) and array_key_exists('use_stored', $mixed) and $mixed['use_stored'] == 'true') {
67 67
             $product->getDBQuery()->useStored(true);
68 68
             $debug2 .= 'use_stored true';
69 69
         } else {
70 70
             if (isset($mixed['search']) and array_key_exists('search', $mixed) and !empty($mixed['search'])) {
71 71
                 $product->getDBQuery()->setFilter('search', $mixed['search']);
72
-                $debug2 .= 'search ' . $mixed['search'];
72
+                $debug2 .= 'search '.$mixed['search'];
73 73
             }
74 74
 
75 75
             if (isset($mixed['keywords']) and array_key_exists('keywords', $mixed) and !empty($mixed['keywords'])) {
76 76
                 $product->getDBQuery()->setFilter('keywords', $mixed['keywords']);
77
-                $debug2 .= 'keyword ' . $mixed['keywords'];
77
+                $debug2 .= 'keyword '.$mixed['keywords'];
78 78
             }
79 79
 
80 80
             if (isset($mixed['ids']) and array_key_exists('ids', $mixed) and is_array($mixed['ids'])) {
81 81
                 $product->getDBQuery()->setFilter('ids', $mixed['ids']);
82
-                $debug2 .= 'ids ' . implode(', ', $mixed['ids']);
82
+                $debug2 .= 'ids '.implode(', ', $mixed['ids']);
83 83
             }
84 84
 
85 85
             if (isset($mixed['sorting']) and array_key_exists('sorting', $mixed) and !empty($mixed['sorting'])) {
86 86
                 $product->getDBQuery()->setFilter('sorting', $mixed['sorting']);
87
-                $debug2 .= 'sorting ' . $mixed['sorting'];
87
+                $debug2 .= 'sorting '.$mixed['sorting'];
88 88
             }
89 89
         }
90 90
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         if (PEAR::isError($db)) {
178 178
             require_once 'XML/RPC2/Exception.php';
179
-            throw new XML_RPC2_FaultException($db->getMessage() . $db->getUserInfo(), -1);
179
+            throw new XML_RPC2_FaultException($db->getMessage().$db->getUserInfo(), -1);
180 180
         }
181 181
 
182 182
         $featured = new Intraface_Webshop_FeaturedProducts($this->kernel->intranet, $db);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         if (!$order_id = $this->webshop->placeOrder($values)) {
349 349
             require_once 'XML/RPC2/Exception.php';
350
-            throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
350
+            throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
351 351
         }
352 352
 
353 353
         return $order_id;
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
         if (!$payment_id = $onlinepayment->save($values)) {
386 386
             require_once 'XML/RPC2/Exception.php';
387
-            throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4);
387
+            throw new XML_RPC2_FaultException('Onlinebetaling kunne ikke blive gemt'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4);
388 388
         }
389 389
 
390 390
         return $payment_id;
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
         if (!$payment_id = $onlinepayment->create()) {
417 417
             require_once 'XML/RPC2/Exception.php';
418
-            throw new XML_RPC2_FaultException('onlinepayment could not be created' . strtolower(implode(', ', $onlinepayment->error->getMessage())), -4);
418
+            throw new XML_RPC2_FaultException('onlinepayment could not be created'.strtolower(implode(', ', $onlinepayment->error->getMessage())), -4);
419 419
         }
420 420
 
421 421
         return $payment_id;
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 
445 445
         if (!$this->webshop->basket->saveAddress($values)) {
446 446
             require_once 'XML/RPC2/Exception.php';
447
-            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
447
+            throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
448 448
         }
449 449
 
450 450
         return true;
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
         $customer_coupon = $this->utf8Decode($customer_coupon);
484 484
         if (!$this->webshop->basket->saveCustomerCoupon($customer_coupon)) {
485 485
             require_once 'XML/RPC2/Exception.php';
486
-            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
486
+            throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
487 487
         }
488 488
 
489 489
         return true;
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
         $customer_ean = $this->utf8Decode($customer_ean);
524 524
         if (!$this->webshop->basket->saveCustomerEan($customer_ean)) {
525 525
             require_once 'XML/RPC2/Exception.php';
526
-            throw new XML_RPC2_FaultException('ean could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
526
+            throw new XML_RPC2_FaultException('ean could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
527 527
         }
528 528
 
529 529
         return true;
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
         $customer_comment = $this->utf8Decode($customer_comment);
564 564
         if (!$this->webshop->basket->saveCustomerComment($customer_comment)) {
565 565
             require_once 'XML/RPC2/Exception.php';
566
-            throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
566
+            throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4);
567 567
         }
568 568
 
569 569
         return true;
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 
616 616
         if (count($credentials) != 2) { // -4
617 617
             require_once 'XML/RPC2/Exception.php';
618
-            throw new XML_RPC2_FaultException('wrong argument count in $credentials - got ' . count($credentials) . ' arguments - need 2', -4);
618
+            throw new XML_RPC2_FaultException('wrong argument count in $credentials - got '.count($credentials).' arguments - need 2', -4);
619 619
         }
620 620
         if (empty($credentials['private_key'])) { // -5
621 621
             require_once 'XML/RPC2/Exception.php';
Please login to merge, or discard this patch.