server
server copied to clipboard
docs: document types flag for search options
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
- Code is properly formatted
- Sign-off message is added to all commits
- [x] Tests (unit, integration, api and/or acceptance) are included
- [x] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)