Passed
Push — master ( e4006a...0c4633 )
by Lars
21:40 queued 06:51
created
src/Intraface/Filehandler/Controller/SelectFile.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,18 +100,18 @@  discard block
 block discarded – undo
100 100
                     $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y")." 00:00");
101 101
                     break;
102 102
                 case 2:
103
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
104
-                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
103
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
104
+                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
105 105
                     break;
106 106
                 case 3:
107
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24*7)." 00:00");
107
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24*7)." 00:00");
108 108
                     break;
109 109
                 case 4:
110 110
                     $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y")." 00:00");
111 111
                     break;
112 112
                 case 5:
113
-                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
114
-                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
113
+                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
114
+                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
115 115
                     break;
116 116
                 default:
117 117
                     // Probaly 0, so nothing happens
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                       'selected_files' =>  $selected_files
152 152
         );
153 153
 
154
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/selectfile');
154
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/selectfile');
155 155
         return $tpl->render($this, $data);
156 156
     }
157 157
 
Please login to merge, or discard this patch.
src/Intraface/Filehandler/Controller/Index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,18 +47,18 @@  discard block
 block discarded – undo
47 47
                         $gateway->getDBQuery()->setFilter('uploaded_from_date', date('d-m-Y').' 00:00');
48 48
                         break;
49 49
                     case 2:
50
-                        $gateway->getDBQuery()->setFilter('uploaded_from_date', date('d-m-Y', time()-60*60*24).' 00:00');
51
-                        $gateway->getDBQuery()->setFilter('uploaded_to_date', date('d-m-Y', time()-60*60*24).' 23:59');
50
+                        $gateway->getDBQuery()->setFilter('uploaded_from_date', date('d-m-Y', time() - 60*60*24).' 00:00');
51
+                        $gateway->getDBQuery()->setFilter('uploaded_to_date', date('d-m-Y', time() - 60*60*24).' 23:59');
52 52
                         break;
53 53
                     case 3:
54
-                        $gateway->getDBQuery()->setFilter('uploaded_from_date', date('d-m-Y', time()-60*60*24*7).' 00:00');
54
+                        $gateway->getDBQuery()->setFilter('uploaded_from_date', date('d-m-Y', time() - 60*60*24*7).' 00:00');
55 55
                         break;
56 56
                     case 4:
57 57
                         $gateway->getDBQuery()->setFilter('edited_from_date', date('d-m-Y').' 00:00');
58 58
                         break;
59 59
                     case 5:
60
-                        $gateway->getDBQuery()->setFilter('edited_from_date', date('d-m-Y', time()-60*60*24).' 00:00');
61
-                        $gateway->getDBQuery()->setFilter('edited_to_date', date('d-m-Y', time()-60*60*24).' 23:59');
60
+                        $gateway->getDBQuery()->setFilter('edited_from_date', date('d-m-Y', time() - 60*60*24).' 00:00');
61
+                        $gateway->getDBQuery()->setFilter('edited_to_date', date('d-m-Y', time() - 60*60*24).' 23:59');
62 62
                         break;
63 63
                     case 6:
64 64
                         $gateway->getDBQuery()->setFilter('accessibility', 'public');
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             'selected_keywords' => $selected_keywords,
98 98
             'keywords' => $keywords);
99 99
 
100
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/index');
100
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/index');
101 101
         return $tpl->render($this, $data);
102 102
     }
103 103
 
Please login to merge, or discard this patch.
src/Intraface/Filehandler/Controller/Crop.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
         $editor_img_height = $instance->get('height');
27 27
         $editor_img_width = $instance->get('width');
28 28
 
29
-        $size_ratio = $editor_img_width / $img_width;
29
+        $size_ratio = $editor_img_width/$img_width;
30 30
 
31 31
         $instance = $filemanager->getInstance($instance_type);
32 32
         $type = $instance->get('instance_properties');
33 33
 
34 34
         $params = unserialize($instance->get('crop_parameter'));
35 35
 
36
-        $editor_min_width = $type['max_width'] * $size_ratio;
37
-        $editor_min_height = $type['max_height'] * $size_ratio;
36
+        $editor_min_width = $type['max_width']*$size_ratio;
37
+        $editor_min_height = $type['max_height']*$size_ratio;
38 38
 
39 39
         if ($editor_min_width > $editor_img_width) {
40 40
             $editor_min_width = $editor_img_width;
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
         // make sure that it is with a . and not ,
58 58
         $size_ratio = str_replace(',', '.', $size_ratio);
59 59
 
60
-        $this->document->setTitle('Crop image: ' . $filemanager->get('file_name'));
60
+        $this->document->setTitle('Crop image: '.$filemanager->get('file_name'));
61 61
         $this->document->addScript('filehandler/cropper/lib/prototype.js');
62 62
         $this->document->addScript('filehandler/cropper/lib/scriptaculous.js');
63 63
         $this->document->addScript('filehandler/cropper/cropper.js');
64 64
         // @todo HACK only way I can get the link to be correct with a comma
65 65
         $this->document->addScript('filehandler/crop_image.js.php'.
66
-            '?size_ratio=' . $size_ratio .
67
-            '&max_width=' . round($editor_min_width) .
68
-            '&max_height=' . round($editor_min_height) .
69
-            '&unlock_ratio=' . $unlock_ratio .
70
-            '&x1=' . $params['crop_offset_x'] .
71
-            '&y1=' . $params['crop_offset_y'] .
72
-            '&x2=' . ($params['crop_offset_x'] + $params['crop_width']) .
73
-            '&y2=' . ($params['crop_offset_y'] + $params['crop_height']));
66
+            '?size_ratio='.$size_ratio.
67
+            '&max_width='.round($editor_min_width).
68
+            '&max_height='.round($editor_min_height).
69
+            '&unlock_ratio='.$unlock_ratio.
70
+            '&x1='.$params['crop_offset_x'].
71
+            '&y1='.$params['crop_offset_y'].
72
+            '&x2='.($params['crop_offset_x'] + $params['crop_width']).
73
+            '&y2='.($params['crop_offset_y'] + $params['crop_height']));
74 74
 
75 75
         $data = array('translation' => $translation,
76 76
                       'type' => $type,
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                       'editor_img_uri' => $editor_img_uri,
83 83
                       'unlock_ratio' => $unlock_ratio);
84 84
 
85
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/crop');
85
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/crop');
86 86
         return $tpl->render($this, $data);
87 87
     }
88 88
 
Please login to merge, or discard this patch.
src/Intraface/Filehandler/Controller/CKEditor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,18 +103,18 @@  discard block
 block discarded – undo
103 103
                     $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y")." 00:00");
104 104
                     break;
105 105
                 case 2:
106
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
107
-                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
106
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
107
+                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
108 108
                     break;
109 109
                 case 3:
110
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24*7)." 00:00");
110
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24*7)." 00:00");
111 111
                     break;
112 112
                 case 4:
113 113
                     $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y")." 00:00");
114 114
                     break;
115 115
                 case 5:
116
-                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
117
-                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
116
+                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
117
+                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
118 118
                     break;
119 119
                 default:
120 120
                     // Probaly 0, so nothing happens
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                       'selected_files' =>  $selected_files
155 155
         );
156 156
 
157
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/ckeditor');
157
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/ckeditor');
158 158
         return new k_HtmlResponse($tpl->render($this, $data));
159 159
     }
160 160
 
Please login to merge, or discard this patch.
src/Intraface/shared/keyword/Keyword.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $condition['keyword.type'] = $this->type;
64 64
 
65 65
         foreach ($condition as $column => $value) {
66
-            $c[] = $column . " = '" . $value . "'";
66
+            $c[] = $column." = '".$value."'";
67 67
         }
68 68
 
69 69
         $db = new DB_Sql;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $condition['active'] = 1;
128 128
 
129 129
         foreach ($condition as $column => $value) {
130
-            $c[] = $column . " = '" . $value . "'";
130
+            $c[] = $column." = '".$value."'";
131 131
         }
132 132
 
133 133
         $db = new DB_Sql;
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
             $condition['type'] = $this->type;
149 149
 
150 150
             foreach ($condition as $column => $value) {
151
-                $c[] = $column . " = '" . $value . "'";
151
+                $c[] = $column." = '".$value."'";
152 152
             }
153 153
 
154 154
             $sql_type = 'UPDATE ';
155
-            $sql_end = ' WHERE ' . implode(' AND ', $c);
155
+            $sql_end = ' WHERE '.implode(' AND ', $c);
156 156
         } else {
157 157
             $c = array();
158 158
             $condition = array();
@@ -160,14 +160,14 @@  discard block
 block discarded – undo
160 160
             $condition['type'] = $this->type;
161 161
 
162 162
             foreach ($condition as $column => $value) {
163
-                $c[] = $column . " = '" . $value . "'";
163
+                $c[] = $column." = '".$value."'";
164 164
             }
165 165
 
166 166
             $sql_type = "INSERT INTO ";
167
-            $sql_end = ", " . implode(', ', $c);
167
+            $sql_end = ", ".implode(', ', $c);
168 168
         }
