aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/OCM/Model/OCMResource.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/OCM/Model/OCMResource.php')
-rw-r--r--lib/private/OCM/Model/OCMResource.php33
1 files changed, 8 insertions, 25 deletions
diff --git a/lib/private/OCM/Model/OCMResource.php b/lib/private/OCM/Model/OCMResource.php
index c4a91f2eabf..3d619db1927 100644
--- a/lib/private/OCM/Model/OCMResource.php
+++ b/lib/private/OCM/Model/OCMResource.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright 2023, Maxence Lange <maxence@artificial-owl.com>
- *
- * @author Maxence Lange <maxence@artificial-owl.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\OCM\Model;
@@ -33,7 +16,7 @@ use OCP\OCM\IOCMResource;
*/
class OCMResource implements IOCMResource {
private string $name = '';
- /** @var string[] */
+ /** @var list<string> */
private array $shareTypes = [];
/** @var array<string, string> */
private array $protocols = [];
@@ -57,7 +40,7 @@ class OCMResource implements IOCMResource {
}
/**
- * @param string[] $shareTypes
+ * @param list<string> $shareTypes
*
* @return $this
*/
@@ -68,7 +51,7 @@ class OCMResource implements IOCMResource {
}
/**
- * @return string[]
+ * @return list<string>
*/
public function getShareTypes(): array {
return $this->shareTypes;
@@ -102,14 +85,14 @@ class OCMResource implements IOCMResource {
*/
public function import(array $data): static {
return $this->setName((string)($data['name'] ?? ''))
- ->setShareTypes($data['shareTypes'] ?? [])
- ->setProtocols($data['protocols'] ?? []);
+ ->setShareTypes($data['shareTypes'] ?? [])
+ ->setProtocols($data['protocols'] ?? []);
}
/**
* @return array{
* name: string,
- * shareTypes: string[],
+ * shareTypes: list<string>,
* protocols: array<string, string>
* }
*/