aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts/ContactsMenu/Manager.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-25 11:56:58 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-06-25 11:56:58 +0330
commit9f2487d14b4fbf8a5ec58a74bc6db5eb5cd27bc1 (patch)
tree2ce5060815a92095c4275f3a41693661294f0f15 /lib/private/Contacts/ContactsMenu/Manager.php
parentec3289d1e3164c68fec2c3e4b1d63c9d39e4b9c2 (diff)
downloadnextcloud-server-9f2487d14b4fbf8a5ec58a74bc6db5eb5cd27bc1.tar.gz
nextcloud-server-9f2487d14b4fbf8a5ec58a74bc6db5eb5cd27bc1.zip
Refactors lib/private/Contacts.
Mainly using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'lib/private/Contacts/ContactsMenu/Manager.php')
-rw-r--r--lib/private/Contacts/ContactsMenu/Manager.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php
index 5c3367a3d09..490cf602283 100644
--- a/lib/private/Contacts/ContactsMenu/Manager.php
+++ b/lib/private/Contacts/ContactsMenu/Manager.php
@@ -33,22 +33,15 @@ use OCP\IConfig;
use OCP\IUser;
class Manager {
- private ContactsStore $store;
- private ActionProviderStore $actionProviderStore;
- private IAppManager $appManager;
- private IConfig $config;
-
- public function __construct(ContactsStore $store, ActionProviderStore $actionProviderStore, IAppManager $appManager, IConfig $config) {
- $this->store = $store;
- $this->actionProviderStore = $actionProviderStore;
- $this->appManager = $appManager;
- $this->config = $config;
+ public function __construct(
+ private ContactsStore $store,
+ private ActionProviderStore $actionProviderStore,
+ private IAppManager $appManager,
+ private IConfig $config,
+ ) {
}
/**
- * @param IUser $user
- * @param string|null $filter
- * @return array
* @throws Exception
*/
public function getEntries(IUser $user, ?string $filter): array {
@@ -95,10 +88,9 @@ class Manager {
/**
* @param IEntry[] $entries
- * @param IUser $user
* @throws Exception
*/
- private function processEntries(array $entries, IUser $user) {
+ private function processEntries(array $entries, IUser $user): void {
$providers = $this->actionProviderStore->getProviders($user);
foreach ($entries as $entry) {
foreach ($providers as $provider) {