aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-20 12:01:19 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-20 13:14:39 +0200
commit99a752922f2241fd4c7477fcf00a68e3ead52461 (patch)
treed7e138ed5fac60240e332b04be0ce8e9cabbf82a
parent60ec5e655c3450c8083f37aeccfbc2876b2a7d1a (diff)
downloadnextcloud-server-99a752922f2241fd4c7477fcf00a68e3ead52461.tar.gz
nextcloud-server-99a752922f2241fd4c7477fcf00a68e3ead52461.zip
Fix psalm
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php5
-rw-r--r--build/psalm-baseline.xml12
2 files changed, 5 insertions, 12 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index 723b3d856ad..81cb30dd25b 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -57,7 +57,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
/** @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 */
+ /** @var CappedMemoryCache<array[]> $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;
@@ -1129,6 +1129,9 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
}
/**
+ * @template T
+ * @param array<array-key, T> $listOfGroups
+ * @return array<array-key, T>
* @throws ServerNotAvailableException
* @throws Exception
*/
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index dc2b8a8f10a..e672dee4c0e 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -1628,20 +1628,10 @@
<ParadoxicalCondition occurrences="1"/>
</file>
<file src="apps/user_ldap/lib/Group_LDAP.php">
- <InvalidReturnStatement occurrences="1">
- <code>$groupName</code>
- </InvalidReturnStatement>
- <InvalidReturnType occurrences="1">
- <code>bool</code>
- </InvalidReturnType>
- <InvalidScalarArgument occurrences="2">
+ <InvalidScalarArgument occurrences="1">
<code>$groupID</code>
<code>$groupID</code>
</InvalidScalarArgument>
- <RedundantCondition occurrences="2">
- <code>is_array($groupDNs)</code>
- <code>is_array($list)</code>
- </RedundantCondition>
</file>
<file src="apps/user_ldap/lib/Group_Proxy.php">
<ParamNameMismatch occurrences="1">