11<?php
22
33declare (strict_types=1 );
4+
45/**
56 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
67 * SPDX-License-Identifier: AGPL-3.0-or-later
@@ -28,21 +29,15 @@ public function allowExternalStorage(): bool {
2829 return $ this ->appConfig ->getAppValueBool ('allow_external_storage ' , false );
2930 }
3031
31- /**
32- * @param string|bool $allow
33- */
34- public function setAllowExternalStorage ($ allow ): void {
32+ public function setAllowExternalStorage (string |bool $ allow ): void {
3533 $ this ->appConfig ->setAppValueBool ('allow_external_storage ' , $ allow === true || $ allow === 'true ' ) ;
3634 }
3735
3836 public function hideOtherUsers (): bool {
3937 return $ this ->appConfig ->getAppValueBool ('hide_users ' , true );
4038 }
4139
42- /**
43- * @param string|bool $hide
44- */
45- public function setHideOtherUsers ($ hide ): void {
40+ public function setHideOtherUsers (string |bool $ hide ): void {
4641 $ this ->appConfig ->setAppValueBool ('hide_users ' , $ hide === true || $ hide === 'true ' ) ;
4742 }
4843
@@ -54,25 +49,19 @@ public function useWhitelist(): bool {
5449 return $ this ->appConfig ->getAppValueBool ('usewhitelist ' , true );
5550 }
5651
57- /**
58- * @param string|bool $use
59- */
60- public function setUseWhitelist ($ use ): void {
52+ public function setUseWhitelist (string |bool $ use ): void {
6153 $ this ->appConfig ->setAppValueBool ('usewhitelist ' , $ use === true || $ use === 'true ' ) ;
6254 }
6355
6456 /**
65- * @return string[]
57+ * @return list< string>
6658 */
6759 public function getAppWhitelist (): array {
6860 $ whitelist = $ this ->appConfig ->getAppValueString ('whitelist ' , AppWhitelist::DEFAULT_WHITELIST );
6961 return explode (', ' , $ whitelist );
7062 }
7163
72- /**
73- * @param array|string $whitelist
74- */
75- public function setAppWhitelist ($ whitelist ): void {
64+ public function setAppWhitelist (array |string $ whitelist ): void {
7665 if (is_array ($ whitelist )) {
7766 $ whitelist = implode (', ' , $ whitelist );
7867 }
@@ -106,12 +95,11 @@ public function canCreateGuests(): bool {
10695 }
10796 }
10897
109-
11098 return !$ this ->isSharingRestrictedToGroup ();
11199 }
112100
113101 /**
114- * @return string[]
102+ * @return list< string>
115103 */
116104 public function getCreateRestrictedToGroup (): array {
117105 $ groups = $ this ->appConfig ->getAppValueArray ('create_restricted_to_group ' , []);
@@ -127,7 +115,7 @@ public function getCreateRestrictedToGroup(): array {
127115 }
128116
129117 /**
130- * @param string[] $groups
118+ * @param list< string> $groups
131119 */
132120 public function setCreateRestrictedToGroup (array $ groups ): void {
133121 $ this ->appConfig ->setAppValueArray ('create_restricted_to_group ' , $ groups );
0 commit comments