Passed
Push — dev ( f7d146...05f415 )
by Rafael
60:50
created
htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
                 $object->clearObjectLinkedCache();
105 105
 
106
-                return (int)$ret;
106
+                return (int) $ret;
107 107
             }
108 108
         }
109 109
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                         foreach ($object->linkedObjects['shipping'] as $element) {
216 216
                             $ret = $element->setClosed();
217 217
                             if ($ret < 0) {
218
-                                return (int)$ret;
218
+                                return (int) $ret;
219 219
                             }
220 220
                         }
221 221
                     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                         foreach ($object->linkedObjects['shipping'] as $element) {
237 237
                             $ret = $element->setBilled();
238 238
                             if ($ret < 0) {
239
-                                return (int)$ret;
239
+                                return (int) $ret;
240 240
                             }
241 241
                         }
242 242
                     }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                         $areAllInvoicesValidated = true;
255 255
                         foreach ($orderLinked->linkedObjects['facture'] as $key => $invoice) {
256 256
                             if ($invoice->statut == Facture::STATUS_VALIDATED || $object->id == $invoice->id) {
257
-                                $totalHTInvoices += (float)$invoice->total_ht;
257
+                                $totalHTInvoices += (float) $invoice->total_ht;
258 258
                             } else {
259 259
                                 $areAllInvoicesValidated = false;
260 260
                                 break;
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                         }
263 263
                         if ($areAllInvoicesValidated) {
264 264
                             $isSameTotal = (price2num($totalHTInvoices, 'MT') == price2num($orderLinked->total_ht, 'MT'));
265
-                            dol_syslog("Amount of linked invoices = " . $totalHTInvoices . ", of order = " . $orderLinked->total_ht . ", isSameTotal = " . (string)$isSameTotal, LOG_DEBUG);
265
+                            dol_syslog("Amount of linked invoices = " . $totalHTInvoices . ", of order = " . $orderLinked->total_ht . ", isSameTotal = " . (string) $isSameTotal, LOG_DEBUG);
266 266
                             if ($isSameTotal) {
267 267
                                 $ret = $orderLinked->classifyBilled($user);
268 268
                                 if ($ret < 0) {
@@ -592,9 +592,9 @@  discard block
 block discarded – undo
592 592
             // Automatically create intervention
593 593
             if (isModEnabled('intervention') && isModEnabled('ticket') && !empty($conf->workflow->enabled) && getDolGlobalString('WORKFLOW_TICKET_CREATE_INTERVENTION')) {
594 594
                 $fichinter = new Fichinter($this->db);
595
-                $fichinter->socid = (int)$object->fk_soc;
596
-                $fichinter->fk_project = (int)$object->fk_project;
597
-                $fichinter->fk_contrat = (int)$object->fk_contract;
595
+                $fichinter->socid = (int) $object->fk_soc;
596
+                $fichinter->fk_project = (int) $object->fk_project;
597
+                $fichinter->fk_contrat = (int) $object->fk_contract;
598 598
                 $fichinter->author = $user->id;
599 599
                 $fichinter->model_pdf = (getDolGlobalString('FICHEINTER_ADDON_PDF')) ? $conf->global->FICHEINTER_ADDON_PDF : 'soleil';
600 600
                 $fichinter->origin = $object->element;
Please login to merge, or discard this patch.
public/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1510,8 +1510,8 @@
 block discarded – undo
1510 1510
         $actioncomm = new ActionComm($this->db);
1511 1511
         $actioncomm->type_code = $object->actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
1512 1512
         $actioncomm->code = 'AC_' . $action;
1513
-        $actioncomm->label = $object->actionmsg2;     // Label of event
1514
-        $actioncomm->note_private = $object->actionmsg;     // Description
1513
+        $actioncomm->label = $object->actionmsg2; // Label of event
1514
+        $actioncomm->note_private = $object->actionmsg; // Description
1515 1515
         $actioncomm->fk_project = $projectid;
1516 1516
         $actioncomm->datep = $now;
1517 1517
         $actioncomm->datef = $now;
Please login to merge, or discard this patch.
public/htdocs/expedition/dispatch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
                         $sql .= " JOIN " . MAIN_DB_PREFIX . "product_stock as ps";
177 177
                         $sql .= " ON ps.rowid = pb.fk_product_stock";
178 178
                         $sql .= " WHERE pb.batch = '" . $db->escape($lot) . "'";
179
-                        $sql .= " AND ps.fk_product = " . ((int) $prod_id) ;
180
-                        $sql .= " AND ps.fk_entrepot = " . ((int) $warehouse_id) ;
179
+                        $sql .= " AND ps.fk_product = " . ((int) $prod_id);
180
+                        $sql .= " AND ps.fk_entrepot = " . ((int) $warehouse_id);
181 181
 
182 182
                         $resql = $db->query($sql);
183 183
                         if ($resql) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                     $qtystart = 0;
206 206
 
207 207
                     if ($idline > 0) {
208
-                        $result = $expeditiondispatch->fetch($idline);  // get line from llx_expeditiondet
208
+                        $result = $expeditiondispatch->fetch($idline); // get line from llx_expeditiondet
209 209
                         if ($result < 0) {
210 210
                             setEventMessages($expeditiondispatch->error, $expeditiondispatch->errors, 'errors');
211 211
                             $error++;
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 llxHeader('', $title, $help_url, '', 0, 0, $morejs);
379 379
 
380 380
 if ($object->id > 0 || !empty($object->ref)) {
381
-    $lines = $object->lines;    // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data
381
+    $lines = $object->lines; // This is an array of detail of line, on line per source order line found intolines[]->fk_elementdet, then each line may have sub data
382 382
     //var_dump($lines[0]->fk_elementdet); exit;
383 383
 
384 384
     $num_prod = count($lines);
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
     print '<center>';
528 528
 
529 529
     print '<br>';
530
-    $disabled = 0;  // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
530
+    $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
531 531
 
532 532
     if ($object->statut == Expedition::STATUS_DRAFT) {
533 533
                 $formproduct = new FormProduct($db);
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
                 }
631 631
                 print '<td class="right">' . $langs->trans("QtyOrdered") . '</td>';
632 632
                 if ($object->status == Expedition::STATUS_DRAFT) {
633
-                    print '<td class="right">' . $langs->trans("QtyToShip");  // Qty to dispatch (sum for all lines of batch detail if there is)
633
+                    print '<td class="right">' . $langs->trans("QtyToShip"); // Qty to dispatch (sum for all lines of batch detail if there is)
634 634
                 } else {
635 635
                     print '<td class="right">' . $langs->trans("QtyDispatchedShort") . '</td>';
636 636
                 }
Please login to merge, or discard this patch.
public/htdocs/reception/dispatch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
     print '<center>';
439 439
 
440 440
     print '<br>';
441
-    $disabled = 0;  // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
441
+    $disabled = 0; // This is used to disable or not the bulk selection of target warehouse. No reason to have it disabled so forced to 0.
442 442
 
443 443
     if ($object->statut == Reception::STATUS_DRAFT || ($object->statut == Reception::STATUS_VALIDATED && !getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION'))) {
444 444
                 $formproduct = new FormProduct($db);
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
                 print '<td class="right">' . $langs->trans("SupplierRef") . '</td>';
542 542
                 print '<td class="right">' . $langs->trans("QtyOrdered") . '</td>';
543 543
                 if ($object->status == Reception::STATUS_DRAFT) {
544
-                    print '<td class="right">' . $langs->trans("QtyToReceive");   // Qty to dispatch (sum for all lines of batch detail if there is)
544
+                    print '<td class="right">' . $langs->trans("QtyToReceive"); // Qty to dispatch (sum for all lines of batch detail if there is)
545 545
                 } else {
546 546
                     print '<td class="right">' . $langs->trans("QtyDispatchedShort") . '</td>';
547 547
                 }
Please login to merge, or discard this patch.
Dolibarr/Code/Api/Api/Documents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -591,7 +591,7 @@
 block discarded – undo
591 591
                     for ($i = 0; $i < $count; $i++) {
592 592
                         foreach ($ecmfile->lines as $line) {
593 593
                             if ($filearray[$i]['name'] == $line->filename) {
594
-                                $filearray[$i] = array_merge($filearray[$i], (array)$line);
594
+                                $filearray[$i] = array_merge($filearray[$i], (array) $line);
595 595
                             }
596 596
                         }
597 597
                     }
Please login to merge, or discard this patch.
Dolibarr/Code/Projet/Api/Tasks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             if ($search_sale == -2) {
105 105
                 $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc)";
106 106
             } elseif ($search_sale > 0) {
107
-                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")";
107
+                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")";
108 108
             }
109 109
         }
110 110
         // Add sql filters
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             }
499 499
             if ($field == 'array_options' && is_array($value)) {
500 500
                 foreach ($value as $index => $val) {
501
-                    $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);;
501
+                    $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task); ;
502 502
                 }
503 503
                 continue;
504 504
             }
Please login to merge, or discard this patch.
Dolibarr/Code/Reception/Api/Receptions.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public $reception;
50 50
 
51 51
     /**
52
-        * Constructor
52
+     * Constructor
53 53
      */
54 54
     public function __construct()
55 55
     {
@@ -643,15 +643,15 @@  discard block
 block discarded – undo
643 643
     */
644 644
 
645 645
     /**
646
-    * Close a reception (Classify it as "Delivered")
647
-    *
648
-    * @param    int     $id             Reception ID
649
-    * @param    int     $notrigger      Disabled triggers
650
-    *
651
-    * @url POST    {id}/close
652
-    *
646
+     * Close a reception (Classify it as "Delivered")
647
+     *
648
+     * @param    int     $id             Reception ID
649
+     * @param    int     $notrigger      Disabled triggers
650
+     *
651
+     * @url POST    {id}/close
652
+     *
653 653
      * @return  array
654
-    */
654
+     */
655 655
     public function close($id, $notrigger = 0)
656 656
     {
657 657
         if (!DolibarrApiAccess::$user->hasRight('reception', 'creer')) {
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
         return $this->_cleanObjectDatas($this->reception);
684 684
     }
685 685
 
686
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
686
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
687 687
     /**
688 688
      * Clean sensible object datas
689 689
      *
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
      */
693 693
     protected function _cleanObjectDatas($object)
694 694
     {
695
-		// phpcs:enable
695
+        // phpcs:enable
696 696
         $object = parent::_cleanObjectDatas($object);
697 697
 
698 698
         unset($object->thirdparty); // id already returned
Please login to merge, or discard this patch.
Dolibarr/Code/ComptaFacture/Api/Invoices.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -372,18 +372,18 @@  discard block
 block discarded – undo
372 372
     }
373 373
 
374 374
     /**
375
-    * Create an invoice using a contract.
376
-    *
377
-    * @param int   $contractid       Id of the contract
375
+     * Create an invoice using a contract.
376
+     *
377
+     * @param int   $contractid       Id of the contract
378 378
      * @return     array                          Object with cleaned properties
379
-    *
380
-    * @url     POST /createfromcontract/{contractid}
381
-    *
382
-    * @throws RestException 400
383
-    * @throws RestException 401
384
-    * @throws RestException 404
385
-    * @throws RestException 405
386
-    */
379
+     *
380
+     * @url     POST /createfromcontract/{contractid}
381
+     *
382
+     * @throws RestException 400
383
+     * @throws RestException 401
384
+     * @throws RestException 404
385
+     * @throws RestException 405
386
+     */
387 387
     public function createInvoiceFromContract($contractid)
388 388
     {
389 389
     
@@ -1732,7 +1732,7 @@  discard block
 block discarded – undo
1732 1732
         ];
1733 1733
     }
1734 1734
 
1735
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1735
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1736 1736
     /**
1737 1737
      * Clean sensible object datas
1738 1738
      *
@@ -1741,7 +1741,7 @@  discard block
 block discarded – undo
1741 1741
      */
1742 1742
     protected function _cleanObjectDatas($object)
1743 1743
     {
1744
-		// phpcs:enable
1744
+        // phpcs:enable
1745 1745
         $object = parent::_cleanObjectDatas($object);
1746 1746
 
1747 1747
         unset($object->note);
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
     }
1836 1836
 
1837 1837
 
1838
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1838
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
1839 1839
     /**
1840 1840
      * Clean sensible object datas
1841 1841
      *
@@ -1844,7 +1844,7 @@  discard block
 block discarded – undo
1844 1844
      */
1845 1845
     protected function _cleanTemplateObjectDatas($object)
1846 1846
     {
1847
-		// phpcs:enable
1847
+        // phpcs:enable
1848 1848
         $object = parent::_cleanObjectDatas($object);
1849 1849
 
1850 1850
         unset($object->note);
Please login to merge, or discard this patch.
Dolibarr/Code/Adherents/Api/Members.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -275,11 +275,11 @@
 block discarded – undo
275 275
         }
276 276
         $sql .= ' WHERE t.entity IN (' . getEntity('adherent') . ')';
277 277
         if (!empty($typeid)) {
278
-            $sql .= ' AND t.fk_adherent_type=' . ((int)$typeid);
278
+            $sql .= ' AND t.fk_adherent_type=' . ((int) $typeid);
279 279
         }
280 280
         // Select members of given category
281 281
         if ($category > 0) {
282
-            $sql .= " AND c.fk_categorie = " . ((int)$category);
282
+            $sql .= " AND c.fk_categorie = " . ((int) $category);
283 283
             $sql .= " AND c.fk_member = t.rowid";
284 284
         }
285 285
         // Add sql filters
Please login to merge, or discard this patch.