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() : string { return trim( ( $this->firstName ?? "" ) . " " . ( $this->lastName ?? "" ) ); } public function loggedIn(?bool $set = null): bool { return $set !== null ? $this->logged = $set : $this->logged; } }