From f9fae65994b4be2c7f30341053ffd687a0696ff6 Mon Sep 17 00:00:00 2001 From: polo Date: Wed, 14 Oct 2026 16:07:18 +0200 Subject: erreur setLoyerHebdo --- src/model/entities/Location.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/model/entities/Location.php') 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 } // setters - public function set(string $entry, string $input) + public function set(string $entry, string $input): void { $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide switch($entry) @@ -113,61 +113,61 @@ class Location break; } } - private function setPresta(Prestation $input) // private? + private function setPresta(Prestation $input): void // private? { $this->presta = $input; } - public function setDesignation(string $value) + public function setDesignation(string $value): Location { $this->designation = $value; return($this); } - public function setModeleDescription(string $value) + public function setModeleDescription(string $value): Location { $this->modele_description = $value; return($this); } - public function setValeur($value) + public function setValeur(string $value): Location { $value = str_replace(',', '.', $value); $this->valeur = (float) $value; return($this); } - public function setEtatDesLieuxDebut(string $value) + public function setEtatDesLieuxDebut(string $value): Location { $this->etat_des_lieux_debut = $value; return($this); } - public function setEtatDesLieuxFin(string $value) + public function setEtatDesLieuxFin(string $value): Location { $this->etat_des_lieux_fin = $value; return($this); } - public function setDureeLocation(string $value) + public function setDureeLocation(string $value): Location { $this->duree_location = $value; return($this); } - public function setLoyerMensuel($value) + public function setLoyerHebdo(string $value): Location { $value = str_replace(',', '.', $value); - $this->loyer_mensuel = (float) $value; + $this->loyer_hebdo = (float) $value; return($this); } - public function setLoyersPayes($value) + public function setLoyersPayes(string $value): Location { $value = str_replace(',', '.', $value); $this->loyers_payes = (float) $value; return($this); } - public function setCaution($value) + public function setCaution(string $value): Location { $value = str_replace(',', '.', $value); $this->caution = (float) $value; return($this); } - private function setAll(array $input) // private? + private function setAll(array $input): void // private? { $this->designation = $input[0]; $this->modele_description = $input[1]; -- cgit v1.2.3