Completed
Push — feature/update_flight ( a7cb77...01d55d )
by Laurent
01:45
created
class/bbcvols.class.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -249,18 +249,18 @@  discard block
 block discarded – undo
249 249
         $sql .= ' ' . (!isset($this->nbrPax) ? 'NULL' : "'" . $this->db->escape($this->nbrPax) . "'") . ',';
250 250
         $sql .= ' ' . (!isset($this->remarque) ? 'NULL' : "'" . $this->db->escape($this->remarque) . "'") . ',';
251 251
         $sql .= ' ' . (!isset($this->incidents) ? 'NULL' : "'" . $this->db->escape($this->incidents) . "'") . ',';
252
-        $sql .= ' ' . (!isset($this->fk_type) || (int)$this->fk_type === -1 ? 'NULL' : $this->fk_type) . ',';
253
-        $sql .= ' ' . (!isset($this->fk_pilot) || (int)$this->fk_pilot === -1 ? 'NULL' : $this->fk_pilot) . ',';
254
-        $sql .= ' ' . (!isset($this->fk_organisateur) || (int)$this->fk_organisateur === -1 ? 'NULL' : $this->fk_organisateur) . ',';
252
+        $sql .= ' ' . (!isset($this->fk_type) || (int) $this->fk_type === -1 ? 'NULL' : $this->fk_type) . ',';
253
+        $sql .= ' ' . (!isset($this->fk_pilot) || (int) $this->fk_pilot === -1 ? 'NULL' : $this->fk_pilot) . ',';
254
+        $sql .= ' ' . (!isset($this->fk_organisateur) || (int) $this->fk_organisateur === -1 ? 'NULL' : $this->fk_organisateur) . ',';
255 255
         $sql .= ' ' . (!isset($this->is_facture) ? '0' : $this->is_facture) . ',';
256 256
         $sql .= ' ' . (!isset($this->kilometers) || empty($this->kilometers) ? '0' : $this->kilometers) . ',';
257 257
         $sql .= ' ' . (!isset($this->cost) ? 'NULL' : "'" . $this->db->escape($this->cost) . "'") . ',';
258
-        $sql .= ' ' . (!isset($this->fk_receiver) || (int)$this->fk_receiver === -1 ? 'NULL' : $this->fk_receiver) . ',';
258
+        $sql .= ' ' . (!isset($this->fk_receiver) || (int) $this->fk_receiver === -1 ? 'NULL' : $this->fk_receiver) . ',';
259 259
         $sql .= ' ' . (!isset($this->justif_kilometers) ? 'NULL' : "'" . $this->db->escape($this->justif_kilometers) . "'") . ',';
260 260
         $sql .= ' ' . "'" . date('Y-m-d H:i:s') . "'" . ',';
261 261
         $sql .= ' ' . "'" . date('Y-m-d H:i:s') . "'" . ',';
262 262
         $sql .= ' ' . "'" . $this->passengerNames . "'" . ',';
263
-        $sql .= ' ' . (!isset($this->orderId) || (int)$this->orderId === -1 ? 'NULL' : $this->orderId) . '';
263
+        $sql .= ' ' . (!isset($this->orderId) || (int) $this->orderId === -1 ? 'NULL' : $this->orderId) . '';
264 264
 
265 265
         $sql .= ')';
266 266
 
@@ -348,28 +348,28 @@  discard block
 block discarded – undo
348 348
 
349 349
                 $this->id = $obj->idBBC_vols;
350 350
 
351
-                $this->idBBC_vols = (int)$obj->idBBC_vols;
351
+                $this->idBBC_vols = (int) $obj->idBBC_vols;
352 352
                 $this->date = $this->db->jdate($obj->date);
353 353
                 $this->lieuD = $obj->lieuD;
354 354
                 $this->lieuA = $obj->lieuA;
355 355
                 $this->heureD = $obj->heureD;
356 356
                 $this->heureA = $obj->heureA;
357
-                $this->BBC_ballons_idBBC_ballons = (int)$obj->BBC_ballons_idBBC_ballons;
357
+                $this->BBC_ballons_idBBC_ballons = (int) $obj->BBC_ballons_idBBC_ballons;
358 358
                 $this->nbrPax = $obj->nbrPax;
359 359
                 $this->remarque = $obj->remarque;
360 360
                 $this->incidents = $obj->incidents;
361
-                $this->fk_type = (int)$obj->fk_type;
362
-                $this->fk_pilot = (int)$obj->fk_pilot;
363
-                $this->fk_organisateur = (int)$obj->fk_organisateur;
364
-                $this->is_facture = (int)$obj->is_facture;
361
+                $this->fk_type = (int) $obj->fk_type;
362
+                $this->fk_pilot = (int) $obj->fk_pilot;
363
+                $this->fk_organisateur = (int) $obj->fk_organisateur;
364
+                $this->is_facture = (int) $obj->is_facture;
365 365
                 $this->kilometers = $obj->kilometers;
