From a8fb722b0e2658eb00568dbbe9da15e8e2cb4152 Mon Sep 17 00:00:00 2001 From: Benjamin Gaussorgues Date: Wed, 10 Jun 2026 11:17:21 +0200 Subject: [PATCH] chore: add strict types in IAddressBook::getKey Signed-off-by: Benjamin Gaussorgues --- apps/dav/lib/CardDAV/AddressBookImpl.php | 3 ++- lib/public/IAddressBook.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index 0668d8fdb73..2413b2c9cc3 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -41,9 +41,10 @@ class AddressBookImpl implements IAddressBookEnabled, ICreateContactFromString { /** * @return string defining the technical unique key * @since 5.0.0 + * @since 35.0.0 Typed return type */ #[\Override] - public function getKey() { + public function getKey(): string { return (string)$this->addressBookInfo['id']; } diff --git a/lib/public/IAddressBook.php b/lib/public/IAddressBook.php index 5a5cc487cee..cd7a13e27d4 100644 --- a/lib/public/IAddressBook.php +++ b/lib/public/IAddressBook.php @@ -18,8 +18,9 @@ namespace OCP { /** * @return string defining the technical unique key * @since 5.0.0 + * @since 35.0.0 Typed return type */ - public function getKey(); + public function getKey(): string; /** * @return string defining the unique uri