Completed
Push — feature/select_existing_custom... ( a1e51a )
by Laurent
01:57
created
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.
readFlights.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 print '<td>' . $totalT3 . '</td>';
267 267
 print '<td></td>';
268 268
 
269
-print '<td>' . $totalT4. '</td>';
269
+print '<td>' . $totalT4 . '</td>';
270 270
 print '<td></td>';
271 271
 
272 272
 print '<td>' . $totalT5 . '</td>';
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 //table km
293 293
 $tauxRemb = isset($conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM) ? $conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM : 0;
294 294
 $year = GETPOST("year", 'int');
295
-if(empty($year)){
295
+if (empty($year)) {
296 296
     $year = date('Y');
297 297
 }
298 298
 
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.
command/CreateFlightBillCommandHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     {
113 113
         $customer = new Client($this->db);
114 114
 
115
-        if($flight->fk_receiver) {
115
+        if ($flight->fk_receiver) {
116 116
             return $this->fetchCustomerFromFlight($flight);
117 117
         }
118 118
 
Please login to merge, or discard this patch.
facture.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,11 +124,11 @@
 block discarded – undo
124 124
  * Put here all code to do according to value of "action" parameter
125 125
  */
126 126
 if ($action == EXPENSE_REPORT_GENERATOR_ACTION_GENERATE) {
127
-    try{
128
-        $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount, $nbrPax);
127
+    try {
128
+        $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote, $bankAccount, $nbrPax);
129 129
         $handler->handle($command);
130
-    }catch (\Exception $e){
131
-        dol_syslog($e->getMessage(),LOG_ERR);
130
+    } catch (\Exception $e) {
131
+        dol_syslog($e->getMessage(), LOG_ERR);
132 132
         dol_htmloutput_mesg("Facture non créée", '', 'error');
133 133
     }
134 134
 }
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.
Form/InputDate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function setValue($value)
30 30
     {
31
-        if($value instanceof \DateTime){
31
+        if ($value instanceof \DateTime) {
32 32
             return parent::setValue($value->format('Y-m-d'));
33 33
         }
34 34
 
Please login to merge, or discard this patch.
Form/FlightForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @param array $options
28 28
      * @param \User $user
29 29
      */
30
-    public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options,\User $user)
30
+    public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options, \User $user)
31 31
     {
32 32
 
33 33
         parent::__construct('flight_form', FormInterface::METHOD_POST, $this->buildOptionsfromConfiguration($options));
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $flight = $object;
84 84
 
85 85
         // Quick fix - Fixme by a factory on this form.
86
-        if($this->user->rights->flightlog->vol->advanced){
86
+        if ($this->user->rights->flightlog->vol->advanced) {
87 87
             return parent::bind($object);
88 88
         }
89 89
 
Please login to merge, or discard this patch.
command/CreateExpenseNoteCommandHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
         $expenseNoteUser = new User($this->db);
273 273
         $expenseNoteUser->id = $currentMissionUserId;
274 274
         $id = $expenseNote->create($expenseNoteUser);
275
-        if($id < 0){
275
+        if ($id < 0) {
276 276
             return null;
277 277
         }
278 278
 
Please login to merge, or discard this patch.