diff --git a/core/lib/Drupal/Core/Session/AccountSwitcher.php b/core/lib/Drupal/Core/Session/AccountSwitcher.php index 6b56a67..0737258 100644 --- a/core/lib/Drupal/Core/Session/AccountSwitcher.php +++ b/core/lib/Drupal/Core/Session/AccountSwitcher.php @@ -33,7 +33,7 @@ class AccountSwitcher implements AccountSwitcherInterface { /** * The session manager. * - * @var \Drupal\Core\Session\SessionManager + * @var \Drupal\Core\Session\SessionManagerInterface */ protected $sessionManager; diff --git a/core/lib/Drupal/Core/Session/AccountSwitcherInterface.php b/core/lib/Drupal/Core/Session/AccountSwitcherInterface.php index 8ba8b8e..15ee497 100644 --- a/core/lib/Drupal/Core/Session/AccountSwitcherInterface.php +++ b/core/lib/Drupal/Core/Session/AccountSwitcherInterface.php @@ -21,7 +21,7 @@ * matched by a corresponding invocation of * AccountSwitcherInterface::switchBack() in the same function. * - * @param \Drupal\Core\Session\AccountInterface + * @param \Drupal\Core\Session\AccountInterface $account * The account to switch to. * * @return \Drupal\Core\Session\AccountSwitcherInterface @@ -41,4 +41,3 @@ public function switchTo(AccountInterface $account); public function switchBack(); } - diff --git a/core/modules/system/src/Tests/Session/AccountSwitcherTest.php b/core/modules/system/src/Tests/Session/AccountSwitcherTest.php index b2cc60e..8277488 100644 --- a/core/modules/system/src/Tests/Session/AccountSwitcherTest.php +++ b/core/modules/system/src/Tests/Session/AccountSwitcherTest.php @@ -21,7 +21,7 @@ public function testAccountSwitching() { $session_manager = $this->container->get('session_manager'); $user = $this->container->get('current_user'); $switcher = $this->container->get('account_switcher'); - $original_user = clone $user; + $original_user = $user->getAccount(); $original_session_saving = $session_manager->isEnabled(); // Switch to user with uid 2.