Browse Source

Fix psalm

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pull/30223/head
Carl Schwan 4 years ago
parent
commit
99a752922f
  1. 5
      apps/user_ldap/lib/Group_LDAP.php
  2. 12
      build/psalm-baseline.xml

5
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
*/

12
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">

Loading…
Cancel
Save