From 1acb96ca57072eb8c171dc6713da0157f54698f6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 20 May 2026 08:26:16 +0200 Subject: [PATCH 1/2] chore(csfixer): Update to coding-standard to 1.5.0 Signed-off-by: Joas Schilling --- vendor-bin/csfixer/composer.json | 2 +- vendor-bin/csfixer/composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vendor-bin/csfixer/composer.json b/vendor-bin/csfixer/composer.json index cf80a7e4dac..e0faa905fc0 100644 --- a/vendor-bin/csfixer/composer.json +++ b/vendor-bin/csfixer/composer.json @@ -7,6 +7,6 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.80.0", - "nextcloud/coding-standard": "^1.4.0" + "nextcloud/coding-standard": "^1.5.0" } } diff --git a/vendor-bin/csfixer/composer.lock b/vendor-bin/csfixer/composer.lock index 1493986a4ef..5033f5ac03c 100644 --- a/vendor-bin/csfixer/composer.lock +++ b/vendor-bin/csfixer/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "728b93402cbd230f5216f9669c9999fa", + "content-hash": "33bef2b4becb4fb6e74e5bf18e102f63", "packages": [], "packages-dev": [ { @@ -61,16 +61,16 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/80547a93236fbb9c783e05f0f0899043851b0dba", + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba", "shasum": "" }, "require": { @@ -100,9 +100,9 @@ ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.5.0" }, - "time": "2025-06-19T12:27:27+00:00" + "time": "2026-05-19T18:30:09+00:00" }, { "name": "php-cs-fixer/shim", @@ -167,5 +167,5 @@ "platform-overrides": { "php": "8.2" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From 817b1280fd732cc1d9fe3d48f2420c63cdb85481 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 20 May 2026 08:29:54 +0200 Subject: [PATCH 2/2] chore(coding-standard): Apply auto fixes Signed-off-by: Joas Schilling --- lib/BackgroundJob/MaximumCallDuration.php | 1 + lib/BackgroundJob/RetryNotificationsJob.php | 1 + lib/Chat/CommentsManager.php | 1 - lib/Chat/Notifier.php | 1 - lib/Chat/Parser/SystemMessage.php | 2 -- lib/Collaboration/Reference/TalkReferenceProvider.php | 2 -- lib/Command/Turn/Add.php | 1 - lib/Controller/AvatarController.php | 1 - lib/Controller/CallController.php | 1 - lib/Controller/CallNotificationController.php | 1 - lib/Controller/ChatController.php | 2 -- lib/Controller/FilesIntegrationController.php | 1 - lib/Controller/HostedSignalingServerController.php | 1 - lib/Controller/RoomController.php | 1 - lib/Controller/SignalingController.php | 1 - lib/Controller/ThreadController.php | 2 -- lib/Dashboard/Event.php | 1 - lib/Events/AReactionEvent.php | 1 - lib/Events/ARoomEvent.php | 1 - lib/Events/BeforeDuplicateShareSentEvent.php | 2 -- lib/Events/RoomPasswordVerifyEvent.php | 1 - lib/Exceptions/CannotReachRemoteException.php | 1 - lib/Exceptions/DialOutFailedException.php | 1 - lib/Exceptions/FederationRestrictionException.php | 1 - lib/Exceptions/ForbiddenException.php | 1 - lib/Exceptions/GuestImportException.php | 1 - lib/Exceptions/ImpossibleToKillException.php | 1 - lib/Exceptions/InvalidPasswordException.php | 1 - lib/Exceptions/InvalidRoomException.php | 1 - lib/Exceptions/MessagingNotAllowedException.php | 1 - lib/Exceptions/ParticipantNotFoundException.php | 1 - lib/Exceptions/PermissionsException.php | 1 - lib/Exceptions/RoomHasNoModeratorException.php | 1 - lib/Exceptions/RoomNotFoundException.php | 1 - lib/Exceptions/UnauthorizedException.php | 1 - lib/Exceptions/WrongPermissionsException.php | 1 - lib/Federation/FederationManager.php | 1 - .../Proxy/TalkV1/Controller/ChatController.php | 1 - .../Proxy/TalkV1/Controller/PollController.php | 1 - .../Proxy/TalkV1/Controller/ReactionController.php | 1 - .../Proxy/TalkV1/Controller/ThreadController.php | 1 - lib/Listener/CalDavEventListener.php | 2 +- lib/Listener/CircleMembershipListener.php | 1 - lib/Manager.php | 2 -- lib/Middleware/CanUseTalkMiddleware.php | 1 - lib/Migration/Version10000Date20201015134000.php | 2 -- lib/Migration/Version11001Date20210212105406.php | 1 - lib/Migration/Version14000Date20220217115327.php | 1 + lib/Migration/Version19000Date20240312105627.php | 1 - lib/Migration/Version19000Date20240709183938.php | 1 - lib/Migration/Version2000Date20170707093535.php | 1 + lib/Migration/Version2000Date20171026140256.php | 1 + lib/Migration/Version2000Date20171026140257.php | 1 + lib/Migration/Version2001Date20170707115443.php | 1 + lib/Migration/Version2001Date20170913104501.php | 1 + lib/Migration/Version2001Date20170921145301.php | 1 + lib/Migration/Version2001Date20170929092606.php | 1 + lib/Migration/Version2001Date20171009132424.php | 1 + lib/Migration/Version2001Date20171026134605.php | 1 + lib/Migration/Version2001Date20171026141336.php | 1 + lib/Migration/Version2001Date20171031102049.php | 2 +- lib/Migration/Version2001Date20180103144447.php | 2 +- lib/Migration/Version2001Date20180103150836.php | 1 + lib/Migration/Version3002Date20180319104030.php | 1 + lib/Migration/Version3003Date20180707222130.php | 1 + lib/Migration/Version3003Date20180718112436.php | 1 + lib/Migration/Version3003Date20180718133519.php | 1 + lib/Migration/Version3003Date20180722152733.php | 1 + lib/Migration/Version3003Date20180722152849.php | 1 + lib/Migration/Version3003Date20180730080327.php | 1 + lib/Migration/Version4099Date20181001123058.php | 1 + lib/Migration/Version7000Date20190717141457.php | 1 + lib/Migration/Version7000Date20190724121136.php | 1 + lib/Model/ProxyCacheMessage.php | 1 - lib/Model/SelectHelper.php | 1 - lib/Model/ThreadMapper.php | 2 -- lib/Notification/FederationChatNotifier.php | 1 - lib/Room.php | 1 - lib/Service/AvatarService.php | 1 - lib/Service/BreakoutRoomService.php | 1 - lib/Service/HostedSignalingServerService.php | 2 -- lib/Service/ParticipantService.php | 1 - lib/Service/RecordingService.php | 1 - lib/Service/RoomFormatter.php | 1 + lib/Service/RoomService.php | 2 -- lib/Service/ThreadService.php | 1 - lib/Settings/Admin/AdminSettings.php | 1 - lib/SetupCheck/BackgroundBlurLoading.php | 1 + lib/SetupCheck/Configuration.php | 1 + lib/TalkSession.php | 1 - tests/integration/features/bootstrap/FeatureContext.php | 9 --------- .../spreedcheats/lib/Controller/ApiController.php | 2 -- .../talk_webhook_demo/lib/Service/SummaryService.php | 1 - tests/php/Activity/Provider/BaseTest.php | 1 - tests/php/Chat/AutoComplete/SearchPluginTest.php | 2 -- tests/php/Command/Signaling/AddTest.php | 1 + tests/php/Command/Signaling/DeleteTest.php | 1 + tests/php/Command/Signaling/ListCommandTest.php | 1 + tests/php/Command/Stun/AddTest.php | 1 + tests/php/Command/Stun/DeleteTest.php | 1 + tests/php/Command/Stun/ListCommandTest.php | 1 + tests/php/Command/Turn/AddTest.php | 1 + tests/php/Command/Turn/DeleteTest.php | 1 + tests/php/Command/Turn/ListCommandTest.php | 1 + tests/php/ConfigTest.php | 1 + tests/php/Controller/SignalingControllerTest.php | 1 - tests/php/GuestManagerTest.php | 1 + tests/php/Model/AttendeeMapperTest.php | 1 - tests/php/Service/ParticipantServiceTest.php | 1 - tests/php/Service/ProxyCacheMessageServiceTest.php | 1 - tests/php/Signaling/ListenerTest.php | 3 --- tests/stubs/oc_comments_comment.php | 1 + tests/stubs/oc_comments_manager.php | 1 + tests/stubs/oc_core_command_base.php | 1 + tests/stubs/oc_hooks_emitter.php | 1 + tests/stubs/oc_http_client_response.php | 1 + tests/stubs/oc_memcache.php | 1 + tests/stubs/oc_user_lazyuser.php | 1 + tests/stubs/oca_circles.php | 1 + tests/stubs/oca_dav_caldav_timezoneservice.php | 1 + tests/stubs/oca_federation_trustedservers.php | 1 + tests/stubs/oca_files_events.php | 1 + tests/stubs/oca_files_sharing_events.php | 1 + tests/stubs/oca_guests.php | 1 + ...oca_settings_setupchecks_checkserverresponsetrait.php | 1 + 125 files changed, 55 insertions(+), 95 deletions(-) diff --git a/lib/BackgroundJob/MaximumCallDuration.php b/lib/BackgroundJob/MaximumCallDuration.php index f686650b145..8db76094b14 100644 --- a/lib/BackgroundJob/MaximumCallDuration.php +++ b/lib/BackgroundJob/MaximumCallDuration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\BackgroundJob; use OCA\Talk\Manager; diff --git a/lib/BackgroundJob/RetryNotificationsJob.php b/lib/BackgroundJob/RetryNotificationsJob.php index 2b7ea717ff8..c9115a53b03 100644 --- a/lib/BackgroundJob/RetryNotificationsJob.php +++ b/lib/BackgroundJob/RetryNotificationsJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\BackgroundJob; use OCA\Talk\Federation\BackendNotifier; diff --git a/lib/Chat/CommentsManager.php b/lib/Chat/CommentsManager.php index c2b276eba54..c7fda2d09ed 100644 --- a/lib/Chat/CommentsManager.php +++ b/lib/Chat/CommentsManager.php @@ -216,7 +216,6 @@ public function getCommentsWithVerbForObjectSinceComment( return $comments; } - /** * @param string $actorType * @param string $actorId diff --git a/lib/Chat/Notifier.php b/lib/Chat/Notifier.php index 212ab80234a..171932e5112 100644 --- a/lib/Chat/Notifier.php +++ b/lib/Chat/Notifier.php @@ -183,7 +183,6 @@ private function addMentionAllToList(Room $chat, array $list, ?Participant $part return $usersToNotify; } - /** * Notifies the author that wrote the comment which was replied to * diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index 7f22c821094..5a432035dbf 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -66,7 +66,6 @@ class SystemMessage implements IEventListener { /** @var array> */ protected array $phoneNames = []; - protected array $currentFederatedUserDetails = []; public function __construct( @@ -1354,7 +1353,6 @@ protected function parseMissedCall(Room $room, array $parameters, ?string $curre ]; } - protected function parseCall(Room $room, string $message, array $parameters, array $params): array { $actorIsSystem = $params['actor']['type'] === 'guest' && $params['actor']['id'] === 'guest/' . Attendee::ACTOR_ID_SYSTEM; $maxDuration = $this->appConfig->getAppValueInt('max_call_duration'); diff --git a/lib/Collaboration/Reference/TalkReferenceProvider.php b/lib/Collaboration/Reference/TalkReferenceProvider.php index 37b453e5eaf..78dfb99f7f4 100644 --- a/lib/Collaboration/Reference/TalkReferenceProvider.php +++ b/lib/Collaboration/Reference/TalkReferenceProvider.php @@ -48,7 +48,6 @@ public function __construct( ) { } - #[\Override] public function matchReference(string $referenceText): bool { return $this->getTalkAppLinkToken($referenceText) !== null; @@ -158,7 +157,6 @@ protected function fetchReference(Reference $reference): void { $description = $room->getDescription(); } - /** * If linking to a comment and the user is already a participant * Title is "Message of {user} in {conversation}" diff --git a/lib/Command/Turn/Add.php b/lib/Command/Turn/Add.php index 7927a9ffa3c..29da9fe19a6 100644 --- a/lib/Command/Turn/Add.php +++ b/lib/Command/Turn/Add.php @@ -113,7 +113,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int } } - $servers[] = [ 'schemes' => $schemes, 'server' => $server, diff --git a/lib/Controller/AvatarController.php b/lib/Controller/AvatarController.php index e439c9cf1bb..5d6bf1f376e 100644 --- a/lib/Controller/AvatarController.php +++ b/lib/Controller/AvatarController.php @@ -344,7 +344,6 @@ protected function getPlaceholderResponse(bool $darkTheme): FileDisplayResponse ); $response->cacheFor(60 * 15, false, true); return $response; - } /** diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php index 8a81cc7ad48..fd0e95cb277 100644 --- a/lib/Controller/CallController.php +++ b/lib/Controller/CallController.php @@ -280,7 +280,6 @@ public function joinCall(?int $flags = null, bool $silent = false, bool $recordi // Force silent join for voice rooms $silent = $silent || ($this->room->getAttributes() & RoomAttributes::VOICE_ROOM->value); - try { $this->participantService->changeInCall($this->room, $this->participant, $flags, silent: $silent, lastJoinedCall: $lastJoinedCall->getTimestamp()); $this->roomService->setActiveSince($this->room, $this->participant, $lastJoinedCall, $flags, silent: $silent, silentFor: $silentFor); diff --git a/lib/Controller/CallNotificationController.php b/lib/Controller/CallNotificationController.php index 7d72e283594..b8649ef8f3e 100644 --- a/lib/Controller/CallNotificationController.php +++ b/lib/Controller/CallNotificationController.php @@ -24,7 +24,6 @@ class CallNotificationController extends OCSController { public const CASE_MISSED_CALL = 2; public const CASE_PARTICIPANT_JOINED = 3; - public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php index 332780748e3..8784d8f722a 100644 --- a/lib/Controller/ChatController.php +++ b/lib/Controller/ChatController.php @@ -1858,7 +1858,6 @@ public function clearHistory(): DataResponse { $systemMessage = $this->messageParser->createMessage($this->room, $this->participant, $systemMessageComment, $this->l); $this->messageParser->parseMessage($systemMessage); - $data = $systemMessage->toArray($this->getResponseFormat(), null); $bridge = $this->matterbridgeManager->getBridgeOfRoom($this->room); @@ -2355,7 +2354,6 @@ public function mentions(string $search, int $limit = 20, bool $includeStatus = return new DataResponse($results); } - /** * @param array $results * @param array $statuses diff --git a/lib/Controller/FilesIntegrationController.php b/lib/Controller/FilesIntegrationController.php index 232a58d989f..5a953667a1d 100644 --- a/lib/Controller/FilesIntegrationController.php +++ b/lib/Controller/FilesIntegrationController.php @@ -98,7 +98,6 @@ public function getRoomByFileId(string $fileId): DataResponse { throw new OCSException($this->l->t('File is not shared, or shared but not with the user'), Http::STATUS_UNAUTHORIZED); } - $node = $this->util->getAnyNodeOfFileAccessibleByUser($fileId, $currentUser->getUID()); if ($node === null) { throw new OCSNotFoundException($this->l->t('File is not shared, or shared but not with the user')); diff --git a/lib/Controller/HostedSignalingServerController.php b/lib/Controller/HostedSignalingServerController.php index 5d5df83530d..1450b952170 100644 --- a/lib/Controller/HostedSignalingServerController.php +++ b/lib/Controller/HostedSignalingServerController.php @@ -117,7 +117,6 @@ public function requestTrial(string $url, string $name, string $email, string $l return new DataResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST); } - return new DataResponse($accountInfo); } diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index a8eba4efd07..0d8a2c56ac1 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -406,7 +406,6 @@ public function getBreakoutRooms(): DataResponse { $return[] = $this->formatRoom($room, $participant, null, false, true, true); } - return new DataResponse($return); } diff --git a/lib/Controller/SignalingController.php b/lib/Controller/SignalingController.php index cb2d0a1d16e..6785aeb487a 100644 --- a/lib/Controller/SignalingController.php +++ b/lib/Controller/SignalingController.php @@ -415,7 +415,6 @@ public function sendMessages(string $token, string $messages): DataResponse { break; } - if ($decodedMessage['type'] === 'control') { if (!$participant->hasModeratorPermissions(false)) { break; diff --git a/lib/Controller/ThreadController.php b/lib/Controller/ThreadController.php index 7eba0c644b5..ef1df9137d1 100644 --- a/lib/Controller/ThreadController.php +++ b/lib/Controller/ThreadController.php @@ -87,7 +87,6 @@ public function getRecentActiveThreads(int $limit = 50): DataResponse { return new DataResponse($list); } - /** * Get subscribed threads for a user * @@ -375,7 +374,6 @@ public function setNotificationLevel(int $messageId, int $level): DataResponse { return new DataResponse(['error' => 'level'], Http::STATUS_BAD_REQUEST); } - try { $thread = $this->threadService->findByThreadId($this->room->getId(), $messageId); } catch (DoesNotExistException) { diff --git a/lib/Dashboard/Event.php b/lib/Dashboard/Event.php index 2c9128a383a..081cca09322 100644 --- a/lib/Dashboard/Event.php +++ b/lib/Dashboard/Event.php @@ -153,7 +153,6 @@ public function isAttendee(array $attendees, string $email): bool { return false; } - public function isOrganizer(array $organizer, string $email): bool { // Calendar emails start with 'mailto:' return substr((string)$organizer[0], 7) === $email; diff --git a/lib/Events/AReactionEvent.php b/lib/Events/AReactionEvent.php index 664402f2b8f..6eadfc01d9f 100644 --- a/lib/Events/AReactionEvent.php +++ b/lib/Events/AReactionEvent.php @@ -32,7 +32,6 @@ public function getReactionMessage(): ?IComment { return $this->reactionMessage; } - public function getActorType(): string { return $this->actorType; } diff --git a/lib/Events/ARoomEvent.php b/lib/Events/ARoomEvent.php index a8552b08bff..9760de966e5 100644 --- a/lib/Events/ARoomEvent.php +++ b/lib/Events/ARoomEvent.php @@ -13,7 +13,6 @@ abstract class ARoomEvent extends Event { - public function __construct( protected Room $room, ) { diff --git a/lib/Events/BeforeDuplicateShareSentEvent.php b/lib/Events/BeforeDuplicateShareSentEvent.php index 1f7910beee4..bfbd47574a2 100644 --- a/lib/Events/BeforeDuplicateShareSentEvent.php +++ b/lib/Events/BeforeDuplicateShareSentEvent.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Events; use OCP\EventDispatcher\Event; @@ -19,7 +18,6 @@ public function __construct( parent::__construct(); } - public function getShare(): IShare { return $this->share; } diff --git a/lib/Events/RoomPasswordVerifyEvent.php b/lib/Events/RoomPasswordVerifyEvent.php index 3264fc64fa5..db56819ea69 100644 --- a/lib/Events/RoomPasswordVerifyEvent.php +++ b/lib/Events/RoomPasswordVerifyEvent.php @@ -14,7 +14,6 @@ class RoomPasswordVerifyEvent extends ARoomEvent { protected ?bool $isPasswordValid = null; protected string $redirectUrl = ''; - public function __construct( Room $room, private readonly string $password, diff --git a/lib/Exceptions/CannotReachRemoteException.php b/lib/Exceptions/CannotReachRemoteException.php index fe346be7ca7..d9d1ae1300d 100644 --- a/lib/Exceptions/CannotReachRemoteException.php +++ b/lib/Exceptions/CannotReachRemoteException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class CannotReachRemoteException extends \Exception { diff --git a/lib/Exceptions/DialOutFailedException.php b/lib/Exceptions/DialOutFailedException.php index 5e197d4b9e8..e3413dcf16d 100644 --- a/lib/Exceptions/DialOutFailedException.php +++ b/lib/Exceptions/DialOutFailedException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class DialOutFailedException extends \RuntimeException { diff --git a/lib/Exceptions/FederationRestrictionException.php b/lib/Exceptions/FederationRestrictionException.php index 21fa8846a72..2eec59f19c4 100644 --- a/lib/Exceptions/FederationRestrictionException.php +++ b/lib/Exceptions/FederationRestrictionException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class FederationRestrictionException extends \InvalidArgumentException { diff --git a/lib/Exceptions/ForbiddenException.php b/lib/Exceptions/ForbiddenException.php index 2f00ee3e0c9..d6cad07c917 100644 --- a/lib/Exceptions/ForbiddenException.php +++ b/lib/Exceptions/ForbiddenException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class ForbiddenException extends \Exception { diff --git a/lib/Exceptions/GuestImportException.php b/lib/Exceptions/GuestImportException.php index 0c0a8b7d886..0c0f5b92103 100644 --- a/lib/Exceptions/GuestImportException.php +++ b/lib/Exceptions/GuestImportException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class GuestImportException extends \Exception { diff --git a/lib/Exceptions/ImpossibleToKillException.php b/lib/Exceptions/ImpossibleToKillException.php index a8ad42bf702..5f003a6c76d 100644 --- a/lib/Exceptions/ImpossibleToKillException.php +++ b/lib/Exceptions/ImpossibleToKillException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class ImpossibleToKillException extends \Exception { diff --git a/lib/Exceptions/InvalidPasswordException.php b/lib/Exceptions/InvalidPasswordException.php index 8845ee31c63..37995d5e70e 100644 --- a/lib/Exceptions/InvalidPasswordException.php +++ b/lib/Exceptions/InvalidPasswordException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class InvalidPasswordException extends \Exception { diff --git a/lib/Exceptions/InvalidRoomException.php b/lib/Exceptions/InvalidRoomException.php index 1c93232bec6..b327f23d02c 100644 --- a/lib/Exceptions/InvalidRoomException.php +++ b/lib/Exceptions/InvalidRoomException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class InvalidRoomException extends \InvalidArgumentException { diff --git a/lib/Exceptions/MessagingNotAllowedException.php b/lib/Exceptions/MessagingNotAllowedException.php index 18bb5eba6d5..c165de5bf98 100644 --- a/lib/Exceptions/MessagingNotAllowedException.php +++ b/lib/Exceptions/MessagingNotAllowedException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; /** diff --git a/lib/Exceptions/ParticipantNotFoundException.php b/lib/Exceptions/ParticipantNotFoundException.php index 3f2db9e10a1..668ace19f1d 100644 --- a/lib/Exceptions/ParticipantNotFoundException.php +++ b/lib/Exceptions/ParticipantNotFoundException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class ParticipantNotFoundException extends \OutOfBoundsException { diff --git a/lib/Exceptions/PermissionsException.php b/lib/Exceptions/PermissionsException.php index dd4da450ec2..7de46cdcd1a 100644 --- a/lib/Exceptions/PermissionsException.php +++ b/lib/Exceptions/PermissionsException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class PermissionsException extends \Exception { diff --git a/lib/Exceptions/RoomHasNoModeratorException.php b/lib/Exceptions/RoomHasNoModeratorException.php index 040414e5df6..3227c3a9abe 100644 --- a/lib/Exceptions/RoomHasNoModeratorException.php +++ b/lib/Exceptions/RoomHasNoModeratorException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class RoomHasNoModeratorException extends \Exception { diff --git a/lib/Exceptions/RoomNotFoundException.php b/lib/Exceptions/RoomNotFoundException.php index ca1b3b8b7c1..d88a0732ef6 100644 --- a/lib/Exceptions/RoomNotFoundException.php +++ b/lib/Exceptions/RoomNotFoundException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class RoomNotFoundException extends \OutOfBoundsException { diff --git a/lib/Exceptions/UnauthorizedException.php b/lib/Exceptions/UnauthorizedException.php index 3d1998519a3..b2edc6f88ac 100644 --- a/lib/Exceptions/UnauthorizedException.php +++ b/lib/Exceptions/UnauthorizedException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class UnauthorizedException extends \Exception { diff --git a/lib/Exceptions/WrongPermissionsException.php b/lib/Exceptions/WrongPermissionsException.php index 4e702dd6c2c..064e4837ad3 100644 --- a/lib/Exceptions/WrongPermissionsException.php +++ b/lib/Exceptions/WrongPermissionsException.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Exceptions; class WrongPermissionsException extends \Exception { diff --git a/lib/Federation/FederationManager.php b/lib/Federation/FederationManager.php index c4c03e83770..97be7d20ca7 100644 --- a/lib/Federation/FederationManager.php +++ b/lib/Federation/FederationManager.php @@ -172,7 +172,6 @@ public function acceptRemoteRoomShare(IUser $user, int $shareId): Participant { throw new \InvalidArgumentException('state'); } - $cloudId = $this->cloudIdManager->getCloudId($user->getUID(), null); // Add user to the room diff --git a/lib/Federation/Proxy/TalkV1/Controller/ChatController.php b/lib/Federation/Proxy/TalkV1/Controller/ChatController.php index ac5b84815b8..91bc944f580 100644 --- a/lib/Federation/Proxy/TalkV1/Controller/ChatController.php +++ b/lib/Federation/Proxy/TalkV1/Controller/ChatController.php @@ -131,7 +131,6 @@ public function receiveMessages( int $markNotificationsAsRead): DataResponse { $cacheKey = sha1(json_encode([$room->getRemoteServer(), $room->getRemoteToken()])); - if ($lookIntoFuture && $markNotificationsAsRead && $participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) { $this->notifier->markMentionNotificationsRead($room, $participant->getAttendee()->getActorId()); } diff --git a/lib/Federation/Proxy/TalkV1/Controller/PollController.php b/lib/Federation/Proxy/TalkV1/Controller/PollController.php index 8f1e68d12a4..12ddcfe64b0 100644 --- a/lib/Federation/Proxy/TalkV1/Controller/PollController.php +++ b/lib/Federation/Proxy/TalkV1/Controller/PollController.php @@ -132,7 +132,6 @@ public function votePoll(Room $room, Participant $participant, int $pollId, arra return new DataResponse($data); } - /** * @return DataResponse|DataResponse|DataResponse * @throws CannotReachRemoteException diff --git a/lib/Federation/Proxy/TalkV1/Controller/ReactionController.php b/lib/Federation/Proxy/TalkV1/Controller/ReactionController.php index 56391073012..12d25536bd5 100644 --- a/lib/Federation/Proxy/TalkV1/Controller/ReactionController.php +++ b/lib/Federation/Proxy/TalkV1/Controller/ReactionController.php @@ -111,7 +111,6 @@ public function delete(Room $room, Participant $participant, int $messageId, str return new DataResponse($this->formatReactions($format, $data), $statusCode); } - /** * Get a list of reactions for a message * diff --git a/lib/Federation/Proxy/TalkV1/Controller/ThreadController.php b/lib/Federation/Proxy/TalkV1/Controller/ThreadController.php index ba494b3a6e2..40289dd45b1 100644 --- a/lib/Federation/Proxy/TalkV1/Controller/ThreadController.php +++ b/lib/Federation/Proxy/TalkV1/Controller/ThreadController.php @@ -140,7 +140,6 @@ public function renameThread(Room $room, Participant $participant, int $threadId return new DataResponse($data, Http::STATUS_OK); } - /** * @see \OCA\Talk\Controller\ThreadController::setNotificationLevel() * diff --git a/lib/Listener/CalDavEventListener.php b/lib/Listener/CalDavEventListener.php index 589cf420a0f..4bb8bbbd705 100644 --- a/lib/Listener/CalDavEventListener.php +++ b/lib/Listener/CalDavEventListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Listener; use OCA\DAV\CalDAV\TimezoneService; @@ -176,7 +177,6 @@ public function handle(Event $event): void { return; } - // So we can unset names & descriptions in case the user deleted them $this->roomService->setName($room, $name ?? $this->l10n->t('Meeting')); $this->roomService->setDescription($room, $description ?? ''); diff --git a/lib/Listener/CircleMembershipListener.php b/lib/Listener/CircleMembershipListener.php index b3172cf2744..15e65dffb83 100644 --- a/lib/Listener/CircleMembershipListener.php +++ b/lib/Listener/CircleMembershipListener.php @@ -79,7 +79,6 @@ protected function addingCircleMemberEvent(AddingCircleMemberEvent $event): void } } - if (empty($roomsToAdd)) { // The circle is not in any room => bye! return; diff --git a/lib/Manager.php b/lib/Manager.php index 85eea1fa6f9..1a0f99d930c 100644 --- a/lib/Manager.php +++ b/lib/Manager.php @@ -785,7 +785,6 @@ public function getRoomByActor(string $token, string $actorType, string $actorId $query->expr()->eq('a.room_id', 'r.id') )); - if ($serverUrl === null) { $query->where($query->expr()->eq('r.token', $query->createNamedParameter($token))); } else { @@ -930,7 +929,6 @@ public function getRoomByToken(string $token, ?string $preloadUserId = null, ?st ->andWhere($query->expr()->eq('r.remote_server', $query->createNamedParameter($serverUrl))); } - $result = $query->executeQuery(); $row = $result->fetchAssociative(); $result->closeCursor(); diff --git a/lib/Middleware/CanUseTalkMiddleware.php b/lib/Middleware/CanUseTalkMiddleware.php index 522ba119635..88becb4f945 100644 --- a/lib/Middleware/CanUseTalkMiddleware.php +++ b/lib/Middleware/CanUseTalkMiddleware.php @@ -51,7 +51,6 @@ class CanUseTalkMiddleware extends Middleware { // Support for E2EE on Talk iOS is still pending public const TALK_IOS_MIN_VERSION_E2EE_CALLS = '23.0.0'; - public function __construct( private readonly IUserSession $userSession, private readonly IGroupManager $groupManager, diff --git a/lib/Migration/Version10000Date20201015134000.php b/lib/Migration/Version10000Date20201015134000.php index 0d75258b857..b247fea2e52 100644 --- a/lib/Migration/Version10000Date20201015134000.php +++ b/lib/Migration/Version10000Date20201015134000.php @@ -113,7 +113,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['actor_type', 'actor_id'], 'ta_actor'); } - if (!$schema->hasTable('talk_sessions')) { $table = $schema->createTable('talk_sessions'); @@ -184,7 +183,6 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array ->where($query->expr()->neq('user_id', $query->createNamedParameter(''))) ->andWhere($query->expr()->isNotNull('user_id')); - $result = $query->executeQuery(); while ($row = $result->fetchAssociative()) { $lastJoinedCall = 0; diff --git a/lib/Migration/Version11001Date20210212105406.php b/lib/Migration/Version11001Date20210212105406.php index 73439786efd..f7d2489db83 100644 --- a/lib/Migration/Version11001Date20210212105406.php +++ b/lib/Migration/Version11001Date20210212105406.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Talk\Migration; use Closure; diff --git a/lib/Migration/Version14000Date20220217115327.php b/lib/Migration/Version14000Date20220217115327.php index d93533596a3..3dc9a893a8d 100644 --- a/lib/Migration/Version14000Date20220217115327.php +++ b/lib/Migration/Version14000Date20220217115327.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use Closure; diff --git a/lib/Migration/Version19000Date20240312105627.php b/lib/Migration/Version19000Date20240312105627.php index 41ad52f750c..3bec74115b1 100644 --- a/lib/Migration/Version19000Date20240312105627.php +++ b/lib/Migration/Version19000Date20240312105627.php @@ -68,7 +68,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt 'notnull' => true, ]); - $table->setPrimaryKey(['id']); $table->addIndex(['next_retry'], 'talk_retry_ocm_next'); diff --git a/lib/Migration/Version19000Date20240709183938.php b/lib/Migration/Version19000Date20240709183938.php index 9b0e67eb6c1..60df9c73d4e 100644 --- a/lib/Migration/Version19000Date20240709183938.php +++ b/lib/Migration/Version19000Date20240709183938.php @@ -25,7 +25,6 @@ public function __construct( ) { } - /** * @param IOutput $output * @param Closure(): ISchemaWrapper $schemaClosure diff --git a/lib/Migration/Version2000Date20170707093535.php b/lib/Migration/Version2000Date20170707093535.php index ae8cee40839..5556304bc97 100644 --- a/lib/Migration/Version2000Date20170707093535.php +++ b/lib/Migration/Version2000Date20170707093535.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version2000Date20171026140256.php b/lib/Migration/Version2000Date20171026140256.php index 033d05ad2ea..43fa0d07f35 100644 --- a/lib/Migration/Version2000Date20171026140256.php +++ b/lib/Migration/Version2000Date20171026140256.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/Migration/Version2000Date20171026140257.php b/lib/Migration/Version2000Date20171026140257.php index c5d44594786..6c8fe0afcbf 100644 --- a/lib/Migration/Version2000Date20171026140257.php +++ b/lib/Migration/Version2000Date20171026140257.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/Migration/Version2001Date20170707115443.php b/lib/Migration/Version2001Date20170707115443.php index 14ceaad4bcf..0b4177b2613 100644 --- a/lib/Migration/Version2001Date20170707115443.php +++ b/lib/Migration/Version2001Date20170707115443.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCA\Talk\Participant; diff --git a/lib/Migration/Version2001Date20170913104501.php b/lib/Migration/Version2001Date20170913104501.php index f0c1dc54330..4f2360b65e7 100644 --- a/lib/Migration/Version2001Date20170913104501.php +++ b/lib/Migration/Version2001Date20170913104501.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version2001Date20170921145301.php b/lib/Migration/Version2001Date20170921145301.php index 0e28ae6b447..2befe46c74f 100644 --- a/lib/Migration/Version2001Date20170921145301.php +++ b/lib/Migration/Version2001Date20170921145301.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version2001Date20170929092606.php b/lib/Migration/Version2001Date20170929092606.php index 74df1d9755a..cd96e07d47e 100644 --- a/lib/Migration/Version2001Date20170929092606.php +++ b/lib/Migration/Version2001Date20170929092606.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\IConfig; diff --git a/lib/Migration/Version2001Date20171009132424.php b/lib/Migration/Version2001Date20171009132424.php index 0000f7686d5..0cd060e895d 100644 --- a/lib/Migration/Version2001Date20171009132424.php +++ b/lib/Migration/Version2001Date20171009132424.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version2001Date20171026134605.php b/lib/Migration/Version2001Date20171026134605.php index 759c787c33a..c2bb8b2b400 100644 --- a/lib/Migration/Version2001Date20171026134605.php +++ b/lib/Migration/Version2001Date20171026134605.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use Doctrine\DBAL\Exception\InvalidFieldNameException; diff --git a/lib/Migration/Version2001Date20171026141336.php b/lib/Migration/Version2001Date20171026141336.php index 96776c661ab..af139ea01aa 100644 --- a/lib/Migration/Version2001Date20171026141336.php +++ b/lib/Migration/Version2001Date20171026141336.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version2001Date20171031102049.php b/lib/Migration/Version2001Date20171031102049.php index a45d1b1e3ec..df40b2a7550 100644 --- a/lib/Migration/Version2001Date20171031102049.php +++ b/lib/Migration/Version2001Date20171031102049.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; @@ -25,7 +26,6 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - $table = $schema->getTable('talk_participants'); $table->addColumn('inCall', Types::BOOLEAN, [ 'default' => 0, diff --git a/lib/Migration/Version2001Date20180103144447.php b/lib/Migration/Version2001Date20180103144447.php index c3e57968fa2..d4544d17dd5 100644 --- a/lib/Migration/Version2001Date20180103144447.php +++ b/lib/Migration/Version2001Date20180103144447.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; @@ -22,7 +23,6 @@ public function __construct( ) { } - /** * @param IOutput $output * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/lib/Migration/Version2001Date20180103150836.php b/lib/Migration/Version2001Date20180103150836.php index 33f0c45b412..814e3179530 100644 --- a/lib/Migration/Version2001Date20180103150836.php +++ b/lib/Migration/Version2001Date20180103150836.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3002Date20180319104030.php b/lib/Migration/Version3002Date20180319104030.php index bade14bb025..724ceb65851 100644 --- a/lib/Migration/Version3002Date20180319104030.php +++ b/lib/Migration/Version3002Date20180319104030.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180707222130.php b/lib/Migration/Version3003Date20180707222130.php index 5cc5629a0a1..38436f6adee 100644 --- a/lib/Migration/Version3003Date20180707222130.php +++ b/lib/Migration/Version3003Date20180707222130.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180718112436.php b/lib/Migration/Version3003Date20180718112436.php index 103c6f8cbc2..6f8a07fe891 100644 --- a/lib/Migration/Version3003Date20180718112436.php +++ b/lib/Migration/Version3003Date20180718112436.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180718133519.php b/lib/Migration/Version3003Date20180718133519.php index bef60bbebd5..17b2d706b53 100644 --- a/lib/Migration/Version3003Date20180718133519.php +++ b/lib/Migration/Version3003Date20180718133519.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180722152733.php b/lib/Migration/Version3003Date20180722152733.php index b6caee18248..1461444d5e0 100644 --- a/lib/Migration/Version3003Date20180722152733.php +++ b/lib/Migration/Version3003Date20180722152733.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180722152849.php b/lib/Migration/Version3003Date20180722152849.php index d61fba9bb4b..76df5229f15 100644 --- a/lib/Migration/Version3003Date20180722152849.php +++ b/lib/Migration/Version3003Date20180722152849.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version3003Date20180730080327.php b/lib/Migration/Version3003Date20180730080327.php index 5f1fd65f6bc..e2ef67981d8 100644 --- a/lib/Migration/Version3003Date20180730080327.php +++ b/lib/Migration/Version3003Date20180730080327.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/Migration/Version4099Date20181001123058.php b/lib/Migration/Version4099Date20181001123058.php index e241a2fb9cb..7ce5b98cb1b 100644 --- a/lib/Migration/Version4099Date20181001123058.php +++ b/lib/Migration/Version4099Date20181001123058.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use Closure; diff --git a/lib/Migration/Version7000Date20190717141457.php b/lib/Migration/Version7000Date20190717141457.php index a639a7afed2..f6ef6e89afb 100644 --- a/lib/Migration/Version7000Date20190717141457.php +++ b/lib/Migration/Version7000Date20190717141457.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use Closure; diff --git a/lib/Migration/Version7000Date20190724121136.php b/lib/Migration/Version7000Date20190724121136.php index 8c972d62eb9..8971474b07a 100644 --- a/lib/Migration/Version7000Date20190724121136.php +++ b/lib/Migration/Version7000Date20190724121136.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Migration; use Doctrine\DBAL\Schema\SchemaException; diff --git a/lib/Model/ProxyCacheMessage.php b/lib/Model/ProxyCacheMessage.php index 9caf752740e..95e72665007 100644 --- a/lib/Model/ProxyCacheMessage.php +++ b/lib/Model/ProxyCacheMessage.php @@ -50,7 +50,6 @@ class ProxyCacheMessage extends Entity implements \JsonSerializable { public const METADATA_REPLY_TO_ACTOR_ID = 'replyToActorId'; public const METADATA_REPLY_TO_MESSAGE_ID = 'replyToMessageId'; - protected string $localToken = ''; protected string $remoteServerUrl = ''; protected string $remoteToken = ''; diff --git a/lib/Model/SelectHelper.php b/lib/Model/SelectHelper.php index f248e43d5eb..104e2287eef 100644 --- a/lib/Model/SelectHelper.php +++ b/lib/Model/SelectHelper.php @@ -74,7 +74,6 @@ public function selectThreadsTable(IQueryBuilder $query, string $alias = 'th', b $alias . 'name', ])->selectAlias($alias . 'id', 'th_id'); - } public function selectAttendeesTable(IQueryBuilder $query, string $alias = 'a'): void { diff --git a/lib/Model/ThreadMapper.php b/lib/Model/ThreadMapper.php index aa362f116ba..a7a0e8c36c4 100644 --- a/lib/Model/ThreadMapper.php +++ b/lib/Model/ThreadMapper.php @@ -88,11 +88,9 @@ public function getForIds(array $threadIds): array { $threads[] = $this->findEntities($query); } - return array_merge(...$threads); } - /** * @param int<1, 50> $limit * @return list diff --git a/lib/Notification/FederationChatNotifier.php b/lib/Notification/FederationChatNotifier.php index 3631225cbdf..c75c34eeaf4 100644 --- a/lib/Notification/FederationChatNotifier.php +++ b/lib/Notification/FederationChatNotifier.php @@ -61,7 +61,6 @@ public function handleChatMessage(Room $room, Participant $participant, ProxyCac return; } - $notificationLevel = $participant->getAttendee()->getNotificationLevel(); if ($threadId !== null) { $threadAttendees = $this->threadService->findAttendeeByThreadIds($participant->getAttendee(), [$threadId]); diff --git a/lib/Room.php b/lib/Room.php index 348c9d993e7..4ebd0e21453 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -56,7 +56,6 @@ class Room { public const RECORDING_AUDIO_STARTING = 4; public const RECORDING_FAILED = 5; - public const READ_WRITE = 0; public const READ_ONLY = 1; diff --git a/lib/Service/AvatarService.php b/lib/Service/AvatarService.php index af1ca8763a5..a844328594f 100644 --- a/lib/Service/AvatarService.php +++ b/lib/Service/AvatarService.php @@ -115,7 +115,6 @@ public function setAvatar(Room $room, \OCP\Image $image): void { throw new InvalidArgumentException($this->l->t('Unknown filetype')); } - $token = $room->getToken(); $avatarFolder = $this->getAvatarFolder($token); diff --git a/lib/Service/BreakoutRoomService.php b/lib/Service/BreakoutRoomService.php index 552323ad835..736002c334e 100644 --- a/lib/Service/BreakoutRoomService.php +++ b/lib/Service/BreakoutRoomService.php @@ -169,7 +169,6 @@ public function setupBreakoutRooms(Room $parent, int $mode, int $amount, string $this->addOthersToBreakoutRooms($breakoutRooms, $map); } - return $breakoutRooms; } diff --git a/lib/Service/HostedSignalingServerService.php b/lib/Service/HostedSignalingServerService.php index 1bb8236d43c..887f515fe9f 100644 --- a/lib/Service/HostedSignalingServerService.php +++ b/lib/Service/HostedSignalingServerService.php @@ -325,7 +325,6 @@ public function fetchAccountInfo(AccountId $accountId) { $body = $response->getBody(); $this->logger->error('Getting the account information failed: something else happened - HTTP status: ' . $status . ' Response body: ' . $body); - $message = $this->l10n->t('Something unexpected happened.'); throw new HostedSignalingServerAPIException($message, $status); } @@ -479,7 +478,6 @@ public function deleteAccount(AccountId $accountId): void { $body = $response->getBody(); $this->logger->error('Deleting the hosted signaling server account failed: something else happened - HTTP status: ' . $status . ' Response body: ' . $body); - $message = $this->l10n->t('Something unexpected happened.'); throw new HostedSignalingServerAPIException($message, $status); } diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index b5c6bb52d06..0a88a8bda04 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -2314,7 +2314,6 @@ public function getParticipantWithActiveSession(Room $room, string $userId): Par ->andWhere($query->expr()->eq('a.room_id', $query->createNamedParameter($room->getId()))) ->setMaxResults(1); - return $this->getParticipantFromQuery($query, $room); } diff --git a/lib/Service/RecordingService.php b/lib/Service/RecordingService.php index 0eafd5ec9f0..50fce450f10 100644 --- a/lib/Service/RecordingService.php +++ b/lib/Service/RecordingService.php @@ -463,7 +463,6 @@ public function notifyStoredRecording(Room $room, Participant $participant, File $this->notificationManager->notify($notification); } - /** * @param 'transcript'|'summary' $aiType */ diff --git a/lib/Service/RoomFormatter.php b/lib/Service/RoomFormatter.php index 45ce1dd296f..dc7b17768d2 100644 --- a/lib/Service/RoomFormatter.php +++ b/lib/Service/RoomFormatter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Service; use OCA\Talk\Chat\ChatManager; diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index c1ce4253c03..87a70c968e6 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -319,7 +319,6 @@ public function createConversation( ]], null); } return $room; - } public function prepareConversationName(string $objectName): string { @@ -336,7 +335,6 @@ public function setPermissions(Room $room, string $level, string $method, int $p return true; } catch (InvalidArgumentException) { return false; - } } return false; diff --git a/lib/Service/ThreadService.php b/lib/Service/ThreadService.php index bc76cab9022..0a1abdb697a 100644 --- a/lib/Service/ThreadService.php +++ b/lib/Service/ThreadService.php @@ -77,7 +77,6 @@ public function findByThreadId(int $roomId, int $threadId): Thread { throw $e; } return $thread; - } /** diff --git a/lib/Settings/Admin/AdminSettings.php b/lib/Settings/Admin/AdminSettings.php index 627af77bf9b..940077dbc56 100644 --- a/lib/Settings/Admin/AdminSettings.php +++ b/lib/Settings/Admin/AdminSettings.php @@ -63,7 +63,6 @@ public function getForm(): TemplateResponse { $this->initRecording(); $this->initSIPBridge(); - Util::addScript('spreed', 'talk-admin-settings'); Util::addStyle('spreed', 'talk-admin-settings'); diff --git a/lib/SetupCheck/BackgroundBlurLoading.php b/lib/SetupCheck/BackgroundBlurLoading.php index fdde432c4fc..4c24758cbca 100644 --- a/lib/SetupCheck/BackgroundBlurLoading.php +++ b/lib/SetupCheck/BackgroundBlurLoading.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\SetupCheck; use OCP\Http\Client\IClientService; diff --git a/lib/SetupCheck/Configuration.php b/lib/SetupCheck/Configuration.php index d92b756203b..52bfc5df626 100644 --- a/lib/SetupCheck/Configuration.php +++ b/lib/SetupCheck/Configuration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\SetupCheck; use OCP\AppFramework\Services\IAppConfig; diff --git a/lib/TalkSession.php b/lib/TalkSession.php index d41803885fe..c57becc34fa 100644 --- a/lib/TalkSession.php +++ b/lib/TalkSession.php @@ -126,7 +126,6 @@ protected function setValue(string $key, string $token, string $value, bool $use $values[$token] = $value; $this->session->set($key, json_encode($values)); - if ($reopened) { $this->session->close(); } diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 7810183b21d..a8c778f8d5b 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -1846,8 +1846,6 @@ public function userAddAttendeeToRoom(string $user, string $newType, string $new $this->assertStatusCode($this->response, $statusCode); } - - #[Then('/^user "([^"]*)" (promotes|demotes) "([^"]*)" in room "([^"]*)" with (\d+) \((v4)\)$/')] public function userPromoteDemoteInRoom(string $user, string $isPromotion, string $participant, string $identifier, int $statusCode, string $apiVersion): void { if ($participant === 'stranger') { @@ -3325,7 +3323,6 @@ protected function compareThreadsResponse(?TableNode $formData, array $results): return; } - $count = count($formData->getHash()); Assert::assertCount($count, $results, 'Result count does not match'); $tokenInResult = false; @@ -3437,7 +3434,6 @@ public function userSeesTheFollowingSystemMessagesInRoom(string $user, string $i return $message; }, $formData->getHash()); - Assert::assertCount(count($expected), $messages, 'Message count does not match:' . "\n" . json_encode($messages, JSON_PRETTY_PRINT)); Assert::assertEquals($expected, array_map(function ($message, $expected) { $data = [ @@ -3768,7 +3764,6 @@ public function userCheckCapability(string $user, string $capability, string $va 'GET', '/cloud/capabilities' ); - $data = $this->getDataFromResponse($this->response); $capabilities = $data['capabilities']; @@ -3796,7 +3791,6 @@ public function userCheckCapabilityFromRoomApi(string $user, string $capability, 'GET', '/apps/spreed/api/v4/room/' . self::$identifierToToken[$identifier] . '/capabilities' ); - $capabilities = $this->getDataFromResponse($this->response); $keys = explode('=>', $capability); @@ -4867,7 +4861,6 @@ public function botSendsRequest(string $botName, string $sends, string $action, $secret = $data['secret']; unset($data['secret']); - if ($action === 'message') { $url = '/message'; $toSign = $data['message']; @@ -4888,7 +4881,6 @@ public function botSendsRequest(string $botName, string $sends, string $action, 'X-Nextcloud-Talk-Bot-Signature' => $hash, ]; - $this->sendRequest( $sends === 'sends' ? 'POST' : 'DELETE', '/apps/spreed/api/' . $apiVersion . '/bot/' . self::$identifierToToken[$identifier] . $url, @@ -5446,7 +5438,6 @@ public function userGetsMutualEventConversations(string $user, string $identifie $this->assertDashboardData($data, $formData); } - /** * @param array $dashboardEvents * @param TableNode $formData diff --git a/tests/integration/spreedcheats/lib/Controller/ApiController.php b/tests/integration/spreedcheats/lib/Controller/ApiController.php index aefcc384740..b6540dccdd8 100644 --- a/tests/integration/spreedcheats/lib/Controller/ApiController.php +++ b/tests/integration/spreedcheats/lib/Controller/ApiController.php @@ -112,7 +112,6 @@ public function resetSpreed(): DataResponse { )) ->executeStatement(); - $delete = $this->db->getQueryBuilder(); $delete->delete('preferences') ->where($delete->expr()->in('configkey', $delete->createNamedParameter(['changelog', 'note_to_self', 'samples_created'], IQueryBuilder::PARAM_STR_ARRAY))) @@ -170,7 +169,6 @@ public function ageChat(string $token, int $hours): DataResponse { } $update->executeStatement(); - $update = $this->db->getQueryBuilder(); $update->update('comments') ->set('creation_timestamp', $update->createParameter('creation_timestamp')) diff --git a/tests/integration/talk_webhook_demo/lib/Service/SummaryService.php b/tests/integration/talk_webhook_demo/lib/Service/SummaryService.php index 6b556e36377..4d5b970ef8f 100644 --- a/tests/integration/talk_webhook_demo/lib/Service/SummaryService.php +++ b/tests/integration/talk_webhook_demo/lib/Service/SummaryService.php @@ -280,7 +280,6 @@ public function agenda(string $server, string $token, string $lang = 'en'): ?str $logEntries = $this->logEntryMapper->findByConversation($server, $token); $this->logEntryMapper->deleteByConversation($server, $token); - $agenda = []; foreach ($logEntries as $logEntry) { if ($logEntry->getType() === LogEntry::TYPE_AGENDA) { diff --git a/tests/php/Activity/Provider/BaseTest.php b/tests/php/Activity/Provider/BaseTest.php index 9e4eb8a873f..97ba3e9e4a4 100644 --- a/tests/php/Activity/Provider/BaseTest.php +++ b/tests/php/Activity/Provider/BaseTest.php @@ -77,7 +77,6 @@ protected function getProvider(array $methods = []): Base&MockObject { ->getMock(); } - public static function dataPreParse(): array { return [ ['other', false, true, true], diff --git a/tests/php/Chat/AutoComplete/SearchPluginTest.php b/tests/php/Chat/AutoComplete/SearchPluginTest.php index 6d4610a7ce6..6fa6e4d1f0b 100644 --- a/tests/php/Chat/AutoComplete/SearchPluginTest.php +++ b/tests/php/Chat/AutoComplete/SearchPluginTest.php @@ -158,7 +158,6 @@ public static function dataSearchUsers(): array { public function testSearchUsers(string $search, array $users, array $expected, array $expectedExact): void { $result = $this->createMock(ISearchResult::class); - $result->expects($this->once()) ->method('addResultSet') ->with($this->anything(), $expected, $expectedExact); @@ -241,7 +240,6 @@ public function testCreateResult(string $type, string $uid, string $name, ?strin $this->assertEquals($expected, self::invokePrivate($plugin, 'createResult', [$type, $uid, $name])); } - public static function dataCreateGuestResult(): array { return [ ['1234', 'foo', ['label' => 'foo', 'value' => ['shareType' => 'guest', 'shareWith' => 'guest/1234']]], diff --git a/tests/php/Command/Signaling/AddTest.php b/tests/php/Command/Signaling/AddTest.php index 0119f3cb9d2..ff88a9cc49e 100644 --- a/tests/php/Command/Signaling/AddTest.php +++ b/tests/php/Command/Signaling/AddTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Signaling; use OCA\Talk\Command\Signaling\Add; diff --git a/tests/php/Command/Signaling/DeleteTest.php b/tests/php/Command/Signaling/DeleteTest.php index 2222dbf13de..ce76771f9b3 100644 --- a/tests/php/Command/Signaling/DeleteTest.php +++ b/tests/php/Command/Signaling/DeleteTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Signaling; use OCA\Talk\Command\Signaling\Delete; diff --git a/tests/php/Command/Signaling/ListCommandTest.php b/tests/php/Command/Signaling/ListCommandTest.php index be8492dd01e..64b8958e0cc 100644 --- a/tests/php/Command/Signaling/ListCommandTest.php +++ b/tests/php/Command/Signaling/ListCommandTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Signaling; use OCA\Talk\Command\Signaling\ListCommand; diff --git a/tests/php/Command/Stun/AddTest.php b/tests/php/Command/Stun/AddTest.php index eaa74fc6706..eca4300b894 100644 --- a/tests/php/Command/Stun/AddTest.php +++ b/tests/php/Command/Stun/AddTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Stun; use OCA\Talk\Command\Stun\Add; diff --git a/tests/php/Command/Stun/DeleteTest.php b/tests/php/Command/Stun/DeleteTest.php index b2643be6816..a1d76df1755 100644 --- a/tests/php/Command/Stun/DeleteTest.php +++ b/tests/php/Command/Stun/DeleteTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Stun; use OCA\Talk\Command\Stun\Delete; diff --git a/tests/php/Command/Stun/ListCommandTest.php b/tests/php/Command/Stun/ListCommandTest.php index b4cb5e9c168..a427d45e996 100644 --- a/tests/php/Command/Stun/ListCommandTest.php +++ b/tests/php/Command/Stun/ListCommandTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Stun; use OCA\Talk\Command\Stun\ListCommand; diff --git a/tests/php/Command/Turn/AddTest.php b/tests/php/Command/Turn/AddTest.php index b97f462a8bf..db96937c1ca 100644 --- a/tests/php/Command/Turn/AddTest.php +++ b/tests/php/Command/Turn/AddTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Turn; use OCA\Talk\Command\Turn\Add; diff --git a/tests/php/Command/Turn/DeleteTest.php b/tests/php/Command/Turn/DeleteTest.php index 1abe23a0b3c..41b3ab27c8a 100644 --- a/tests/php/Command/Turn/DeleteTest.php +++ b/tests/php/Command/Turn/DeleteTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Turn; use OCA\Talk\Command\Turn\Delete; diff --git a/tests/php/Command/Turn/ListCommandTest.php b/tests/php/Command/Turn/ListCommandTest.php index 8526f2e7d7a..2d9ce8362b4 100644 --- a/tests/php/Command/Turn/ListCommandTest.php +++ b/tests/php/Command/Turn/ListCommandTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php\Command\Turn; use OCA\Talk\Command\Turn\ListCommand; diff --git a/tests/php/ConfigTest.php b/tests/php/ConfigTest.php index 11f15ab731e..59598d1d300 100644 --- a/tests/php/ConfigTest.php +++ b/tests/php/ConfigTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php; use OCA\Talk\Config; diff --git a/tests/php/Controller/SignalingControllerTest.php b/tests/php/Controller/SignalingControllerTest.php index bfc0f0890c2..6e294cede3d 100644 --- a/tests/php/Controller/SignalingControllerTest.php +++ b/tests/php/Controller/SignalingControllerTest.php @@ -1360,7 +1360,6 @@ public function testBackendPingMixedAndInactive(): void { ], $result->getData()); } - public function testLeaveRoomWithOldSession(): void { // Make sure that leaving a user with an old session id doesn't remove // the current user from the room if they re-joined in the meantime. diff --git a/tests/php/GuestManagerTest.php b/tests/php/GuestManagerTest.php index ab7995caede..95ab638382b 100644 --- a/tests/php/GuestManagerTest.php +++ b/tests/php/GuestManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Talk\Tests\php; use OCA\Talk\Config; diff --git a/tests/php/Model/AttendeeMapperTest.php b/tests/php/Model/AttendeeMapperTest.php index 53088f993ca..4b36be3161c 100644 --- a/tests/php/Model/AttendeeMapperTest.php +++ b/tests/php/Model/AttendeeMapperTest.php @@ -21,7 +21,6 @@ class AttendeeMapperTest extends TestCase { protected ?AttendeeMapper $attendeeMapper = null; - public function setUp(): void { parent::setUp(); diff --git a/tests/php/Service/ParticipantServiceTest.php b/tests/php/Service/ParticipantServiceTest.php index c1b16228fb0..993e510f3eb 100644 --- a/tests/php/Service/ParticipantServiceTest.php +++ b/tests/php/Service/ParticipantServiceTest.php @@ -53,7 +53,6 @@ class ParticipantServiceTest extends TestCase { private ?ParticipantService $service = null; protected LoggerInterface&MockObject $logger; - public function setUp(): void { parent::setUp(); diff --git a/tests/php/Service/ProxyCacheMessageServiceTest.php b/tests/php/Service/ProxyCacheMessageServiceTest.php index 9a924ca7e14..bedbe2f57bc 100644 --- a/tests/php/Service/ProxyCacheMessageServiceTest.php +++ b/tests/php/Service/ProxyCacheMessageServiceTest.php @@ -29,7 +29,6 @@ class ProxyCacheMessageServiceTest extends TestCase { protected ?ProxyCacheMessageMapper $mapper = null; protected ?ProxyCacheMessageService $service = null; - public function setUp(): void { parent::setUp(); diff --git a/tests/php/Signaling/ListenerTest.php b/tests/php/Signaling/ListenerTest.php index 934217b1584..d69e1baa7d7 100644 --- a/tests/php/Signaling/ListenerTest.php +++ b/tests/php/Signaling/ListenerTest.php @@ -53,8 +53,6 @@ class ListenerTest extends TestCase { protected IFactory $l10nFactory; protected MockObject&PollService $pollService; - - public function setUp(): void { parent::setUp(); @@ -398,7 +396,6 @@ public function testSystemMessageSentEvent(): void { $this->listener->handle($event); } - public function testSystemMessageSentEventSkippingUpdate(): void { $room = $this->createMock(Room::class); $comment = $this->createMock(IComment::class); diff --git a/tests/stubs/oc_comments_comment.php b/tests/stubs/oc_comments_comment.php index fc9636e02c0..46120474d39 100644 --- a/tests/stubs/oc_comments_comment.php +++ b/tests/stubs/oc_comments_comment.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Comments { class Comment implements \OCP\Comments\IComment { public function __construct(?array $data = null) { diff --git a/tests/stubs/oc_comments_manager.php b/tests/stubs/oc_comments_manager.php index 6f6f7cc020d..304185e591f 100644 --- a/tests/stubs/oc_comments_manager.php +++ b/tests/stubs/oc_comments_manager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Comments; use OCP\Comments\IComment; diff --git a/tests/stubs/oc_core_command_base.php b/tests/stubs/oc_core_command_base.php index 6d1364de414..048b0405c91 100644 --- a/tests/stubs/oc_core_command_base.php +++ b/tests/stubs/oc_core_command_base.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command { use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; diff --git a/tests/stubs/oc_hooks_emitter.php b/tests/stubs/oc_hooks_emitter.php index d12029ed149..995a9ac7602 100644 --- a/tests/stubs/oc_hooks_emitter.php +++ b/tests/stubs/oc_hooks_emitter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Hooks { class Emitter { public function emit(string $class, string $value, array $option) { diff --git a/tests/stubs/oc_http_client_response.php b/tests/stubs/oc_http_client_response.php index 8859f4e89a7..a6b01468b76 100644 --- a/tests/stubs/oc_http_client_response.php +++ b/tests/stubs/oc_http_client_response.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Http\Client; use OCP\Http\Client\IResponse; diff --git a/tests/stubs/oc_memcache.php b/tests/stubs/oc_memcache.php index ae9929cc8ab..1f22f2d8867 100644 --- a/tests/stubs/oc_memcache.php +++ b/tests/stubs/oc_memcache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache { use OCP\IMemcache; diff --git a/tests/stubs/oc_user_lazyuser.php b/tests/stubs/oc_user_lazyuser.php index fdfe6320643..4c2793420b4 100644 --- a/tests/stubs/oc_user_lazyuser.php +++ b/tests/stubs/oc_user_lazyuser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User; use OCP\IUser; diff --git a/tests/stubs/oca_circles.php b/tests/stubs/oca_circles.php index 33b78fe8ad9..5145ba1a28d 100644 --- a/tests/stubs/oca_circles.php +++ b/tests/stubs/oca_circles.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Events { use OCA\Circles\Model\Circle; diff --git a/tests/stubs/oca_dav_caldav_timezoneservice.php b/tests/stubs/oca_dav_caldav_timezoneservice.php index 653f7805361..68150b0dfa0 100644 --- a/tests/stubs/oca_dav_caldav_timezoneservice.php +++ b/tests/stubs/oca_dav_caldav_timezoneservice.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV { class TimezoneService { diff --git a/tests/stubs/oca_federation_trustedservers.php b/tests/stubs/oca_federation_trustedservers.php index f9d0e162d54..2489396785d 100644 --- a/tests/stubs/oca_federation_trustedservers.php +++ b/tests/stubs/oca_federation_trustedservers.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Federation; class TrustedServers { diff --git a/tests/stubs/oca_files_events.php b/tests/stubs/oca_files_events.php index faeb5b10d31..5a6be6159c5 100644 --- a/tests/stubs/oca_files_events.php +++ b/tests/stubs/oca_files_events.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Event { use OCP\EventDispatcher\Event; diff --git a/tests/stubs/oca_files_sharing_events.php b/tests/stubs/oca_files_sharing_events.php index d6868e0cb94..8d40e2ca0cd 100644 --- a/tests/stubs/oca_files_sharing_events.php +++ b/tests/stubs/oca_files_sharing_events.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Event { use OCP\EventDispatcher\Event; diff --git a/tests/stubs/oca_guests.php b/tests/stubs/oca_guests.php index b49737f8667..6058ea58763 100644 --- a/tests/stubs/oca_guests.php +++ b/tests/stubs/oca_guests.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Guests { class UserBackend implements \OCP\IUserBackend { } diff --git a/tests/stubs/oca_settings_setupchecks_checkserverresponsetrait.php b/tests/stubs/oca_settings_setupchecks_checkserverresponsetrait.php index b1f0a285aaf..659d322198b 100644 --- a/tests/stubs/oca_settings_setupchecks_checkserverresponsetrait.php +++ b/tests/stubs/oca_settings_setupchecks_checkserverresponsetrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks { use Generator;