Skip to content

Commit 4a60577

Browse files
committed
fixup! Fix some tests
1 parent 4f860a3 commit 4a60577

File tree

4 files changed

+7
-50
lines changed

4 files changed

+7
-50
lines changed

apps/user_ldap/lib/Group_LDAP.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
class Group_LDAP extends ABackend implements GroupInterface, IGroupLDAP,
6161
IGetDisplayNameBackend, IDeleteGroupBackend, ICountUsersBackend, IAddToGroupBackend,
62-
IRemoveFromGroupBackend, IGroupDetailsBackend {
62+
IRemoveFromGroupBackend {
6363
protected $enabled = false;
6464

6565
/** @var CappedMemoryCache<string[]> $cachedGroupMembers array of users with gid as key */

apps/user_ldap/lib/Group_Proxy.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
class Group_Proxy extends Proxy implements GroupInterface, IGroupLDAP,
4242
IGetDisplayNameBackend, IDeleteGroupBackend, ICountUsersBackend, IAddToGroupBackend,
43-
IRemoveFromGroupBackend, IGroupDetailsBackend {
43+
IRemoveFromGroupBackend {
4444
private $backends = [];
4545
private $refBackend = null;
4646

@@ -280,9 +280,10 @@ public function implementsActions($actions) {
280280
/**
281281
* Return access for LDAP interaction.
282282
*
283+
* @param string $gid
283284
* @return Access instance of Access for LDAP interaction
284285
*/
285-
public function getLDAPAccess($gid) {
286+
public function getLDAPAccess($gid): Acc {
286287
return $this->handleRequest($gid, 'getLDAPAccess', [$gid]);
287288
}
288289

build/psalm-baseline-ocp.xml

-45
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@
6666
<code>\OC</code>
6767
</UndefinedClass>
6868
</file>
69-
<file src="lib/public/AppFramework/Http/ZipResponse.php">
70-
<InvalidArrayAccess occurrences="5">
71-
<code>$resource['internalName']</code>
72-
<code>$resource['resource']</code>
73-
<code>$resource['size']</code>
74-
<code>$resource['size']</code>
75-
<code>$resource['time']</code>
76-
</InvalidArrayAccess>
77-
<InvalidPropertyAssignmentValue occurrences="1">
78-
<code>$this-&gt;resources</code>
79-
</InvalidPropertyAssignmentValue>
80-
</file>
8169
<file src="lib/public/BackgroundJob/Job.php">
8270
<UndefinedClass occurrences="1">
8371
<code>\OC</code>
@@ -169,16 +157,6 @@
169157
<code>\OC</code>
170158
</UndefinedClass>
171159
</file>
172-
<file src="lib/public/FullTextSearch/Model/ISearchRequest.php">
173-
<InvalidClass occurrences="1">
174-
<code>IsearchRequest</code>
175-
</InvalidClass>
176-
</file>
177-
<file src="lib/public/IAddressBook.php">
178-
<InvalidDocblock occurrences="1">
179-
<code>public function getUri(): string;</code>
180-
</InvalidDocblock>
181-
</file>
182160
<file src="lib/public/IAvatar.php">
183161
<UndefinedDocblockClass occurrences="1">
184162
<code>Color</code>
@@ -190,23 +168,6 @@
190168
<code>ContainerExceptionInterface</code>
191169
</InvalidThrow>
192170
</file>
193-
<file src="lib/public/IDBConnection.php">
194-
<InvalidClass occurrences="1">
195-
<code>PreconditionNotMetException</code>
196-
</InvalidClass>
197-
</file>
198-
<file src="lib/public/Search/SearchResult.php">
199-
<InvalidArgument occurrences="1">
200-
<code>$cursor</code>
201-
</InvalidArgument>
202-
</file>
203-
<file src="lib/public/Share.php">
204-
<InvalidReturnType occurrences="3">
205-
<code>array</code>
206-
<code>array|bool</code>
207-
<code>mixed</code>
208-
</InvalidReturnType>
209-
</file>
210171
<file src="lib/public/Template.php">
211172
<UndefinedFunction occurrences="7">
212173
<code>\html_select_options($options, $selected, $params)</code>
@@ -219,12 +180,6 @@
219180
</UndefinedFunction>
220181
</file>
221182
<file src="lib/public/Util.php">
222-
<InvalidReturnStatement occurrences="1">
223-
<code>\OC_Helper::computerFileSize($str)</code>
224-
</InvalidReturnStatement>
225-
<InvalidReturnType occurrences="1">
226-
<code>float</code>
227-
</InvalidReturnType>
228183
<UndefinedClass occurrences="14">
229184
<code>\OC</code>
230185
<code>\OC</code>

lib/public/Group/Backend/ABackend.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use OC\User\LazyUser;
3030
use OCP\GroupInterface;
3131
use OCP\IUserManager;
32+
use OCP\Server;
3233

3334
/**
3435
* @since 14.0.0
@@ -71,8 +72,8 @@ public function implementsActions($actions): bool {
7172

7273
public function searchInGroup(string $gid, string $search = '', int $limit = -1, int $offset = 0): array {
7374
// Default implementation for compatibility reasons
74-
$displayNameCache = \OC::$server->get(DisplayNameCache::class);
75-
$userManager = \OC::$server->get(IUserManager::class);
75+
$displayNameCache = Server::get(DisplayNameCache::class);
76+
$userManager = Server::get(IUserManager::class);
7677
$users = [];
7778
foreach ($this->usersInGroup($gid, $search, $limit, $offset) as $userId) {
7879
$users[$userId] = new LazyUser($userId, $displayNameCache, $userManager);

0 commit comments

Comments
 (0)