diff options
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 12 | ||||
-rw-r--r-- | apps/user_ldap/lib/Helper.php | 13 | ||||
-rw-r--r-- | apps/user_ldap/lib/User/Manager.php | 51 |
3 files changed, 24 insertions, 52 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index f9d9b061743..8fcb10cb850 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -55,12 +55,12 @@ use Psr\Log\LoggerInterface; class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, IGetDisplayNameBackend, IDeleteGroupBackend { protected $enabled = false; - /** @var string[][] $cachedGroupMembers array of users with gid as key */ - protected $cachedGroupMembers; - /** @var string[] $cachedGroupsByMember array of groups with uid as key */ - protected $cachedGroupsByMember; - /** @var string[] $cachedNestedGroups array of groups with gid (DN) as key */ - protected $cachedNestedGroups; + /** @var CappedMemoryCache<string[]> $cachedGroupMembers array of users with gid as key */ + protected CappedMemoryCache $cachedGroupMembers; + /** @var CappedMemoryCache<string[]> $cachedGroupsByMember array of groups with uid as key */ + protected CappedMemoryCache $cachedGroupsByMember; + /** @var CappedMemoryCache<string[]> $cachedNestedGroups array of groups with gid (DN) as key */ + protected CappedMemoryCache $cachedNestedGroups; /** @var GroupPluginManager */ protected $groupPluginManager; /** @var LoggerInterface */ diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php index 437fab6b6a8..3ca5de67874 100644 --- a/apps/user_ldap/lib/Helper.php +++ b/apps/user_ldap/lib/Helper.php @@ -35,15 +35,10 @@ use OCP\IConfig; use OCP\IDBConnection; class Helper { - - /** @var IConfig */ - private $config; - - /** @var IDBConnection */ - private $connection; - - /** @var CappedMemoryCache */ - protected $sanitizeDnCache; + private IConfig $config; + private IDBConnection $connection; + /** @var CappedMemoryCache<string> */ + protected CappedMemoryCache $sanitizeDnCache; public function __construct(IConfig $config, IDBConnection $connection) { diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php index e752b113e3f..e52b093f5af 100644 --- a/apps/user_ldap/lib/User/Manager.php +++ b/apps/user_ldap/lib/User/Manager.php @@ -47,43 +47,20 @@ use Psr\Log\LoggerInterface; * cache */ class Manager { - /** @var Access */ - protected $access; - - /** @var IConfig */ - protected $ocConfig; - - /** @var IDBConnection */ - protected $db; - - /** @var IUserManager */ - protected $userManager; - - /** @var INotificationManager */ - protected $notificationManager; - - /** @var FilesystemHelper */ - protected $ocFilesystem; - - /** @var LoggerInterface */ - protected $logger; - - /** @var Image */ - protected $image; - - /** @param \OCP\IAvatarManager */ - protected $avatarManager; - - /** - * @var CappedMemoryCache $usersByDN - */ - protected $usersByDN; - /** - * @var CappedMemoryCache $usersByUid - */ - protected $usersByUid; - /** @var IManager */ - private $shareManager; + protected ?Access $access = null; + protected IConfig $ocConfig; + protected IDBConnection $db; + protected IUserManager $userManager; + protected INotificationManager $notificationManager; + protected FilesystemHelper $ocFilesystem; + protected LoggerInterface $logger; + protected Image $image; + protected IAvatarManager $avatarManager; + /** @var CappedMemoryCache<User> $usersByDN */ + protected CappedMemoryCache $usersByDN; + /** @var CappedMemoryCache<User> $usersByUid */ + protected CappedMemoryCache $usersByUid; + private IManager $shareManager; public function __construct( IConfig $ocConfig, |