Completed
Push — master ( d208aa...25518b )
by Lars
12:37
created
src/Intraface/modules/debtor/Controller/Depreciations.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
         return $this->context->getKernel();
24 24
     }
25 25
 
26
+    /**
27
+     * @return Invoice
28
+     */
26 29
     function getModel()
27 30
     {
28 31
         return $this->context->getModel();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $depreciation = $this->getDepreciation();
53 53
         if ($id = $depreciation->update($_POST)) {
54 54
             if ($this->getKernel()->user->hasModuleAccess('accounting')) {
55
-                return new k_SeeOther($this->url($id . '/state'));
55
+                return new k_SeeOther($this->url($id.'/state'));
56 56
             } else {
57 57
                 return new k_SeeOther($this->url('../'));
58 58
             }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $invoice_module = $this->getKernel()->useModule('invoice');
66 66
         $depreciation = $this->getDepreciation();
67
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/depreciation');
67
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/depreciation');
68 68
         return $smarty->render($this);
69 69
     }
70 70
 }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/DebtorDoctrineGateway.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,6 @@
 block discarded – undo
77 77
      * s� man kan se, hvad folk er interesseret i.
78 78
      * S�gemaskinen skal v�re tolerant for stavefejl
79 79
      *
80
-     * @param object $search
81 80
      *
82 81
      * @return object collection containing products
83 82
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -199,16 +199,16 @@
 block discarded – undo
199 199
 
200 200
         switch ($dbquery->getFilter("sorting")) {
201 201
             case 1:
202
-                $query =  $query->addOrderBy('number ASC, item.position');
202
+                $query = $query->addOrderBy('number ASC, item.position');
203 203
                 break;
204 204
             case 2:
205
-                $query =  $query->addOrderBy('contact.number ASC, item.position');
205
+                $query = $query->addOrderBy('contact.number ASC, item.position');
206 206
                 break;
207 207
             case 3:
208
-                $query =  $query->addOrderBy('contact_address.name ASC, item.position');
208
+                $query = $query->addOrderBy('contact_address.name ASC, item.position');
209 209
                 break;
210 210
             default:
211
-                $query =  $query->addOrderBy('number DESC, item.position');
211
+                $query = $query->addOrderBy('number DESC, item.position');
212 212
         }
213 213
 
214 214
 
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/DebtorGateway.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * returns the possible debtor types!
22 22
      *
23
-     * @return array types
23
+     * @return string[] types
24 24
      */
25 25
     static function getDebtorTypes()
26 26
     {
@@ -60,8 +60,6 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * Bruges til at lave en menu p� kontakten eller produktet
62 62
      *
63
-     * @param string  $type    contact eller product
64
-     * @param integer $type_id id p� contact eller product.
65 63
      *
66 64
      * @return integer
67 65
      */
@@ -95,6 +93,9 @@  discard block
 block discarded – undo
95 93
         return $db->numRows();
96 94
     }
97 95
 
96
+    /**
97
+     * @param integer $id
98
+     */
98 99
     function findById($id)
99 100
     {
100 101
         if (is_int($id) && $id != 0) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
                 $sql = "SELECT id
71 71
                 FROM debtor
72
-                    WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
72
+                    WHERE intranet_id = " . $this->kernel->intranet->get("id")."
73 73
                         AND contact_id = ".(int)$contact_id."
74 74
               AND type='".$this->type_key."'
75 75
               AND active = 1";
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     function setNewContactId($old_contact_id, $new_contact_id)
83 83
     {
84 84
         $db = new DB_Sql;
85
-        $db->query('UPDATE debtor SET contact_id = ' . $new_contact_id . ' WHERE contact_id = ' . $old_contact_id);
85
+        $db->query('UPDATE debtor SET contact_id = '.$new_contact_id.' WHERE contact_id = '.$old_contact_id);
86 86
         return true;
87 87
     }
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $db = new DB_Sql;
92 92
         $db->query('SELECT * FROM debtor WHERE date_created >=
93 93
         	DATE_SUB(NOW(),INTERVAL 1 DAY)
94
-        	AND type = ' .$this->type_key . ' AND intranet_id = ' .$this->kernel->intranet->get('id'));
94
+        	AND type = ' .$this->type_key.' AND intranet_id = '.$this->kernel->intranet->get('id'));
95 95
         return $db->numRows();
96 96
     }
97 97
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     public function isFilledIn()
398 398
     {
399 399
         $db = new DB_Sql;
400
-        $db->query("SELECT id FROM debtor WHERE type = " . $this->getTypeKey() . " AND intranet_id = " . $this->kernel->intranet->get('id'));
400
+        $db->query("SELECT id FROM debtor WHERE type = ".$this->getTypeKey()." AND intranet_id = ".$this->kernel->intranet->get('id'));
401 401
         return $db->numRows();
402 402
     }
403 403
 }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/PaymentMethod.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     /**
14 14
      * Do not change the key for the payment methods
15 15
      *
16
-     * @return array The possible payment types
16
+     * @return string[] The possible payment types
17 17
      */
