aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Contacts
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-03-22 12:39:23 +0100
committerThomas Citharel <tcit@tcit.fr>2022-05-12 18:31:59 +0200
commit232322fe062031d5fe5b5297ca60b22bc1da1d30 (patch)
treea2591d9ed9caf669cbc7c16142a84b00f435df8f /lib/public/Contacts
parent32139610c5e11ee84c71cc1db3e58523f749aa27 (diff)
downloadnextcloud-server-232322fe062031d5fe5b5297ca60b22bc1da1d30.tar.gz
nextcloud-server-232322fe062031d5fe5b5297ca60b22bc1da1d30.zip
Modernize contacts menu
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/public/Contacts')
-rw-r--r--lib/public/Contacts/ContactsMenu/IAction.php10
-rw-r--r--lib/public/Contacts/ContactsMenu/IContactsStore.php14
-rw-r--r--lib/public/Contacts/ContactsMenu/ILinkAction.php6
3 files changed, 13 insertions, 17 deletions
diff --git a/lib/public/Contacts/ContactsMenu/IAction.php b/lib/public/Contacts/ContactsMenu/IAction.php
index 9b08bbbf04b..f6022fefac3 100644
--- a/lib/public/Contacts/ContactsMenu/IAction.php
+++ b/lib/public/Contacts/ContactsMenu/IAction.php
@@ -35,31 +35,31 @@ interface IAction extends JsonSerializable {
* @param string $icon absolute URI to an icon
* @since 12.0
*/
- public function setIcon($icon);
+ public function setIcon(string $icon);
/**
* @return string localized action name, e.g. 'Call'
* @since 12.0
*/
- public function getName();
+ public function getName(): string;
/**
* @param string $name localized action name, e.g. 'Call'
* @since 12.0
*/
- public function setName($name);
+ public function setName(string $name);
/**
* @param int $priority priorize actions, high order ones are shown on top
* @since 12.0
*/
- public function setPriority($priority);
+ public function setPriority(int $priority);
/**
* @return int priority to priorize actions, high order ones are shown on top
* @since 12.0
*/
- public function getPriority();
+ public function getPriority(): int;
/**
* @param string $appId
diff --git a/lib/public/Contacts/ContactsMenu/IContactsStore.php b/lib/public/Contacts/ContactsMenu/IContactsStore.php
index 3aa51888450..8b36f9cde5c 100644
--- a/lib/public/Contacts/ContactsMenu/IContactsStore.php
+++ b/lib/public/Contacts/ContactsMenu/IContactsStore.php
@@ -34,21 +34,17 @@ interface IContactsStore {
/**
* @param IUser $user
- * @param string $filter
- * @param int $limit added 19.0.2
- * @param int $offset added 19.0.2
+ * @param string|null $filter
+ * @param int|null $limit added 19.0.2
+ * @param int|null $offset added 19.0.2
* @return IEntry[]
* @since 13.0.0
*/
- public function getContacts(IUser $user, $filter, ?int $limit = null, ?int $offset = null);
+ public function getContacts(IUser $user, ?string $filter, ?int $limit = null, ?int $offset = null): array;
/**
* @brief finds a contact by specifying the property to search on ($shareType) and the value ($shareWith)
- * @param IUser $user
- * @param integer $shareType
- * @param string $shareWith
- * @return IEntry|null
* @since 13.0.0
*/
- public function findOne(IUser $user, $shareType, $shareWith);
+ public function findOne(IUser $user, int $shareType, string $shareWith): ?IEntry;
}
diff --git a/lib/public/Contacts/ContactsMenu/ILinkAction.php b/lib/public/Contacts/ContactsMenu/ILinkAction.php
index 63e77f5446f..936dd22bcf2 100644
--- a/lib/public/Contacts/ContactsMenu/ILinkAction.php
+++ b/lib/public/Contacts/ContactsMenu/ILinkAction.php
@@ -28,14 +28,14 @@ namespace OCP\Contacts\ContactsMenu;
interface ILinkAction extends IAction {
/**
- * @since 12.0
* @param string $href the target URL of the action
+ * @since 12.0
*/
- public function setHref($href);
+ public function setHref(string $href);
/**
* @since 12.0
* @return string
*/
- public function getHref();
+ public function getHref(): string;
}