Skip to content
Snippets Groups Projects
Commit d3c9ec75 authored by Leandro Isotton's avatar Leandro Isotton Committed by Vladimir Roudakov
Browse files

Issue #3308506 by lisotton, Ambient.Impact, fskreuz, VladimirAus, igork96,...

Issue #3308506 by lisotton, Ambient.Impact, fskreuz, VladimirAus, igork96, Rajivgandhi, benaboki, dpi, svendecabooter, el7cosmos, Alina Basarabeanu, jpoesen, jannakha, bdanin, nimoatwoodway, K3vin_nl: Services\SessionLimit should type-hint dependencies using interfaces
parent 5519cf51
No related branches found
No related tags found
1 merge request!17Issue #3308506: Use interfaces as type-hint
Pipeline #223849 passed with warnings
......@@ -3,16 +3,16 @@
namespace Drupal\session_limit\Services;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Session\AccountProxy;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\Session\AnonymousUserSession;
use Drupal\Core\Session\SessionManager;
use Drupal\Core\Session\SessionManagerInterface;
use Drupal\Core\Url;
use Drupal\session_limit\Event\SessionLimitBypassEvent;
use Drupal\session_limit\Event\SessionLimitCollisionEvent;
......@@ -73,14 +73,14 @@ class SessionLimit implements EventSubscriberInterface {
/**
* Module handler.
*
* @var \Drupal\Core\Extension\ModuleHandler
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/**
* Config factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected $configFactory;
......@@ -107,20 +107,20 @@ class SessionLimit implements EventSubscriberInterface {
* The event dispatcher service.
* @param \Drupal\Core\Routing\RouteMatchInterface $routeMatch
* The Route.
* @param \Drupal\Core\Session\AccountProxy $currentUser
* @param \Drupal\Core\Session\AccountProxyInterface $currentUser
* The current user.
* @param \Drupal\Core\Session\SessionManager $sessionManager
* @param \Drupal\Core\Session\SessionManagerInterface $sessionManager
* Session manager.
* @param \Drupal\Core\Extension\ModuleHandler $moduleHandler
* @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
* Module handler.
* @param \Drupal\Core\Config\ConfigFactory $configFactory
* @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
* Config factory.
* @param \Drupal\Core\Messenger\MessengerInterface $messenger
* The messenger.
* @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $loggerFactory
* The logger factory.
*/
public function __construct(Connection $database, EventDispatcherInterface $eventDispatcher, RouteMatchInterface $routeMatch, AccountProxy $currentUser, SessionManager $sessionManager, ModuleHandler $moduleHandler, ConfigFactory $configFactory, MessengerInterface $messenger, LoggerChannelFactoryInterface $loggerFactory) {
public function __construct(Connection $database, EventDispatcherInterface $eventDispatcher, RouteMatchInterface $routeMatch, AccountProxyInterface $currentUser, SessionManagerInterface $sessionManager, ModuleHandlerInterface $moduleHandler, ConfigFactoryInterface $configFactory, MessengerInterface $messenger, LoggerChannelFactoryInterface $loggerFactory) {
$this->database = $database;
$this->eventDispatcher = $eventDispatcher;
$this->routeMatch = $routeMatch;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment