Passed
Push — dev ( f7d146...05f415 )
by Rafael
60:50
created
public/htdocs/bookcal/admin/calendar_extrafields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 
88 88
 
89 89
 // Buttons
90
-if ((float)DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl.
90
+if ((float) DOL_VERSION < 17) { // On v17+, the "New Attribute" button is included into tpl.
91 91
     if ($action != 'create' && $action != 'edit') {
92 92
         print '<div class="tabsAction">';
93 93
         print '<a class="butAction reposition" href="' . $_SERVER["PHP_SELF"] . '?action=create">' . $langs->trans("NewAttribute") . '</a>';
Please login to merge, or discard this patch.
public/htdocs/bookcal/calendar_list.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 $object = new Calendar($db);
73 73
 $extrafields = new ExtraFields($db);
74 74
 $diroutputmassaction = $conf->bookcal->dir_output . '/temp/massgeneration/' . $user->id;
75
-$hookmanager->initHooks(array($contextpage));   // Note that conf->hooks_modules contains array of activated contexes
75
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
76 76
 
77 77
 // Fetch optionals attributes and labels
78 78
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 // Default sort order (if not yet defined by previous GETPOST)
84 84
 if (!$sortfield) {
85
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
85
+    reset($object->fields); // Reset is required to avoid key() to return null.
86 86
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
87 87
 }
88 88
 if (!$sortorder) {
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 foreach ($object->fields as $key => $val) {
131 131
     // If $val['visible']==0, then we never show the field
132 132
     if (!empty($val['visible'])) {
133
-        $visible = (int)dol_eval($val['visible'], 1);
133
+        $visible = (int) dol_eval($val['visible'], 1);
134 134
         $arrayfields['t.' . $key] = array(
135 135
             'label' => $val['label'],
136 136
             'checked' => (($visible < 0) ? 0 : 1),
137
-            'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1)),
137
+            'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
138 138
             'position' => $val['position'],
139 139
             'help' => isset($val['help']) ? $val['help'] : ''
140 140
         );
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 // Output page
389 389
 // --------------------------------------------------------------------
390 390
 
391
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
391
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
392 392
 
393 393
 $arrayofselected = is_array($toselect) ? $toselect : array();
394 394
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     $param .= '&contextpage=' . urlencode($contextpage);
401 401
 }
402 402
 if ($limit > 0 && $limit != $conf->liste_limit) {
403
-    $param .= '&limit=' . ((int)$limit);
403
+    $param .= '&limit=' . ((int) $limit);
404 404
 }
405 405
 if ($optioncss != '') {
406 406
     $param .= '&optioncss=' . urlencode($optioncss);
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
 }
506 506
 
507 507
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
508
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
508
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
509 509
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
510 510
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
511 511
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
598 598
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
599 599
     }
600
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
600
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
601 601
     if (!empty($arrayfields['t.' . $key]['checked'])) {
602 602
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
603 603
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/bookcal/availabilities_list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 // Default sort order (if not yet defined by previous GETPOST)
81 81
 if (!$sortfield) {
82
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
82
+    reset($object->fields); // Reset is required to avoid key() to return null.
83 83
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
84 84
 }
85 85
 if (!$sortorder) {
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
 foreach ($object->fields as $key => $val) {
130 130
     // If $val['visible']==0, then we never show the field
131 131
     if (!empty($val['visible'])) {
132
-        $visible = (int)dol_eval($val['visible'], 1);
132
+        $visible = (int) dol_eval($val['visible'], 1);
133 133
         $arrayfields['t.' . $key] = array(
134 134
             'label' => $val['label'],
135 135
             'checked' => (($visible < 0) ? 0 : 1),
136
-            'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1)),
136
+            'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
137 137
             'position' => $val['position'],
138 138
             'help' => isset($val['help']) ? $val['help'] : ''
139 139
         );
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 // Output page
389 389
 // --------------------------------------------------------------------
390 390
 
391
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
391
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
392 392
 
393 393
 // Example : Adding jquery code
394 394
 // print '<script type="text/javascript">
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     $param .= '&contextpage=' . urlencode($contextpage);
416 416
 }
417 417
 if ($limit > 0 && $limit != $conf->liste_limit) {
418
-    $param .= '&limit=' . ((int)$limit);
418
+    $param .= '&limit=' . ((int) $limit);
419 419
 }
420 420
 if ($optioncss != '') {
421 421
     $param .= '&optioncss=' . urlencode($optioncss);
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 }
520 520
 
521 521
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
522
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
522
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
523 523
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
524 524
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
525 525
 
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
613 613
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
614 614
     }
615
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
615
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
616 616
     if (!empty($arrayfields['t.' . $key]['checked'])) {
617 617
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
618 618
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/bookcal/booking_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
     $sql = "SELECT ac.id, ac.ref, ac.datep as date_start, ac.datep2 as date_end, ac.label, acr.fk_element";
189 189
     $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm as ac";
190 190
     $sql .= " JOIN " . MAIN_DB_PREFIX . "actioncomm_resources as acr on acr.fk_actioncomm = ac.id";
191
-    $sql .= " WHERE ac.fk_bookcal_calendar = " . ((int)$object->id);
191
+    $sql .= " WHERE ac.fk_bookcal_calendar = " . ((int) $object->id);
192 192
     $sql .= " AND ac.code = 'AC_RDV'";
193 193
     $sql .= " AND acr.element_type = 'socpeople'";
194 194
     $resql = $db->query($sql);
Please login to merge, or discard this patch.
public/htdocs/theme/md/badges.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -245,22 +245,22 @@  discard block
 block discarded – undo
245 245
             $thisBadgeTextColor = ${$statusVarNamePrefix . 'badgeStatus_textColor' . $statusName};
246 246
         }
247 247
 
248
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
248
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
249 249
             $thisBadgeTextColor = '#212529';
250 250
             $thisBadgeBackgroundColor = "#fff";
251 251
         }
252 252
 
253
-        if (in_array((string)$statusName, array('0', '5', '9'))) {
253
+        if (in_array((string) $statusName, array('0', '5', '9'))) {
254 254
             $thisBadgeTextColor = '#999999';
255 255
         }
256
-        if (in_array((string)$statusName, array('6'))) {
256
+        if (in_array((string) $statusName, array('6'))) {
257 257
             $thisBadgeTextColor = '#777777';
258 258
         }
259 259
 
260 260
         // badge-statusX
261 261
         print $cssPrefix . ".badge-status" . $statusName . " {\n";
262 262
         print "        color: " . $thisBadgeTextColor . " !important;\n";
263
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
263
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
264 264
             print "        border-color: " . $thisBadgeBorderColor . " !important;\n";
265 265
         }
266 266
         if ($thisBadgeBackgroundColor != '') {
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         print $cssPrefix . ".badge-status" . $statusName . ":focus, " . $cssPrefix . ".badge-status" . $statusName . ":hover {\n";
284 284
         print "    color: " . $thisBadgeTextColor . " !important;\n";
285 285
         //print "    background-color: ".colorDarker($thisBadgeBackgroundColor, 10).";\n";
286
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
286
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
287 287
             print "        border-color: " . colorDarker($thisBadgeBorderColor, 10) . " !important;\n";
288 288
         }
289 289
         print "}\n";
Please login to merge, or discard this patch.
public/htdocs/theme/md/btn.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     if (getDolGlobalString('THEME_DARKMODEENABLED')) {
22 22
         print "/* For dark mode */\n";
23 23
         if (getDolGlobalInt('THEME_DARKMODEENABLED') != 2) {
24
-            print "@media (prefers-color-scheme: dark) {";  // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
24
+            print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
25 25
         } else {
26 26
             print "@media not print {";
27 27
         }
Please login to merge, or discard this patch.
public/htdocs/theme/eldy/badges.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -243,22 +243,22 @@  discard block
 block discarded – undo
243 243
             $thisBadgeTextColor = ${$statusVarNamePrefix . 'badgeStatus_textColor' . $statusName};
244 244
         }
245 245
 
246
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
246
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
247 247
             $thisBadgeTextColor = '#212529';
248 248
             $thisBadgeBackgroundColor = "";
249 249
         }
250 250
 
251
-        if (in_array((string)$statusName, array('0', '5', '9'))) {
251
+        if (in_array((string) $statusName, array('0', '5', '9'))) {
252 252
             $thisBadgeTextColor = '#999999';
253 253
         }
254
-        if (in_array((string)$statusName, array('6'))) {
254
+        if (in_array((string) $statusName, array('6'))) {
255 255
             $thisBadgeTextColor = '#777777';
256 256
         }
257 257
 
258 258
         // badge-statusX
259 259
         print $cssPrefix . ".badge-status" . $statusName . " {\n";
260 260
         print "        color: " . $thisBadgeTextColor . " !important;\n";
261
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
261
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
262 262
             print "        border-color: " . $thisBadgeBorderColor . " !important;\n";
263 263
         }
264 264
         if ($thisBadgeBackgroundColor != '') {
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         print $cssPrefix . ".badge-status" . $statusName . ":focus, " . $cssPrefix . ".badge-status" . $statusName . ":hover {\n";
282 282
         print "    color: " . $thisBadgeTextColor . " !important;\n";
283 283
         //print "    background-color: " . colorDarker($thisBadgeBackgroundColor, 10) . ";\n";
284
-        if (in_array((string)$statusName, $TBadgeBorderOnly)) {
284
+        if (in_array((string) $statusName, $TBadgeBorderOnly)) {
285 285
             print "        border-color: " . colorDarker($thisBadgeBorderColor, 10) . " !important;\n";
286 286
         }
287 287
         print "}\n";
Please login to merge, or discard this patch.
public/htdocs/societe/ajax/ajaxcompanies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,13 +118,13 @@
 block discarded – undo
118 118
         $sql .= " OR s.code_fournisseur LIKE '%" . $db->escape($db->escapeforlike($socid)) . "%'";
119 119
     }
120 120
     if (getDolGlobalString('SOCIETE_ALLOW_SEARCH_ON_ROWID')) {
121
-        $sql .= " OR s.rowid = " . ((int)$socid);
121
+        $sql .= " OR s.rowid = " . ((int) $socid);
122 122
     }
123 123
     $sql .= ")";
124 124
 }
125 125
 // Protection for external user access
126 126
 if ($user->socid > 0) {
127
-    $sql .= " AND s.rowid = " . ((int)$user->socid);
127
+    $sql .= " AND s.rowid = " . ((int) $user->socid);
128 128
 }
129 129
 //if (GETPOST("filter")) $sql.= " AND (".GETPOST("filter", "alpha").")"; // Add other filters
130 130
 $sql .= " ORDER BY s.nom ASC";
Please login to merge, or discard this patch.
public/htdocs/societe/paymentmodes.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
             'use_companybankid' => GETPOST('companybankid'),
530 530
             'force_dir_output' => $conf->societe->multidir_output[$object->entity] . '/' . dol_sanitizeFileName($object->id)
531 531
         );
532
-        $_POST['lang_id'] = GETPOST('lang_idrib' . GETPOSTINT('companybankid'), 'alphanohtml');   // This is required by core/action_builddoc.inc.php
533
-        $_POST['model'] = GETPOST('modelrib' . GETPOSTINT('companybankid'), 'alphanohtml');       // This is required by core/action_builddoc.inc.php
532
+        $_POST['lang_id'] = GETPOST('lang_idrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php
533
+        $_POST['model'] = GETPOST('modelrib' . GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php
534 534
     }
535 535
 
536 536
     $id = $socid;
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
         }
601 601
         if ($action == 'syncsepatostripe') {
602 602
             // Create the bank account on current Stripe env
603
-            $companypaymentmode = new CompanyPaymentMode($db);  // Get record in llx_societe_rib
603
+            $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib
604 604
             $companypaymentmode->fetch($id);
605 605
 
606 606
             if ($companypaymentmode->type != 'ban') {
@@ -653,10 +653,10 @@  discard block
 block discarded – undo
653 653
             $db->begin();
654 654
 
655 655
             if (empty($newcu)) {
656
-                $sql = "DELETE FROM " . MAIN_DB_PREFIX . "societe_account WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . $object->id . " AND status = " . ((int)$tmpservicestatus) . " AND entity = " . $conf->entity;
656
+                $sql = "DELETE FROM " . MAIN_DB_PREFIX . "societe_account WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . $object->id . " AND status = " . ((int) $tmpservicestatus) . " AND entity = " . $conf->entity;
657 657
             } else {
658 658
                 $sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . "societe_account";
659
-                $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int)$object->id) . " AND status = " . ((int)$tmpservicestatus) . " AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
659
+                $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int) $object->id) . " AND status = " . ((int) $tmpservicestatus) . " AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
660 660
             }
661 661
 
662 662
             $resql = $db->query($sql);
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
                 } else {
679 679
                     $sql = 'UPDATE ' . MAIN_DB_PREFIX . "societe_account";
680 680
                     $sql .= " SET key_account = '" . $db->escape($newcu) . "', site_account = '" . $db->escape($tmpsite_account) . "'";
681
-                    $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int)$object->id) . " AND status = " . ((int)$tmpservicestatus) . " AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
681
+                    $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '' or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int) $object->id) . " AND status = " . ((int) $tmpservicestatus) . " AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
682 682
                     $resql = $db->query($sql);