366 366
                 $this->cost = $obj->cost;
367
-                $this->fk_receiver = (int)$obj->fk_receiver;
367
+                $this->fk_receiver = (int) $obj->fk_receiver;
368 368
                 $this->justif_kilometers = $obj->justif_kilometers;
369 369
                 $this->date_creation = $obj->date_creation;
370 370
                 $this->date_update = $obj->date_update;
371 371
                 $this->passengerNames = $obj->passenger_names;
372
-                $this->orderId = (int)$obj->order_id;
372
+                $this->orderId = (int) $obj->order_id;
373 373
 
374 374
                 $this->balloon = $this->fetchBalloon();
375 375
                 $this->pilot = $this->fetchUser($this->fk_pilot);
@@ -478,17 +478,17 @@  discard block
 block discarded – undo
478 478
         $sql .= ' nbrPax = ' . (isset($this->nbrPax) ? "'" . $this->db->escape($this->nbrPax) . "'" : "null") . ',';
479 479
         $sql .= ' remarque = ' . (isset($this->remarque) ? "'" . $this->db->escape($this->remarque) . "'" : "null") . ',';
480 480
         $sql .= ' incidents = ' . (isset($this->incidents) ? "'" . $this->db->escape($this->incidents) . "'" : "null") . ',';
481
-        $sql .= ' fk_type = ' . (isset($this->fk_type) && (int)$this->fk_type > 0 ? $this->fk_type : "null") . ',';
482
-        $sql .= ' fk_pilot = ' . (isset($this->fk_pilot) && (int)$this->fk_pilot > 0 ? $this->fk_pilot : "null") . ',';
483
-        $sql .= ' fk_organisateur = ' . (isset($this->fk_organisateur) && (int)$this->fk_organisateur > 0 ? $this->fk_organisateur : "null") . ',';
481
+        $sql .= ' fk_type = ' . (isset($this->fk_type) && (int) $this->fk_type > 0 ? $this->fk_type : "null") . ',';
482
+        $sql .= ' fk_pilot = ' . (isset($this->fk_pilot) && (int) $this->fk_pilot > 0 ? $this->fk_pilot : "null") . ',';
483
+        $sql .= ' fk_organisateur = ' . (isset($this->fk_organisateur) && (int) $this->fk_organisateur > 0 ? $this->fk_organisateur : "null") . ',';
484 484
         $sql .= ' is_facture = ' . (isset($this->is_facture) ? $this->is_facture : "0") . ',';
485 485
         $sql .= ' kilometers = ' . (!empty($this->kilometers) ? $this->kilometers : "0") . ',';
486 486
         $sql .= ' cost = ' . (isset($this->cost) ? "'" . $this->db->escape($this->cost) . "'" : "''") . ',';
487
-        $sql .= ' fk_receiver = ' . (isset($this->fk_receiver) && (int)$this->fk_receiver > 0 ? $this->fk_receiver : "null") . ',';
487
+        $sql .= ' fk_receiver = ' . (isset($this->fk_receiver) && (int) $this->fk_receiver > 0 ? $this->fk_receiver : "null") . ',';
488 488
         $sql .= ' justif_kilometers = ' . (isset($this->justif_kilometers) ? "'" . $this->db->escape($this->justif_kilometers) . "'," : "'',");
489 489
         $sql .= ' date_update = ' . "'" . date('Y-m-d H:i:s') . "',";
490 490
         $sql .= ' passenger_names = ' . "'" . trim($this->passengerNames) . "',";
491
-        $sql .= ' order_id = ' .  (!isset($this->orderId) || (int)$this->orderId === -1 || (int)$this->orderId === 0 ? 'null' : $this->orderId);
491
+        $sql .= ' order_id = ' . (!isset($this->orderId) || (int) $this->orderId === -1 || (int) $this->orderId === 0 ? 'null' : $this->orderId);
492 492
 
493 493
         $sql .= ' WHERE idBBC_vols=' . $this->idBBC_vols;
494 494
 
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
      */
858 858
     public function getAmountPerPassenger()
859 859
     {
860
-        $nbrPax = $this->nbrPax > 0 ? $this->nbrPax : 1 ;
860
+        $nbrPax = $this->nbrPax > 0 ? $this->nbrPax : 1;
861 861
         return $this->cost / $nbrPax;
862 862
     }
863 863
 
Please login to merge, or discard this patch.