id = $id; $this->nickname = $nickname; try { $this->hashedPassword = $hashedPassword = password_hash($password, PASSWORD_BCRYPT, ['cost' => 12]); } catch (Exception $e) { echo $e->getMessage(); } } public function getNickname() { return $this->nickname; } public function getHashedPassword() { return $this->hashedPassword; } public function setHashedPassword(string $hashedPassword) { $this->hashedPassword = $hashedPassword; } }