aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Accounts/TAccountsHelper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Accounts/TAccountsHelper.php')
-rw-r--r--lib/private/Accounts/TAccountsHelper.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/private/Accounts/TAccountsHelper.php b/lib/private/Accounts/TAccountsHelper.php
new file mode 100644
index 00000000000..69d25d9a933
--- /dev/null
+++ b/lib/private/Accounts/TAccountsHelper.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OC\Accounts;
+
+use OCP\Accounts\IAccountManager;
+
+trait TAccountsHelper {
+ /**
+ * returns whether the property is a collection
+ */
+ protected function isCollection(string $propertyName): bool {
+ return in_array(
+ $propertyName,
+ [
+ IAccountManager::COLLECTION_EMAIL,
+ ],
+ true
+ );
+ }
+}