@@ -60,31 +60,31 @@ |
||
| 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 | } |
@@ -746,14 +746,14 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -256,7 +256,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |