Completed
Push — master ( 9d10c2...bf46e5 )
by Lars
05:14
created
src/Intraface/modules/shop/Coordinator.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -194,12 +194,12 @@  discard block
 block discarded – undo
194 194
 
195 195
         if (isset($input['customer_coupon']) && $input['customer_coupon'] != '') {
196 196
             if ($value['message'] != '') $value['message'] .= "\n\n";
197
-            $value['message'] .= "Kundekupon:". $input['customer_coupon'];
197
+            $value['message'] .= "Kundekupon:".$input['customer_coupon'];
198 198
         }
199 199
 
200 200
         if (isset($input['customer_comment']) && $input['customer_comment'] != '') {
201 201
             if ($value['message'] != '') $value['message'] .= "\n\n";
202
-            $value['message'] .= "Kommentar:\n". $input['customer_comment'];
202
+            $value['message'] .= "Kommentar:\n".$input['customer_comment'];
203 203
         }
204 204
 
205 205
         if (isset($input['payment_method']) && is_array($input['payment_method']) && !empty($input['payment_method'])) {
@@ -324,15 +324,15 @@  discard block
 block discarded – undo
324 324
         $email = new Email($this->kernel);
325 325
 
326 326
         if ($this->shop->getConfirmationSubject()) {
327
-            $subject = $this->shop->getConfirmationSubject() . ' (#' . $this->order->get('number') . ')';
327
+            $subject = $this->shop->getConfirmationSubject().' (#'.$this->order->get('number').')';
328 328
         } else {
329
-            $subject = 'Bekræftelse på bestilling (#' . $this->order->get('number') . ')';
329
+            $subject = 'Bekræftelse på bestilling (#'.$this->order->get('number').')';
330 330
         }
331 331
 
332 332
         $body = $this->shop->getConfirmationText();
333 333
 
334 334
         if ($this->shop->showPaymentUrl()) {
335
-            $body .=  "\n\n" . $this->shop->getPaymentUrl() . $this->order->getIdentifier();
335
+            $body .= "\n\n".$this->shop->getPaymentUrl().$this->order->getIdentifier();
336 336
         }
337 337
 
338 338
         // @todo improve this table
@@ -348,19 +348,19 @@  discard block
 block discarded – undo
348 348
                 $currency_iso_code = 'DKK';
349 349
             }
350 350
 
351
-            $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' ' . $amount));
351
+            $table->addRow(array(round($item["quantity"]), substr($item["name"], 0, 40), $currency_iso_code.' '.$amount));
352 352
         }
353 353
 
354
-        $body .= "\n\n" . $table->getTable();
354
+        $body .= "\n\n".$table->getTable();
355 355
 
356 356
         if ($this->shop->getConfirmationGreeting()) {
357
-            $body .=  "\n\n" . $this->shop->getConfirmationGreeting();
357
+            $body .= "\n\n".$this->shop->getConfirmationGreeting();
358 358
         } else {
359
-            $body .= "Venlig hilsen\n".  $this->kernel->intranet->address->get('name');
359
+            $body .= "Venlig hilsen\n".$this->kernel->intranet->address->get('name');
360 360
         }
361 361
 
362 362
         if ($this->shop->showLoginUrl()) {
363
-            $body .=  "\n\n" . $this->contact->getLoginUrl();
363
+            $body .= "\n\n".$this->contact->getLoginUrl();
364 364
         }
365 365
 
