Completed
Push — master ( 1601f8...4a8589 )
by Laurent
01:43
created
class/flight/FlightBonus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/flight/FlightPoints.php');
3
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/flight/FlightPoints.php');
4 4
 
5 5
 /**
6 6
  * A bonus won by a pilot
Please login to merge, or discard this patch.
class/flight/FlightTypeCount.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@
 block discarded – undo
31 31
     public function __construct($type, $count = 0, $factor = 0)
32 32
     {
33 33
         $this->type = $type;
34
-        $this->count = (int)$count;
35
-        $this->factor = (int)$factor;
34
+        $this->count = (int) $count;
35
+        $this->factor = (int) $factor;
36 36
     }
37 37
 
38 38
     /**
Please login to merge, or discard this patch.
class/flight/Pilot.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/flight/FlightBonus.php');
4
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/flight/FlightPoints.php');
5
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/flight/FlightTypeCount.php');
6
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/billing/FlightCost.php');
3
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/flight/FlightBonus.php');
4
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/flight/FlightPoints.php');
5
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/flight/FlightTypeCount.php');
6
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/billing/FlightCost.php');
7 7
 
8 8
 /**
9 9
  * Pilot class
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     /**
157 157
      * @return boolean
158 158
      */
159
-    public function isBillable(){
159
+    public function isBillable() {
160 160
         return $this->getTotalBill()->getValue() > 0;
161 161
     }
162 162
 
Please login to merge, or discard this patch.
class/billing/FlightCost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once(DOL_DOCUMENT_ROOT.'/flightlog/class/flight/FlightBonus.php');
3
+require_once(DOL_DOCUMENT_ROOT . '/flightlog/class/flight/FlightBonus.php');
4 4
 
5 5
 /**
6 6
  * @author Laurent De Coninck <[email protected]>
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; ?>
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     Vol client
83 83
                 </td>
84 84
                 <td>
85
-                    <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?>
85
+                    <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?>
86 86
                 </td>
87 87
             </tr>
88 88
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     <label for="points_bonus_<?php echo $flightTypeLine->numero; ?>">
106 106
                         (T<?php echo $flightTypeLine->numero ?>) - <?php echo $flightTypeLine->nom ?>
107 107
                     </label>
108
-                    <?php $prop = 'BBC_POINTS_BONUS_'.$flightTypeLine->numero; ?>
108
+                    <?php $prop = 'BBC_POINTS_BONUS_' . $flightTypeLine->numero; ?>
109 109
                     <input type="number" id="points_bonus_<?php echo $flightTypeLine->numero; ?>" name="points_bonus_<?php echo $flightTypeLine->numero; ?>" value="<?php echo $conf->global->$prop?>" />
110 110
                     <br/>
111 111
                 <?php endforeach; ?>
Please login to merge, or discard this patch.
query/BillableFlightQueryHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
             return $this->getFactorForService($type);
160 160
         }
161 161
 
162
-        return (int)$this->conf->$constVariableName;
162
+        return (int) $this->conf->$constVariableName;
163 163
 
164 164
     }
165 165
 
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
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 2 : Baptême") . '</td>';
148 148
 print '<td class="liste_titre" colspan="2">' . $langs->trans("Organisateur (T1/T2)") . '</td>';
149 149
 print '<td class="liste_titre" colspan="2">' . $langs->trans("Instructeur (orga T6)") . '</td>';
150
-print '<td class="liste_titre" >'            . $langs->trans("Total bonus") . '</td>';
150
+print '<td class="liste_titre" >' . $langs->trans("Total bonus") . '</td>';
151 151
 print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 3 : Privé") . '</td>';
152 152
 print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 4: Meeting") . '</td>';
153 153
 print '<td class="liste_titre" colspan="1">' . $langs->trans("Type 5: Chambley") . '</td>';
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 print "<tr>";
244 244
 print "<td colspan='20'></td>";
245 245
 print "<td>Total à reçevoir</td>";
246
-print "<td>".price($total)."€</td>";
246
+print "<td>" . price($total) . "€</td>";
247 247
 print "</tr>";
248 248
 
249 249
 print '</tbody>';
Please login to merge, or discard this patch.
command/CreatePilotYearBillCommandHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@
 block discarded – undo
271 271
      */
272 272
     private function addAdditionalBonusToOrder(CreatePilotYearBillCommand $command, $object)
273 273
     {
274
-        if ((int)$command->getAdditionalBonus() <= 0) {
274
+        if ((int) $command->getAdditionalBonus() <= 0) {
275 275
             return;
276 276
         }
277 277
 
Please login to merge, or discard this patch.
class/bbctypes.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             }
257 257
 
258 258
             if (is_int($value)) {
259
-                $sqlwhere [] = $key . ' = ' . (int)$value;
259
+                $sqlwhere [] = $key . ' = ' . (int) $value;
260 260
                 continue;
261 261
             }
262 262
         }
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
      */
600 600
     public function isPaxRequired()
601 601
     {
602
-        switch ((int)$this->idType) {
602
+        switch ((int) $this->idType) {
603 603
             case 1:
604 604
             case 2:
605 605
                 return true;
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      */
616 616
     public function isBillingRequired()
617 617
     {
618
-        return (int)$this->idType === 2;
618
+        return (int) $this->idType === 2;
619 619
     }
620 620
 
621 621
     /**
Please login to merge, or discard this patch.