18 18
     public function getTypes()
19 19
     {
@@ -30,6 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     /**
32 32
      * Returns specific payment method
33
+     * @param string $method
33 34
      */
34 35
     public function getByName($method)
35 36
     {
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/ReminderGateway.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -22,6 +22,9 @@
 block discarded – undo
22 22
         return $this->dbquery;
23 23
     }
24 24
 
25
+    /**
26
+     * @param integer $id
27
+     */
25 28
     function findById($id)
26 29
     {
27 30
         require_once dirname(__FILE__) . '/Reminder.php';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     function findById($id)
26 26
     {
27
-        require_once dirname(__FILE__) . '/Reminder.php';
27
+        require_once dirname(__FILE__).'/Reminder.php';
28 28
         return new Reminder($this->kernel, $id);
29 29
     }
30 30
 
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
         }
40 40
         $db = new DB_Sql;
41 41
         $db->query("SELECT id
42
-            FROM invoice_reminder WHERE intranet_id = ".$this->kernel->intranet->get("id")." AND active = 1 AND contact_id=" . $contact_id);
42
+            FROM invoice_reminder WHERE intranet_id = ".$this->kernel->intranet->get("id")." AND active = 1 AND contact_id=".$contact_id);
43 43
         return $db->numRows();
44 44
     }
45 45
 
46 46
     function setNewContactId($old_contact_id, $new_contact_id)
47 47
     {
48 48
         $db = new DB_Sql;
49
-        $db->query('UPDATE invoice_reminder SET contact_id = ' . $new_contact_id . ' WHERE contact_id = ' . $old_contact_id);
49
+        $db->query('UPDATE invoice_reminder SET contact_id = '.$new_contact_id.' WHERE contact_id = '.$old_contact_id);
50 50
         return true;
51 51
     }
52 52
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     function isFilledIn()
158 158
     {
159 159
         $db = new DB_Sql;
160
-        $db->query("SELECT id FROM invoice_reminder WHERE intranet_id = " . $this->kernel->intranet->get('id'));
160
+        $db->query("SELECT id FROM invoice_reminder WHERE intranet_id = ".$this->kernel->intranet->get('id'));
161 161
         return $db->numRows();
162 162
     }
163 163
 
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/AccessUpdate.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * Run the AccessUpdate and applies module access acording to module packages
36 36
      *
37 37
      * @param integer intranet_id id on intranet, and the access update will only run on this intranet.
38
-     * @return boolean true on success, false on failure
38
+     * @return null|boolean true on success, false on failure
39 39
      */
40 40
     public function run($intranet_id = 0)
41 41
     {
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/Action.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,8 +155,9 @@
 block discarded – undo
155 155
      * Executes the actions by adding and deleting module packages according to the actions
156 156
      *
157 157
      * @param object intranet intranet object
158
+     * @param Intraface_Intranet $intranet
158 159
      *
159
-     * @return boolean true or false.
160
+     * @return null|boolean true or false.
160 161
      */
161 162
     public function execute($intranet)
162 163
     {
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.