upgraded to phpunit 8 (#1155)
This commit is contained in:
@@ -151,10 +151,6 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
|
||||
*/
|
||||
public function loadUserPreferences(PrepareUserEvent $event)
|
||||
{
|
||||
if (!$this->canHandleEvent($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $event->getUser();
|
||||
|
||||
$prefs = [];
|
||||
@@ -182,17 +178,4 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
|
||||
|
||||
$user->setPreferences(array_values($prefs));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PrepareUserEvent $event
|
||||
* @return bool
|
||||
*/
|
||||
protected function canHandleEvent(PrepareUserEvent $event): bool
|
||||
{
|
||||
if (null === ($user = $event->getUser())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ($user instanceof User);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user