Completed
Push — feature/damages ( 8f70f7...06d026 )
by Laurent
31s
created
core/modules/modFlightLog.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -341,7 +341,7 @@
 block discarded – undo
341 341
      */
342 342
     private function initPermissions()
343 343
     {
344
-        $this->rights = array();        // Permission array used by this module
344
+        $this->rights = array(); // Permission array used by this module
345 345
         $r = 0;
346 346
 
347 347
         $this->rights[$r][0] = 9993;
Please login to merge, or discard this patch.
admin/vol.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
  * Actions
26 26
  */
27 27
 // Save
28
-if($action === ACTION_SAVE){
29
-    foreach($services as $flightTypeId => $serviceId){
28
+if ($action === ACTION_SAVE) {
29
+    foreach ($services as $flightTypeId => $serviceId) {
30 30
         $res = $flightType->fetch($flightTypeId);
31
-        if($res > 0 ){
31
+        if ($res > 0) {
32 32
             $flightType->fkService = $serviceId;
33 33
             $flightType->update($user);
34 34
         }
35 35
 
36
-        dolibarr_set_const($db, 'BBC_POINTS_BONUS_'.$flightTypeId, GETPOST('points_bonus_'.$flightTypeId), 'chaine', 0, 'Points pour le vol T'.$flightTypeId, $conf->entity);
36
+        dolibarr_set_const($db, 'BBC_POINTS_BONUS_' . $flightTypeId, GETPOST('points_bonus_' . $flightTypeId), 'chaine', 0, 'Points pour le vol T' . $flightTypeId, $conf->entity);
37 37
     }
38 38
 
39 39
     dolibarr_set_const($db, 'BBC_FLIGHT_TYPE_CUSTOMER', GETPOST('customer_product'), 'chaine', 0, '', $conf->entity);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 <tr class="<?= $flightTypeLine->id % 2 == 0 ? "pair" : "impair" ?>">
72 72
                     <td>(T<?= $flightTypeLine->numero ?>) - <?= $flightTypeLine->nom ?></td>
73 73
                     <td>
74
-                        <?php $form->select_produits($flightTypeLine->fkService, 'idprod['.$flightTypeLine->id.']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?>
74
+                        <?php $form->select_produits($flightTypeLine->fkService, 'idprod[' . $flightTypeLine->id . ']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?>
75 75
                     </td>
76 76
                 </tr>
77 77
             <?php endforeach; ?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 </td>
84 84
                 <td>
85 85
                     <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product',
86
-                        $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?>
86
+                        $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?>
87 87
                 </td>
88 88
             </tr>
89 89
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     <label for="points_bonus_<?php echo $flightTypeLine->numero; ?>">
107 107
                         (T<?php echo $flightTypeLine->numero ?>) - <?php echo $flightTypeLine->nom ?>
108 108
                     </label>
109
-                    <?php $prop = 'BBC_POINTS_BONUS_'.$flightTypeLine->numero; ?>
109
+                    <?php $prop = 'BBC_POINTS_BONUS_' . $flightTypeLine->numero; ?>
110 110
                     <input type="number" id="points_bonus_<?php echo $flightTypeLine->numero; ?>" name="points_bonus_<?php echo $flightTypeLine->numero; ?>" value="<?php echo $conf->global->$prop?>" />
111 111
                     <br/>
112 112
                 <?php endforeach; ?>
Please login to merge, or discard this patch.
command/CreateFlightBillCommandHandlerFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once __DIR__.'/CreateFlightBillCommandHandler.php';
4
-require_once __DIR__.'/CreateFlightBillTransactionalCommandHandler.php';
3
+require_once __DIR__ . '/CreateFlightBillCommandHandler.php';
4
+require_once __DIR__ . '/CreateFlightBillTransactionalCommandHandler.php';
5 5
 
6 6
 /**
7 7
  * @author Laurent De Coninck <[email protected]>
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     /**
12 12
      * @return CreateFlightBillCommandHandler
13 13
      */
14
-    public static function factory($db, $conf, $user, $langs){
14
+    public static function factory($db, $conf, $user, $langs) {
15 15
         return new CreateFlightBillTransactionalCommandHandler($db, $conf, $user, $langs);
16 16
     }
17 17
 
Please login to merge, or discard this patch.
generateMonthlyBilling.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 if ($action == EXPENSE_REPORT_GENERATOR_ACTION_GENERATE) {
96 96
     try {
97 97
 
98
-        $command = new CreateMonthBillCommand( $type, $publicNote, $privateNote, $year, $month);
98
+        $command = new CreateMonthBillCommand($type, $publicNote, $privateNote, $year, $month);
99 99
         $handler->handle($command);
100 100
         dol_htmloutput_mesg('Génération : OK');
101 101
     } catch (Exception $e) {
Please login to merge, or discard this patch.
core/cron/BbcMonthlyFlightsBillCron.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         try {
55 55
 
56
-            if(date('d')>=15){
56
+            if (date('d') >= 15) {
57 57
                 dol_syslog('Monthly bill generation : date over');
58 58
                 return -2;
59 59
             }
Please login to merge, or discard this patch.
tabs/project/instructions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
                                     <?php echo !empty($flight->linkedObjectsIds) && in_array($currentTask->id,
233 233
                                         $flight->linkedObjectsIds[$currentTask->table_element]) ? 'checked' : '' ?>
234 234
                                 />
235
-                            <?php else: ?>
235
+                            <?php else : ?>
236 236
 
237 237
                                 <?php if (!empty($flight->linkedObjectsIds) && in_array($currentTask->id,
238 238
                                         $flight->linkedObjectsIds[$currentTask->table_element])): ?>
Please login to merge, or discard this patch.
generateExpenseNote.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
     try {
88 88
         $command = new CreateExpenseNoteCommand($year, $quarter, $userValidatorId, $privateNote, $publicNote);
89 89
         $commandHandler->__invoke($command);
90
-    } catch(PeriodNotFinishedException $e){
90
+    } catch (PeriodNotFinishedException $e) {
91 91
         dol_htmloutput_errors("Le quadri n'est pas encore fini !");
92
-    } catch(\Exception $e){
92
+    } catch (\Exception $e) {
93 93
         dol_syslog($e->getMessage(), LOG_ERR);
94 94
         dol_htmloutput_errors('Error : ' . $e->getMessage());
95 95
     }
@@ -105,15 +105,15 @@  discard block
 block discarded – undo
105 105
 $form = new Form($db);
106 106
 
107 107
 $tabLinks = [];
108
-foreach($flightYears as $currentFlightYear){
108
+foreach ($flightYears as $currentFlightYear) {
109 109
     $tabLinks[] = [
110
-        DOL_URL_ROOT."/flightlog/generateExpenseNote.php?year=".$currentFlightYear,
110
+        DOL_URL_ROOT . "/flightlog/generateExpenseNote.php?year=" . $currentFlightYear,
111 111
         $currentFlightYear,
112
-        "tab_".$currentFlightYear
112
+        "tab_" . $currentFlightYear
113 113
     ];
114 114
 }
115 115
 
116
-dol_fiche_head($tabLinks, "tab_".$year);
116
+dol_fiche_head($tabLinks, "tab_" . $year);
117 117
 
118 118
 ?>
119 119
     <form method="POST">
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         <select name="quarter" id="field_quarter">
135 135
             <option value="1" <?= ($year == $currentYear && $currentQuarter <= 1) ? 'disabled="disabled"' : "" ?>>1</option>
136 136
             <option value="2" <?= ($year == $currentYear && $currentQuarter <= 2) ? 'disabled="disabled"' : "" ?>>2</option>
137
-            <option value="3" <?= ($year == $currentYear && $currentQuarter <= 3) ? 'disabled="disabled"': "" ?>>3</option>
137
+            <option value="3" <?= ($year == $currentYear && $currentQuarter <= 3) ? 'disabled="disabled"' : "" ?>>3</option>
138 138
             <option value="4" <?= ($year == $currentYear && $currentQuarter <= 4) ? 'disabled="disabled"' : "" ?>>4</option>
139 139
         </select>
140 140
         <br/>
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         <label><?= $langs->trans("Validateur de la note de frais")?></label><br/>
144 144
         <?php
145 145
             $include_users = $object->fetch_users_approver_expensereport();
146
-            print $form->select_dolusers($user->id,"fk_user_validator",1,"",0,$include_users);
146
+            print $form->select_dolusers($user->id, "fk_user_validator", 1, "", 0, $include_users);
147 147
         ?>
148 148
         <br/>
149 149
 
Please login to merge, or discard this patch.
command/CreateFlightBillCommand.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
             throw new \InvalidArgumentException('Model document is missing');
92 92
         }
93 93
 
94
-        if(!isset($nbrPax) || !is_numeric($nbrPax) || $nbrPax != (int) $nbrPax){
94
+        if (!isset($nbrPax) || !is_numeric($nbrPax) || $nbrPax != (int) $nbrPax) {
95 95
             throw new \InvalidArgumentException('The number of pax is not correct, an integer is expected');
96 96
         }
97 97
 
Please login to merge, or discard this patch.
class/bbctypes.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -733,7 +733,7 @@
 block discarded – undo
733 733
      */
734 734
     public function getActive()
735 735
     {
736
-        return (boolean)$this->active;
736
+        return (boolean) $this->active;
737 737
     }
738 738
 
739 739
     /**
Please login to merge, or discard this patch.