Completed
Push — master ( 6ed6e7...ca5679 )
by Lars
26:16 queued 07:58
created
src/Intraface/modules/product/Variation/Detail.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @param object Product
77 77
      *
78
-     * @return object Ilib_Variable_Float with price
78
+     * @return Ilib_Variable_Float Ilib_Variable_Float with price
79 79
      */
80 80
     public function getPrice($product)
81 81
     {
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
      * @todo Product should not be given as parameter, but defined as relation. Product needs to be made in doctrine
93 93
      *
94 94
      * @param object $currency Intraface_modules_currency_Currency
95
-     * @param integer $exchange_rage_id
95
+     * @param integer $exchange_rate_id
96 96
      * @param object $product Product
97 97
      *
98
-     * @return obejct Ilib_Variable_Float with price of the variation in given currency
98
+     * @return Ilib_Variable_Float Ilib_Variable_Float with price of the variation in given currency
99 99
      */
100 100
     public function getPriceInCurrency($currency, $exchange_rate_id = 0, $product)
101 101
     {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @param object $product Product
111 111
      *
112
-     * @return object Ilib_Variable_Float with price including vat
112
+     * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat
113 113
      */
114 114
     public function getPriceIncludingVat($product)
115 115
     {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      * @param integer $exchange_rate_id
130 130
      * @param object product Product
131 131
      *
132
-     * @return object Ilib_Variable_Float with price including vat in given currency
132
+     * @return Ilib_Variable_Float Ilib_Variable_Float with price including vat in given currency
133 133
      */
134 134
     public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id, $product)
135 135
     {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      *
144 144
      * @param object Product
145 145
      *
146
-     * @return object Ilib_Variable_Float with price
146
+     * @return Ilib_Variable_Float Ilib_Variable_Float with price
147 147
      */
148 148
     public function getWeight($product)
149 149
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function getPriceInCurrency($currency, $exchange_rate_id = 0, $product)
101 101
     {
102
-        return new Ilib_Variable_Float(round($this->getPrice($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100), 2));
102
+        return new Ilib_Variable_Float(round($this->getPrice($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100), 2));
103 103
     }
104 104
 
105 105
     /**
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
     public function getPriceIncludingVat($product)
115 115
     {
116 116
         if (get_class($product) == 'Intraface_modules_product_ProductDoctrine') {
117
-            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2) * (1 + $product->getDetails()->getVatPercent()->getAsIso()/100));
117
+            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2)*(1 + $product->getDetails()->getVatPercent()->getAsIso()/100));
118 118
         } else {
119
-            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2) * (1 + $product->get('vat_percent')/100));
119
+            return new Ilib_Variable_Float($this->getPrice($product)->getAsIso(2)*(1 + $product->get('vat_percent')/100));
120 120
         }
121 121
     }
122 122
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function getPriceIncludingVatInCurrency($currency, $exchange_rate_id, $product)
135 135
     {
136
-        return new Ilib_Variable_Float($this->getPriceIncludingVat($product)->getAsIso() / ($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso() / 100));
136
+        return new Ilib_Variable_Float($this->getPriceIncludingVat($product)->getAsIso()/($currency->getProductPriceExchangeRate((int)$exchange_rate_id)->getRate()->getAsIso()/100));
137 137
     }
138 138
 
139 139
     /**
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Basket.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      *
55 55
      * @param object $db         The webshop object
56 56
      * @param object $intranet   The webshop object
57
-     * @param object $webshop    The webshop object
57
+     * @param object $shop    The webshop object
58 58
      * @param string $session_id A session id
59 59
      *
60 60
      * @return void
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @param integer $product_id Product to remove
105 105
      * @param integer $quantity   How many should be removed
106 106
      *
107
-     * @return boelean
107
+     * @return boolean
108 108
      */
109 109
     public function remove($product_id, $product_variation_id = 0, $quantity = 1)
110 110
     {
@@ -122,6 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param integer $quantity         The quantity
123 123
      * @param string  $text             To add description to product, not yet implemented
124 124
      * @param integer $basketevaluation Wheter the product is from basketevaluation
125
+     * @param integer $product_variation_id
125 126
      *
126 127
      * @return boolean
127 128
      */
@@ -530,7 +531,7 @@  discard block
 block discarded – undo
530 531
     /**
531 532
      * Gets the total weight of the basket
532 533
      *
533
-     * @return float
534
+     * @return integer
534 535
      */
535 536
     public function getTotalWeight()
536 537
     {
Please login to merge, or discard this patch.
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
         $this->resetItemCache();
70 70
 
71 71
         $this->conditions = array(
72
-            'session_id = ' . $this->db->quote($this->session_id, 'text'),
73
-            'shop_id = ' . $this->db->quote($this->webshop->getId(), 'integer'),
74
-            'intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer'));
72
+            'session_id = '.$this->db->quote($this->session_id, 'text'),
73
+            'shop_id = '.$this->db->quote($this->webshop->getId(), 'integer'),
74
+            'intranet_id = '.$this->db->quote($this->intranet->getId(), 'integer'));
75 75
 
76 76
         $this->cleanUp();
77 77
     }
78 78
 
79 79
     private function cleanUp()
80 80
     {
81
-        return $this->db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL " . $this->db->quote(self::CLEAN_UP_AFTER, 'integer') . " HOUR) < NOW()");
81
+        return $this->db->query("DELETE FROM basket WHERE DATE_ADD(date_changed, INTERVAL ".$this->db->quote(self::CLEAN_UP_AFTER, 'integer')." HOUR) < NOW()");
82 82
     }
83 83
 
84 84
     /**
@@ -165,23 +165,23 @@  discard block
 block discarded – undo
165 165
                 FROM basket
166 166
                 WHERE product_id = ".$product_id."
167 167
                     AND product_variation_id = ".$product_variation_id."
168
-                    AND product_detail_id = " . $product_detail_id . "
169
-                    AND basketevaluation_product = " . $basketevaluation . "
168
+                    AND product_detail_id = " . $product_detail_id."
169
+                    AND basketevaluation_product = " . $basketevaluation."
170 170
                     AND " . $sql_extra);
171 171
 
172 172
         if ($db->nextRecord()) {
173 173
             if ($quantity == 0) {
174 174
                 $db->query("DELETE FROM basket
175
-                    WHERE id = ".$db->f('id') . "
176
-                        AND basketevaluation_product = " . $basketevaluation . "
175
+                    WHERE id = ".$db->f('id')."
176
+                        AND basketevaluation_product = " . $basketevaluation."
177 177
                         AND " . $sql_extra);
178 178
             } else {
179 179
                 $db->query("UPDATE basket SET
180 180
                     quantity = $quantity,
181 181
                     date_changed = NOW(),
182 182
                     text = '".$text."'
183
-                    WHERE id = ".$db->f('id') . "
184
-                        AND basketevaluation_product = " . $basketevaluation . "
183
+                    WHERE id = ".$db->f('id')."
184
+                        AND basketevaluation_product = " . $basketevaluation."
185 185
                         AND " . $sql_extra);
186 186
             }
187 187
             return true;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                         quantity = $quantity,
193 193
                         date_changed = NOW(),
194 194
                         text = '".$text."',
195
-                        basketevaluation_product = " . $basketevaluation . ",
195
+                        basketevaluation_product = " . $basketevaluation.",
196 196
                         product_id = ".$product_id.",
197 197
                         product_variation_id = ".$product_variation_id.",
198 198
                         product_detail_id = ".$product_detail_id.",
@@ -220,10 +220,10 @@  discard block
 block discarded – undo
220 220
         settype($input['email'], 'string');
221 221
         settype($input['phone'], 'string');
222 222
 
223
-        $sql = "name = \"".safeToDb($input['name'])."\"," .
224
-            "contactperson = \"".safeToDb($input['contactperson'])."\", " .
225
-            "address = \"".safeToDb($input['address'])."\", " .
226
-            "postcode = \"".safeToDb($input['postcode'])."\", " .
223
+        $sql = "name = \"".safeToDb($input['name'])."\",".
224
+            "contactperson = \"".safeToDb($input['contactperson'])."\", ".
225
+            "address = \"".safeToDb($input['address'])."\", ".
226
+            "postcode = \"".safeToDb($input['postcode'])."\", ".
227 227
             "city = \"".safeToDb($input['city'])."\", ".
228 228
             "country = \"".safeToDb($input['country'])."\", ".
229 229
             "cvr = \"".safeToDb($input['cvr'])."\", ".
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
         $sql_extra = implode(" AND ", $this->conditions);
306 306
 
307 307
         $db = new DB_Sql;
308
-        $db->query("SELECT id FROM basket_details WHERE " . $sql_extra. "
308
+        $db->query("SELECT id FROM basket_details WHERE ".$sql_extra."
309 309
                 AND intranet_id = " . $this->intranet->getId());
310 310
         if ($db->nextRecord()) {
311 311
             $db->query("UPDATE basket_details SET ".$sql.",
312 312
                 date_changed = NOW()
313
-                WHERE id = ".$db->f('id') . "
314
-                    AND " . $sql_extra . "
313
+                WHERE id = ".$db->f('id')."
314
+                    AND " . $sql_extra."
315 315
                     AND intranet_id = " . $this->intranet->getId());
316 316
             return true;
317 317
         } else {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $db = new DB_Sql;
340 340
         $db->query("SELECT *
341 341
             FROM basket_details
342
-            WHERE " . $sql_extra . "
342
+            WHERE " . $sql_extra."
343 343
                 AND intranet_id = " . $this->intranet->getId());
344 344
         if (!$db->nextRecord()) {
345 345
             return array();
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $db = new DB_Sql;
370 370
         $db->query("SELECT customer_coupon
371 371
             FROM basket_details
372
-            WHERE " . $sql_extra . "
372
+            WHERE " . $sql_extra."
373 373
                 AND intranet_id = " . $this->intranet->getId());
374 374
         if (!$db->nextRecord()) {
375 375
             return array();
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         $db = new DB_Sql;
392 392
         $db->query("SELECT customer_ean
393 393
             FROM basket_details
394
-            WHERE " . $sql_extra . "
394
+            WHERE " . $sql_extra."
395 395
                 AND intranet_id = " . $this->intranet->getId());
396 396
         if (!$db->nextRecord()) {
397 397
             return array();
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
         $db = new DB_Sql;
414 414
         $db->query("SELECT customer_comment
415 415
             FROM basket_details
416
-            WHERE " . $sql_extra . "
416
+            WHERE " . $sql_extra."
417 417
                 AND intranet_id = " . $this->intranet->getId());
418 418
         if (!$db->nextRecord()) {
419 419
             return array();
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         $db = new DB_Sql;
436 436
         $db->query("SELECT payment_method_key
437 437
             FROM basket_details
438
-            WHERE " . $sql_extra . "
438
+            WHERE " . $sql_extra."
439 439
                 AND intranet_id = " . $this->intranet->getId());
440 440
         if (!$db->nextRecord() || $db->f('payment_method_key') == 0) {
441 441
             return array();
@@ -460,10 +460,10 @@  discard block
 block discarded – undo
460 460
         $db = new DB_Sql;
461 461
         $db->query("SELECT *
462 462
             FROM basket
463
-            WHERE " . $sql_extra . "
464
-                AND product_id = " . $product_id . "
463
+            WHERE " . $sql_extra."
464
+                AND product_id = " . $product_id."
465 465
                 AND product_variation_id = ".$product_variation_id."
466
-                AND intranet_id = " . $this->intranet->getId() . "
466
+                AND intranet_id = " . $this->intranet->getId()."
467 467
       AND quantity > 0 LIMIT 1");
468 468
 
469 469
         if (!$db->nextRecord()) {
@@ -574,9 +574,9 @@  discard block
 block discarded – undo
574 574
                 ON product.id = basket.product_id
575 575
             INNER JOIN product_detail
576 576
                 ON product.id = product_detail.product_id
577
-            WHERE " . $sql_extra . "
577
+            WHERE " . $sql_extra."
578 578
                 AND product_detail.active = 1
579
-                AND basket.intranet_id = " . $this->intranet->getId() . "
579
+                AND basket.intranet_id = " . $this->intranet->getId()."
580 580
             ORDER BY product_detail.vat DESC, basket.basketevaluation_product");
581 581
 
582 582
         $i = 0;
@@ -627,16 +627,16 @@  discard block
 block discarded – undo
627 627
 
628 628
             // basket specific
629 629
             $items[$i]['quantity'] = $db->f('quantity');
630
-            $items[$i]['totalweight'] = $items[$i]['weight'] * $db->f('quantity');
631
-            $items[$i]['totalprice'] = $db->f('quantity') * $items[$i]['price'];
632
-            $items[$i]['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['price_incl_vat'];
630
+            $items[$i]['totalweight'] = $items[$i]['weight']*$db->f('quantity');
631
+            $items[$i]['totalprice'] = $db->f('quantity')*$items[$i]['price'];
632
+            $items[$i]['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['price_incl_vat'];
633 633
 
634
-            $items[$i]['currency']['DKK']['totalprice'] = $db->f('quantity') * $items[$i]['currency']['DKK']['price'];
635
-            $items[$i]['currency']['DKK']['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['currency']['DKK']['price_incl_vat'];
634
+            $items[$i]['currency']['DKK']['totalprice'] = $db->f('quantity')*$items[$i]['currency']['DKK']['price'];
635
+            $items[$i]['currency']['DKK']['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['currency']['DKK']['price_incl_vat'];
636 636
             if (is_object($currencies) && $currencies->count() > 0) {
637 637
                 foreach ($currencies as $currency) {
638
-                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice'] = $db->f('quantity') * $items[$i]['currency'][$currency->getType()->getIsoCode()]['price'];
639
-                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice_incl_vat'] = $db->f('quantity') * $items[$i]['currency'][$currency->getType()->getIsoCode()]['price_incl_vat'];
638
+                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice'] = $db->f('quantity')*$items[$i]['currency'][$currency->getType()->getIsoCode()]['price'];
639
+                    $items[$i]['currency'][$currency->getType()->getIsoCode()]['totalprice_incl_vat'] = $db->f('quantity')*$items[$i]['currency'][$currency->getType()->getIsoCode()]['price_incl_vat'];
640 640
                 }
641 641
             }
642 642
 
@@ -665,10 +665,10 @@  discard block
 block discarded – undo
665 665
     {
666 666
         $sql_extra = implode(" AND ", $this->conditions);
667 667
         $db = new DB_Sql;
668
-        $db->query("DELETE FROM basket " .
669
-                "WHERE basketevaluation_product = 1 " .
670
-                    "AND " . $sql_extra . " " .
671
-                    "AND intranet_id = " . $this->intranet->getId());
668
+        $db->query("DELETE FROM basket ".
669
+                "WHERE basketevaluation_product = 1 ".
670
+                    "AND ".$sql_extra." ".
671
+                    "AND intranet_id = ".$this->intranet->getId());
672 672
 
673 673
         $this->resetItemCache();
674 674
 
@@ -687,8 +687,8 @@  discard block
 block discarded – undo
687 687
 
688 688
         $sql_extra = implode(" AND ", $this->conditions);
689 689
         $db = new DB_Sql;
690
-        $db->query("UPDATE basket SET session_id = '' WHERE " . $sql_extra . " AND intranet_id = " . $this->intranet->getId());
691
-        $db->query("UPDATE basket_details SET session_id = '' WHERE " . $sql_extra . " AND intranet_id = " . $this->intranet->getId());
690
+        $db->query("UPDATE basket SET session_id = '' WHERE ".$sql_extra." AND intranet_id = ".$this->intranet->getId());
691
+        $db->query("UPDATE basket_details SET session_id = '' WHERE ".$sql_extra." AND intranet_id = ".$this->intranet->getId());
692 692
 
693 693
         return true;
694 694
     }
Please login to merge, or discard this patch.
src/Intraface/modules/shop/BasketEvaluation.php 3 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,6 @@  discard block
 block discarded – undo
34 34
     /**
35 35
      * Constructor
36 36
      *
37
-     * @param object $kernel Kernel registry
38 37
      * @param int    $id     Id of the BasketEvaluation
39 38
      *
40 39
      * @return void
@@ -106,6 +105,9 @@  discard block
 block discarded – undo
106 105
         return true;
107 106
     }
108 107
 
108
+    /**
109
+     * @param Struct $input
110
+     */
109 111
     function validate($input)
110 112
     {
111 113
         $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
@@ -147,15 +147,15 @@
 block discarded – undo
147 147
         }
148 148
 
149 149
         $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
150
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
158
-                 "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
150
+                    "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
+                    "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
+                    "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
+                    "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
+                    "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
+                    "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
+                    "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
+                    "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
158
+                    "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
159 159
 
160 160
         if ($this->id != 0) {
161 161
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')  . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $this->shop     = $shop;
48 48
         $this->id       = (int)$id;
49 49
 
50
-        $this->value['settings'] = array (
50
+        $this->value['settings'] = array(
51 51
             'evaluate_target' => array(
52 52
                 0 => 'price',
53 53
                 1 => 'weight',
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
      */
86 86
     private function load()
87 87
     {
88
-        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer') . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
88
+        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
89 89
 
90 90
         if (PEAR::isError($result)) {
91
-            throw new Exception($result->getMessage() . $result->getUserInfo());
91
+            throw new Exception($result->getMessage().$result->getUserInfo());
92 92
         }
93 93
 
94 94
         if ($result->numRows() == 0) {
@@ -146,35 +146,35 @@  discard block
 block discarded – undo
146 146
             return false;
147 147
         }
148 148
 
149
-        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
150
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
149
+        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", ".
150
+                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", ".
151
+                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", ".
152
+                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", ".
153
+                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", ".
154
+                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", ".
155
+                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", ".
156
+                 "action_value = ".$this->db->quote($input['action_value'], 'text').", ".
157
+                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", ".
158 158
                  "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
159 159
 
160 160
         if ($this->id != 0) {
161
-            $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')  . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
161
+            $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
162 162
 
163 163
             if (PEAR::isError($result)) {
164
-                throw new Exception($result->getMessage() . $result->getUserInfo());
164
+                throw new Exception($result->getMessage().$result->getUserInfo());
165 165
                 return false;
166 166
             }
167 167
         } else {
168 168
             $result = $this->db->query("INSERT INTO webshop_basket_evaluation SET ".$sql.", intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer').", id = ".$this->db->quote($this->id, 'integer').", shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
169 169
 
170 170
             if (PEAR::isError($result)) {
171
-                throw new Exception($result->getMessage() . $result->getUserInfo());
171
+                throw new Exception($result->getMessage().$result->getUserInfo());
172 172
                 return false;
173 173
             }
174 174
 
175 175
             $this->id = $this->db->lastInsertID();
176 176
             if (PEAR::isError($this->id)) {
177
-                throw new Exception($result->getMessage() . $result->getUserInfo());
177
+                throw new Exception($result->getMessage().$result->getUserInfo());
178 178
             }
179 179
         }
180 180
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     {
191 191
         $result = $this->db->exec("UPDATE webshop_basket_evaluation SET active = 0 WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
192 192
         if (PEAR::isError($result)) {
193
-            throw new Exception($result->getMessage() . $result->getUserInfo());
193
+            throw new Exception($result->getMessage().$result->getUserInfo());
194 194
             return false;
195 195
         }
196 196
         return true;
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function getList()
205 205
     {
206
-        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer'). " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer')." ORDER BY running_index");
206
+        $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer')." ORDER BY running_index");
207 207
 
208 208
         if (PEAR::isError($this->id)) {
209
-            throw new Exception($result->getMessage() . $result->getUserInfo());
209
+            throw new Exception($result->getMessage().$result->getUserInfo());
210 210
         }
211 211
 
212 212
         $i = 0;
Please login to merge, or discard this patch.
src/Intraface/modules/shop/DiscountCampaignGateway.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -65,6 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * Find a variation from id
67 67
      * 
68
+     * @param integer $id
68 69
      * @return object Intraface_modules_product_Variation_OneAttributeGroup or Intraface_modules_product_Variation_TwoAttributeGroups
69 70
      */
70 71
     public function findById($id)
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Shop.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -87,6 +87,9 @@
 block discarded – undo
87 87
         return 'Create';
88 88
     }
89 89
 
90
+    /**
91
+     * @return string
92
+     */
90 93
     function getType()
91 94
     {
92 95
         return $this->context->context->getType();
Please login to merge, or discard this patch.
src/Intraface/modules/todo/TodoItem.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * Constructor
20 20
      *
21
-     * @param object  $todo Todo liste
21
+     * @param TodoList  $todo Todo liste
22 22
      * @param integer $id   Id for item
23 23
      *
24 24
      * @return void
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      *
160 160
      * @param object $db Database object
161 161
      *
162
-     * @return object
162
+     * @return Ilib_Position
163 163
      */
164 164
     public function getPosition($db)
165 165
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             throw new Exception('Todo kr�ver Kernel');
30 30
         }
31 31
         $this->todo = $todo;
32
-        $this->id = (int) $id;
32
+        $this->id = (int)$id;
33 33
 
34 34
         if ($this->id > 0) {
35 35
             $this->load();
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     private function load()
45 45
     {
46 46
         $db = new Db_Sql;
47
-        $db->query("SELECT * FROM todo_item WHERE id = " . $this->id);
47
+        $db->query("SELECT * FROM todo_item WHERE id = ".$this->id);
48 48
         if ($db->nextRecord()) {
49 49
             $this->value['id'] = $db->f('id');
50 50
             $this->value['item'] = $db->f('item');
@@ -103,20 +103,20 @@  discard block
 block discarded – undo
103 103
         $db = new DB_Sql;
104 104
 
105 105
         if ($this->id == 0) {
106
-            $db->query("SELECT position FROM todo_item WHERE todo_list_id = " . $this->todo->get('id') . " ORDER BY position DESC LIMIT 1");
106
+            $db->query("SELECT position FROM todo_item WHERE todo_list_id = ".$this->todo->get('id')." ORDER BY position DESC LIMIT 1");
107 107
             $db->nextRecord();
108 108
             $new_position = $db->f('position') + 1;
109 109
         }
110 110
 
111 111
         if ($this->id == 0) {
112 112
             $sql_type = "INSERT INTO ";
113
-            $sql_end = ", date_created = NOW(), position = " . $new_position;
113
+            $sql_end = ", date_created = NOW(), position = ".$new_position;
114 114
         } else {
115 115
             $sql_type = "UPDATE ";
116
-            $sql_end = " WHERE id = " . $this->id;
116
+            $sql_end = " WHERE id = ".$this->id;
117 117
         }
118 118
 
119
-        $db->query($sql_type. " todo_item SET intranet_id = ".$this->todo->kernel->intranet->get('id').", item = '".$var."', todo_list_id = ".(int)$this->todo->get('id').", responsible_user_id = " .$user_id. " " . $sql_end);
119
+        $db->query($sql_type." todo_item SET intranet_id = ".$this->todo->kernel->intranet->get('id').", item = '".$var."', todo_list_id = ".(int)$this->todo->get('id').", responsible_user_id = ".$user_id." ".$sql_end);
120 120
 
121 121
         if ($this->id == 0) {
122 122
             $this->id = $db->insertedId();
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             return false;
136 136
         }
137 137
         $db = new DB_Sql;
138
-        $db->query("UPDATE todo_item SET status = 1 WHERE id = " . $this->id);
138
+        $db->query("UPDATE todo_item SET status = 1 WHERE id = ".$this->id);
139 139
         return true;
140 140
     }
141 141
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return false;
151 151
         }
152 152
         $db = new DB_Sql;
153
-        $db->query("UPDATE todo_item SET active = 0 WHERE id = " . $this->id);
153
+        $db->query("UPDATE todo_item SET active = 0 WHERE id = ".$this->id);
154 154
         return true;
155 155
     }
156 156
 
Please login to merge, or discard this patch.
src/Intraface/modules/todo/TodoList.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @param integer $id Id for specific item
111 111
      *
112
-     * @return array
112
+     * @return TodoItem
113 113
      */
114 114
     public function getItem($id = 0)
115 115
     {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @deprecated
126 126
      *
127
-     * @return array
127
+     * @return TodoItem
128 128
      */
129 129
     private function loadItem($id = 0)
130 130
     {
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         }
35 35
 
36 36
         $this->kernel = $kernel;
37
-        $this->id = (int) $id;
37
+        $this->id = (int)$id;
38 38
 
39 39
         if ($this->id > 0) {
40 40
             $this->load();
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         }
60 60
 
61 61
         $db = new DB_Sql;
62
-        $db->query("SELECT * FROM todo_item WHERE " . $sql_status . " todo_list_id =" . (int)$this->getId() . "  AND active = 1 ORDER BY status ASC, position ASC");
62
+        $db->query("SELECT * FROM todo_item WHERE ".$sql_status." todo_list_id =".(int)$this->getId()."  AND active = 1 ORDER BY status ASC, position ASC");
63 63
         $ids = array();
64 64
         $i = 0;
65 65
         while ($db->nextRecord()) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function setAllItemsUndone()
101 101
     {
102 102
         $db = new DB_Sql;
103
-        $db->query("UPDATE todo_item SET status = 0 WHERE todo_list_id = " . $this->getId());
103
+        $db->query("UPDATE todo_item SET status = 0 WHERE todo_list_id = ".$this->getId());
104 104
         return true;
105 105
     }
106 106
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function deleteAllItems()
141 141
     {
142 142
         $db = new DB_Sql;
143
-        $db->query("DELETE FROM todo_item WHERE todo_list_id = " . $this->id. " AND active = 1 AND status = 0");
143
+        $db->query("DELETE FROM todo_item WHERE todo_list_id = ".$this->id." AND active = 1 AND status = 0");
144 144
         return true;
145 145
     }
146 146
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     private function load()
153 153
     {
154 154
         $db = new Db_Sql;
155
-        $db->query("SELECT * FROM todo_list WHERE id = " . $this->id . " LIMIT 1");
155
+        $db->query("SELECT * FROM todo_list WHERE id = ".$this->id." LIMIT 1");
156 156
         if ($db->nextRecord()) {
157 157
             $this->value['id'] = $db->f('id');
158 158
             $this->value['list_name'] = $db->f('name');
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
 
219 219
         if ($this->id == 0) {
220 220
             $sql_type = "INSERT INTO ";
221
-            $sql_end = ", date_created = NOW(), public_key = '" .$this->kernel->randomKey(10) . "'";
221
+            $sql_end = ", date_created = NOW(), public_key = '".$this->kernel->randomKey(10)."'";
222 222
         } else {
223 223
             $sql_type = "UPDATE ";
224
-            $sql_end = " WHERE id = " . $this->id;
224
+            $sql_end = " WHERE id = ".$this->id;
225 225
         }
226 226
         $db = new DB_Sql;
227
-        $db->query($sql_type. " todo_list SET description = '".$var['list_description']."', name = '".$var['list_name']."', date_changed=NOW(),intranet_id = " . $this->kernel->intranet->get('id') . $sql_end);
227
+        $db->query($sql_type." todo_list SET description = '".$var['list_description']."', name = '".$var['list_name']."', date_changed=NOW(),intranet_id = ".$this->kernel->intranet->get('id').$sql_end);
228 228
 
229 229
         if ($this->id == 0) {
230 230
             $this->id = $db->insertedId();
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
         $db->query("SELECT * FROM todo_list
247 247
             WHERE intranet_id = " . $this->kernel->intranet->get('id'));
248 248
         $ids = array();
249
-        $i=0;
249
+        $i = 0;
250 250
         while ($db->nextRecord()) {
251 251
             $todo = new TodoList($this->kernel, $db->f('id'));
252 252
             if ($type == 'done' and $todo->howManyLeft() > 0) {
253 253
                 continue;
254
-            } elseif ($type != 'done'  and $todo->howManyLeft() == 0) {
254
+            } elseif ($type != 'done' and $todo->howManyLeft() == 0) {
255 255
                 continue;
256 256
             }
257 257
             $ids[$i]['id'] = $db->f('id');
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     public function howManyLeft()
271 271
     {
272 272
         $db = new DB_Sql;
273
-        $db->query("SELECT * FROM todo_item WHERE status = 0 AND active = 1 AND todo_list_id = " . $this->id);
273
+        $db->query("SELECT * FROM todo_item WHERE status = 0 AND active = 1 AND todo_list_id = ".$this->id);
274 274
         return $db->numRows();
275 275
     }
276 276
 
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
     {
284 284
         $id = (int)$id;
285 285
         $db = new DB_Sql;
286
-        $db->query("SELECT * FROM todo_contact WHERE contact_id = " . $id);
286
+        $db->query("SELECT * FROM todo_contact WHERE contact_id = ".$id);
287 287
         if ($db->nextRecord()) {
288 288
             return true;
289 289
         }
290
-        $db->query("INSERT INTO todo_contact SET contact_id = " . $id . ", list_id = ".$this->get('id').", intranet_id = " . $this->kernel->intranet->get('id'));
290
+        $db->query("INSERT INTO todo_contact SET contact_id = ".$id.", list_id = ".$this->get('id').", intranet_id = ".$this->kernel->intranet->get('id'));
291 291
         return true;
292 292
     }
293 293
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
         $db = new DB_Sql;
302 302
         $i = 0;
303 303
         $contacts = array();
304
-        $db->query("SELECT * FROM todo_contact WHERE intranet_id = " . $this->kernel->intranet->get('id'));
304
+        $db->query("SELECT * FROM todo_contact WHERE intranet_id = ".$this->kernel->intranet->get('id'));
305 305
         while ($db->nextRecord()) {
306 306
             $contacts[$i] = $db->f('contact_id');
307 307
             $i++;
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.