Passed
Push — GENERAL_BUG_REVIEW_240911 ( 776d89...c757bd )
by Rafael
50:33
created
public/htdocs/categories/photos.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 /*
70 70
  * Actions
71 71
  */
72
-$parameters = array('id' => $id,  'label' => $label, 'confirm' => $confirm, 'type' => $type, 'uploaddir' => $upload_dir, 'sendfile' => (GETPOST("sendit") ? true : false));
72
+$parameters = array('id' => $id, 'label' => $label, 'confirm' => $confirm, 'type' => $type, 'uploaddir' => $upload_dir, 'sendfile' => (GETPOST("sendit") ? true : false));
73 73
 // Note that $action and $object may be modified by some hooks
74 74
 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
75 75
 if ($reshook < 0) {
Please login to merge, or discard this patch.
public/htdocs/categories/traduction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
 $type = $object->type;
61 61
 if (is_numeric($type)) {
62
-    $type = Categorie::$MAP_ID_TO_CODE[$type];   // For backward compatibility
62
+    $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
63 63
 }
64 64
 
65 65
 
Please login to merge, or discard this patch.
public/htdocs/emailcollector/lib/emailcollector.lib.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
 function getAttachments($jk, $mbox)
120 120
 {
121
-    $structure = imap_fetchstructure($mbox, $jk, FT_UID);  // @phan-suppress-current-line PhanTypeMismatchArgumentInternal
121
+    $structure = imap_fetchstructure($mbox, $jk, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal
122 122
     $parts = getParts($structure);
123 123
 
124 124
     $fpos = 2;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
  */
156 156
 function getFileData($jk, $fpos, $type, $mbox)
157 157
 {
158
-    $merge = imap_fetchbody($mbox, $jk, $fpos, FT_UID);  // @phan-suppress-current-line PhanTypeMismatchArgumentInternal
158
+    $merge = imap_fetchbody($mbox, $jk, $fpos, FT_UID); // @phan-suppress-current-line PhanTypeMismatchArgumentInternal
159 159
     $data = getDecodeValue($merge, $type);
160 160
 
161 161
     return $data;
Please login to merge, or discard this patch.
public/htdocs/expedition/ajax/searchfrombarcode.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,22 +98,22 @@
 block discarded – undo
98 98
                     $fk_product = $obj->fk_product;
99 99
                     $reelqty = $obj->reel;
100 100
 
101
-                    $objectreturn = array('fk_warehouse' => $warehouseid,'fk_product' => $fk_product,'reelqty' => $reelqty);
101
+                    $objectreturn = array('fk_warehouse' => $warehouseid, 'fk_product' => $fk_product, 'reelqty' => $reelqty);
102 102
                 }
103 103
             }
104 104
         }
105 105
         if ($warehousefound < 1) {
106
-            $response = array('status' => 'error','errorcode' => 'NotFound','message' => 'No warehouse found for barcode' . $barcode);
106
+            $response = array('status' => 'error', 'errorcode' => 'NotFound', 'message' => 'No warehouse found for barcode' . $barcode);
107 107
         } elseif ($warehousefound > 1) {
108
-            $response = array('status' => 'error','errorcode' => 'TooManyWarehouse','message' => 'Too many warehouse found');
108
+            $response = array('status' => 'error', 'errorcode' => 'TooManyWarehouse', 'message' => 'Too many warehouse found');
109 109
         } else {
110
-            $response = array('status' => 'success','message' => 'Warehouse found','object' => $objectreturn);
110
+            $response = array('status' => 'success', 'message' => 'Warehouse found', 'object' => $objectreturn);
111 111
         }
112 112
     } else {
113
-        $response = array('status' => 'error','errorcode' => 'NotFound','message' => "No results found for barcode");
113
+        $response = array('status' => 'error', 'errorcode' => 'NotFound', 'message' => "No results found for barcode");
114 114
     }
115 115
 } else {
116
-    $response = array('status' => 'error','errorcode' => 'ActionError','message' => "Error on action");
116
+    $response = array('status' => 'error', 'errorcode' => 'ActionError', 'message' => "Error on action");
117 117
 }
118 118
 
119 119
 $response = json_encode($response);
Please login to merge, or discard this patch.
public/htdocs/expedition/card.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
                                         $tooltipClass = ' classfortooltip';
1450 1450
                                         $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1451 1451
                                     } else {
1452
-                                        $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ;
1452
+                                        $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
1453 1453
                                     }
1454 1454
                                     $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1455 1455
 
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
                                             $tooltipClass = ' classfortooltip';
1689 1689
                                             $tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines') . ' : ' . $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1690 1690
                                         } else {
1691
-                                            $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ;
1691
+                                            $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
1692 1692
                                         }
1693 1693
                                         $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1694 1694
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1437,7 +1437,9 @@
 block discarded – undo
1437 1437
                                         $deliverableQty = min($quantityToBeDelivered, $batchStock);
1438 1438
                                     }
1439 1439
 
1440
-                                    if ($deliverableQty < 0) $deliverableQty = 0;
1440
+                                    if ($deliverableQty < 0) {
1441
+                                        $deliverableQty = 0;
1442
+                                    }
1441 1443
 
1442 1444
                                     $inputName = 'qtyl' . $indiceAsked . '_' . $subj;
1443 1445
                                     if (GETPOSTISSET($inputName)) {
Please login to merge, or discard this patch.
public/htdocs/expedition/list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
 
154 154
 $object->fields = dol_sort_array($object->fields, 'position');
155 155
 $arrayfields = dol_sort_array($arrayfields, 'position');
156
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
156
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
157 157
 
158 158
 // Security check
159 159
 $expeditionid = GETPOSTINT('id');
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,8 +444,10 @@
 block discarded – undo
444 444
                             );
445 445
                             if ($result > 0) {
446 446
                                 $lineid = $result;
447
-                                if (!empty($createbills_onebythird)) //increment rang to keep sending
447
+                                if (!empty($createbills_onebythird)) {
448
+                                    //increment rang to keep sending
448 449
                                     $TFactThirdNbLines[$expd->socid]++;
450
+                                }
449 451
                             } else {
450 452
                                 $lineid = 0;
451 453
                                 $error++;
Please login to merge, or discard this patch.
public/htdocs/expedition/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 }
97 97
 $result = restrictedArea($user, 'expedition', $object->id, '');
98 98
 
99
-$permissiontoadd = $user->hasRight('expedition', 'creer');  // Used by the include of actions_dellink.inc.php
99
+$permissiontoadd = $user->hasRight('expedition', 'creer'); // Used by the include of actions_dellink.inc.php
100 100
 
101 101
 
102 102
 /*
Please login to merge, or discard this patch.
public/htdocs/expedition/shipment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     $socid = $user->socid;
82 82
 }
83 83
 
84
-$result = restrictedArea($user, 'expedition', 0, '');   // We use 0 for id, because there is no particular shipment on this tab, only id of order is known
84
+$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known
85 85
 
86 86
 
87 87
 
Please login to merge, or discard this patch.
public/htdocs/hrm/position.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 
92 92
 // Default sort order (if not yet defined by previous GETPOST)
93 93
 if (!$sortfield) {
94
-    reset($objectposition->fields);                    // Reset is required to avoid key() to return null.
94
+    reset($objectposition->fields); // Reset is required to avoid key() to return null.
95 95
     $sortfield = "t." . key($objectposition->fields); // Set here default search field. By default 1st field in definition.
96 96
 }
97 97
 if (!$sortorder) {
Please login to merge, or discard this patch.