server icon indicating copy to clipboard operation
server copied to clipboard

docs: document types flag for search options

Open kesselb opened this issue 3 years ago • 0 comments

Summary

Psalm warning for Mail:

ERROR: InvalidArgument - lib/Service/ContactsIntegration.php:183:59 - Argument 3 of OCP\Contacts\IManager::search expects array{enumeration?: bool, escape_like_param?: bool, fullmatch?: bool, limit?: int, offset?: int, strict_search?: bool}, but array{limit: 1, types: true} with additional array shape fields (types) was provided (see https://psalm.dev/004)

$result = $this->contactsManager->search($uid, ['UID'], ['types' => true, 'limit' => 1]);

https://github.com/nextcloud/server/blob/2e0d26286442c33b5f8de2cfd9b2cfa317b96252/lib/public/IAddressBook.php#L61-L80

The documentation for IAdressBook is up-to-date. OCP\Contacts\IManager misses the types search options flag.

TODO

  • [x] Make Psalm happy

Checklist

kesselb avatar Dec 06 '22 19:12 kesselb