Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
public/htdocs/webservices/server_payment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
         $new_payment->paiementid = !empty($payment['payment_mode_id']) ? intval($payment['payment_mode_id']) : $soc->mode_reglement_id;
196 196
         $new_payment->datepaye = $now;
197 197
         $new_payment->author = $payment['thirdparty_id'];
198
-        $new_payment->amounts = array($payment['invoice_id'] => (float)$payment['amount']);
198
+        $new_payment->amounts = array($payment['invoice_id'] => (float) $payment['amount']);
199 199
 
200 200
         $db->begin();
201 201
         $result = $new_payment->create($fuser, true);
Please login to merge, or discard this patch.
public/htdocs/public/ticket/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 // For MultiCompany module.
46 46
 // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
47 47
 // Because 2 entities can have the same ref.
48
-$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1));
48
+$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
49 49
 if (is_numeric($entity)) {
50 50
     define("DOLENTITY", $entity);
51 51
 }
Please login to merge, or discard this patch.
public/htdocs/variants/combinations.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
 
35 35
 $langs->loadLangs(array("products", "other"));
36 36
 
37
-$id = GETPOSTINT('id');                             // ID of the parent Product
37
+$id = GETPOSTINT('id'); // ID of the parent Product
38 38
 $ref = GETPOST('ref', 'alpha');
39 39
 
40
-$combination_id = GETPOSTINT('combination_id');     // ID of the combination
40
+$combination_id = GETPOSTINT('combination_id'); // ID of the combination
41 41
 
42
-$reference = GETPOST('reference', 'alpha');         // Reference of the variant Product
42
+$reference = GETPOST('reference', 'alpha'); // Reference of the variant Product
43 43
 
44 44
 $weight_impact = GETPOSTFLOAT('weight_impact', 2);
45
-$price_impact_percent = (bool)GETPOST('price_impact_percent');
45
+$price_impact_percent = (bool) GETPOST('price_impact_percent');
46 46
 $price_impact = $price_impact_percent ? GETPOSTFLOAT('price_impact', 2) : GETPOSTFLOAT('price_impact', 'MU');
47 47
 
48 48
 // for PRODUIT_MULTIPRICES
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
             }
178 178
 
179 179
             // Valuepair
180
-            $sanit_features[(int)$explode[0]] = (int)$explode[1];
180
+            $sanit_features[(int) $explode[0]] = (int) $explode[1];
181 181
 
182 182
             $tmp = new ProductCombination2ValuePair($db);
183
-            $tmp->fk_prod_attr = (int)$explode[0];
184
-            $tmp->fk_prod_attr_val = (int)$explode[1];
183
+            $tmp->fk_prod_attr = (int) $explode[0];
184
+            $tmp->fk_prod_attr_val = (int) $explode[1];
185 185
 
186 186
             $productCombination2ValuePairs1[] = $tmp;
187 187
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         exit();
282 282
     }
283 283
 
284
-    $prodcomb->variation_weight = (float)price2num($weight_impact);
284
+    $prodcomb->variation_weight = (float) price2num($weight_impact);
285 285
 
286 286
     // for conf PRODUIT_MULTIPRICES
287 287
     if (getDolGlobalString('PRODUIT_MULTIPRICES')) {
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
             $productCombinationLevel = new ProductCombinationLevel($db);
302 302
             $productCombinationLevel->fk_product_attribute_combination = $prodcomb->id;
303 303
             $productCombinationLevel->fk_price_level = $i;
304
-            $productCombinationLevel->variation_price = (float)$level_price_impact[$i];
305
-            $productCombinationLevel->variation_price_percentage = (bool)$level_price_impact_percent[$i];
304
+            $productCombinationLevel->variation_price = (float) $level_price_impact[$i];
305
+            $productCombinationLevel->variation_price_percentage = (bool) $level_price_impact_percent[$i];
306 306
             $prodcomb->combination_price_levels[$i] = $productCombinationLevel;
307 307
         }
308 308
     }
@@ -417,8 +417,8 @@  discard block
 block discarded – undo
417 417
 
418 418
     print dol_get_fiche_head($head, 'combinations', $titre, -1, $picto);
419 419
 
420
-    $linkback = '<a href="' . constant('BASE_URL') . '/product/list.php?type=' . ((int)$object->type) . '">' . $langs->trans("BackToList") . '</a>';
421
-    $object->next_prev_filter = "fk_product_type = " . ((int)$object->type);
420
+    $linkback = '<a href="' . constant('BASE_URL') . '/product/list.php?type=' . ((int) $object->type) . '">' . $langs->trans("BackToList") . '</a>';
421
+    $object->next_prev_filter = "fk_product_type = " . ((int) $object->type);
422 422
 
423 423
     dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', '', '', '', 0, '', '');
424 424
 
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
                 $prodstatic->fetch($prodcomb->fk_product_child);
801 801
 
802 802
                 print $form->formconfirm(
803
-                    "combinations.php?id=" . urlencode((string)($id)) . "&combination_id=" . urlencode((string)($combination_id)),
803
+                    "combinations.php?id=" . urlencode((string) ($id)) . "&combination_id=" . urlencode((string) ($combination_id)),
804 804
                     $langs->trans('Delete'),
805 805
                     $langs->trans('ProductCombinationDeleteDialog', $prodstatic->ref),
806 806
                     "confirm_deletecombination",
Please login to merge, or discard this patch.
public/htdocs/supplier_proposal/card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
             $idprod = GETPOSTINT('idprod');
604 604
         }
605 605
 
606
-        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);      // Can be '1.2' or '1.2 (CODE)'
606
+        $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
607 607
 
608 608
         $price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
609 609
         $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
             }
979 979
 
980 980
             $ttc = price2num(GETPOST('price_ttc'), '', 2);
981
-            $ht = (float)$ttc / (1 + ((float)$vatratecleaned / 100));
981
+            $ht = (float) $ttc / (1 + ((float) $vatratecleaned / 100));
982 982
             $price_base_type = 'HT';
983 983
         }
984 984
 
Please login to merge, or discard this patch.