diff --git a/src/Form/OpenIDConnectAccountsForm.php b/src/Form/OpenIDConnectAccountsForm.php
index 3690600..d9989f0 100644
--- a/src/Form/OpenIDConnectAccountsForm.php
+++ b/src/Form/OpenIDConnectAccountsForm.php
@@ -121,7 +121,7 @@ class OpenIDConnectAccountsForm extends FormBase implements ContainerInjectionIn
   /**
    * {@inheritdoc}
    */
-  public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $user = NULL) {
+  public function buildForm(array $form, FormStateInterface $form_state, ?AccountInterface $user = NULL) {
     $form_state->set('account', $user);
 
     $clients = $this->pluginManager->getDefinitions();
diff --git a/src/OpenIDConnect.php b/src/OpenIDConnect.php
index 5955644..ea7b548 100644
--- a/src/OpenIDConnect.php
+++ b/src/OpenIDConnect.php
@@ -458,14 +458,14 @@ class OpenIDConnect {
   /**
    * Find whether a user is allowed to change the own password.
    *
-   * @param \Drupal\Core\Session\AccountInterface $account
+   * @param \Drupal\Core\Session\AccountInterface|null $account
    *   Optional: Account to check the access for.
    *   Defaults to the currently logged-in user.
    *
    * @return bool
    *   TRUE if access is granted, FALSE otherwise.
    */
-  public function hasSetPasswordAccess(AccountInterface $account = NULL) {
+  public function hasSetPasswordAccess(?AccountInterface $account = NULL) {
     if (empty($account)) {
       $account = $this->currentUser;
     }
diff --git a/src/OpenIDConnectAuthmap.php b/src/OpenIDConnectAuthmap.php
index a708db0..6eba57a 100644
--- a/src/OpenIDConnectAuthmap.php
+++ b/src/OpenIDConnectAuthmap.php
@@ -31,10 +31,10 @@ class OpenIDConnectAuthmap {
    *
    * @param \Drupal\Core\Database\Connection $connection
    *   A database connection.
-   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
+   * @param \Drupal\Core\Entity\EntityTypeManagerInterface|null $entity_type_manager
    *   (optional) The entity manager. (deprecated) Will be mandatory in 2.0.
    */
-  public function __construct(Connection $connection, EntityTypeManagerInterface $entity_type_manager = NULL) {
+  public function __construct(Connection $connection, ?EntityTypeManagerInterface $entity_type_manager = NULL) {
     if ($entity_type_manager === NULL) {
       @trigger_error('The second parameter optionality is deprecated in openid_connect:8.x-1.1 and will be mandatory in openid_connect:8.x-2.0. See https://www.drupal.org/project/openid_connect/issues/3201504', E_USER_DEPRECATED);
     }
diff --git a/src/OpenIDConnectClaims.php b/src/OpenIDConnectClaims.php
index 2339ffd..aa1dbbc 100644
--- a/src/OpenIDConnectClaims.php
+++ b/src/OpenIDConnectClaims.php
@@ -117,7 +117,7 @@ class OpenIDConnectClaims implements ContainerInjectionInterface {
    *
    * @see http://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims
    */
-  public function getScopes(OpenIDConnectClientInterface $client = NULL) {
+  public function getScopes(?OpenIDConnectClientInterface $client = NULL) {
     $claims = $this->configFactory
       ->get('openid_connect.settings')
       ->get('userinfo_mappings');
