Compare commits

..

No commits in common. "10ad77d607e34d8e9bcf68384a2193ca525ed9f4" and "267fe5cadd44b17bacc354fd4a4124becba2ebd7" have entirely different histories.

View File

@ -85,7 +85,7 @@ class User {
public function __toString() : string public function __toString() : string
{ {
return "{$this->firstName} {$this->lastName}"; return $this->fullname();
} }
public function setPassword($password) : self public function setPassword($password) : self
@ -95,16 +95,16 @@ class User {
return $this->hashPassword(); return $this->hashPassword();
} }
public function hashPassword(? string $password = null) : self public function hashPassword() : self
{ {
$this->password = password_hash($password ?: $this->password, PASSWORD_DEFAULT); $this->password = password_hash($this->password, PASSWORD_DEFAULT);
return $this; return $this;
} }
public function verifyPassword(string $password) : bool public function verifyPassword(string $password) : bool
{ {
return password_verify($password, $this->password); return password_verify($password, $this->password );
} }
public function fullname() : string public function fullname() : string