683 683
                 }
684 684
             }
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
                     $tokenstring['type'] = $stripesup->type;
732 732
                     $sql = "UPDATE " . MAIN_DB_PREFIX . "oauth_token";
733 733
                     $sql .= " SET tokenstring = '" . $db->escape(json_encode($tokenstring)) . "'";
734
-                    $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int)$object->id) . " AND service = '" . $db->escape($tmpservice) . "' AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
734
+                    $sql .= " WHERE site = 'stripe' AND (site_account IS NULL or site_account = '" . $db->escape($tmpsite_account) . "') AND fk_soc = " . ((int) $object->id) . " AND service = '" . $db->escape($tmpservice) . "' AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
735 735
                     // TODO Add site and site_account on oauth_token table
736 736
                     $sql .= " WHERE fk_soc = " . $object->id . " AND service = '" . $db->escape($tmpservice) . "' AND entity = " . $conf->entity; // Keep = here for entity. Only 1 record must be modified !
737 737
                 } catch (Exception $e) {
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
                     $tokenstring['stripe_user_id'] = $stripesup->id;
749 749
                     $tokenstring['type'] = $stripesup->type;
750 750
                     $sql = "INSERT INTO " . MAIN_DB_PREFIX . "oauth_token (service, fk_soc, entity, tokenstring)";
751
-                    $sql .= " VALUES ('" . $db->escape($tmpservice) . "', " . ((int)$object->id) . ", " . ((int)$conf->entity) . ", '" . $db->escape(json_encode($tokenstring)) . "')";
751
+                    $sql .= " VALUES ('" . $db->escape($tmpservice) . "', " . ((int) $object->id) . ", " . ((int) $conf->entity) . ", '" . $db->escape(json_encode($tokenstring)) . "')";
752 752
                     // TODO Add site and site_account on oauth_token table
753 753
                 } catch (Exception $e) {
754 754
                     $error++;
@@ -782,9 +782,9 @@  discard block
 block discarded – undo
782 782
             try {
783 783
                 $cu = $stripe->customerStripe($object, $stripeacc, $servicestatus);
784 784
                 if (preg_match('/pm_|src_/', $source)) {
785
-                    $cu->invoice_settings->default_payment_method = (string)$source; // New
785
+                    $cu->invoice_settings->default_payment_method = (string) $source; // New
786 786
                 } else {
787
-                    $cu->default_source = (string)$source; // Old
787
+                    $cu->default_source = (string) $source; // Old
788 788
                 }
789 789
                 // @phan-suppress-next-line PhanDeprecatedFunction
790 790
                 $result = $cu->save();
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
             print ' <span class="error">(' . $langs->trans("WrongCustomerCode") . ')</span>';
972 972
         }
973 973
         print '</td></tr>';
974
-        $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int)$socid);
974
+        $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int) $socid);
975 975
         $resql = $db->query($sql);
