fullName(); } public function setPassword($password) : static { $this->password = $password; return $this->hashPassword(); } public function hashPassword(? string $password = null) : static { $this->password = password_hash($password ?: $this->password, PASSWORD_DEFAULT); return $this; } public function verifyPassword(string $password) : bool { return password_verify($password, $this->password ?? null); } public function fullname(bool $reverse = false) : string { if (! $this->isLoaded() ) { return "???"; } return trim($reverse ? "{$this->lastName}, {$this->firstName}" : "{$this->firstName} {$this->lastName}"); } public function loggedIn(?bool $set = null): bool { return $set !== null ? $this->logged = $set : $this->logged; } }