366 366
         if (!$email->save(array('contact_id' => $this->contact->get('id'),
@@ -435,9 +435,9 @@  discard block
 block discarded – undo
435 435
         $this->kernel->useShared('email');
436 436
         $email = new Email($this->kernel);
437 437
 
438
-        $subject = 'Bekræftelse på betaling (#' . $payment_id . ')';
438
+        $subject = 'Bekræftelse på betaling (#'.$payment_id.')';
439 439
         $body = 'Vi har modtaget din betaling. Hvis din ordre var afsendt inden kl. 12.00, sender vi den allerede i dag.';
440
-        $body .= "\n\nVenlig hilsen\n".  $this->kernel->intranet->address->get('name');
440
+        $body .= "\n\nVenlig hilsen\n".$this->kernel->intranet->address->get('name');
441 441
 
442 442
         if (!$email->save(array('contact_id' => $this->contact->get('id'),
443 443
                                 'subject' => $subject,
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -226,7 +226,6 @@  discard block
 block discarded – undo
226 226
      *
227 227
      * @param array $input    Array with customer data
228 228
      * @param array $products Array with products
229
-     * @param object $mailer mailer to send e-mail
230 229
      *
231 230
      * @return integer Order id
232 231
      */
@@ -392,9 +391,9 @@  discard block
 block discarded – undo
392 391
      * @param integer $order_id
393 392
      * @param integer $transaction_number
394 393
      * @param integer $transaction_status
395
-     * @param float   $transaction_amount
394
+     * @param integer $amount
396 395
      *
397
-     * @return boolean
396
+     * @return integer
398 397
      */
399 398
     public function addOnlinePayment($order_id, $transaction_number, $transaction_status, $amount)
400 399
     {
@@ -434,6 +433,9 @@  discard block
 block discarded – undo
434 433
         }
435 434
     }
436 435
 
436
+    /**
437
+     * @param integer $payment_id
438
+     */
437 439
     private function sendEmailOnOnlinePayment($payment_id)
438 440
     {
439 441
         $this->kernel->useShared('email');
Please login to merge, or discard this patch.
src/Intraface/modules/shop/FeaturedProducts.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $result = $this->db->query('SELECT id 
44 44
                                     FROM shop_featuredproducts 
45
-                                    WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' 
46
-                                        AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' 
45
+                                    WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' 
46
+                                        AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer').' 
47 47
                                         AND keyword_id  = ' . $this->db->quote($keyword->getId(), 'integer'));
48 48
         if (PEAR::isError($result)) {
49 49
             throw new Exception($result->getUserInfo());
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     function delete($id)
73 73
     {
74
-        $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer') . ' AND id  = ' . $this->db->quote($id, 'integer'));
74
+        $result = $this->db->query('DELETE FROM shop_featuredproducts WHERE intranet_id = '.$this->db->quote($this->intranet->getId(), 'integer').' AND shop_id = '.$this->db->quote($this->shop->getId(), 'integer').' AND id  = '.$this->db->quote($id, 'integer'));
75 75
         if (PEAR::isError($result)) {
76 76
             throw new Exception($result->getUserInfo());
77 77
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     function getAll()
82 82
     {
83 83
         $result = $this->db->query('SELECT * FROM shop_featuredproducts 
84
-                                    WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer') . ' 
84
+                                    WHERE intranet_id = ' . $this->db->quote($this->intranet->getId(), 'integer').' 
85 85
                                         AND shop_id = ' . $this->db->quote($this->shop->getId(), 'integer'));
86 86
         if (PEAR::isError($result)) {
87 87
             throw new Exception($result->getUserInfo());
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-     * @param string $headline Headline
37 36
      * @param object $keyword  Keyword object
37
+     * @param string $description
38 38
      *
39
-     * @return integer
39
+     * @return boolean
40 40
      */
41 41
     function add($description, $keyword)
42 42
     {
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/BasketEvaluation/Index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $shop = $this->getShop();
27 27
 
28
-        $this->document->setTitle('Basket evaluation for' . ' ' . $shop->name);
28
+        $this->document->setTitle('Basket evaluation for'.' '.$shop->name);
29 29
         $this->document->options = array($this->url('../') => 'Close');
30 30
 
31 31
         $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $data = array('shop' => $shop, 'evaluations' => $evaluations);
35 35
 
36
-        $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/evaluation-index');
36
+        $tpl = $this->template->create(dirname(__FILE__).'/../tpl/evaluation-index');
37 37
         return $tpl->render($this, $data);
38 38
     }
39 39
 
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/Categories/Show.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $this->document->setTitle($this->getModel()->getName());
23 23
 
24
-        $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/category');
24
+        $tpl = $this->template->create(dirname(__FILE__).'/../tpl/category');
25 25
         return $tpl->render($this);
26 26
     }
27 27
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             'category_object' => $this->getModel(),
35 35
             'regret_link' => $redirect->getRedirect($this->url('../'))
36 36
         );
37
-        $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit');
37
+        $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit');
38 38
         return $tpl->render($this, $data);
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/Categories/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             'category_object' => $this->getModel(),
42 42
             'regret_link' => $redirect->getRedirect($this->url('../'))
43 43
         );
44
-        $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/categories-edit');
44
+        $tpl = $this->template->create(dirname(__FILE__).'/../tpl/categories-edit');
45 45
         return $tpl->render($this, $data);
46 46
     }
47 47
 
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/Show.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@
 block discarded – undo
33 33
         $this->document->setTitle($shop->name);
34 34
 
35 35
         $this->document->options = array($this->url('../') => 'Close',
36
-                                         $this->url(null, array('edit')) => 'Edit',
37
-                                         $this->url('featuredproducts') => 'Choose featured products',
38
-                                         $this->url('categories') => 'Product categories',
39
-                                         $this->url('basketevaluation') => 'Basket evaluation',
40
-                                         $this->url('paymentmethods') => 'Payment methods');
36
+                                            $this->url(null, array('edit')) => 'Edit',
37
+                                            $this->url('featuredproducts') => 'Choose featured products',
38
+                                            $this->url('categories') => 'Product categories',
39
+                                            $this->url('basketevaluation') => 'Basket evaluation',
40
+                                            $this->url('paymentmethods') => 'Payment methods');
41 41
 
42 42
         $basketevaluation = new Intraface_modules_shop_BasketEvaluation($this->mdb2, $this->getKernel()->intranet, $shop);
43 43
         $evaluations = $basketevaluation->getList();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $data = array('shop' => $shop, 'evaluations' => $evaluations);
46 46
 
47
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/show');
47
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/show');
48 48
         return $tpl->render($this, $data);
49 49
     }
50 50
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
             'settings' => $settings,
86 86
             'currencies' => $currencies,
87 87
             'languages' => $langs);
88
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit');
89
-        return $this->getError()->view() . $tpl->render($this, $data);
88
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit');
89
+        return $this->getError()->view().$tpl->render($this, $data);
90 90
     }
91 91
 
92 92
     function postForm()
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/Index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@
 block discarded – undo
77 77
 
78 78
     function __construct(k_TemplateFactory $template, Doctrine_Connection_Common $doctrine)
79 79
     {
80
-         $this->template = $template;
81
-         $this->doctrine = $doctrine;
80
+            $this->template = $template;
81
+            $this->doctrine = $doctrine;
82 82
     }
83 83
 
84 84
     function map($name)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         if (!is_null($options)) {
28 28
             $config = HTMLPurifier_Config::createDefault();
29 29
             foreach ($options as $option) {
30
-                $config->set($option[0] . '.' . $option[1], $option[2]);
30
+                $config->set($option[0].'.'.$option[1], $option[2]);
31 31
             }
32 32
         }
33 33
         $this->_htmlPurifier = new HTMLPurifier($config);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $options = array(
47 47
             array('Cache', 'SerializerPath',
48
-                PATH_CACHE . '/htmlpurifier'
48
+                PATH_CACHE.'/htmlpurifier'
49 49
             ),
50 50
             //array('HTML', 'Doctype', 'XHTML 1.0 Strict'),
51 51
             array('HTML', 'Allowed',
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
         $shops = Doctrine::getTable('Intraface_modules_shop_Shop')->findByIntranetId($this->getKernel()->intranet->getId());
150 150
 
151 151
         if (count($shops) == 0) {
152
-            $tpl = $this->template->create(dirname(__FILE__) . '/tpl/empty-table');
152
+            $tpl = $this->template->create(dirname(__FILE__).'/tpl/empty-table');
153 153
             return $tpl->render($this, array('message' => 'No shops has been created yet.'));
154 154
         }
155 155
 
156 156
         $data = array('shops' => $shops);
157
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/shops');
157
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/shops');
158 158
         return $tpl->render($this, $data);
159 159
     }
160 160
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             'settings' => $settings,
193 193
             'currencies' => $currencies,
194 194
             'languages' => $langs);
195
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/edit');
195
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/edit');
196 196
         return $tpl->render($this, $data);
197 197
     }
198 198
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
     function wrapHtml($content)
244 244
     {
245
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content');
245
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/content');
246 246
         return $tpl->render($this, array('content' => $content));
247 247
     }
248 248
 
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/FeaturedProducts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             'kernel' => $this->getKernel(),
43 43
             'keywords' => $keywords);
44 44
 
45
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/featuredproducts');
45
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/featuredproducts');
46 46
         return $tpl->render($this, $data);
47 47
     }
48 48
 
Please login to merge, or discard this patch.
src/Intraface/modules/shop/Controller/PaymentMethods/Index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         $shop = Doctrine::getTable('Intraface_modules_shop_Shop')->find($this->getShopId());
14 14
 
15
-        $this->document->setTitle('Payment methods for') . ' ' . $shop->name;
15
+        $this->document->setTitle('Payment methods for').' '.$shop->name;
16 16
 
17 17
         $this->document->options = array($this->url('../') => 'Close');
18 18
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $chosen = $this->getPaymentMethodsForShop();
23 23
 
24 24
         $data = array('shop' => $shop, 'methods' => $methods, 'chosen' => $chosen);
25
-        $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/paymentmethods-index');
25
+        $tpl = $this->template->create(dirname(__FILE__).'/../tpl/paymentmethods-index');
26 26
         return $tpl->render($this, $data);
27 27
     }
28 28
 
Please login to merge, or discard this patch.