976 976
         if (!$resql) {
977 977
             dol_print_error($db);
@@ -1070,7 +1070,7 @@  discard block
 block discarded – undo
1070 1070
             print ' <span class="error">(' . $langs->trans("WrongSupplierCode") . ')</span>';
1071 1071
         }
1072 1072
         print '</td></tr>';
1073
-        $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int)$socid);
1073
+        $sql = "SELECT count(*) as nb from " . MAIN_DB_PREFIX . "facture where fk_soc = " . ((int) $socid);
1074 1074
         $resql = $db->query($sql);
1075 1075
         if (!$resql) {
1076 1076
             dol_print_error($db);
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
                         }
1168 1168
 
1169 1169
                         if ($paymentmethodobjsA->data != null && $paymentmethodobjsB->data != null) {
1170
-                            $listofsources = array_merge((array)$paymentmethodobjsA->data, (array)$paymentmethodobjsB->data);
1170
+                            $listofsources = array_merge((array) $paymentmethodobjsA->data, (array) $paymentmethodobjsB->data);
1171 1171
                         } elseif ($paymentmethodobjsB->data != null) {
1172 1172
                             $listofsources = $paymentmethodobjsB->data;
1173 1173
                         } else {
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
         print '<table class="liste centpercent">' . "\n";
1200 1200
         print '<tr class="liste_titre">';
1201 1201
         print '<td>' . $langs->trans('Label') . '</td>';
1202
-        print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>';   // external system ID
1202
+        print '<td>' . $form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")) . '</td>'; // external system ID
1203 1203
         print '<td>' . $langs->trans('Type') . '</td>';
1204 1204
         print '<td>' . $langs->trans('Informations') . '</td>';
1205 1205
         print '<td></td>';
@@ -1225,8 +1225,8 @@  discard block
 block discarded – undo
1225 1225
 
1226 1226
             $sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . "societe_rib";
1227 1227
             $sql .= " WHERE type in ('card')";
1228
-            $sql .= " AND fk_soc = " . ((int)$object->id);
1229
-            $sql .= " AND status = " . ((int)$servicestatus);
1228
+            $sql .= " AND fk_soc = " . ((int) $object->id);
1229
+            $sql .= " AND status = " . ((int) $servicestatus);
1230 1230
 
1231 1231
             $resql = $db->query($sql);
1232 1232
             if ($resql) {
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 
1243 1243
                             $arrayofremotecard[$companypaymentmodetemp->stripe_card_ref] = $companypaymentmodetemp->stripe_card_ref;
1244 1244
 
1245
-                            print '<tr class="oddeven" data-rowid="' . ((int)$companypaymentmodetemp->id) . '">';
1245
+                            print '<tr class="oddeven" data-rowid="' . ((int) $companypaymentmodetemp->id) . '">';
1246 1246
                             // Label
1247 1247
                             print '<td class="tdoverflowmax150" title="' . dol_escape_htmltag($companypaymentmodetemp->label) . '">';
1248 1248
                             print dol_escape_htmltag($companypaymentmodetemp->label);
@@ -1558,7 +1558,7 @@  discard block
 block discarded – undo
1558 1558
 
1559 1559
         print '<tr class="liste_titre">';
1560 1560
         print_liste_field_titre("Label");
1561
-        print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")));       // external system ID
1561
+        print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID
1562 1562
         print_liste_field_titre("Bank");
1563 1563
         print_liste_field_titre("RIB");
1564 1564
         print_liste_field_titre("IBAN");
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
             // Default
1673 1673
             print '<td class="center" width="70">';
1674 1674
             if (!$rib->default_rib) {
1675
-                print '<a href="' . $_SERVER["PHP_SELF"] . '?socid=' . ((int)$object->id) . '&ribid=' . ((int)$rib->id) . '&action=setasbankdefault&token=' . newToken() . '">';
1675
+                print '<a href="' . $_SERVER["PHP_SELF"] . '?socid=' . ((int) $object->id) . '&ribid=' . ((int) $rib->id) . '&action=setasbankdefault&token=' . newToken() . '">';
1676 1676
                 print img_picto($langs->trans("Disabled"), 'off');
1677 1677
                 print '</a>';
1678 1678
             } else {
Please login to merge, or discard this patch.