diff options
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/entities/Location.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/model/entities/Location.php b/src/model/entities/Location.php index 364b34c..11102f9 100644 --- a/src/model/entities/Location.php +++ b/src/model/entities/Location.php | |||
| @@ -79,7 +79,7 @@ class Location | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | // setters | 81 | // setters |
| 82 | public function set(string $entry, string $input) | 82 | public function set(string $entry, string $input): void |
| 83 | { | 83 | { |
| 84 | $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide | 84 | $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide |
| 85 | switch($entry) | 85 | switch($entry) |
| @@ -113,61 +113,61 @@ class Location | |||
| 113 | break; | 113 | break; |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | private function setPresta(Prestation $input) // private? | 116 | private function setPresta(Prestation $input): void // private? |
| 117 | { | 117 | { |
| 118 | $this->presta = $input; | 118 | $this->presta = $input; |
| 119 | } | 119 | } |
| 120 | public function setDesignation(string $value) | 120 | public function setDesignation(string $value): Location |
| 121 | { | 121 | { |
| 122 | $this->designation = $value; | 122 | $this->designation = $value; |
| 123 | return($this); | 123 | return($this); |
| 124 | } | 124 | } |
| 125 | public function setModeleDescription(string $value) | 125 | public function setModeleDescription(string $value): Location |
| 126 | { | 126 | { |
| 127 | $this->modele_description = $value; | 127 | $this->modele_description = $value; |
| 128 | return($this); | 128 | return($this); |
| 129 | } | 129 | } |
| 130 | public function setValeur($value) | 130 | public function setValeur(string $value): Location |
| 131 | { | 131 | { |
| 132 | $value = str_replace(',', '.', $value); | 132 | $value = str_replace(',', '.', $value); |
| 133 | $this->valeur = (float) $value; | 133 | $this->valeur = (float) $value; |
| 134 | return($this); | 134 | return($this); |
| 135 | } | 135 | } |
| 136 | public function setEtatDesLieuxDebut(string $value) | 136 | public function setEtatDesLieuxDebut(string $value): Location |
| 137 | { | 137 | { |
| 138 | $this->etat_des_lieux_debut = $value; | 138 | $this->etat_des_lieux_debut = $value; |
| 139 | return($this); | 139 | return($this); |
| 140 | } | 140 | } |
| 141 | public function setEtatDesLieuxFin(string $value) | 141 | public function setEtatDesLieuxFin(string $value): Location |
| 142 | { | 142 | { |
| 143 | $this->etat_des_lieux_fin = $value; | 143 | $this->etat_des_lieux_fin = $value; |
| 144 | return($this); | 144 | return($this); |
| 145 | } | 145 | } |
| 146 | public function setDureeLocation(string $value) | 146 | public function setDureeLocation(string $value): Location |
| 147 | { | 147 | { |
| 148 | $this->duree_location = $value; | 148 | $this->duree_location = $value; |
| 149 | return($this); | 149 | return($this); |
| 150 | } | 150 | } |
| 151 | public function setLoyerMensuel($value) | 151 | public function setLoyerHebdo(string $value): Location |
| 152 | { | 152 | { |
| 153 | $value = str_replace(',', '.', $value); | 153 | $value = str_replace(',', '.', $value); |
| 154 | $this->loyer_mensuel = (float) $value; | 154 | $this->loyer_hebdo = (float) $value; |
| 155 | return($this); | 155 | return($this); |
| 156 | } | 156 | } |
| 157 | public function setLoyersPayes($value) | 157 | public function setLoyersPayes(string $value): Location |
| 158 | { | 158 | { |
| 159 | $value = str_replace(',', '.', $value); | 159 | $value = str_replace(',', '.', $value); |
| 160 | $this->loyers_payes = (float) $value; | 160 | $this->loyers_payes = (float) $value; |
| 161 | return($this); | 161 | return($this); |
| 162 | } | 162 | } |
| 163 | public function setCaution($value) | 163 | public function setCaution(string $value): Location |
| 164 | { | 164 | { |
| 165 | $value = str_replace(',', '.', $value); | 165 | $value = str_replace(',', '.', $value); |
| 166 | $this->caution = (float) $value; | 166 | $this->caution = (float) $value; |
| 167 | return($this); | 167 | return($this); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | private function setAll(array $input) // private? | 170 | private function setAll(array $input): void // private? |
| 171 | { | 171 | { |
| 172 | $this->designation = $input[0]; | 172 | $this->designation = $input[0]; |
| 173 | $this->modele_description = $input[1]; | 173 | $this->modele_description = $input[1]; |
