@@ -91,7 +91,7 @@ |
||
| 91 | 91 | throw new \InvalidArgumentException('Model document is missing'); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if(!isset($nbrPax) || !is_numeric($nbrPax) || $nbrPax != (int) $nbrPax){ |
|
| 94 | + if (!isset($nbrPax) || !is_numeric($nbrPax) || $nbrPax != (int) $nbrPax) { |
|
| 95 | 95 | throw new \InvalidArgumentException('The number of pax is not correct, an integer is expected'); |
| 96 | 96 | } |
| 97 | 97 | |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | { |
| 113 | 113 | $customer = new Client($this->db); |
| 114 | 114 | |
| 115 | - if($flight->fk_receiver) { |
|
| 115 | + if ($flight->fk_receiver) { |
|
| 116 | 116 | return $this->fetchCustomerFromFlight($flight); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -124,11 +124,11 @@ |
||
| 124 | 124 | * Put here all code to do according to value of "action" parameter |
| 125 | 125 | */ |
| 126 | 126 | if ($action == EXPENSE_REPORT_GENERATOR_ACTION_GENERATE) { |
| 127 | - try{ |
|
| 128 | - $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote,$bankAccount, $nbrPax); |
|
| 127 | + try { |
|
| 128 | + $command = new CreateFlightBillCommand($flight->getId(), $modeReglement, $conditionReglement, $documentModel, $type, $publicNote, $privateNote, $bankAccount, $nbrPax); |
|
| 129 | 129 | $handler->handle($command); |
| 130 | - }catch (\Exception $e){ |
|
| 131 | - dol_syslog($e->getMessage(),LOG_ERR); |
|
| 130 | + } catch (\Exception $e) { |
|
| 131 | + dol_syslog($e->getMessage(), LOG_ERR); |
|
| 132 | 132 | dol_htmloutput_mesg("Facture non créée", '', 'error'); |
| 133 | 133 | } |
| 134 | 134 | } |