Completed
Push — feature/pilot_information ( cc067b...4835e7 )
by Laurent
01:49
created
damage/tpl/linkedobjectblock.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@
 block discarded – undo
45 45
     $var = !$var;
46 46
     $trclass = ($var ? 'pair' : 'impair');
47 47
 
48
-    if(!$user->rights->flightlog->vol->financial && $user->rowid != $damage->getAuthorId()){
48
+    if (!$user->rights->flightlog->vol->financial && $user->rowid != $damage->getAuthorId()) {
49 49
         continue;
50 50
     }
51 51
 ?>
52 52
     <tr <?php echo $GLOBALS['bc'][$var]; ?> >
53 53
         <td><?php echo $langs->trans("Dégâts"); ?></td>
54
-        <td><a href="<?php echo sprintf(DOL_URL_ROOT.'/flightlog/index.php?id=%s&r=%s', $damage->getId(), 'get_one_damage');?>"><?php echo $damage->getId()?></a></td>
54
+        <td><a href="<?php echo sprintf(DOL_URL_ROOT . '/flightlog/index.php?id=%s&r=%s', $damage->getId(), 'get_one_damage'); ?>"><?php echo $damage->getId()?></a></td>
55 55
         <td align="center"><?php echo $damage->getAuthorName(); ?></td>
56 56
         <td align="center"></td>
57 57
         <td align="right"><?echo price($damage->getAmount()) ?>€</td>
Please login to merge, or discard this patch.
Flight/Query/Repository/GetBillableFlightPerMonthQueryRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@
 block discarded – undo
64 64
 
65 65
         $stats = new BillableFlightByYearMonth();
66 66
 
67
-        for($i = 0; $i < $num ; $i++) {
67
+        for ($i = 0; $i < $num; $i++) {
68 68
             $properties = $this->db->fetch_array($resql);
69 69
             $stat = Statistic::fromArray($properties);
70 70
             $stats->add($stat);
71 71
         }
72 72
 
73
-        $stats->add(new Statistic(0,1,(new \DateTime())->format('Y')));
73
+        $stats->add(new Statistic(0, 1, (new \DateTime())->format('Y')));
74 74
 
75 75
         return $stats;
76 76
     }
Please login to merge, or discard this patch.
Application/Flight/ViewModel/BillableFlightByYearMonth.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
     public function add(Statistic $stat)
18 18
     {
19
-        if(!isset($this->data[$stat->year()])){
19
+        if (!isset($this->data[$stat->year()])) {
20 20
             $this->data[$stat->year()] = [];
21
-            for($i = 1 ; $i <= 12 ; $i++){
21
+            for ($i = 1; $i <= 12; $i++) {
22 22
                 $this->data[$stat->year()][$i] = new Statistic(0, $stat->month(), $stat->year());
23 23
             }
24 24
         }
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
         $this->data[$stat->year()][$stat->month()] = $stat;
27 27
     }
28 28
 
29
-    public function data(){
29
+    public function data() {
30 30
         return $this->data;
31 31
     }
32 32
 
33
-    public function years(){
33
+    public function years() {
34 34
         return array_keys($this->data);
35 35
     }
36 36
 
Please login to merge, or discard this patch.
Application/Flight/ViewModel/Statistic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
         return $this->number;
45 45
     }
46 46
 
47
-    public function year(){
47
+    public function year() {
48 48
         return $this->year;
49 49
     }
50 50
 
51
-    public function month(){
51
+    public function month() {
52 52
         return $this->month;
53 53
     }
54 54
 
Please login to merge, or discard this patch.
Http/Web/Controller/StatisticalGraphController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
         $graphByTypeAndYear->type = [];
137 137
         foreach (fetchBbcFlightTypes() as $flightType) {
138 138
 
139
-            if (!in_array($flightType->numero, [1, 2, 3,4, 6])) {
139
+            if (!in_array($flightType->numero, [1, 2, 3, 4, 6])) {
140 140
                 continue;
141 141
             }
142 142
 
Please login to merge, or discard this patch.
class/YearGraphicalData.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
         $result = [$this->year];
70 70
 
71 71
         foreach ($this->graphData as $typeId => $data) {
72
-            if (!in_array($typeId, [1, 2, 3,4, 6])) {
72
+            if (!in_array($typeId, [1, 2, 3, 4, 6])) {
73 73
                 continue;
74 74
             }
75 75
 
Please login to merge, or discard this patch.
class/flight/FlightTypeCount.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     /**
29 29
      * @param string $type
30
-     * @param float    $count
30
+     * @param integer    $count
31 31
      * @param int    $factor
32 32
      */
33 33
     public function __construct($type, $count = 0, $factor = 0)
Please login to merge, or discard this patch.
Http/Web/templates/flight_damage/form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     <?php echo $renderer->render($form->getElement('flight_id')); ?>
25 25
     <?php echo $renderer->render($form->getElement('token')); ?>
26 26
 
27
-    <?php if($form->has('amount')): ?>
27
+    <?php if ($form->has('amount')): ?>
28 28
         <section class="form-section">
29 29
             <h1 class="form-section-title"><?php echo $langs->trans('Ajout de dégâts'); ?></h1>
30 30
             <table class="border" width="50%">
Please login to merge, or discard this patch.
readFlights.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     print '<td>' . $pilot->getCountForType('orga_T6')->getCount() . '</td>';
190 190
     print '<td>' . $pilot->getCountForType('orga_T6')->getCost()->getValue() . '</td>';
191 191
 
192
-    print sprintf('<td class="%s">', $pilot->getFlightBonus()->getValue() === 0?'text-muted':'text-bold'). $pilot->getFlightBonus()->getValue() . ' pts</td>';
192
+    print sprintf('<td class="%s">', $pilot->getFlightBonus()->getValue() === 0 ? 'text-muted' : 'text-bold') . $pilot->getFlightBonus()->getValue() . ' pts</td>';
193 193
 
194 194
     print '<td>' . $pilot->getCountForType('3')->getCount() . '</td>';
195 195
     print '<td>' . price($pilot->getCountForType('3')->getCost()->getValue()) . '€</td>';
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
     print '<td>' . price($pilot->damageCost()->getValue()) . '€</td>';
209 209
     print '<td>' . price($pilot->invoicedDamageCost()->getValue()) . '€</td>';
210 210
 
211
-    print sprintf('<td class="%s">', $pilot->getFlightsCost()->getValue() === 0?'text-muted':'text-bold'). price($pilot->getFlightsCost()->getValue()) . '€ </td>';
212
-    print sprintf('<td class="%s">', $pilot->isBillable(FlightBonus::zero())?'text-bold':'text-muted'). price($pilot->getTotalBill()->getValue()) . '€</td>';
211
+    print sprintf('<td class="%s">', $pilot->getFlightsCost()->getValue() === 0 ? 'text-muted' : 'text-bold') . price($pilot->getFlightsCost()->getValue()) . '€ </td>';
212
+    print sprintf('<td class="%s">', $pilot->isBillable(FlightBonus::zero()) ? 'text-bold' : 'text-muted') . price($pilot->getTotalBill()->getValue()) . '€</td>';
213 213
     print '</tr>';
214 214
 }
215 215
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 print '<td>' . $totalT3 . '</td>';
235 235
 print '<td></td>';
236 236
 
237
-print '<td>' . $totalT4. '</td>';
237
+print '<td>' . $totalT4 . '</td>';
238 238
 print '<td></td>';
239 239
 
240 240
 print '<td>' . $totalT5 . '</td>';
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 //table km
264 264
 $tauxRemb = isset($conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM) ? $conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM : 0;
265 265
 $year = GETPOST("year", 'int');
266
-if(empty($year)){
266
+if (empty($year)) {
267 267
     $year = date('Y');
268 268
 }
269 269
 
Please login to merge, or discard this patch.