code: public function verifyPassword(string $password)
      {
          if (password_verify($password, $this->getPasswordHash())) {
              if (password_needs_rehash($password, $this->getPasswordHash())) {
                  $this->setPasswordHash($this->hashPassword($password));
                  $this->save();
  
                  return true;
              }
          } else {
              return false;
          }
      }
docs: Check hash