🔧 📌 Downgrade User.php to php7
continuous-integration/drone/push Build is passing Details

issue_16_statistics_coach
Antoine PEREDERII 2 years ago
parent d5a73fa41f
commit eec7dfb069

@ -5,18 +5,41 @@ use Model\Role;
// Data Class // Data Class
class User{ class User{
private int $id;
private string $nom;
private string $prenom;
private string $email;
private string $motDePasse;
private string $sexe;
private float $taille;
private float $poids;
private \DateTime $dateNaissance;
private Role $role;
public function __construct( public function __construct(
private int $id, int $id,
private string $nom, string $nom,
private string $prenom, string $prenom,
private string $email, string $email,
private string $motDePasse, string $motDePasse,
private string $sexe, string $sexe,
private float $taille, float $taille,
private float $poids, float $poids,
private \DateTime $dateNaissance, \DateTime $dateNaissance,
private Role $role, Role $role
) {} ) {
$this->id = $id;
$this->nom = $nom;
$this->prenom = $prenom;
$this->email = $email;
$this->motDePasse = $motDePasse;
$this->sexe = $sexe;
$this->taille = $taille;
$this->poids = $poids;
$this->dateNaissance = $dateNaissance;
$this->role = $role;
}
public function getId(): int { public function getId(): int {
return $this->id; return $this->id;
} }
@ -48,8 +71,8 @@ class User{
public function setEmail(string $email): void { public function setEmail(string $email): void {
$this->email = $email; $this->email = $email;
} }
/** /**
* @return string hashed password used to authenticate the user. * @return string hashed password used to authenticate the user.
*/ */
public function getMotDePasse(): string { public function getMotDePasse(): string {
@ -108,5 +131,5 @@ class User{
public function __toString() { public function __toString() {
return "Athlete [ID: {$this->id}, Nom: {$this->nom}, Prénom: {$this->prenom}, Email: {$this->email}]"; return "Athlete [ID: {$this->id}, Nom: {$this->nom}, Prénom: {$this->prenom}, Email: {$this->email}]";
} }
} }
Loading…
Cancel
Save