@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $vol = new Bbcvols($this->db); |
66 | 66 | $vol->date = $command->getDate(); |
67 | 67 | $vol->lieuD = $command->getLieuD(); |
68 | - $vol->lieuA =$command->getLieuA(); |
|
68 | + $vol->lieuA = $command->getLieuA(); |
|
69 | 69 | $vol->heureD = $command->getHeureD(); |
70 | 70 | $vol->heureA = $command->getHeureA(); |
71 | 71 | $vol->BBC_ballons_idBBC_ballons = $command->getBBCBallonsIdBBCBallons(); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $vol->remarque = $command->getRemarque(); |
74 | 74 | $vol->incidents = $command->getIncidents(); |
75 | 75 | $vol->fk_type = $command->getFkType(); |
76 | - $vol->fk_pilot =$command->getFkPilot(); |
|
76 | + $vol->fk_pilot = $command->getFkPilot(); |
|
77 | 77 | $vol->fk_organisateur = $command->getFkOrganisateur(); |
78 | 78 | $vol->kilometers = $command->getKilometers(); |
79 | 79 | $vol->cost = $command->getCost(); |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | throw new Exception(); |
87 | 87 | } |
88 | 88 | |
89 | - if(!$vol->getFlightType()->isBillingRequired() || $vol->isLinkedToOrder()){ |
|
89 | + if (!$vol->getFlightType()->isBillingRequired() || $vol->isLinkedToOrder()) { |
|
90 | 90 | $vol->is_facture = true; |
91 | 91 | } |
92 | 92 | |
93 | 93 | $result = $vol->create($this->user); |
94 | - if($result <= 0){ |
|
94 | + if ($result <= 0) { |
|
95 | 95 | throw new Exception(); |
96 | 96 | } |
97 | 97 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | { |
112 | 112 | $flight->fetch($flight->id); |
113 | 113 | |
114 | - if(!$flight->isLinkedToOrder()){ |
|
114 | + if (!$flight->isLinkedToOrder()) { |
|
115 | 115 | return; |
116 | 116 | } |
117 | 117 | |
@@ -122,17 +122,17 @@ discard block |
||
122 | 122 | |
123 | 123 | $qtyOrder = 0; |
124 | 124 | /** @var OrderLine $currentOrderLine */ |
125 | - foreach($order->lines as $currentOrderLine){ |
|
126 | - $qtyOrder += (int)$currentOrderLine->qty; |
|
125 | + foreach ($order->lines as $currentOrderLine) { |
|
126 | + $qtyOrder += (int) $currentOrderLine->qty; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | $passangersCount = $this->numberOfPassengersLinkedToOrder($order->id); |
130 | 130 | |
131 | - if($passangersCount != $qtyOrder){ |
|
131 | + if ($passangersCount != $qtyOrder) { |
|
132 | 132 | return; |
133 | 133 | } |
134 | 134 | |
135 | - if($order->statut == Commande::STATUS_VALIDATED){ |
|
135 | + if ($order->statut == Commande::STATUS_VALIDATED) { |
|
136 | 136 | $order->cloture($this->user); |
137 | 137 | } |
138 | 138 | } |