Completed
Push — master ( 9d10c2...bf46e5 )
by Lars
05:14
created
src/Intraface/modules/filemanager/ImageHandler.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * Constructor
30 30
      *
31
-     * @param object $file_handler
31
+     * @param FileHandler $file_handler
32 32
      *
33 33
      * @return void
34 34
      */
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
      *
142 142
      * @param float  $width  Width
143 143
      * @param float  $height Height
144
-     * @param float $offset_x offset x
145
-     * @param float $offset_y offset y
144
+     * @param integer $offset_x offset x
145
+     * @param integer $offset_y offset y
146 146
      *
147 147
      * @return string new file name
148 148
      */
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2
- /**
3
-  * Image handler. Klarer h�ndtering af billeder.
4
-  *
5
-  * @package Intraface
6
-  * @author: Sune
7
-  * @version: 1.0
8
-  *
9
-  */
2
+    /**
3
+     * Image handler. Klarer h�ndtering af billeder.
4
+     *
5
+     * @package Intraface
6
+     * @author: Sune
7
+     * @version: 1.0
8
+     *
9
+     */
10 10
 
11 11
 class ImageHandler extends Intraface_Standard
12 12
 {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->image_library = IMAGE_LIBRARY;
55 55
 
56 56
         if ($this->file_handler->get('is_image') != 1) {
57
-            throw new Exception("Filtypen " . $file_handler->get('mime_type') . " er ikke et billede, og kan derfor ikke manipuleres i ImageHandler");
57
+            throw new Exception("Filtypen ".$file_handler->get('mime_type')." er ikke et billede, og kan derfor ikke manipuleres i ImageHandler");
58 58
         }
59 59
 
60 60
         $this->tempdir_path = $this->file_handler->getTemporaryDirectory();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $image = Image_Transform::factory($this->image_library);
82 82
         if (PEAR::isError($image)) {
83
-            throw new Exception($image->getMessage() . $image->getUserInfo());
83
+            throw new Exception($image->getMessage().$image->getUserInfo());
84 84
         }
85 85
 
86 86
         if ($this->tmp_file_name != null && file_exists($this->tmp_file_name)) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $image = Image_Transform::factory($this->image_library);
152 152
         if (PEAR::isError($image)) {
153
-            throw new Exception($image->getMessage() . $image->getUserInfo());
153
+            throw new Exception($image->getMessage().$image->getUserInfo());
154 154
         }
155 155
 
156 156
         if ($this->tmp_file_name != null && file_exists($this->tmp_file_name)) {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $result = $image->crop($width, $height, $offset_x, $offset_y);
169 169
 
170 170
         if (PEAR::isError($result)) {
171
-            throw new Exception("Der opstod en fejl under formatering (crop) af billedet i ImageHandler->crop: " . $result->getMessage());
171
+            throw new Exception("Der opstod en fejl under formatering (crop) af billedet i ImageHandler->crop: ".$result->getMessage());
172 172
         }
173 173
 
174 174
         $file_type = $this->file_handler->get('file_type');
Please login to merge, or discard this patch.
src/Intraface/modules/filemanager/InstanceHandler.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param object  $file_handler File handler object
35 35
      * @param integer $id           Optional id
36 36
      *
37
-     * @return void
37
+     * @return string
38 38
      */
39 39
     function __construct($file_handler, $id = 0)
40 40
     {
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * Factory
67 67
      *
68
-     * @param object $file_handler File handler
69
-     * @param string $type         the instance type
68
+     * @param FileHandler $file_handler File handler
70 69
      * @param array  $param        one or more of crop_width, crop_height, crop_offset_x, crop_offset_y
70
+     * @param string $type_name
71 71
      *
72
-     * @return object
72
+     * @return InstanceHandler
73 73
      */
74 74
     function factory($file_handler, $type_name, $param = array())
75 75
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 type_key = ".$type['type_key'].",
124 124
                 file_size = ".(int)$file_size.",
125 125
                 width = ".(int)$width.",
126
-                height = ".(int)$height.", " .
126
+                height = ".(int)$height.", ".
127 127
                 "crop_parameter = \"".safeToDb($crop_param_string)."\"");
128 128
 
129 129
             $id = $db->insertedId();
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         //$this->value['predefined_size'] = $db->f('predefined_size');
188 188
         $this->value['server_file_name'] = $db->f('server_file_name');
189 189
         $this->value['file_size'] = $db->f('file_size');
190
-        $this->value['file_path'] = $this->instance_path . $db->f('server_file_name');
190
+        $this->value['file_path'] = $this->instance_path.$db->f('server_file_name');
191 191
 
192 192
         $this->value['last_modified'] = filemtime($this->get('file_path'));
193 193
         // $this->value['file_uri'] = FILE_VIEWER.'?id='.$this->get('id').'&type='.$this->get('type').'&name=/'.urlencode($this->file_handler->get('file_name'));
Please login to merge, or discard this patch.
src/Intraface/modules/filemanager/UploadHandler.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      *       then the filehandler->save method should rather accept some kind of file object which this
71 71
      *       object could generate?
72 72
      *
73
-     * @param object $file_handler A filehandler
73
+     * @param FileHandler $file_handler A filehandler
74 74
      *
75 75
      * @return void
76 76
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
                     continue;
289 289
                 }
290 290
 
291
-                $ext = substr($file, strrpos($file, ".")+1);
291
+                $ext = substr($file, strrpos($file, ".") + 1);
292 292
 
293 293
                 if (strlen($ext) < 3 || strlen($ext) > 4) {
294 294
                     $this->file_handler->error->set("Filen \"".$file."\" har ikke en gyldig endelse, f.eks. .pdf");
Please login to merge, or discard this patch.
src/Intraface/modules/intranetmaintenance/ModuleMaintenance.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -85,6 +85,9 @@
 block discarded – undo
85 85
         }
86 86
     }
87 87
 
88
+    /**
89
+     * @param string $module_name
90
+     */
88 91
     public function registerModule($module_name)
89 92
     {
90 93
         $gateway = new Intraface_ModuleGateway(MDB2::singleton(DB_DSN));
Please login to merge, or discard this patch.
src/Intraface/modules/intranetmaintenance/UserMaintenance.php 1 patch
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.
src/Intraface/modules/invoice/CreditNote.php 2 patches
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@  discard block
 block discarded – undo
15 15
         parent::__construct($kernel, 'credit_note', $id);
16 16
     }
17 17
 
18
+    /**
19
+     * @param string $status
20
+     */
18 21
     function setStatus($status)
19 22
     {
20 23
         $return = parent::setStatus($status);
@@ -37,6 +40,9 @@  discard block
 block discarded – undo
37 40
         }
38 41
     }
39 42
 
43
+    /**
44
+     * @return boolean
45
+     */
40 46
     function readyForState($year, $check_products = 'check_products')
41 47
     {
42 48
         if (!is_object($year)) {
@@ -94,6 +100,14 @@  discard block
 block discarded – undo
94 100
 
95 101
     }
96 102
 
103
+    /**
104
+     * @param Year $year
105
+     * @param integer $voucher_number
106
+     * @param string $voucher_date
107
+     * @param Stub_Translation $translation
108
+     *
109
+     * @return boolean
110
+     */
97 111
     function state($year, $voucher_number, $voucher_date, $translation)
98 112
     {
99 113
         if (!is_object($year)) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
             for ($i = 0, $max = count($items); $i < $max; $i++) {
79 79
                 $product = new Product($this->kernel, $items[$i]['product_id']);
80 80
                 if ($product->get('state_account_id') == 0) {
81
-                    $this->error->set('Produktet ' . $product->get('name') . ' ved ikke hvor den skal bogf�res');
81
+                    $this->error->set('Produktet '.$product->get('name').' ved ikke hvor den skal bogf�res');
82 82
                 } else {
83 83
                     require_once 'Intraface/modules/accounting/Account.php';
84 84
                     $account = Account::factory($year, $product->get('state_account_id'));
85 85
                     if ($account->get('id') == 0 || $account->get('type') != 'operating') {
86
-                        $this->error->set('Ugyldig konto for bogf�ring af produktet ' . $product->get('name'));
86
+                        $this->error->set('Ugyldig konto for bogf�ring af produktet '.$product->get('name'));
87 87
                         $return = false;
88 88
                     }
89 89
                 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $voucher->save(array(
134 134
             'voucher_number' => $voucher_number,
135 135
             'date' => $voucher_date,
136
-            'text' => 'Kreditnota #' . $this->get('number')
136
+            'text' => 'Kreditnota #'.$this->get('number')
137 137
         ));
138 138
 
139 139
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $credit_account_number = $credit_account->get('number');
149 149
             $voucher = Voucher::factory($year, $voucher_number);
150 150
 
151
-            $amount = $item['quantity'] * $item['price']->getAsIso(2);
151
+            $amount = $item['quantity']*$item['price']->getAsIso(2);
152 152
 
153 153
             // hvis bel�bet er mindre end nul, skal konti byttes om og bel�bet skal g�res positivt
154 154
             if ($amount < 0) {
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
                 'debet_account_number' => $debet_account_number,
166 166
                 'credit_account_number' => $credit_account_number,
167 167
                 'vat_off' => 1,
168
-                'text' => $text.' #' . $this->get('number') . ' - ' . $item['name']
168
+                'text' => $text.' #'.$this->get('number').' - '.$item['name']
169 169
             );
170 170
             if ($debet_account->get('vat') == 'out') {
171
-                $total_with_vat += $item["quantity"] * $item["price"]->getAsIso(2);
171
+                $total_with_vat += $item["quantity"]*$item["price"]->getAsIso(2);
172 172
             }
173 173
 
174 174
             if (!$voucher->saveInDaybook($input_values, true)) {
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
                     'voucher_number' => $voucher_number,
186 186
                     'reference' => $this->get('number'),
187 187
                     'date' => $voucher_date,
188
-                    'amount' => number_format($total_with_vat * $this->kernel->setting->get('intranet', 'vatpercent') / 100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
188
+                    'amount' => number_format($total_with_vat*$this->kernel->setting->get('intranet', 'vatpercent')/100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
189 189
                     'debet_account_number' => $debet_account->get('number'),
190 190
                     'credit_account_number' => $credit_account->get('number'),
191 191
                     'vat_off' => 1,
192
-                    'text' => $text.' #' . $this->get('number') . ' - ' . $debet_account->get('name')
192
+                    'text' => $text.' #'.$this->get('number').' - '.$debet_account->get('name')
193 193
             );
194 194
             if (!$voucher->saveInDaybook($input_values, true)) {
195 195
                 $this->error->merge($voucher->error->getMessage());
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
         require_once 'Intraface/modules/accounting/VoucherFile.php';
200 200
         $voucher_file = new VoucherFile($voucher);
201
-        if (!$voucher_file->save(array('description' => $text.' #' . $this->get('number'), 'belong_to'=>'credit_note','belong_to_id'=>$this->get('id')))) {
201
+        if (!$voucher_file->save(array('description' => $text.' #'.$this->get('number'), 'belong_to'=>'credit_note', 'belong_to_id'=>$this->get('id')))) {
202 202
             $this->error->merge($voucher_file->error->getMessage());
203 203
             $this->error->set('Filen blev ikke overflyttet');
204 204
         }
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/Invoice.php 2 patches
Doc Comments   +8 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,6 +17,9 @@  discard block
 block discarded – undo
17 17
         parent::__construct($kernel, 'invoice', $id);
18 18
     }
19 19
 
20
+    /**
21
+     * @param string $status
22
+     */
20 23
     function setStatus($status)
21 24
     {
22 25
         if ($status == 'cancelled') {
@@ -58,7 +61,7 @@  discard block
 block discarded – undo
58 61
     /**
59 62
      * returns DebtorAccount object
60 63
      *
61
-     * @return object DebtorAccount
64
+     * @return DebtorAccount DebtorAccount
62 65
      */
63 66
     public function getDebtorAccount()
64 67
     {
@@ -150,6 +153,10 @@  discard block
 block discarded – undo
150 153
      * @param object year stating year
151 154
      * @param integer voucher_number
152 155
      * @param string voucher_date
156
+     * @param Year $year
157
+     * @param integer $voucher_number
158
+     * @param string $voucher_date
159
+     * @param Stub_Translation $translation
153 160
      * @return boolean true or false
154 161
      */
155 162
     function state($year, $voucher_number, $voucher_date, $translation)
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $db = new DB_Sql;
34 34
         $sql = "SELECT id FROM debtor
35
-            WHERE type=3 AND status=1 AND active = 1 AND due_date < NOW() AND intranet_id = ".$this->kernel->intranet->get("id")." AND contact_id = " . $contact_id;
35
+            WHERE type=3 AND status=1 AND active = 1 AND due_date < NOW() AND intranet_id = ".$this->kernel->intranet->get("id")." AND contact_id = ".$contact_id;
36 36
         $db->query($sql);
37 37
 
38 38
         return $db->numRows();
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
             for ($i = 0, $max = count($items); $i < $max; $i++) {
130 130
                 $product = new Product($this->kernel, $items[$i]['product_id']);
131 131
                 if ($product->get('state_account_id') == 0) {
132
-                    $this->error->set('Produktet ' . $product->get('name') . ' ved ikke hvor den skal bogf�res');
132
+                    $this->error->set('Produktet '.$product->get('name').' ved ikke hvor den skal bogf�res');
133 133
                 } else {
134 134
                     require_once 'Intraface/modules/accounting/Account.php';
135 135
                     $account = Account::factory($year, $product->get('state_account_id'));
136 136
                     if ($account->get('id') == 0 || $account->get('type') != 'operating') {
137
-                        $this->error->set('Ugyldig konto for bogføring af produktet ' . $product->get('name'));
137
+                        $this->error->set('Ugyldig konto for bogføring af produktet '.$product->get('name'));
138 138
                         $return = false;
139 139
                     }
140 140
                 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             $debet_account_number = $debet_account->get('number');
208 208
             $voucher = Voucher::factory($year, $voucher_number);
209 209
 
210
-            $amount = $item['quantity'] * $item['price']->getAsIso(2);
210
+            $amount = $item['quantity']*$item['price']->getAsIso(2);
211 211
 
212 212
             // hvis bel�bet er mindre end nul, skal konti byttes om og bel�bet skal g�res positivt
213 213
             if ($amount < 0) {
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
                 'debet_account_number' => $debet_account_number,
225 225
                 'credit_account_number' => $credit_account_number,
226 226
                 'vat_off' => 1,
227
-                'text' => $text . ' - ' . $item['name']
227
+                'text' => $text.' - '.$item['name']
228 228
             );
229 229
 
230 230
             if ($credit_account->get('vat') == 'out') {
231
-                $total_with_vat += $item["quantity"] * $item["price"]->getAsIso(2);
231
+                $total_with_vat += $item["quantity"]*$item["price"]->getAsIso(2);
232 232
             }
233 233
 
234 234
             if (!$voucher->saveInDaybook($input_values, true)) {
@@ -241,16 +241,16 @@  discard block
 block discarded – undo
241 241
         if ($total_with_vat > 0) {
242 242
             $voucher = Voucher::factory($year, $voucher_number);
243 243
             $credit_account = new Account($year, $year->getSetting('vat_out_account_id'));
244
-            $debet_account =    new Account($year, $year->getSetting('debtor_account_id'));
244
+            $debet_account = new Account($year, $year->getSetting('debtor_account_id'));
245 245
             $input_values = array(
246 246
                     'voucher_number' => $voucher_number,
247 247
                     'reference' => $this->get('number'),
248 248
                     'date' => $voucher_date,
249
-                    'amount' => number_format($total_with_vat * $this->kernel->setting->get('intranet', 'vatpercent') / 100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
249
+                    'amount' => number_format($total_with_vat*$this->kernel->setting->get('intranet', 'vatpercent')/100, 2, ",", "."), // opm�rksom p� at vat bliver rigtig defineret
250 250
                     'debet_account_number' => $debet_account->get('number'),
251 251
                     'credit_account_number' => $credit_account->get('number'),
252 252
                     'vat_off' => 1,
253
-                    'text' => $text . ' - ' . $credit_account->get('name')
253
+                    'text' => $text.' - '.$credit_account->get('name')
254 254
             );
255 255
             if (!$voucher->saveInDaybook($input_values, true)) {
256 256
                 $this->error->merge($voucher->error->getMessage());
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
         require_once 'Intraface/modules/accounting/VoucherFile.php';
261 261
         $voucher_file = new VoucherFile($voucher);
262
-        if (!$voucher_file->save(array('description' => $text, 'belong_to'=>'invoice','belong_to_id'=>$this->get('id')))) {
262
+        if (!$voucher_file->save(array('description' => $text, 'belong_to'=>'invoice', 'belong_to_id'=>$this->get('id')))) {
263 263
             $this->error->merge($voucher_file->error->getMessage());
264 264
             $this->error->set('Filen blev ikke overflyttet');
265 265
         }
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/Payment.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -360,10 +360,11 @@  discard block
 block discarded – undo
360 360
     /**
361 361
      * States the payment i the given year
362 362
      *
363
-     * @param object $year Accounting Year object
363
+     * @param Year $year Accounting Year object
364 364
      * @param integer $voucher_number
365 365
      * @param string $voucher_date
366 366
      * @param integer $state_account_number
367
+     * @param Stub_Translation $translation
367 368
      *
368 369
      * @return boolean true on succes or false.
369 370
      */
@@ -454,7 +455,7 @@  discard block
 block discarded – undo
454 455
     /**
455 456
      * returns possible payment types
456 457
      *
457
-     * @return array payment types
458
+     * @return string[] payment types
458 459
      *
459 460
      */
460 461
     public static function getTypes()
@@ -469,7 +470,7 @@  discard block
 block discarded – undo
469 470
     /**
470 471
      * returns the possible types payments can be for.
471 472
      *
472
-     * @return array payment for types
473
+     * @return string[] payment for types
473 474
      */
474 475
     private static function getPaymentForTypes()
475 476
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function load()
50 50
     {
51
-        $result = $this->db->query('SELECT id, amount, type, description, payment_date, payment_for_id, DATE_FORMAT(payment_date, "%d-%m-%Y") AS dk_payment_date, date_stated, voucher_id FROM invoice_payment ' .
52
-            'WHERE intranet_id = '.$this->kernel->intranet->get('id').' ' .
53
-                'AND payment_for = '.$this->payment_for_type_id.' ' .
54
-                'AND payment_for_id = '.$this->payment_for_id.' ' .
55
-                'AND type IN ('.implode(',', array_keys($this->getTypes())).')' .
51
+        $result = $this->db->query('SELECT id, amount, type, description, payment_date, payment_for_id, DATE_FORMAT(payment_date, "%d-%m-%Y") AS dk_payment_date, date_stated, voucher_id FROM invoice_payment '.
52
+            'WHERE intranet_id = '.$this->kernel->intranet->get('id').' '.
53
+                'AND payment_for = '.$this->payment_for_type_id.' '.
54
+                'AND payment_for_id = '.$this->payment_for_id.' '.
55
+                'AND type IN ('.implode(',', array_keys($this->getTypes())).')'.
56 56
                 'AND id = '.$this->id);
57 57
 
58 58
         if (PEAR::isError($result)) {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
         $types = $this->getPaymentForTypes();
430 430
         // translation is needed!
431
-        $text = $translation->get('Payment') . ' ' . $this->get('description') . ' ('.$translation->get($types[$this->payment_for_type_id]).' #'.$this->payment_for->get('number') . ')';
431
+        $text = $translation->get('Payment').' '.$this->get('description').' ('.$translation->get($types[$this->payment_for_type_id]).' #'.$this->payment_for->get('number').')';
432 432
 
433 433
         $input_values = array(
434 434
             'voucher_number' => $voucher_number,
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         }
446 446
 
447 447
         $db = new DB_sql;
448
-        $db->query("UPDATE invoice_payment SET date_stated = NOW(), voucher_id = ".$voucher->get('id') . " WHERE intranet_id = " . $this->kernel->intranet->getId() . ' AND id = ' . $this->id);
448
+        $db->query("UPDATE invoice_payment SET date_stated = NOW(), voucher_id = ".$voucher->get('id')." WHERE intranet_id = ".$this->kernel->intranet->getId().' AND id = '.$this->id);
449 449
 
450 450
         $this->load();
451 451
         return true;
Please login to merge, or discard this patch.
src/Intraface/modules/invoice/PaymentGateway.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
         $this->dbquery = $this->getDBQuery();
20 20
     }
21 21
 
22
+    /**
23
+     * @param string|null $id
24
+     */
22 25
     function findById($id)
23 26
     {
24 27
         $db = new DB_Sql;
@@ -113,7 +116,7 @@  discard block
 block discarded – undo
113 116
     /**
114 117
      * returns possible payment types
115 118
      *
116
-     * @return array payment types
119
+     * @return string[] payment types
117 120
      *
118 121
      */
119 122
     public static function getTypes()
@@ -128,7 +131,7 @@  discard block
 block discarded – undo
128 131
     /**
129 132
      * returns the possible types payments can be for.
130 133
      *
131
-     * @return array payment for types
134
+     * @return string[] payment for types
132 135
      */
133 136
     private static function getPaymentForTypes()
134 137
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     function findById($id)
23 23
     {
24 24
         $db = new DB_Sql;
25
-        $db->query('SELECT * FROM invoice_payment WHERE id = ' . $id);
25
+        $db->query('SELECT * FROM invoice_payment WHERE id = '.$id);
26 26
 
27 27
         if (!$db->nextRecord()) {
28 28
             return false;
Please login to merge, or discard this patch.