Passed
Push — main ( f1540e...02d90d )
by Rafael
45:15
created
htdocs/core/customreports.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 }
192 192
 
193 193
 // Fetch optionals attributes and labels
194
-$extrafields->fetch_name_optionals_label('all');    // We load all extrafields definitions for all objects
194
+$extrafields->fetch_name_optionals_label('all'); // We load all extrafields definitions for all objects
195 195
 //$extrafields->fetch_name_optionals_label($object->table_element_line);
196 196
 
197 197
 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
     $crits = explode(' ', trim($value)); // the string after the name of the field. Explode on each AND
217 217
     $res = '';
218 218
 
219
-    $i1 = 0;    // count the nb of and criteria added (all fields / criteria)
219
+    $i1 = 0; // count the nb of and criteria added (all fields / criteria)
220 220
     foreach ($crits as $crit) {     // Loop on each AND criteria
221 221
         $crit = trim($crit);
222 222
 
223
-        $i2 = 0;    // count the nb of valid criteria added for this first criteria
223
+        $i2 = 0; // count the nb of valid criteria added for this first criteria
224 224
         $newres = '';
225 225
         $tmpcrits = explode('|', $crit);
226
-        $i3 = 0;    // count the nb of valid criteria added for this current field
226
+        $i3 = 0; // count the nb of valid criteria added for this current field
227 227
         foreach ($tmpcrits as $tmpcrit) {
228 228
             if ($tmpcrit !== '0' && empty($tmpcrit)) {
229 229
                 continue;
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
                 }
242 242
             }
243 243
 
244
-            $field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit);        // the name of the field
245
-            $tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit);    // the condition after the name of the field
244
+            $field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit); // the name of the field
245
+            $tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit); // the condition after the name of the field
246 246
             //var_dump($field); var_dump($tmpcrit); var_dump($i3);
247 247
 
248 248
             $newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '');
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
     foreach ($arrayofmesures as $key => $val) {
613 613
         $simplearrayofmesures[$key] = $arrayofmesures[$key]['label'];
614 614
     }
615
-    print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300', 1, 0, '', '', $langs->trans("Measures"));    // Fill the array $arrayofmeasures with possible fields
615
+    print $form->multiselectarray('search_measures', $simplearrayofmesures, $search_measures, 0, 0, 'minwidth300', 1, 0, '', '', $langs->trans("Measures")); // Fill the array $arrayofmeasures with possible fields
616 616
     print '</div>';
617 617
 
618 618
     // XAxis
@@ -620,14 +620,14 @@  discard block
 block discarded – undo
620 620
     print '<div class="divadvancedsearchfield">';
621 621
     print '<div class="inline-block"><span class="fas fa-ruler-combined paddingright pictofixedwidth" title="' . dol_escape_htmltag($langs->trans("XAxis")) . '"></span><span class="fas fa-caret-down caretdownaxis" title="' . dol_escape_htmltag($langs->trans("XAxis")) . '"></span></div>';
622 622
     //var_dump($arrayofxaxis);
623
-    print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400');   // Fill the array $arrayofxaxis with possible fields
623
+    print $formother->selectXAxisField($object, $search_xaxis, $arrayofxaxis, $langs->trans("XAxis"), 'minwidth300 maxwidth400'); // Fill the array $arrayofxaxis with possible fields
624 624
     print '</div>';
625 625
 
626 626
     // Group by
627 627
     $count = 0;
628 628
     print '<div class="divadvancedsearchfield">';
629 629
     print '<div class="inline-block opacitymedium"><span class="fas fa-ruler-horizontal paddingright pictofixedwidth" title="' . dol_escape_htmltag($langs->trans("GroupBy")) . '"></span></div>';
630
-    print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300', $langs->trans("GroupBy"));   // Fill the array $arrayofgroupby with possible fields
630
+    print $formother->selectGroupByField($object, $search_groupby, $arrayofgroupby, 'minwidth250 maxwidth300', $langs->trans("GroupBy")); // Fill the array $arrayofgroupby with possible fields
631 631
     print '</div>';
632 632
 
633 633
 
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
             //var_dump($arrayofgroupby);
785 785
             $tmpforloop = dolExplodeIntoArray($arrayofxaxis[$val]['tablefromt'], ',');
