diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-13 16:33:53 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-10-20 17:41:47 +0200 |
commit | 4bc821edd95a6b71dd99f75632f432d5ccf2853f (patch) | |
tree | d6fd460718df9da42b369d1a1f85200517a49bae /lib/private | |
parent | 851e8c0ded27a6cf8d18f6cf42f2473a6fe2aa8c (diff) | |
download | nextcloud-server-4bc821edd95a6b71dd99f75632f432d5ccf2853f.tar.gz nextcloud-server-4bc821edd95a6b71dd99f75632f432d5ccf2853f.zip |
PSR logger for accounts
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 13 | ||||
-rw-r--r-- | lib/private/Accounts/Hooks.php | 17 |
2 files changed, 9 insertions, 21 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 1f23e7e33a3..d18555d296c 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -35,8 +35,8 @@ use OCP\Accounts\IAccount; use OCP\Accounts\IAccountManager; use OCP\BackgroundJob\IJobList; use OCP\IDBConnection; -use OCP\ILogger; use OCP\IUser; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; use function json_decode; @@ -64,20 +64,13 @@ class AccountManager implements IAccountManager { /** @var IJobList */ private $jobList; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; - /** - * AccountManager constructor. - * - * @param IDBConnection $connection - * @param EventDispatcherInterface $eventDispatcher - * @param IJobList $jobList - */ public function __construct(IDBConnection $connection, EventDispatcherInterface $eventDispatcher, IJobList $jobList, - ILogger $logger) { + LoggerInterface $logger) { $this->connection = $connection; $this->eventDispatcher = $eventDispatcher; $this->jobList = $jobList; diff --git a/lib/private/Accounts/Hooks.php b/lib/private/Accounts/Hooks.php index 2288b884c5c..82f55f5a9d1 100644 --- a/lib/private/Accounts/Hooks.php +++ b/lib/private/Accounts/Hooks.php @@ -24,23 +24,18 @@ namespace OC\Accounts; -use OCP\ILogger; use OCP\IUser; +use Psr\Log\LoggerInterface; class Hooks { - /** @var AccountManager */ - private $accountManager = null; + /** @var AccountManager|null */ + private $accountManager; - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; - /** - * Hooks constructor. - * - * @param ILogger $logger - */ - public function __construct(ILogger $logger) { + public function __construct(LoggerInterface $logger) { $this->logger = $logger; } @@ -85,7 +80,7 @@ class Hooks { * * @return AccountManager */ - protected function getAccountManager() { + protected function getAccountManager(): AccountManager { if ($this->accountManager === null) { $this->accountManager = \OC::$server->query(AccountManager::class); } |