Passed
Push — dev ( f7d146...05f415 )
by Rafael
60:50
created
public/htdocs/admin/knowledgemanagement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 $action = GETPOST('action', 'aZ09');
50 50
 $backtopage = GETPOST('backtopage', 'alpha');
51 51
 $value = GETPOST('value', 'alpha');
52
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
52
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
53 53
 
54 54
 $label = GETPOST('label', 'alpha');
55 55
 $scandir = GETPOST('scan_dir', 'alpha');
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     // Search template files
120 120
     $file = '';
121 121
     $className = '';
122
-    $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
122
+    $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
123 123
     foreach ($dirmodels as $reldir) {
124 124
         $file = dol_buildpath($reldir . "core/modules/knowledgemanagement/doc/pdf_" . $modele . "_" . strtolower($tmpobjectkey) . ".modules.php", 0);
125 125
         if (file_exists($file)) {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 
196 196
 $form = new Form($db);
197 197
 
198
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
198
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
199 199
 
200 200
 $page_name = "KnowledgeManagementSetup";
201 201
 llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-knowledgemanagement');
Please login to merge, or discard this patch.
public/htdocs/admin/invoice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 $action = GETPOST('action', 'aZ09');
53 53
 $value = GETPOST('value', 'alpha');
54
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
54
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
55 55
 
56 56
 $label = GETPOST('label', 'alpha');
57 57
 $scandir = GETPOST('scan_dir', 'alpha');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     // Search template files
107 107
     $file = '';
108 108
     $classname = '';
109
-    $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
109
+    $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
110 110
     foreach ($dirmodels as $reldir) {
111 111
         $file = dol_buildpath($reldir . "core/modules/facture/doc/pdf_" . $modele . ".modules.php", 0);
112 112
         if (file_exists($file)) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
  * View
281 281
  */
282 282
 
283
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
283
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
284 284
 
285 285
 llxHeader("", $langs->trans("BillsSetup"), 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura', '', 0, 0, '', '', '', 'mod-admin page-invoice');
286 286
 
Please login to merge, or discard this patch.
public/htdocs/admin/webhook.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 // Parameters
53 53
 $action = GETPOST('action', 'aZ09');
54 54
 $backtopage = GETPOST('backtopage', 'alpha');
55
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
55
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
56 56
 
57 57
 $value = GETPOST('value', 'alpha');
58 58
 $label = GETPOST('label', 'alpha');
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 $setupnotempty = count($formSetup->items);
76 76
 
77 77
 
78
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
78
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
79 79
 
80 80
 
81 81
 /*
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
 
176 176
 if ($action == 'edit') {
177
-    if ($useFormSetup && (float)DOL_VERSION >= 15) {
177
+    if ($useFormSetup && (float) DOL_VERSION >= 15) {
178 178
         print $formSetup->generateOutput(true);
179 179
     } else {
180 180
         print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
     print '<br>';
262 262
 } else {
263
-    if ($useFormSetup && (float)DOL_VERSION >= 15) {
263
+    if ($useFormSetup && (float) DOL_VERSION >= 15) {
264 264
         if (!empty($formSetup->items)) {
265 265
             print $formSetup->generateOutput();
266 266
         }
Please login to merge, or discard this patch.
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/admin/stocktransfer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     // Search template files
98 98
     $file = '';
99 99
     $classname = '';
100
-    $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
100
+    $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
101 101
     foreach ($dirmodels as $reldir) {
102 102
         $file = dol_buildpath($reldir . "core/modules/stocktransfer/doc/pdf_" . $modele . ".modules.php", 0);
103 103
         if (file_exists($file)) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 $form = new Form($db);
165 165
 
166
-$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']);
166
+$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
167 167
 
168 168
 $page_name = "StockTransferSetup";
169 169
 llxHeader('', $langs->trans($page_name), '', '', 0, 0, '', '', '', 'mod-admin page-stocktransfer');
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/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.