@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | print '<td>' . $totalT3 . '</td>'; |
| 267 | 267 | print '<td></td>'; |
| 268 | 268 | |
| 269 | -print '<td>' . $totalT4. '</td>'; |
|
| 269 | +print '<td>' . $totalT4 . '</td>'; |
|
| 270 | 270 | print '<td></td>'; |
| 271 | 271 | |
| 272 | 272 | print '<td>' . $totalT5 . '</td>'; |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | //table km |
| 293 | 293 | $tauxRemb = isset($conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM) ? $conf->global->BBC_FLIGHT_LOG_TAUX_REMB_KM : 0; |
| 294 | 294 | $year = GETPOST("year", 'int'); |
| 295 | -if(empty($year)){ |
|
| 295 | +if (empty($year)) { |
|
| 296 | 296 | $year = date('Y'); |
| 297 | 297 | } |
| 298 | 298 | |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | - * @param null $year |
|
| 111 | + * @param integer $year |
|
| 112 | 112 | * @param null $pilotId |
| 113 | 113 | * @param null $quarter |
| 114 | 114 | * @param bool $groupBy |
@@ -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 | |
@@ -645,7 +645,7 @@ |
||
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | /** |
| 648 | - * @return array|BbctypesLine[] |
|
| 648 | + * @return BbctypesLine[] |
|
| 649 | 649 | */ |
| 650 | 650 | public function getLines() |
| 651 | 651 | { |
@@ -733,7 +733,7 @@ |
||
| 733 | 733 | */ |
| 734 | 734 | public function getActive() |
| 735 | 735 | { |
| 736 | - return (boolean)$this->active; |
|
| 736 | + return (boolean) $this->active; |
|
| 737 | 737 | } |
| 738 | 738 | |
| 739 | 739 | /** |
@@ -95,6 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * @inheritDoc |
| 98 | + * @param string $fieldName |
|
| 98 | 99 | */ |
| 99 | 100 | public function remove($fieldName) |
| 100 | 101 | { |
@@ -142,7 +143,7 @@ discard block |
||
| 142 | 143 | } |
| 143 | 144 | |
| 144 | 145 | /** |
| 145 | - * @param null|\ValidatorInterface $validator |
|
| 146 | + * @param ValidatorInterface $validator |
|
| 146 | 147 | * |
| 147 | 148 | * @return Form |
| 148 | 149 | */ |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public function add(FormElementInterface $element) |
| 89 | 89 | { |
| 90 | - if(array_key_exists($element->getName(), $this->elements)){ |
|
| 90 | + if (array_key_exists($element->getName(), $this->elements)) { |
|
| 91 | 91 | throw new \InvalidArgumentException('Element already exists'); |
| 92 | 92 | } |
| 93 | 93 | $this->elements[$element->getName()] = $element; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function setValue($value) |
| 30 | 30 | { |
| 31 | - if($value instanceof \DateTime){ |
|
| 31 | + if ($value instanceof \DateTime) { |
|
| 32 | 32 | return parent::setValue($value->format('Y-m-d')); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param array $options |
| 28 | 28 | * @param \User $user |
| 29 | 29 | */ |
| 30 | - public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options,\User $user) |
|
| 30 | + public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options, \User $user) |
|
| 31 | 31 | { |
| 32 | 32 | |
| 33 | 33 | parent::__construct('flight_form', FormInterface::METHOD_POST, $this->buildOptionsfromConfiguration($options)); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $flight = $object; |
| 84 | 84 | |
| 85 | 85 | // Quick fix - Fixme by a factory on this form. |
| 86 | - if($this->user->rights->flightlog->vol->advanced){ |
|
| 86 | + if ($this->user->rights->flightlog->vol->advanced) { |
|
| 87 | 87 | return parent::bind($object); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | $expenseNoteUser = new User($this->db); |
| 273 | 273 | $expenseNoteUser->id = $currentMissionUserId; |
| 274 | 274 | $id = $expenseNote->create($expenseNoteUser); |
| 275 | - if($id < 0){ |
|
| 275 | + if ($id < 0) { |
|
| 276 | 276 | return null; |
| 277 | 277 | } |
| 278 | 278 | |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | $pilotLastname = $obj->lastname; |
| 53 | 53 | $pilotFirstname = $obj->firstname; |
| 54 | 54 | |
| 55 | - if($query->isPilotsOnly()){ |
|
| 55 | + if ($query->isPilotsOnly()) { |
|
| 56 | 56 | $result->addPilot($pilotId, $pilotFirstname, $pilotLastname); |
| 57 | - }else{ |
|
| 57 | + } else { |
|
| 58 | 58 | $result->addMission($obj->quartil, $pilotId, $pilotFirstname, $pilotLastname, |
| 59 | 59 | $obj->number_flights, $obj->total_kilometers); |
| 60 | 60 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $sql .= " , SUM(VOL.kilometers) as total_kilometers "; |
| 80 | 80 | $sql .= " , COUNT(VOL.idBBC_vols) as number_flights"; |
| 81 | 81 | |
| 82 | - if(!$query->isPilotsOnly()){ |
|
| 82 | + if (!$query->isPilotsOnly()) { |
|
| 83 | 83 | $sql .= " , QUARTER(VOL.date) as quartil "; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | |
| 55 | 55 | if($query->isPilotsOnly()){ |
| 56 | 56 | $result->addPilot($pilotId, $pilotFirstname, $pilotLastname); |
| 57 | - }else{ |
|
| 57 | + } else{ |
|
| 58 | 58 | $result->addMission($obj->quartil, $pilotId, $pilotFirstname, $pilotLastname, |
| 59 | 59 | $obj->number_flights, $obj->total_kilometers); |
| 60 | 60 | } |