169 169
 
170
-        $sql = $sql_type . "keyword SET keyword = '".$var['keyword']."'" . $sql_end;
170
+        $sql = $sql_type."keyword SET keyword = '".$var['keyword']."'".$sql_end;
171 171
         $db->query($sql);
172 172
 
173 173
         if ($this->id == 0) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $condition['id'] = $this->id;
193 193
         $condition['type'] = $this->type;
194 194
         foreach ($condition as $column => $value) {
195
-            $c[] = $column . " = '" . $value . "'";
195
+            $c[] = $column." = '".$value."'";
196 196
         }
197 197
 
198 198
         $db = new DB_Sql;
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
         $condition['keyword.type'] = $this->type;
216 216
         $condition['keyword.active'] = 1;
217 217
         foreach ($condition as $column => $value) {
218
-            $c[] = $column . " = '" . $value . "'";
218
+            $c[] = $column." = '".$value."'";
219 219
         }
220 220
 
221 221
         $sql = "SELECT * FROM keyword
222
-            WHERE " . implode(' AND ', $c) . "
222
+            WHERE " . implode(' AND ', $c)."
223 223
             ORDER BY keyword ASC";
224 224
         $db = new DB_Sql;
225 225
         $db->query($sql);
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
284 284
 
285 285
         foreach ($condition as $column => $value) {
286
-            $c[] = $column . " = '" . $value . "'";
286
+            $c[] = $column." = '".$value."'";
287 287
         }
288 288
 
289 289
         $sql = "SELECT * FROM keyword_x_object
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $condition['keyword.active'] = 1;
334 334
 
335 335
         foreach ($condition as $column => $value) {
336
-            $c[] = $column . " = '" . $value . "'";
336
+            $c[] = $column." = '".$value."'";
337 337
         }
338 338
 
339 339
         $db = new DB_Sql;
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
             FROM keyword_x_object x
342 342
             INNER JOIN keyword keyword
343 343
                 ON x.keyword_id = keyword.id
344
-            WHERE " . implode(' AND ', $c) . "
344
+            WHERE " . implode(' AND ', $c)."
345 345
             ORDER BY keyword ASC");
346 346
 
347 347
         $i = 0;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
375 375
 
376 376
         foreach ($condition as $column => $value) {
377
-            $c[] = $column . " = '" . $value . "'";
377
+            $c[] = $column." = '".$value."'";
378 378
         }
379 379
 
380 380
         $db = new DB_Sql;
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
                 FROM keyword_x_object
383 383
                 INNER JOIN keyword
384 384
                     ON keyword_x_object.keyword_id = keyword.id
385
-                WHERE " . implode(' AND ', $c) . " AND keyword.keyword != ''
385
+                WHERE " . implode(' AND ', $c)." AND keyword.keyword != ''
386 386
                 ORDER BY keyword.keyword";
387 387
         $db->query($sql);
388 388
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $condition['keyword_x_object.belong_to'] = $this->getBelongToId();
415 415
 
416 416
         foreach ($condition as $column => $value) {
417
-            $c[] = $column . " = '" . $value . "'";
417
+            $c[] = $column." = '".$value."'";
418 418
         }
419 419
 
420 420
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         $result = array();
503 503
 
