Completed
Pull Request — master (#7)
by Laurent
08:13 queued 03:14
created
generateMonthlyBilling.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,9 +239,12 @@
 block discarded – undo
239 239
                     <?php echo $langs->trans('La periode demandée n\'est pas cloturée.') ?>
240 240
                 </p>
241 241
                 <a class="butActionRefused" href="#">Générer</a>
242
-            <?php else: ?>
242
+            <?php else {
243
+    : ?>
243 244
                 <button class="butAction" type="submit">Générer</button>
244
-            <?php endif; ?>
245
+            <?php endif;
246
+}
247
+?>
245 248
 
246 249
         </form>
247 250
     </section>
Please login to merge, or discard this 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.
readFlights.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
 print '<td>' . $totalT3 . '</td>';
275 275
 print '<td></td>';
276 276
 
277
-print '<td>' . $totalT4. '</td>';
277
+print '<td>' . $totalT4 . '</td>';
278 278
 print '<td></td>';
279 279
 
280 280
 print '<td>' . $totalT5 . '</td>';
Please login to merge, or discard this patch.
validators/FlightValidator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,31 +60,31 @@
 block discarded – undo
60 60
             $this->addError('nbrPax', 'Erreur le nombre de passager est un nombre négatif.');
61 61
         }
62 62
 
63
-        if($vol->mustHavePax()){
63
+        if ($vol->mustHavePax()) {
64 64
             if (!$vol->hasPax()) {
65 65
                 $this->addError('nbrPax', 'Erreur ce type de vol doit etre fait avec des passagers.');
66 66
             }
67 67
 
68
-            if(empty(trim($vol->getPassengerNames()))){
68
+            if (empty(trim($vol->getPassengerNames()))) {
69 69
                 $this->addError('passenger_names', 'Le nom des passagers est obligatoire.');
70 70
             }
71 71
 
72
-            if(empty(trim($vol->getPassengerNames()))){
72
+            if (empty(trim($vol->getPassengerNames()))) {
73 73
                 $this->addError('passenger_names', 'Le nom des passagers est obligatoire.');
74 74
             }
75 75
 
76 76
             $passengers = explode(';', $vol->getPassengerNames());
77
-            if(count($passengers) !== $vol->getNumberOfPassengers()){
77
+            if (count($passengers) !== $vol->getNumberOfPassengers()) {
78 78
                 $this->addError('passenger_names', 'Le nombre de noms des passagers doit être égale au nombre de passagers.');
79 79
             }
80 80
         }
81 81
 
82
-        if($vol->isInstruction()){
83
-            if($vol->getPilotId() === $vol->getOrganisatorId()){
82
+        if ($vol->isInstruction()) {
83
+            if ($vol->getPilotId() === $vol->getOrganisatorId()) {
84 84
                 $this->addError('organisator', 'l\'organisateur d\'un vol d\'instruction doit être l\'instructeur et non le pilote');
85 85
             }
86 86
 
87
-            if($this->isGroupedFlight($context)){
87
+            if ($this->isGroupedFlight($context)) {
88 88
                 $this->addError('alone', "Le vol d'instruction est un vol à un seul ballon.");
89 89
             }
90 90
         }
Please login to merge, or discard this patch.
class/bbcvols.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -746,14 +746,14 @@  discard block
 block discarded – undo
746 746
     /**
747 747
      * @return int
748 748
      */
749
-    public function getPilotId(){
749
+    public function getPilotId() {
750 750
         return (int) $this->fk_pilot;
751 751
     }
752 752
 
753 753
     /**
754 754
      * @return int
755 755
      */
756
-    public function getOrganisatorId(){
756
+    public function getOrganisatorId() {
757 757
         return (int) $this->fk_organisateur;
758 758
     }
759 759
 
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
     /**
909 909
      * Is an instruction flight (T6/T7)
910 910
      */
911
-    public function isInstruction(){
911
+    public function isInstruction() {
912 912
         return $this->getFlightType()->isInstruction();
913 913
     }
914 914
 }
Please login to merge, or discard this patch.
class/bbctypes.class.php 1 patch
Spacing   +4 added lines, -4 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
     /**
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
      */
641 641
     public function isInstruction()
642 642
     {
643
-        $type = (int)$this->idType;
643
+        $type = (int) $this->idType;
644 644
         return  $type === 6 || $type === 7;
645 645
     }
646 646
 }
Please login to merge, or discard this patch.