Passed
Push — dev ( 162356...096618 )
by Rafael
70:47 queued 05:12
created
public/htdocs/admin/hrm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 $value = GETPOST('value', 'alpha');
59 59
 $label = GETPOST('label', 'alpha');
60
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
60
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
61 61
 
62 62
 $scandir = GETPOST('scan_dir', 'alpha');
63 63
 $type = 'evaluation';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 $error = 0;
71 71
 $setupnotempty = 0;
72 72
 
73
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
73
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
74 74
 
75 75
 $moduledir = 'hrm';
76 76
 // TODO Scan list of objects to fill this array
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     // Search template files
140 140
     $file = '';
141 141
     $classname = '';
142
-    $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
142
+    $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
143 143
     foreach ($dirmodels as $reldir) {
144 144
         $file = dol_buildpath($reldir . "core/modules/hrm/doc/pdf_" . $modele . ".modules.php", 0);
145 145
         if (file_exists($file)) {
Please login to merge, or discard this patch.
public/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->db = $db;
98 98
         $this->name = "cornas";
99 99
         $this->description = $langs->trans('SuppliersCommandModel');
100
-        $this->update_main_doc_field = 1;       // Save the name of generated file as the main doc when generating a doc with this template
100
+        $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
101 101
 
102 102
         // Page size for A4 format
103 103
         $this->type = 'pdf';
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
                         $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100;
693 693
                     }*/
694 694
 
695
-                    $vatrate = (string)$object->lines[$i]->tva_tx;
695
+                    $vatrate = (string) $object->lines[$i]->tva_tx;
696 696
 
697 697
                     // Retrieve type from database for backward compatibility with old records
698 698
                     if (
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
             //{
1344 1344
             //Local tax 1
1345 1345
             foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
1346
-                if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1346
+                if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1347 1347
                     continue;
1348 1348
                 }
1349 1349
 
@@ -1355,8 +1355,8 @@  discard block
 block discarded – undo
1355 1355
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
1356 1356
 
1357 1357
                         $tvacompl = '';
1358
-                        if (preg_match('/\*/', (string)$tvakey)) {
1359
-                            $tvakey = str_replace('*', '', (string)$tvakey);
1358
+                        if (preg_match('/\*/', (string) $tvakey)) {
1359
+                            $tvakey = str_replace('*', '', (string) $tvakey);
1360 1360
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
1361 1361
                         }
1362 1362
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' ';
@@ -1373,7 +1373,7 @@  discard block
 block discarded – undo
1373 1373
             //{
1374 1374
             //Local tax 2
1375 1375
             foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
1376
-                if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1376
+                if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1377 1377
                     continue;
1378 1378
                 }
1379 1379
 
@@ -1385,8 +1385,8 @@  discard block
 block discarded – undo
1385 1385
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
1386 1386
 
1387 1387
                         $tvacompl = '';
1388
-                        if (preg_match('/\*/', (string)$tvakey)) {
1389
-                            $tvakey = str_replace('*', '', (string)$tvakey);
1388
+                        if (preg_match('/\*/', (string) $tvakey)) {
1389
+                            $tvakey = str_replace('*', '', (string) $tvakey);
1390 1390
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
1391 1391
                         }
1392 1392
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' ';
Please login to merge, or discard this patch.
public/htdocs/core/modules/propale/doc/pdf_azur.modules.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
                         $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100;
634 634
                     }*/
635 635
 
636
-                    $vatrate = (string)$object->lines[$i]->tva_tx;
636
+                    $vatrate = (string) $object->lines[$i]->tva_tx;
637 637
 
638 638
                     // Retrieve type from database for backward compatibility with old records
639 639
                     if (
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
1517 1517
                 //{
1518 1518
                 foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
1519
-                    if (in_array((string)$localtax_type, array('1', '3', '5'))) {
1519
+                    if (in_array((string) $localtax_type, array('1', '3', '5'))) {
1520 1520
                         continue;
1521 1521
                     }
1522 1522
 
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
1549 1549
                 //{
1550 1550
                 foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
1551
-                    if (in_array((string)$localtax_type, array('1', '3', '5'))) {
1551
+                    if (in_array((string) $localtax_type, array('1', '3', '5'))) {
1552 1552
                         continue;
1553 1553
                     }
1554 1554
 
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
1611 1611
                 //{
1612 1612
                 foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
1613
-                    if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1613
+                    if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1614 1614
                         continue;
1615 1615
                     }
1616 1616
 
@@ -1643,7 +1643,7 @@  discard block
 block discarded – undo
1643 1643
                 //if (!empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
1644 1644
                 //{
1645 1645
                 foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
1646
-                    if (in_array((string)$localtax_type, array('2', '4', '6'))) {
1646
+                    if (in_array((string) $localtax_type, array('2', '4', '6'))) {
1647 1647
                         continue;
1648 1648
                     }
1649 1649
 
Please login to merge, or discard this patch.
Dolibarr/Code/Mailing/Classes/MailingTargets.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public $sql;
76 76
 
77 77
 
78
-    public $evenunsubscribe = 0;        // Set this to 1 if you want to flag you also want to include email in target that has opt-out.
78
+    public $evenunsubscribe = 0; // Set this to 1 if you want to flag you also want to include email in target that has opt-out.
79 79
 
80 80
 
81 81
     /**
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
         // phpcs:enable
171 171
         // Mise a jour nombre de destinataire dans table des mailings
172 172
         $sql = "SELECT COUNT(*) nb FROM " . MAIN_DB_PREFIX . "mailing_cibles";
173
-        $sql .= " WHERE fk_mailing = " . ((int)$mailing_id);
173
+        $sql .= " WHERE fk_mailing = " . ((int) $mailing_id);
174 174
         $result = $this->db->query($sql);
175 175
         if ($result) {
176 176
             $obj = $this->db->fetch_object($result);
177 177
             $nb = $obj->nb;
178 178
 
179 179
             $sql = "UPDATE " . MAIN_DB_PREFIX . "mailing";
180
-            $sql .= " SET nbemail = " . ((int)$nb) . " WHERE rowid = " . ((int)$mailing_id);
180
+            $sql .= " SET nbemail = " . ((int) $nb) . " WHERE rowid = " . ((int) $mailing_id);
181 181
             if (!$this->db->query($sql)) {
182 182
                 dol_syslog($this->db->error());
183 183
                 $this->error = $this->db->error();
@@ -213,15 +213,15 @@  discard block
 block discarded – undo
213 213
                 $sql .= " lastname, firstname, email, other, source_url, source_id,";
214 214
                 $sql .= " tag,";
215 215
                 $sql .= " source_type)";
216
-                $sql .= " VALUES (" . ((int)$mailing_id) . ",";
217
-                $sql .= (empty($targetarray['fk_contact']) ? '0' : (int)$targetarray['fk_contact']) . ",";
216
+                $sql .= " VALUES (" . ((int) $mailing_id) . ",";
217
+                $sql .= (empty($targetarray['fk_contact']) ? '0' : (int) $targetarray['fk_contact']) . ",";
218 218
                 $sql .= "'" . $this->db->escape($targetarray['lastname']) . "',";
219 219
                 $sql .= "'" . $this->db->escape($targetarray['firstname']) . "',";
220 220
                 $sql .= "'" . $this->db->escape($targetarray['email']) . "',";
221 221
                 $sql .= "'" . $this->db->escape($targetarray['other']) . "',";
222 222
                 $sql .= "'" . $this->db->escape($targetarray['source_url']) . "',";
223 223
                 $sql .= (empty($targetarray['source_id']) ? 'null' : "'" . $this->db->escape($targetarray['source_id']) . "'") . ",";
224
-                $sql .= "'" . $this->db->escape(dol_hash($conf->file->instance_unique_id . ";" . $targetarray['email'] . ";" . $targetarray['lastname'] . ";" . ((int)$mailing_id) . ";" . getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY'), 'md5')) . "',";
224
+                $sql .= "'" . $this->db->escape(dol_hash($conf->file->instance_unique_id . ";" . $targetarray['email'] . ";" . $targetarray['lastname'] . ";" . ((int) $mailing_id) . ";" . getDolGlobalString('MAILING_EMAIL_UNSUBSCRIBE_KEY'), 'md5')) . "',";
225 225
                 $sql .= "'" . $this->db->escape($targetarray['source_type']) . "')";
226 226
                 dol_syslog(__METHOD__, LOG_DEBUG);
227 227
                 $result = $this->db->query($sql);
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
         if (empty($this->evenunsubscribe)) {
263 263
             $sql = "UPDATE " . MAIN_DB_PREFIX . "mailing_cibles as mc";
264 264
             $sql .= " SET mc.statut = 3";
265
-            $sql .= " WHERE mc.fk_mailing = " . ((int)$mailing_id);
266
-            $sql .= " AND EXISTS (SELECT rowid FROM " . MAIN_DB_PREFIX . "mailing_unsubscribe as mu WHERE mu.email = mc.email and mu.entity = " . ((int)$conf->entity) . ")";
265
+            $sql .= " WHERE mc.fk_mailing = " . ((int) $mailing_id);
266
+            $sql .= " AND EXISTS (SELECT rowid FROM " . MAIN_DB_PREFIX . "mailing_unsubscribe as mu WHERE mu.email = mc.email and mu.entity = " . ((int) $conf->entity) . ")";
267 267
 
268 268
             dol_syslog(__METHOD__ . ":mailing update status to display emails that do not want to be contacted anymore", LOG_DEBUG);
269 269
             $result = $this->db->query($sql);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     {
293 293
         // phpcs:enable
294 294
         $sql = "DELETE FROM " . MAIN_DB_PREFIX . "mailing_cibles";
295
-        $sql .= " WHERE fk_mailing = " . ((int)$mailing_id);
295
+        $sql .= " WHERE fk_mailing = " . ((int) $mailing_id);
296 296
 
297 297
         if (!$this->db->query($sql)) {
298 298
             dol_syslog($this->db->error());
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
                         $part1 = $reg[1];
348 348
 
349 349
                         //$modName = ucfirst($reg[1]);
350
-                        $modName = 'mailing_' . $reg[1];  // name of selector submodule
350
+                        $modName = 'mailing_' . $reg[1]; // name of selector submodule
351 351
                         //print "file=$file modName=$modName"; exit;
352 352
                         if (in_array($modName, $modules)) {
353 353
                             $langs->load("errors");
Please login to merge, or discard this patch.
Dolibarr/Code/Exports/Classes/ModeleExports.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                 if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) {
101 101
                     $moduleid = $reg[1];
102 102
                     if ($moduleid == 'csv') {
103
-                        continue;   // This may happen if on old file export_csv.modules.php was not correctly deleted
103
+                        continue; // This may happen if on old file export_csv.modules.php was not correctly deleted
104 104
                     }
105 105
 
106 106
                     // Loading Class
Please login to merge, or discard this patch.
Dolibarr/Code/Printing/Classes/PrintingDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 
87 87
         $listoffiles = array();
88 88
         if (!empty($conf->modules_parts['printing'])) {
89
-            $dirmodels = array_merge(array('/core/modules/printing/'), (array)$conf->modules_parts['printing']);
89
+            $dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
90 90
         } else {
91 91
             $dirmodels = array('/core/modules/printing/');
92 92
         }
Please login to merge, or discard this patch.
public/htdocs/api/admin/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 print '<tr class="oddeven">';
120 120
 print '<td>' . $langs->trans("ApiProductionMode") . '</td>';
121
-$production_mode = (bool)getDolGlobalString('API_PRODUCTION_MODE');
121
+$production_mode = (bool) getDolGlobalString('API_PRODUCTION_MODE');
122 122
 if ($production_mode) {
123 123
     print '<td><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setproductionmode&token=' . newToken() . '&status=0">';
124 124
     print img_picto($langs->trans("Activated"), 'switch_on');
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 print '<tr class="oddeven">';
134 134
 print '<td>' . $langs->trans("API_DISABLE_COMPRESSION") . '</td>';
135
-$disable_compression = (bool)getDolGlobalString('API_DISABLE_COMPRESSION');
135
+$disable_compression = (bool) getDolGlobalString('API_DISABLE_COMPRESSION');
136 136
 if ($disable_compression) {
137 137
     print '<td><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?action=setdisablecompression&token=' . newToken() . '&status=0">';
138 138
     print img_picto($langs->trans("Activated"), 'switch_on');
Please login to merge, or discard this patch.
public/htdocs/asset/admin/setup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 $error = 0;
79 79
 $setupnotempty = 0;
80 80
 
81
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
81
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
82 82
 
83 83
 $moduledir = 'asset';
84 84
 $myTmpObjects = array();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     // Search template files
123 123
     $file = '';
124 124
     $classname = '';
125
-    $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
125
+    $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
126 126
     foreach ($dirmodels as $reldir) {
127 127
         $file = dol_buildpath($reldir . "core/modules/asset/doc/pdf_" . $modele . "_" . strtolower($tmpobjectkey) . ".modules.php", 0);
128 128
         if (file_exists($file)) {
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
                     $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS'));
559 559
                     $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
560 560
                     $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
561
-                    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')';      // Always limit to current entity. No sharing in accountancy.
561
+                    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy.
562 562
                     $sql .= ' LIMIT 50000'; // just as a sanity check
563 563
                     $resql = $db->query($sql);
564 564
                     if ($resql) {
Please login to merge, or discard this patch.
public/htdocs/bom/bom_net_needs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
         print '<td class="left">' . $langs->trans('ProducedBy') . '</td>';
230 230
     }
231 231
     print '<td class="linecolqty right">' . $langs->trans('Quantity') . '</td>';
232
-    print '<td></td>';  // For unit
232
+    print '<td></td>'; // For unit
233 233
     print '<td class="linecolstock right">' . $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1) . '</td>';
234 234
     print '<td class="linecoltheoricalstock right">' . $form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")) . '</td>';
235 235
     print  '</tr>';
Please login to merge, or discard this patch.