786 786
             foreach ($tmpforloop as $tmptable => $tmptablealias) {
787
-                if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
787
+                if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
788 788
                     $tmpforexplode = explode('__', $tmptablealias);
789 789
                     $endpart = end($tmpforexplode);
790 790
                     $parenttableandfield = preg_replace('/__' . $endpart . '$/', '', $tmptablealias) . '.' . $endpart;
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
             //var_dump($arrayofgroupby[$val]); var_dump($tmpval);
812 812
             $tmpforloop = dolExplodeIntoArray($arrayofgroupby[$val]['tablefromt'], ',');
813 813
             foreach ($tmpforloop as $tmptable => $tmptablealias) {
814
-                if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
814
+                if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
815 815
                     $tmpforexplode = explode('__', $tmptablealias);
816 816
                     $endpart = end($tmpforexplode);
817 817
                     $parenttableandfield = preg_replace('/__' . $endpart . '$/', '', $tmptablealias) . '.' . $endpart;
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
             //var_dump($arrayofgroupby);
839 839
             $tmpforloop = dolExplodeIntoArray($arrayofmesures[$val]['tablefromt'], ',');
840 840
             foreach ($tmpforloop as $tmptable => $tmptablealias) {
841
-                if (! in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
841
+                if (!in_array($tmptable, $listoftablesalreadyadded)) { // We do not add join for main table and tables already added
842 842
                     $tmpforexplode = explode('__', $tmptablealias);
843 843
                     $endpart = end($tmpforexplode);
844 844
                     $parenttableandfield = preg_replace('/__' . $endpart . '$/', '', $tmptablealias) . '.' . $endpart;
Please login to merge, or discard this patch.
htdocs/core/bookmarks_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 $title = $langs->trans("Bookmarks");
72 72
 
73 73
 // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests
74
-$head = '<!-- Bookmarks -->' . "\n";  // This is used by DoliDroid to know page is a bookmark selection page
74
+$head = '<!-- Bookmarks -->' . "\n"; // This is used by DoliDroid to know page is a bookmark selection page
75 75
 $arrayofjs = array();
76 76
 $arrayofcss = array();
77 77
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/core/login/functions_googleoauth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@
 block discarded – undo
76 76
             //global $dolibarr_main_url_root;
77 77
             //$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
78 78
             //$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
79
-            $urlwithroot = DOL_MAIN_URL_ROOT;                 // This is to use same domain name than current
79
+            $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current
80 80
 
81 81
             //$shortscope = 'userinfo_email,userinfo_profile';
82
-            $shortscope = 'openid,email,profile';   // For openid connect
82
+            $shortscope = 'openid,email,profile'; // For openid connect
83 83
 
84 84
             $oauthstateanticsrf = bin2hex(random_bytes(128 / 8));
85 85
             $_SESSION['oauthstateanticsrf'] = $shortscope . '-' . $oauthstateanticsrf;
Please login to merge, or discard this patch.
htdocs/core/login/functions_http.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
  */
63 63
 function decodeHttpBasicAuth($value)
64 64
 {
65
-    $encoded_basic_auth = substr($value, 6);    // Remove the "Basic " string
65
+    $encoded_basic_auth = substr($value, 6); // Remove the "Basic " string
66 66
     $decoded_basic_auth = base64_decode($encoded_basic_auth);
67 67
     $credentials_basic_auth = explode(':', $decoded_basic_auth);
68 68
 
Please login to merge, or discard this patch.
htdocs/core/actions_massactions.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
                                 $objectobj2->fk_element     = $objid2;
605 605
                                 $objectobj2->elementtype    = $objectobj2->element;
606 606
                                 if (getDolGlobalString('MAIN_MAIL_REPLACE_EVENT_TITLE_BY_EMAIL_SUBJECT')) {
607
-                                    $objectobj2->actionmsg2     = $subjectreplaced; // Short text
607
+                                    $objectobj2->actionmsg2 = $subjectreplaced; // Short text
608 608
                                 }
609 609
 
610 610
                                 $triggername = strtoupper(get_class($objectobj2)) . '_SENTBYMAIL';
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
                 continue;
1064 1064
             }
1065 1065
 
1066
-            if ($objectclass == 'Holiday' && ! in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) {
1066
+            if ($objectclass == 'Holiday' && !in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) {
1067 1067
                 $langs->load("errors");
1068 1068
                 $nbignored++;
1069 1069
                 $TMsg[] = '<div class="error">' . $langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref) . '</div><br>';
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
     $db->begin();
1467 1467
 
1468 1468
     $objecttmp = new $objectclass($db);
1469
-    $e = new ExtraFields($db);// fetch optionals attributes and labels
1469
+    $e = new ExtraFields($db); // fetch optionals attributes and labels
1470 1470
     $e->fetch_name_optionals_label($objecttmp->table_element);
1471 1471
 
1472 1472
     $nbok = 0;
@@ -1668,7 +1668,7 @@  discard block
 block discarded – undo
1668 1668
     $objecttmp = new $objectclass($db);
1669 1669
     $nbok = 0;
1670 1670
     $typeholiday = GETPOST('typeholiday', 'alpha');
1671
-    $nbdaysholidays = GETPOSTFLOAT('nbdaysholidays');   // May be 1.5
1671
+    $nbdaysholidays = GETPOSTFLOAT('nbdaysholidays'); // May be 1.5
1672 1672
 
1673 1673
     if ($nbdaysholidays <= 0) {
1674 1674
         setEventMessages($langs->trans("WrongAmount"), "", 'errors');
Please login to merge, or discard this patch.
htdocs/core/filemanagerdol/connectors/php/connector.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@
 block discarded – undo
267 267
 
268 268
                 switch ($sErrorMsg) {
269 269
                     case '':
270
-                        $sErrorNumber = '0';  // @phan-suppress-current-line PhanPluginRedundantAssignment
270
+                        $sErrorNumber = '0'; // @phan-suppress-current-line PhanPluginRedundantAssignment
271 271
                         break;
272 272
                     case 'Invalid argument':
273 273
                     case 'No such file or directory':
Please login to merge, or discard this patch.
htdocs/core/filemanagerdol/connectors/php/connector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 ob_start();
27 27
 
28
-require 'config.inc.php';   // This include the main.inc.php
28
+require 'config.inc.php'; // This include the main.inc.php
29 29
 require 'connector.lib.php';
30 30
 
31 31
 if (!$Config['Enabled']) {
Please login to merge, or discard this patch.
htdocs/core/extrafieldsinexport.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             case 'sellist':
51 51
                 $tmp = '';
52 52
                 $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
53
-                if (is_array($tmpparam) && array_key_exists('options', $tmpparam) &&  $tmpparam['options'] && is_array($tmpparam['options'])) {
53
+                if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
54 54
                     $tmpkeys = array_keys($tmpparam['options']);
55 55
                     $tmp = array_shift($tmpkeys);
56 56
                 }
Please login to merge, or discard this patch.
htdocs/core/ajax/ajaxinvoiceline.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $showempty = 0;
62 62
     }
63 63
 
64
-    $return['value']    = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1);
64
+    $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1);
65 65
     //$return['num'] = $form->num;
66 66
     //$return['error']  = $form->error;
67 67
 
Please login to merge, or discard this patch.