504 504
         while (list($arg, $val) = each($getstrings)) {
505
-            if ($instring==1) {
505
+            if ($instring == 1) {
506 506
                 //Add the whole string, untouched to the result array.
507 507
                 if (!empty($val)) {
508 508
                     $result[] = $val;
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
             } else {
512 512
                 //Break up the string according to the delimiter character
513 513
                 //Each string has extraneous delimiters around it (inc the ones we added above), so they need to be stripped off
514
-                $temparray = explode($splitter, substr($val, $delimlen, strlen($val)-$delimlen-$delimlen));
514
+                $temparray = explode($splitter, substr($val, $delimlen, strlen($val) - $delimlen - $delimlen));
515 515
 
516 516
                 while (list($iarg, $ival) = each($temparray)) {
517 517
                     if (!empty($ival)) {
Please login to merge, or discard this patch.
src/Intraface/shared/email/Signature.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
                 break;
84 84
             case 1:
85 85
             default:
86
-                return "--\n" . $this->getUser()->getAddress()->get('name') . "\n" . $this->getIntranet()->get('name');
86
+                return "--\n".$this->getUser()->getAddress()->get('name')."\n".$this->getIntranet()->get('name');
87 87
                 break;
88 88
             case 2:
89 89
                 return $this->getSetting()->get('user', 'email.custom_signature');
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/DebtorDoctrineGateway.php 1 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/Debtor.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         // Bruges til at afg�re, hvor debtor er sendt hent til
273 273
         $db = new DB_Sql;
274
-        $db->query("SELECT id, type FROM debtor WHERE where_from > 2 AND where_from_id = " . $this->id . " AND active = 1");
274
+        $db->query("SELECT id, type FROM debtor WHERE where_from > 2 AND where_from_id = ".$this->id." AND active = 1");
275 275
         if ($db->nextRecord()) {
276 276
             if ($db->f('type') > 0) {
277 277
                 $types = self::getDebtorTypes();
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         // @todo Currency is always loaded, should be done with left join. Oh give me more doctrine!
306 306
         $currency = $this->getCurrency();
307 307
 
308
-        for ($i = 0, $max = count($item), $total = 0, $total_currency = 0; $i<$max; $i++) {
308
+        for ($i = 0, $max = count($item), $total = 0, $total_currency = 0; $i < $max; $i++) {
309 309
             $total += $item[$i]["amount"]->getAsIso();
310 310
             if ($currency) {
311 311
                 $total_currency += $item[$i]['amount_currency']->getAsIso();
@@ -462,12 +462,12 @@  discard block
 block discarded – undo
462 462
             } while ($db->nextRecord());
463 463
 
464 464
             $sql_type = "INSERT INTO ";
465
-            $sql_after = ", date_created = NOW(), identifier_key = \"".$identifier."\", intranet_id = " . $this->kernel->intranet->get('id');
465
+            $sql_after = ", date_created = NOW(), identifier_key = \"".$identifier."\", intranet_id = ".$this->kernel->intranet->get('id');
466 466
         } else {
467 467
             $sql_type = "UPDATE ";
468
-            $sql_after = " WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id');
468
+            $sql_after = " WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id');
469 469
         }
470
-        $sql = $sql_type . "debtor SET contact_id = " . $contact->get('id') . ",
470
+        $sql = $sql_type."debtor SET contact_id = ".$contact->get('id').",
471 471
             contact_address_id = ".$contact_address_id.",
472 472
             contact_person_id = ".$input['contact_person_id'].",
473 473
             intranet_address_id = ".$this->kernel->intranet->address->get("address_id").",
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
             currency_id = ".$currency_id.",
483 483
             currency_product_price_exchange_rate_id = ".$currency_exchange_rate_id.",
484 484
             payment_method=".$input['payment_method'].",
485
-            girocode='".$input['girocode']."' " . $internal_note_sql . $sql_after;
485
+            girocode='".$input['girocode']."' ".$internal_note_sql.$sql_after;
486 486
 
487 487
             // attention_to = '". $input['attention_to'] ."',
488 488
 
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
         }
495 495
 
496 496
         if (is_object($this->kernel->user) and strtolower(get_class($this->kernel->user)) == 'user') {
497
-            $db->query("UPDATE debtor SET user_id = ".$this->kernel->user->get('id')." WHERE id = " . $this->id);
497
+            $db->query("UPDATE debtor SET user_id = ".$this->kernel->user->get('id')." WHERE id = ".$this->id);
498 498
         }
499 499
 
500 500
         $this->load();
@@ -514,9 +514,9 @@  discard block
 block discarded – undo
514 514
             return false;
515 515
         }
516 516
         $db = new DB_Sql;
517
-        $db->query("SELECT id FROM debtor WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'). " AND type = '".$this->type_key."' LIMIT 1");
517
+        $db->query("SELECT id FROM debtor WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')." AND type = '".$this->type_key."' LIMIT 1");
518 518
         if ($db->nextRecord()) {
519
-            $db->query("UPDATE debtor SET active = 0 WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id') . "  AND type = '".$this->type_key."'");
519
+            $db->query("UPDATE debtor SET active = 0 WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')."  AND type = '".$this->type_key."'");
520 520
             return true;
521 521
         }
522 522
         return false;
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 
567 567
         switch ($this->type) {
568 568
             case "invoice":
569
-                $values['due_date'] = date("d-m-Y", time() + 24 * 60 * 60 * $debtor_object->contact->get("paymentcondition"));
569
+                $values['due_date'] = date("d-m-Y", time() + 24*60*60*$debtor_object->contact->get("paymentcondition"));
570 570
                 if (empty($values['payment_method']) and $this->kernel->setting->get('intranet', 'bank_account_number')) {
571 571
                     $values['payment_method'] = 1;
572 572
                 }
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
         }
664 664
 
665 665
         $db = new Db_Sql;
666
-        $db->query("UPDATE debtor SET status = ".$status_id.", ".$sql."  WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
666
+        $db->query("UPDATE debtor SET status = ".$status_id.", ".$sql."  WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
667 667
         $this->load();
668 668
 
669 669
         return true;
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
             return false;
691 691
         }
692 692
         $db = new Db_Sql;
693
-        $db->query("UPDATE debtor SET where_from = ".(int)$from.", where_from_id = " . $from_id . " WHERE id = " . $this->id);
693
+        $db->query("UPDATE debtor SET where_from = ".(int)$from.", where_from_id = ".$from_id." WHERE id = ".$this->id);
694 694
         return true;
695 695
     }
696 696
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
         }
712 712
         $contact_id = (int)$contact_id;
713 713
         $db = new DB_Sql;
714
-        $db->query("UPDATE debtor SET contact_id = " . $contact_id . " WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get("id") . " AND type='".$this->type_key."'");
714
+        $db->query("UPDATE debtor SET contact_id = ".$contact_id." WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get("id")." AND type='".$this->type_key."'");
715 715
 
716 716
         return true;
717 717
     }
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
             case 'contact':
741 741
                 $sql = "SELECT id
742 742
                 FROM debtor
743
-                    WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
743
+                    WHERE intranet_id = " . $this->kernel->intranet->get("id")."
744 744
                         AND contact_id = ".(int)$type_id."
745 745
               AND type='".$this->type_key."'
746 746
               AND active = 1";
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
     public function isFilledIn()
775 775
     {
776 776
         $db = new DB_Sql;
777
-        $db->query("SELECT id FROM debtor WHERE type = " . $this->type_key . " AND intranet_id = " . $this->kernel->intranet->get('id'));
777
+        $db->query("SELECT id FROM debtor WHERE type = ".$this->type_key." AND intranet_id = ".$this->kernel->intranet->get('id'));
778 778
         return $db->numRows();
779 779
     }
780 780
 
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
     {
973 973
         $number = safeToDb($number);
974 974
         $db = new DB_Sql;
975
-        $sql = "SELECT id FROM debtor WHERE intranet_id = " . $this->kernel->intranet->get('id') . " AND number = '".$number."' AND type = '".$this->type_key."' AND id != " . $this->id." AND active = 1";
975
+        $sql = "SELECT id FROM debtor WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND number = '".$number."' AND type = '".$this->type_key."' AND id != ".$this->id." AND active = 1";
976 976
         $db->query($sql);
977 977
         if ($db->numRows() == 0) {
978 978
             return true;
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
     {
1058 1058
         // FIXME - check on date
1059 1059
         $db = new DB_Sql;
1060
-        $db->query("UPDATE debtor SET date_stated = '" . $voucher_date . "', voucher_id = '".$voucher_id."' WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
1060
+        $db->query("UPDATE debtor SET date_stated = '".$voucher_date."', voucher_id = '".$voucher_id."' WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
1061 1061
         return true;
1062 1062
     }
1063 1063
 
@@ -1301,6 +1301,6 @@  discard block
 block discarded – undo
1301 1301
 
1302 1302
     function getPaymentLink($url)
1303 1303
     {
1304
-        return $url . $this->getIdentifier();
1304
+        return $url.$this->getIdentifier();
1305 1305
     }
1306 1306
 }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Visitor/OIOXML.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
     private function start()
41 41
     {
42
-        $this->output .= '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
43
-        $this->output .= '<Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd">' . "\n";
42
+        $this->output .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\n";
43
+        $this->output .= '<Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd">'."\n";
44 44
     }
45 45
 
46 46
     private function end()
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function output($debtor)
52 52
     {
53 53
         $this->start();
54
-        $this->output .= '<com:ID>'.$debtor->get('id').'</com:ID>' . "\n";
54
+        $this->output .= '<com:ID>'.$debtor->get('id').'</com:ID>'."\n";
55 55
         $this->output .= '<com:IssueDate>'.$debtor->get('date_due').'</com:IssueDate>';
56 56
         $this->output .= '<com:TypeCode>PIE</com:TypeCode>';
57 57
         $this->output .= '<main:InvoiceCurrencyCode>DKK</main:InvoiceCurrencyCode>';
Please login to merge, or discard this patch.