Completed
Push — master ( 9d10c2...bf46e5 )
by Lars
05:14
created
src/Intraface/modules/modulepackage/Manager.php 2 patches
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,6 +253,7 @@  discard block
 block discarded – undo
253 253
      * Returns on the basis of the module package which type of add this is. Can be either add, extend, or upgrade
254 254
      *
255 255
      * @param object modulepackage An modulepackage object
256
+     * @param Intraface_modules_modulepackage_ModulePackage $modulepackage
256 257
      *
257 258
      * @return string either 'add', 'extend' or 'upgrade'
258 259
      */
@@ -295,6 +296,7 @@  discard block
 block discarded – undo
295 296
      * Returns the end date of the last modulepacke in a given group
296 297
      *
297 298
      * @param object modulepackage
299
+     * @return string
298 300
      */
299 301
     public function getLastEndDateInGroup($modulepackage)
300 302
     {
@@ -400,6 +402,8 @@  discard block
 block discarded – undo
400 402
      *
401 403
      * @param object modulepackage module package
402 404
      * @param string duration Duration as either date 'dd-mm-yyyy' or 'yyyy-mm-dd' or 'X month' where X is any whole number
405
+     * @param Intraface_modules_modulepackage_ModulePackage $modulepackage
406
+     * @param string $duration
403 407
      *
404 408
      * @return object Action object with the actions needed to be processed
405 409
      */
@@ -470,6 +474,8 @@  discard block
 block discarded – undo
470 474
      *
471 475
      * @param object modulepackage
472 476
      * @param string duration Duration as either date 'dd-mm-yyyy' or 'yyyy-mm-dd' or 'X month' where X is any whole number
477
+     * @param Intraface_modules_modulepackage_ModulePackage $modulepackage
478
+     * @param string $duration
473 479
      *
474 480
      * @return object Action object with the actions needed to be performed
475 481
      */
@@ -628,7 +634,7 @@  discard block
 block discarded – undo
628 634
     /**
629 635
      * Returns the possible types of status'
630 636
      *
631
-     * @return array status types
637
+     * @return string[] status types
632 638
      */
633 639
     static public function getStatusTypes()
634 640
     {
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         // Should we rather just take intranet_id as parameter?
49 49
         $this->intranet = &$intranet;
50 50
         $this->db = MDB2::singleton(DB_DSN);
51
-        $this->error =  new Intraface_Error;
51
+        $this->error = new Intraface_Error;
52 52
         $this->id = (int)$id;
53 53
 
54 54
         if ($this->id > 0) {
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         // TODO: This could actually easily use dbquery
72
-        $result = $this->db->query('SELECT intranet_module_package.id, ' .
73
-                'intranet_module_package.module_package_id, ' .
74
-                'intranet_module_package.start_date, ' .
75
-                'intranet_module_package.end_date, ' .
76
-                'intranet_module_package.order_debtor_id, ' .
77
-                'intranet_module_package.status_key, ' .
78
-                'module_package_plan.plan, ' .
79
-                'module_package_group.group_name, ' .
80
-                'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' .
81
-                'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date ' .
82
-            'FROM intranet_module_package ' .
83
-            'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' .
84
-            'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' .
85
-            'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id ' .
72
+        $result = $this->db->query('SELECT intranet_module_package.id, '.
73
+                'intranet_module_package.module_package_id, '.
74
+                'intranet_module_package.start_date, '.
75
+                'intranet_module_package.end_date, '.
76
+                'intranet_module_package.order_debtor_id, '.
77
+                'intranet_module_package.status_key, '.
78
+                'module_package_plan.plan, '.
79
+                'module_package_group.group_name, '.
80
+                'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '.
81
+                'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date '.
82
+            'FROM intranet_module_package '.
83
+            'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '.
84
+            'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '.
85
+            'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id '.
86 86
             'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND intranet_module_package.id = '.$this->db->quote($this->id, 'integer'));
87 87
 
88 88
         if (PEAR::isError($result)) {
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             return false;
163 163
         }
164 164
 
165
-        $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", " .
166
-                "start_date = ".$this->db->quote($start_date, 'date').", " .
165
+        $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", ".
166
+                "start_date = ".$this->db->quote($start_date, 'date').", ".
167 167
                 "end_date = ".$this->db->quote($end_date, 'date');
168 168
 
169 169
         $result = $this->db->exec("INSERT INTO intranet_module_package SET ".$sql.", status_key = 1, active = 1, intranet_id = ".$this->intranet->get('id'));
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
             return false;
201 201
         }
202 202
 
203
-        $result = $this->db->exec('UPDATE intranet_module_package ' .
204
-            'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' ' .
203
+        $result = $this->db->exec('UPDATE intranet_module_package '.
204
+            'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' '.
205 205
             'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer'));
206 206
 
207 207
         if (PEAR::isError($result)) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
         $result = $this->db->exec("UPDATE intranet_module_package SET status_key = 3 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id));
227 227
         if (PEAR::isError($result)) {
228
-            throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :". $result->getUserInfo());
228
+            throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :".$result->getUserInfo());
229 229
             exit;
230 230
         }
231 231
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         }
245 245
         $result = $this->db->exec("UPDATE intranet_module_package SET active = 0 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id));
246 246
         if (PEAR::isError($result)) {
247
-            throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :". $result->getUserInfo());
247
+            throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :".$result->getUserInfo());
248 248
             exit;
249 249
         }
250 250
 
@@ -271,10 +271,10 @@  discard block
 block discarded – undo
271 271
         }
272 272
 
273 273
         // TODO: If DBQuery had not needed kernel we could have used it here!
274
-        $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package ' .
275
-                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' .
276
-                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' .
277
-                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' .
274
+        $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package '.
275
+                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '.
276
+                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '.
277
+                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '.
278 278
                 'ORDER BY end_date DESC');
279 279
 
280 280
         if (PEAR::isError($result)) {
@@ -312,10 +312,10 @@  discard block
 block discarded – undo
312 312
         }
313 313
 
314 314
         // TODO: If DBQuery had not needed kernel we could have used it here!
315
-        $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package ' .
316
-                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' .
317
-                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' .
318
-                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' .
315
+        $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package '.
316
+                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '.
317
+                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '.
318
+                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '.
319 319
                 'ORDER BY end_date DESC');
320 320
 
321 321
         if (PEAR::isError($result)) {
@@ -498,11 +498,11 @@  discard block
 block discarded – undo
498 498
         $shop = new Intraface_modules_modulepackage_ShopExtension;
499 499
 
500 500
         // TODO: If DBQuery had not needed kernel we could have used it here!
501
-        $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id ' .
502
-                'FROM intranet_module_package ' .
503
-                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' .
504
-                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' .
505
-                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' .
501
+        $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id '.
502
+                'FROM intranet_module_package '.
503
+                'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '.
504
+                'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '.
505
+                'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '.
506 506
                 'ORDER BY end_date DESC');
507 507
 
508 508
         if (PEAR::isError($result)) {
@@ -587,15 +587,15 @@  discard block
 block discarded – undo
587 587
             $this->dbquery->setSorting('module_package_group.sorting_index, module_package_plan.plan_index, intranet_module_package.start_date');
588 588
         }
589 589
 
590
-        $db = $this->dbquery->getRecordset('intranet_module_package.id, ' .
591
-                    'intranet_module_package.module_package_id, ' .
592
-                    'intranet_module_package.start_date, ' .
593
-                    'intranet_module_package.end_date, ' .
594
-                    'intranet_module_package.order_debtor_id, ' .
595
-                    'intranet_module_package.status_key, ' .
596
-                    'module_package_plan.plan, ' .
597
-                    'module_package_group.group_name, ' .
598
-                    'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' .
590
+        $db = $this->dbquery->getRecordset('intranet_module_package.id, '.
591
+                    'intranet_module_package.module_package_id, '.
592
+                    'intranet_module_package.start_date, '.
593
+                    'intranet_module_package.end_date, '.
594
+                    'intranet_module_package.order_debtor_id, '.
595
+                    'intranet_module_package.status_key, '.
596
+                    'module_package_plan.plan, '.
597
+                    'module_package_group.group_name, '.
598
+                    'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '.
599 599
                     'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date', '', false);
600 600
 
601 601
         $modulepackages = array();
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/ShopExtension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
     /**
235 235
      * Returns order details from order identifier
236 236
      *
237
-     * @param string $order_identifier
237
+     * @param string $order_identification
238 238
      * @return array
239 239
      */
240 240
     public function getOrderDetails($order_identification)
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/SubscribersGateway.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -57,6 +57,9 @@  discard block
 block discarded – undo
57 57
         return $db->numRows();
58 58
     }
59 59
 
60
+    /**
61
+     * @param string $code
62
+     */
60 63
     function findByCode($code)
61 64
     {
62 65
         // kernel og kode
@@ -73,6 +76,9 @@  discard block
 block discarded – undo
73 76
         return new NewsletterSubscriber(new NewsletterList($this->kernel, $db->f('list_id')), $db->f('id'));
74 77
     }
75 78
 
79
+    /**
80
+     * @param string $email
81
+     */
76 82
     function findByListAndEmail($list, $email)
77 83
     {
78 84
         $email = safeToDb($email);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     function getAllUnsubscribersForList($list)
18 18
     {
19
-        $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=". $list->get('id') . " AND newsletter_subscriber.intranet_id = " . $list->kernel->intranet->get('id'));
19
+        $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=".$list->get('id')." AND newsletter_subscriber.intranet_id = ".$list->kernel->intranet->get('id'));
20 20
         $this->dbquery->setJoin("LEFT", "contact", "newsletter_subscriber.contact_id = contact.id AND contact.intranet_id = ".$list->kernel->intranet->get("id"), '');
21 21
         $this->dbquery->setJoin("LEFT", "address", "address.belong_to_id = contact.id AND address.active = 1 AND address.type = 3", '');
22 22
         $this->dbquery->setFilter('optin', 1);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     function getByContactId($list, $id)
32 32
     {
33
-        $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=". $list->get('id') . " AND newsletter_subscriber.intranet_id = " . $list->kernel->intranet->get('id'));
33
+        $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=".$list->get('id')." AND newsletter_subscriber.intranet_id = ".$list->kernel->intranet->get('id'));
34 34
         $this->dbquery->setFilter('contact_id', $id);
35 35
         $this->getDBQuery()->setCondition('newsletter_subscriber.contact_id = '.$this->getDBQuery()->getFilter('contact_id'));
36 36
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
     {
42 42
         // @todo - make sure to delete old ones
43 43
         $db = MDB2::singleton();
44
-        $db->query('UPDATE newsletter_subscriber SET contact_id = ' . $new_id . ' WHERE contact_id = ' . $old_id);
44
+        $db->query('UPDATE newsletter_subscriber SET contact_id = '.$new_id.' WHERE contact_id = '.$old_id);
45 45
     }
46 46
 
47 47
     public function findCountByContactId($contact_id)
48 48
     {
49 49
         $sql = "SELECT id
50 50
                 FROM newsletter_subscriber
51
-                    WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
51
+                    WHERE intranet_id = " . $this->kernel->intranet->get("id")."
52 52
                         AND contact_id = ".(int)$contact_id."
53 53
               AND active = 1";
54 54
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $code = strip_tags($code);
66 66
 
67 67
         $db = new DB_Sql;
68
-        $db->query("SELECT id, list_id FROM newsletter_subscriber WHERE code = '".$code."' AND intranet_id = " . $this->kernel->intranet->get('id')." and active = 1");
68
+        $db->query("SELECT id, list_id FROM newsletter_subscriber WHERE code = '".$code."' AND intranet_id = ".$this->kernel->intranet->get('id')." and active = 1");
69 69
         if (!$db->nextRecord()) {
70 70
             return false;
71 71
         }
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
                     LEFT JOIN address
85 85
                         ON address.belong_to_id = contact.id
86 86
                     WHERE address.email = '".$email."'
87
-                        AND newsletter_subscriber.list_id = " . $list->get('id') . "
88
-                        AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id') . "
87
+                        AND newsletter_subscriber.list_id = " . $list->get('id')."
88
+                        AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id')."
89 89
                         AND newsletter_subscriber.active = 1
90 90
                         AND contact.active = 1");
91 91
         if (!$db->nextRecord()) {
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/OnlinePaymentGateway.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -33,6 +33,9 @@  discard block
 block discarded – undo
33 33
         return $this->getProvider($provider, $value);
34 34
     }
35 35
 
36
+    /**
37
+     * @param integer $provider
38
+     */
36 39
     public function findByProvider($provider)
37 40
     {
38 41
         if (!in_array($provider, $this->implemented_providers)) {
@@ -42,6 +45,9 @@  discard block
 block discarded – undo
42 45
         return $this->getProvider($provider);
43 46
     }
44 47
 
48
+    /**
49
+     * @param integer $value
50
+     */
45 51
     public function findByTransactionNumber($value)
46 52
     {
47 53
         $db = new DB_Sql;
Please login to merge, or discard this 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
         $type = 'id';
27 27
         $db = new DB_Sql;
28
-        $db->query("SELECT provider_key FROM onlinepayment WHERE id = ".(int)$value. " AND intranet_id = " . $this->kernel->intranet->get('id'));
28
+        $db->query("SELECT provider_key FROM onlinepayment WHERE id = ".(int)$value." AND intranet_id = ".$this->kernel->intranet->get('id'));
29 29
         if (!$db->nextRecord()) {
30 30
             throw new Exception('OnlinePayment::factory: Ikke et gyldigt id');
31 31
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function findByTransactionNumber($value)
46 46
     {
47 47
         $db = new DB_Sql;
48
-        $db->query("SELECT provider_key FROM onlinepayment WHERE transaction_number = '".$value."' AND intranet_id = " . $kernel->intranet->get('id'));
48
+        $db->query("SELECT provider_key FROM onlinepayment WHERE transaction_number = '".$value."' AND intranet_id = ".$kernel->intranet->get('id'));
49 49
         if (!$db->nextRecord()) {
50 50
             throw new Exception('OnlinePayment::factory: Ikke et gyldigt transactionnumber');
51 51
         }
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/provider/Default.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
 
9 9
 class OnlinePaymentDefault extends OnlinePayment
10 10
 {
11
+    /**
12
+     * @param integer $id
13
+     */
11 14
     function __construct($kernel, $id) {
12 15
 
13 16
         parent::__construct($kernel, $id);
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/provider/QuickPay.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      *
96 96
      * @param string $action Which action to perform?
97 97
      *
98
-     * @return void
98
+     * @return boolean
99 99
      */
100 100
     function transactionAction($action)
101 101
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
         return $this->eval;
88 88
     }
89
-    **/
89
+     **/
90 90
 
91 91
     /**
92 92
      * @todo does what?
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->quickpay = new quickpay;
59 59
         $this->quickpay->set_md5checkword($this->settings['md5_secret']);
60 60
         $this->quickpay->set_merchant($this->settings['merchant_id']);
61
-        $this->quickpay->set_curl_certificate(dirname(__FILE__) . '/../../../certificates/cacert.pem');
61
+        $this->quickpay->set_curl_certificate(dirname(__FILE__).'/../../../certificates/cacert.pem');
62 62
 
63 63
         // hvordan bliver disse sat - og hvad er det n�jagtigt?
64 64
         $this->quickpay->set_posc($this->posc);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
             // henter bel�bene fra denne onlinebetaling
106 106
             $this->quickpay->set_transaction($this->get('transaction_number'));
107
-            $this->quickpay->set_amount(round($this->get('amount') * 100));
107
+            $this->quickpay->set_amount(round($this->get('amount')*100));
108 108
 
109 109
             $this->eval = $this->quickpay->capture();
110 110
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 $this->setStatus("reversed");
131 131
                 return true;
132 132
             } else {
133
-                $this->error->set('Betalingen kunne ikke tilbagebetales: ' . $this->eval['qpstatmsg']);
133
+                $this->error->set('Betalingen kunne ikke tilbagebetales: '.$this->eval['qpstatmsg']);
134 134
                 return false;
135 135
             }
136 136
         } else {
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
      */
185 185
     function getSettings()
186 186
     {
187
-        $this->value['md5_secret'] =    $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.md5_secret');
188
-        $this->value['merchant_id'] =   $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.merchant_id');
187
+        $this->value['md5_secret'] = $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.md5_secret');
188
+        $this->value['merchant_id'] = $this->kernel->setting->get('intranet', 'onlinepayment.quickpay.merchant_id');
189 189
         return $this->value;
190 190
     }
191 191
 
Please login to merge, or discard this patch.
src/Intraface/modules/procurement/ProcurementGateway.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      * returns possible status types
183 183
      * @todo: duplicate in Procurement class
184 184
      *
185
-     * @return array status types
185
+     * @return string[] status types
186 186
      */
187 187
     public function getStatusTypes()
188 188
     {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * returns the possible regions where procurement is bought
198 198
      * @todo: duplicate in Procurement class
199 199
      *
200
-     * @return array possible regions
200
+     * @return string[] possible regions
201 201
      */
202 202
     public function getRegionTypes()
203 203
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     function setNewContactId($old_id, $new_id)
42 42
     {
43 43
         $db = MDB2::singleton();
44
-        $db->query('UPDATE procurement SET contact_id = ' . $new_id . ' WHERE contact_id = ' . $old_id);
44
+        $db->query('UPDATE procurement SET contact_id = '.$new_id.' WHERE contact_id = '.$old_id);
45 45
     }
46 46
 
47 47
     function find()
@@ -158,14 +158,14 @@  discard block
 block discarded – undo
158 158
     function any()
159 159
     {
160 160
         $db = new DB_Sql;
161
-        $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id'));
161
+        $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id'));
162 162
         return $db->numRows();
163 163
     }
164 164
 
165 165
     function anyByContact($contact_id)
166 166
     {
167 167
         $db = new DB_Sql;
168
-        $db->query("SELECT id FROM procurement WHERE intranet_id = " . $this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1");
168
+        $db->query("SELECT id FROM procurement WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND contact_id = ".$contact_id." AND active = 1");
169 169
         return $db->numRows();
170 170
     }
171 171
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
     {
215 215
         $sql = "SELECT id
216 216
                 FROM procurement
217
-                WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
217
+                WHERE intranet_id = " . $this->kernel->intranet->get("id")."
218 218
                     AND contact_id = ".(int)$contact_id."
219 219
                     AND active = 1";
220 220
 
Please login to merge, or discard this patch.
src/Intraface/modules/product/Attribute/Group/Gateway.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * @todo $doctrine should not be optional
22 22
      * 
23 23
      * @param object $doctrine Doctrine_Connection 
24
-     * @return void
24
+     * @return integer
25 25
      */
26 26
     public function __construct($doctrine = NULL) 
27 27
     {
Please login to merge, or discard this patch.
src/Intraface/modules/product/Gateway.php 3 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,6 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Constructor
38 38
      *
39
-     * @param object  $user                Userobject
40 39
      *
41 40
      * @return void
42 41
      */
@@ -77,9 +76,8 @@  discard block
 block discarded – undo
77 76
     /**
78 77
      * Finds a product with an id
79 78
      *
80
-     * @param integer $id product id
81 79
      *
82
-     * @return object
80
+     * @return Product
83 81
      */
84 82
     function getById($product_id, $old_product_detail_id = 0)
85 83
     {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
 
52 52
     /**
53 53
      * Creates the dbquery object
54
-
55 54
      * @return void
56 55
      */
57 56
     public function getDBQuery()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
                 'INNER',
140 140
                 'ilib_category',
141 141
                 'ilib_category_append.category_id = ilib_category.id',
142
-                'ilib_category.intranet_id = '.$this->kernel->intranet->getId(). ' ' .
143
-                    'AND ilib_category.belong_to = '.$category_type->getBelongTo().' ' .
142
+                'ilib_category.intranet_id = '.$this->kernel->intranet->getId().' '.
143
+                    'AND ilib_category.belong_to = '.$category_type->getBelongTo().' '.
144 144
                 'AND ilib_category.belong_to_id = '.$category_type->getBelongToId()
145 145
             );
146 146
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
             // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet?
209 209
             // 0 = only stock
210
-            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which=='webshop') { // only stock
210
+            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which == 'webshop') { // only stock
211 211
                 if (array_key_exists('for_sale', $products[$i]['stock_status']) and $products[$i]['stock_status']['for_sale'] <= 0) {
212 212
                     continue;
213 213
                 }
Please login to merge, or discard this patch.