diff --git a/Auth/Base.php b/Auth/Base.php index c8be304..d1daa2e 100644 --- a/Auth/Base.php +++ b/Auth/Base.php @@ -98,7 +98,7 @@ abstract class Base implements Auth */ protected $logger; - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); } @@ -290,7 +290,7 @@ protected function getUserForLogin() return $this->userForLogin; } - protected function tryFallbackAuth($onlySuperUsers = true, Auth $auth = null) + protected function tryFallbackAuth($onlySuperUsers = true, ?Auth $auth = null) { if (empty($auth)) { $auth = new \Piwik\Plugins\Login\Auth(); diff --git a/LdapInterop/UserAccessAttributeParser.php b/LdapInterop/UserAccessAttributeParser.php index bd86487..f0133e7 100644 --- a/LdapInterop/UserAccessAttributeParser.php +++ b/LdapInterop/UserAccessAttributeParser.php @@ -110,7 +110,7 @@ class UserAccessAttributeParser */ private $logger; - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); } diff --git a/LdapInterop/UserAccessMapper.php b/LdapInterop/UserAccessMapper.php index 4ff2285..8d18bb4 100644 --- a/LdapInterop/UserAccessMapper.php +++ b/LdapInterop/UserAccessMapper.php @@ -85,7 +85,7 @@ class UserAccessMapper /** * Constructor. */ - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); } diff --git a/LdapInterop/UserMapper.php b/LdapInterop/UserMapper.php index 748eba8..6a2b87b 100644 --- a/LdapInterop/UserMapper.php +++ b/LdapInterop/UserMapper.php @@ -76,7 +76,7 @@ class UserMapper /** * Constructor. */ - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); } diff --git a/LdapInterop/UserSynchronizer.php b/LdapInterop/UserSynchronizer.php index 758f45a..0b60fcf 100644 --- a/LdapInterop/UserSynchronizer.php +++ b/LdapInterop/UserSynchronizer.php @@ -108,7 +108,7 @@ class UserSynchronizer */ public static $skipPasswordConfirmation = false; - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); } diff --git a/Model/LdapUsers.php b/Model/LdapUsers.php index 1627b9d..4eb26d2 100644 --- a/Model/LdapUsers.php +++ b/Model/LdapUsers.php @@ -119,7 +119,7 @@ class LdapUsers /** * Constructor. */ - public function __construct(LoggerInterface $logger = null) + public function __construct(?LoggerInterface $logger = null) { $this->logger = $logger ?: StaticContainer::get(LoggerInterface::class); }