aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Comments
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Comments')
-rw-r--r--lib/public/Comments/CommentsEntityEvent.php42
-rw-r--r--lib/public/Comments/CommentsEvent.php30
-rw-r--r--lib/public/Comments/IComment.php110
-rw-r--r--lib/public/Comments/ICommentsEventHandler.php27
-rw-r--r--lib/public/Comments/ICommentsManager.php169
-rw-r--r--lib/public/Comments/ICommentsManagerFactory.php27
-rw-r--r--lib/public/Comments/IllegalIDChangeException.php26
-rw-r--r--lib/public/Comments/MessageTooLongException.php25
-rw-r--r--lib/public/Comments/NotFoundException.php26
9 files changed, 237 insertions, 245 deletions
diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php
index 7ae2968ead8..39568151b61 100644
--- a/lib/public/Comments/CommentsEntityEvent.php
+++ b/lib/public/Comments/CommentsEntityEvent.php
@@ -1,27 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
use OCP\EventDispatcher\Event;
@@ -30,35 +13,34 @@ use OCP\EventDispatcher\Event;
* Class CommentsEntityEvent
*
* @since 9.1.0
+ * @since 28.0.0 Dispatched as a typed event
*/
class CommentsEntityEvent extends Event {
/**
- * @deprecated 22.0.0
+ * @since 9.1.0
+ * @deprecated 22.0.0 - Listen to the typed event instead.
*/
public const EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity';
- /** @var string */
- protected $event;
/** @var \Closure[] */
protected $collections;
/**
* DispatcherEvent constructor.
*
- * @param string $event
* @since 9.1.0
*/
- public function __construct($event) {
- $this->event = $event;
+ public function __construct() {
+ parent::__construct();
$this->collections = [];
}
/**
* @param string $name
* @param \Closure $entityExistsFunction The closure should take one
- * argument, which is the id of the entity, that comments
- * should be handled for. The return should then be bool,
- * depending on whether comments are allowed (true) or not.
+ * argument, which is the id of the entity, that comments
+ * should be handled for. The return should then be bool,
+ * depending on whether comments are allowed (true) or not.
* @throws \OutOfBoundsException when the entity name is already taken
* @since 9.1.0
*/
diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php
index 9090425aae5..04d592d4f1e 100644
--- a/lib/public/Comments/CommentsEvent.php
+++ b/lib/public/Comments/CommentsEvent.php
@@ -1,27 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
use OCP\EventDispatcher\Event;
@@ -32,23 +15,26 @@ use OCP\EventDispatcher\Event;
* @since 9.0.0
*/
class CommentsEvent extends Event {
-
/**
+ * @since 11.0.0
* @deprecated 22.0.0
*/
public const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment';
/**
+ * @since 11.0.0
* @deprecated 22.0.0
*/
public const EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment';
/**
+ * @since 11.0.0
* @deprecated 22.0.0
*/
public const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment';
/**
+ * @since 11.0.0
* @deprecated 22.0.0
*/
public const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment';
diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php
index fb8c1facfdd..cdfcf188761 100644
--- a/lib/public/Comments/IComment.php
+++ b/lib/public/Comments/IComment.php
@@ -1,29 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
/**
@@ -34,6 +15,9 @@ namespace OCP\Comments;
* @since 9.0.0
*/
interface IComment {
+ /**
+ * @since 9.0.0
+ */
public const MAX_MESSAGE_LENGTH = 1000;
/**
@@ -140,21 +124,12 @@ interface IComment {
* returns an array containing mentions that are included in the comment
*
* @return array each mention provides a 'type' and an 'id', see example below
+ * @psalm-return list<array{type: 'guest'|'email'|'federated_group'|'group'|'federated_team'|'team'|'federated_user'|'user', id: non-empty-lowercase-string}>
+ * @since 30.0.2 Type 'email' is supported
+ * @since 29.0.0 Types 'federated_group', 'federated_team', 'team' and 'federated_user' are supported
+ * @since 23.0.0 Type 'group' is supported
+ * @since 17.0.0 Type 'guest' is supported
* @since 11.0.0
- *
- * The return array looks like:
- * [
- * [
- * 'type' => 'user',
- * 'id' => 'citizen4'
- * ],
- * [
- * 'type' => 'group',
- * 'id' => 'media'
- * ],
- * …
- * ]
- *
*/
public function getMentions();
@@ -231,11 +206,11 @@ interface IComment {
/**
* sets the date of the most recent child
*
- * @param \DateTime $dateTime
+ * @param \DateTime|null $dateTime
* @return IComment
* @since 9.0.0
*/
- public function setLatestChildDateTime(\DateTime $dateTime);
+ public function setLatestChildDateTime(?\DateTime $dateTime = null);
/**
* returns the object type the comment is attached to
@@ -279,4 +254,61 @@ interface IComment {
* @since 19.0.0
*/
public function setReferenceId(?string $referenceId): IComment;
+
+ /**
+ * Returns the metadata of the comment
+ *
+ * @return array|null
+ * @since 29.0.0
+ */
+ public function getMetaData(): ?array;
+
+ /**
+ * Sets (overwrites) the metadata of the comment
+ * Data as a json encoded array
+ *
+ * @param array|null $metaData
+ * @return IComment
+ * @throws \JsonException When the metadata can not be converted to a json encoded string
+ * @since 29.0.0
+ */
+ public function setMetaData(?array $metaData): IComment;
+
+ /**
+ * Returns the reactions array if exists
+ *
+ * The keys is the emoji of reaction and the value is the total.
+ *
+ * @return array<string, integer> e.g. ["👍":1]
+ * @since 24.0.0
+ */
+ public function getReactions(): array;
+
+ /**
+ * Set summarized array of reactions by reaction type
+ *
+ * The keys is the emoji of reaction and the value is the total.
+ *
+ * @param array<string, integer>|null $reactions e.g. ["👍":1]
+ * @return IComment
+ * @since 24.0.0
+ */
+ public function setReactions(?array $reactions): IComment;
+
+ /**
+ * Set message expire date
+ *
+ * @param \DateTime|null $dateTime
+ * @return IComment
+ * @since 25.0.0
+ */
+ public function setExpireDate(?\DateTime $dateTime): IComment;
+
+ /**
+ * Get message expire date
+ *
+ * @return ?\DateTime
+ * @since 25.0.0
+ */
+ public function getExpireDate(): ?\DateTime;
}
diff --git a/lib/public/Comments/ICommentsEventHandler.php b/lib/public/Comments/ICommentsEventHandler.php
index 38939fefd5b..148ead2c367 100644
--- a/lib/public/Comments/ICommentsEventHandler.php
+++ b/lib/public/Comments/ICommentsEventHandler.php
@@ -1,39 +1,22 @@
<?php
+
/**
- * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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: 2016 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OCP\Comments;
/**
* Interface ICommentsEventHandler
*
* @since 11.0.0
+ * @deprecated 30.0.0 Register a listener for the CommentsEvent through the IEventDispatcher
*/
interface ICommentsEventHandler {
-
/**
* @param CommentsEvent $event
* @since 11.0.0
+ * @deprecated 30.0.0 Register a listener for the CommentsEvent through the IEventDispatcher
*/
public function handle(CommentsEvent $event);
}
diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php
index aabacec9202..7e59b5c7b06 100644
--- a/lib/public/Comments/ICommentsManager.php
+++ b/lib/public/Comments/ICommentsManager.php
@@ -1,35 +1,14 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Joas Schilling <coding@schilljs.com>
- * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Robin Appelman <robin@icewind.nl>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
use OCP\IUser;
+use OCP\PreConditionNotMetException;
/**
* Interface ICommentsManager
@@ -39,7 +18,6 @@ use OCP\IUser;
* @since 9.0.0
*/
interface ICommentsManager {
-
/**
* @const DELETED_USER type and id for a user that has been deleted
* @see deleteReferencesOfActor
@@ -62,12 +40,12 @@ interface ICommentsManager {
public function get($id);
/**
- * returns the comment specified by the id and all it's child comments
+ * Returns the comment specified by the id and all it's child comments
*
* @param string $id
* @param int $limit max number of entries to return, 0 returns all
* @param int $offset the start entry
- * @return array
+ * @return array{comment: IComment, replies: list<array{comment: IComment, replies: array<empty, empty>}>}
* @since 9.0.0
*
* The return array looks like this
@@ -107,19 +85,19 @@ interface ICommentsManager {
* @param string $objectType the object type, e.g. 'files'
* @param string $objectId the id of the object
* @param int $limit optional, number of maximum comments to be returned. if
- * not specified, all comments are returned.
+ * not specified, all comments are returned.
* @param int $offset optional, starting point
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments
- * that may be returned
- * @return IComment[]
+ * that may be returned
+ * @return list<IComment>
* @since 9.0.0
*/
public function getForObject(
- $objectType,
- $objectId,
- $limit = 0,
- $offset = 0,
- \DateTime $notOlderThan = null
+ $objectType,
+ $objectId,
+ $limit = 0,
+ $offset = 0,
+ ?\DateTime $notOlderThan = null,
);
/**
@@ -128,10 +106,12 @@ interface ICommentsManager {
* @param int $lastKnownCommentId the last known comment (will be used as offset)
* @param string $sortDirection direction of the comments (`asc` or `desc`)
* @param int $limit optional, number of maximum comments to be returned. if
- * set to 0, all comments are returned.
+ * set to 0, all comments are returned.
* @param bool $includeLastKnown
- * @return IComment[]
+ * @param string $topmostParentId Limit the comments to a list of replies and its original root comment
+ * @return list<IComment>
* @since 14.0.0
+ * @deprecated 24.0.0 - Use getCommentsWithVerbForObjectSinceComment instead
*/
public function getForObjectSince(
string $objectType,
@@ -139,7 +119,32 @@ interface ICommentsManager {
int $lastKnownCommentId,
string $sortDirection = 'asc',
int $limit = 30,
- bool $includeLastKnown = false
+ bool $includeLastKnown = false,
+ string $topmostParentId = '',
+ ): array;
+
+ /**
+ * @param string $objectType the object type, e.g. 'files'
+ * @param string $objectId the id of the object
+ * @param string[] $verbs List of verbs to filter by
+ * @param int $lastKnownCommentId the last known comment (will be used as offset)
+ * @param string $sortDirection direction of the comments (`asc` or `desc`)
+ * @param int $limit optional, number of maximum comments to be returned. if
+ * set to 0, all comments are returned.
+ * @param bool $includeLastKnown
+ * @param string $topmostParentId Limit the comments to a list of replies and its original root comment
+ * @return list<IComment>
+ * @since 24.0.0
+ */
+ public function getCommentsWithVerbForObjectSinceComment(
+ string $objectType,
+ string $objectId,
+ array $verbs,
+ int $lastKnownCommentId,
+ string $sortDirection = 'asc',
+ int $limit = 30,
+ bool $includeLastKnown = false,
+ string $topmostParentId = '',
): array;
/**
@@ -151,7 +156,7 @@ interface ICommentsManager {
* @param string $verb Limit the verb of the comment
* @param int $offset
* @param int $limit
- * @return IComment[]
+ * @return list<IComment>
* @since 14.0.0
*/
public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array;
@@ -174,12 +179,12 @@ interface ICommentsManager {
* @param $objectType string the object type, e.g. 'files'
* @param $objectId string the id of the object
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments
- * that may be returned
+ * that may be returned
* @param string $verb Limit the verb of the comment - Added in 14.0.0
* @return Int
* @since 9.0.0
*/
- public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null, $verb = '');
+ public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '');
/**
* @param string $objectType the object type, e.g. 'files'
@@ -199,9 +204,21 @@ interface ICommentsManager {
* @param string $verb
* @return int
* @since 21.0.0
+ * @deprecated 24.0.0 - Use getNumberOfCommentsWithVerbsForObjectSinceComment instead
*/
public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int;
+
+ /**
+ * @param string $objectType
+ * @param string $objectId
+ * @param int $lastRead
+ * @param string[] $verbs
+ * @return int
+ * @since 24.0.0
+ */
+ public function getNumberOfCommentsWithVerbsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, array $verbs): int;
+
/**
* @param string $objectType
* @param string $objectId
@@ -227,7 +244,7 @@ interface ICommentsManager {
string $objectId,
string $verb,
string $actorType,
- array $actors
+ array $actors,
): array;
/**
@@ -237,6 +254,7 @@ interface ICommentsManager {
* @param IUser $user
* @return array [$fileId => $unreadCount]
* @since 12.0.0
+ * @deprecated 29.0.0 use getNumberOfUnreadCommentsForObjects instead
*/
public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user);
@@ -267,6 +285,58 @@ interface ICommentsManager {
public function delete($id);
/**
+ * Get comment related with user reaction
+ *
+ * Throws PreConditionNotMetException when the system haven't the minimum requirements to
+ * use reactions
+ *
+ * @param int $parentId
+ * @param string $actorType
+ * @param string $actorId
+ * @param string $reaction
+ * @return IComment
+ * @throws NotFoundException
+ * @throws PreConditionNotMetException
+ * @since 24.0.0
+ */
+ public function getReactionComment(int $parentId, string $actorType, string $actorId, string $reaction): IComment;
+
+ /**
+ * Retrieve all reactions of a message
+ *
+ * Throws PreConditionNotMetException when the system haven't the minimum requirements to
+ * use reactions
+ *
+ * @param int $parentId
+ * @return IComment[]
+ * @throws PreConditionNotMetException
+ * @since 24.0.0
+ */
+ public function retrieveAllReactions(int $parentId): array;
+
+ /**
+ * Retrieve all reactions with specific reaction of a message
+ *
+ * Throws PreConditionNotMetException when the system haven't the minimum requirements to
+ * use reactions
+ *
+ * @param int $parentId
+ * @param string $reaction
+ * @return IComment[]
+ * @throws PreConditionNotMetException
+ * @since 24.0.0
+ */
+ public function retrieveAllReactionsWithSpecificReaction(int $parentId, string $reaction): array;
+
+ /**
+ * Support reactions
+ *
+ * @return bool
+ * @since 24.0.0
+ */
+ public function supportReactions(): bool;
+
+ /**
* saves the comment permanently
*
* if the supplied comment has an empty ID, a new entry comment will be
@@ -395,4 +465,15 @@ interface ICommentsManager {
* @since 21.0.0
*/
public function load(): void;
+
+ /**
+ * Delete comments with field expire_date less than current date
+ * Only will delete the message related with the object.
+ *
+ * @param string $objectType the object type (e.g. 'files')
+ * @param string $objectId e.g. the file id, leave empty to expire on all objects of this type
+ * @return boolean true if at least one row was deleted
+ * @since 25.0.0
+ */
+ public function deleteCommentsExpiredAtObject(string $objectType, string $objectId = ''): bool;
}
diff --git a/lib/public/Comments/ICommentsManagerFactory.php b/lib/public/Comments/ICommentsManagerFactory.php
index 3b939297573..bfe6154a48f 100644
--- a/lib/public/Comments/ICommentsManagerFactory.php
+++ b/lib/public/Comments/ICommentsManagerFactory.php
@@ -1,28 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- * @author Vincent Petry <vincent@nextcloud.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
use OCP\IServerContainer;
@@ -36,7 +18,6 @@ use OCP\IServerContainer;
* @since 9.0.0
*/
interface ICommentsManagerFactory {
-
/**
* Constructor for the comments manager factory
*
diff --git a/lib/public/Comments/IllegalIDChangeException.php b/lib/public/Comments/IllegalIDChangeException.php
index f20120bd207..08eddfc6fa4 100644
--- a/lib/public/Comments/IllegalIDChangeException.php
+++ b/lib/public/Comments/IllegalIDChangeException.php
@@ -1,28 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
/**
diff --git a/lib/public/Comments/MessageTooLongException.php b/lib/public/Comments/MessageTooLongException.php
index b6152291755..4358dc2e291 100644
--- a/lib/public/Comments/MessageTooLongException.php
+++ b/lib/public/Comments/MessageTooLongException.php
@@ -1,27 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
/**
diff --git a/lib/public/Comments/NotFoundException.php b/lib/public/Comments/NotFoundException.php
index 9e86b7ff27f..4f25fdbf09f 100644
--- a/lib/public/Comments/NotFoundException.php
+++ b/lib/public/Comments/NotFoundException.php
@@ -1,28 +1,10 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- * @author Thomas Müller <thomas.mueller@tmit.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OCP\Comments;
/**