diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php index acd415d82ea9e..d44b9ca179b05 100644 --- a/apps/admin_audit/lib/Actions/Action.php +++ b/apps/admin_audit/lib/Actions/Action.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; use OCA\AdminAudit\IAuditLogger; diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php index 7be4a7cd58103..4ba96b8d70ab4 100644 --- a/apps/admin_audit/lib/Actions/Files.php +++ b/apps/admin_audit/lib/Actions/Files.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; use OC\Files\Node\NonExistingFile; @@ -74,7 +75,6 @@ public function afterRename(NodeRenamedEvent $event): void { ); } - /** * Logs creation of files */ diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 8f021d5f210fc..424fe63757c58 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; /** diff --git a/apps/admin_audit/lib/Actions/TagManagement.php b/apps/admin_audit/lib/Actions/TagManagement.php index 77a94de3df3c0..2f79bb442690b 100644 --- a/apps/admin_audit/lib/Actions/TagManagement.php +++ b/apps/admin_audit/lib/Actions/TagManagement.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; use OCP\SystemTag\ISystemTag; diff --git a/apps/admin_audit/lib/Actions/Trashbin.php b/apps/admin_audit/lib/Actions/Trashbin.php index c1e994da3a527..c7503ed1becc4 100644 --- a/apps/admin_audit/lib/Actions/Trashbin.php +++ b/apps/admin_audit/lib/Actions/Trashbin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; class Trashbin extends Action { diff --git a/apps/admin_audit/lib/Actions/Versions.php b/apps/admin_audit/lib/Actions/Versions.php index b3fdefd011d78..a7b18119ea28e 100644 --- a/apps/admin_audit/lib/Actions/Versions.php +++ b/apps/admin_audit/lib/Actions/Versions.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Actions; class Versions extends Action { diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php index bfc1b1d8a0d4f..85133c009ad28 100644 --- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php +++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\BackgroundJobs; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/admin_audit/lib/IAuditLogger.php b/apps/admin_audit/lib/IAuditLogger.php index 635c063753fdc..cfc3e22386245 100644 --- a/apps/admin_audit/lib/IAuditLogger.php +++ b/apps/admin_audit/lib/IAuditLogger.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit; use Psr\Log\LoggerInterface; diff --git a/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php b/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php index c8cb0281113b4..feb67ad0166e4 100644 --- a/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php +++ b/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\AdminAudit\Tests\Actions; use OCA\AdminAudit\IAuditLogger; diff --git a/apps/appstore/lib/AppInfo/Application.php b/apps/appstore/lib/AppInfo/Application.php index 9eed4437e5f09..f3f05f675b5b9 100644 --- a/apps/appstore/lib/AppInfo/Application.php +++ b/apps/appstore/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Appstore\AppInfo; use OCA\Appstore\Search\AppSearch; diff --git a/apps/appstore/lib/Search/AppSearch.php b/apps/appstore/lib/Search/AppSearch.php index 61040d666bba8..97a7dfa6ddc84 100644 --- a/apps/appstore/lib/Search/AppSearch.php +++ b/apps/appstore/lib/Search/AppSearch.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Appstore\Search; use OCA\Appstore\AppInfo\Application; diff --git a/apps/appstore/tests/Controller/ApiControllerTest.php b/apps/appstore/tests/Controller/ApiControllerTest.php index bf964d8786ec9..711042dffc86c 100644 --- a/apps/appstore/tests/Controller/ApiControllerTest.php +++ b/apps/appstore/tests/Controller/ApiControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Appstore\Tests\Controller; use OC\App\AppManager; diff --git a/apps/appstore/tests/Controller/PageControllerTest.php b/apps/appstore/tests/Controller/PageControllerTest.php index 1e5edfe061f86..43e1e4811f5f7 100644 --- a/apps/appstore/tests/Controller/PageControllerTest.php +++ b/apps/appstore/tests/Controller/PageControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Appstore\Tests\Controller; use OC\App\AppStore\Bundles\BundleFetcher; diff --git a/apps/cloud_federation_api/lib/AppInfo/Application.php b/apps/cloud_federation_api/lib/AppInfo/Application.php index 39238b3dae7d8..67f55d6663706 100644 --- a/apps/cloud_federation_api/lib/AppInfo/Application.php +++ b/apps/cloud_federation_api/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\CloudFederationAPI\AppInfo; use OCA\CloudFederationAPI\Capabilities; diff --git a/apps/cloud_federation_api/lib/Config.php b/apps/cloud_federation_api/lib/Config.php index 23788c26dc995..7fa14528e6df8 100644 --- a/apps/cloud_federation_api/lib/Config.php +++ b/apps/cloud_federation_api/lib/Config.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\CloudFederationAPI; use OCP\Federation\ICloudFederationProviderManager; diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index d2df7da8e9266..f89b2ba5f9697 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -426,7 +426,6 @@ private function mapUid($uid) { return $uid; } - /** * confirm that the value related to $key entry from the payload is in format userid@hostname * and compare hostname with the origin of the signed request. diff --git a/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php b/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php index 7f0b6c760d595..18d9fe3af1f85 100644 --- a/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php +++ b/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php @@ -41,7 +41,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, - ]); // https://saturncloud.io/blog/what-is-the-maximum-length-of-a-url-in-different-browsers/#maximum-url-length-in-different-browsers // We use the least common denominator, the minimum length supported by browsers diff --git a/apps/comments/lib/Activity/Filter.php b/apps/comments/lib/Activity/Filter.php index fe72acd3e6e68..7bc690ca79054 100644 --- a/apps/comments/lib/Activity/Filter.php +++ b/apps/comments/lib/Activity/Filter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Activity; use OCP\Activity\IFilter; diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php index 2cde51a7b9b88..acf48f21ecf6d 100644 --- a/apps/comments/lib/Activity/Listener.php +++ b/apps/comments/lib/Activity/Listener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Activity; use OCP\Activity\IManager; diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php index 5ed94a50aa56a..d56b90dae54cf 100644 --- a/apps/comments/lib/Activity/Provider.php +++ b/apps/comments/lib/Activity/Provider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Activity; use OCP\Activity\Exceptions\UnknownActivityException; @@ -62,7 +63,6 @@ public function parse($language, IEvent $event, ?IEvent $previousEvent = null): return $this->parseLongVersion($event, $l); } throw new UnknownActivityException(); - } /** diff --git a/apps/comments/lib/Activity/Setting.php b/apps/comments/lib/Activity/Setting.php index 46bf8d8790aab..c590a54cfd731 100644 --- a/apps/comments/lib/Activity/Setting.php +++ b/apps/comments/lib/Activity/Setting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Activity; use OCP\Activity\ActivitySettings; diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php index 843383ac1ecc6..224a22dfb69c6 100644 --- a/apps/comments/lib/AppInfo/Application.php +++ b/apps/comments/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\AppInfo; use OCA\Comments\Capabilities; diff --git a/apps/comments/lib/Capabilities.php b/apps/comments/lib/Capabilities.php index 148b1db9ee4de..579d2e271779e 100644 --- a/apps/comments/lib/Capabilities.php +++ b/apps/comments/lib/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments; use OCP\Capabilities\ICapability; diff --git a/apps/comments/lib/Collaboration/CommentersSorter.php b/apps/comments/lib/Collaboration/CommentersSorter.php index f0ecc7fb80b7d..3956423a50b0a 100644 --- a/apps/comments/lib/Collaboration/CommentersSorter.php +++ b/apps/comments/lib/Collaboration/CommentersSorter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Collaboration; use OCP\Collaboration\AutoComplete\ISorter; diff --git a/apps/comments/lib/Controller/NotificationsController.php b/apps/comments/lib/Controller/NotificationsController.php index 53a88f54075b7..66192eeaf6353 100644 --- a/apps/comments/lib/Controller/NotificationsController.php +++ b/apps/comments/lib/Controller/NotificationsController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Controller; use OCP\AppFramework\Controller; diff --git a/apps/comments/lib/Listener/CommentsEntityEventListener.php b/apps/comments/lib/Listener/CommentsEntityEventListener.php index b2ce749121134..3c5900f220a57 100644 --- a/apps/comments/lib/Listener/CommentsEntityEventListener.php +++ b/apps/comments/lib/Listener/CommentsEntityEventListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Listener; use OCP\Comments\CommentsEntityEvent; diff --git a/apps/comments/lib/Listener/CommentsEventListener.php b/apps/comments/lib/Listener/CommentsEventListener.php index d47526e759c3b..d420933c862fc 100644 --- a/apps/comments/lib/Listener/CommentsEventListener.php +++ b/apps/comments/lib/Listener/CommentsEventListener.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Comments\Listener; use OCA\Comments\Activity\Listener as ActivityListener; diff --git a/apps/comments/lib/Listener/LoadAdditionalScripts.php b/apps/comments/lib/Listener/LoadAdditionalScripts.php index c0bb998c75785..4525dbea438ca 100644 --- a/apps/comments/lib/Listener/LoadAdditionalScripts.php +++ b/apps/comments/lib/Listener/LoadAdditionalScripts.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Listener; use OCA\Comments\AppInfo\Application; diff --git a/apps/comments/lib/Listener/LoadSidebarScripts.php b/apps/comments/lib/Listener/LoadSidebarScripts.php index c111a62ad6b85..3d10acc93bfce 100644 --- a/apps/comments/lib/Listener/LoadSidebarScripts.php +++ b/apps/comments/lib/Listener/LoadSidebarScripts.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Listener; use OCA\Comments\AppInfo\Application; diff --git a/apps/comments/lib/MaxAutoCompleteResultsInitialState.php b/apps/comments/lib/MaxAutoCompleteResultsInitialState.php index d9852f538aab6..37b6a4eb9197f 100644 --- a/apps/comments/lib/MaxAutoCompleteResultsInitialState.php +++ b/apps/comments/lib/MaxAutoCompleteResultsInitialState.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments; use OCP\AppFramework\Services\InitialStateProvider; diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index 43922f85e59c4..eda60becb6479 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Notification; use OCP\Comments\CommentsEvent; diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php index ef442305e9575..c6fbe743054a0 100644 --- a/apps/comments/lib/Notification/Notifier.php +++ b/apps/comments/lib/Notification/Notifier.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Notification; use OCP\Comments\IComment; diff --git a/apps/comments/lib/OpenMetrics/CommentsCountMetric.php b/apps/comments/lib/OpenMetrics/CommentsCountMetric.php index c22f067989885..39132a4ca74f8 100644 --- a/apps/comments/lib/OpenMetrics/CommentsCountMetric.php +++ b/apps/comments/lib/OpenMetrics/CommentsCountMetric.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\OpenMetrics; use Generator; diff --git a/apps/comments/lib/Search/CommentsSearchProvider.php b/apps/comments/lib/Search/CommentsSearchProvider.php index ce62d0760f791..210be879865d2 100644 --- a/apps/comments/lib/Search/CommentsSearchProvider.php +++ b/apps/comments/lib/Search/CommentsSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Search; use OCP\Comments\IComment; @@ -109,7 +110,6 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { $numComments = 50 - count($result); } - return SearchResult::complete( $this->l10n->t('Comments'), $result, diff --git a/apps/comments/tests/Unit/Activity/ListenerTest.php b/apps/comments/tests/Unit/Activity/ListenerTest.php index fbb1a3ef15279..5280dc77a6572 100644 --- a/apps/comments/tests/Unit/Activity/ListenerTest.php +++ b/apps/comments/tests/Unit/Activity/ListenerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Tests\Unit\Activity; use OCA\Comments\Activity\Listener; diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index a2af64b6cfb46..35fd151e2395d 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Tests\Unit\AppInfo; use OCA\Comments\Activity\Filter; diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php index c83bd283a0817..769027387fc70 100644 --- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php +++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Tests\Unit\Collaboration; use OCA\Comments\Collaboration\CommentersSorter; diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php index 0150884f1ccff..46746091c7aca 100644 --- a/apps/comments/tests/Unit/Controller/NotificationsTest.php +++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Tests\Unit\Controller; use OCA\Comments\Controller\NotificationsController; diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php index ff7496c7e7dd2..b52d0d1764c72 100644 --- a/apps/comments/tests/Unit/EventHandlerTest.php +++ b/apps/comments/tests/Unit/EventHandlerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Tests\Unit\Notification; use OCA\Comments\Activity\Listener as ActivityListener; diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php index eac83c74855c8..1858253796e71 100644 --- a/apps/comments/tests/Unit/Notification/ListenerTest.php +++ b/apps/comments/tests/Unit/Notification/ListenerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Comments\Tests\Unit\Notification; use OCA\Comments\Notification\Listener; diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index 03ebc87c95063..b26e183e53cf0 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Comments\Tests\Unit\Notification; use OCA\Comments\Notification\Notifier; @@ -296,7 +297,6 @@ public function testPrepareSuccessDeletedUser(): void { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareDifferentApp(): void { $this->expectException(UnknownNotificationException::class); @@ -333,7 +333,6 @@ public function testPrepareDifferentApp(): void { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareNotFound(): void { $this->expectException(UnknownNotificationException::class); @@ -371,7 +370,6 @@ public function testPrepareNotFound(): void { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareDifferentSubject(): void { $this->expectException(UnknownNotificationException::class); @@ -428,7 +426,6 @@ public function testPrepareDifferentSubject(): void { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareNotFiles(): void { $this->expectException(UnknownNotificationException::class); @@ -486,7 +483,6 @@ public function testPrepareNotFiles(): void { $this->notifier->prepare($this->notification, $this->lc); } - public function testPrepareUnresolvableFileID(): void { $this->expectException(AlreadyProcessedException::class); diff --git a/apps/contactsinteraction/lib/AddressBook.php b/apps/contactsinteraction/lib/AddressBook.php index 6ec6ba5f12d56..6a3fc754f0f04 100644 --- a/apps/contactsinteraction/lib/AddressBook.php +++ b/apps/contactsinteraction/lib/AddressBook.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction; use Exception; diff --git a/apps/contactsinteraction/lib/AddressBookProvider.php b/apps/contactsinteraction/lib/AddressBookProvider.php index 5e4154ae7f04c..6ca7e188c4cbd 100644 --- a/apps/contactsinteraction/lib/AddressBookProvider.php +++ b/apps/contactsinteraction/lib/AddressBookProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction; use OCA\ContactsInteraction\AppInfo\Application; diff --git a/apps/contactsinteraction/lib/AppInfo/Application.php b/apps/contactsinteraction/lib/AppInfo/Application.php index e9f6fe4940049..5824bbd405190 100644 --- a/apps/contactsinteraction/lib/AppInfo/Application.php +++ b/apps/contactsinteraction/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\AppInfo; use OCA\ContactsInteraction\Listeners\ContactInteractionListener; diff --git a/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php b/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php index 218c7dec1c3e0..216340d225a88 100644 --- a/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php +++ b/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\BackgroundJob; use OCA\ContactsInteraction\Db\RecentContactMapper; diff --git a/apps/contactsinteraction/lib/Card.php b/apps/contactsinteraction/lib/Card.php index 813195c0bc9a2..7a1ac19beb0d1 100644 --- a/apps/contactsinteraction/lib/Card.php +++ b/apps/contactsinteraction/lib/Card.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction; use OCA\ContactsInteraction\Db\RecentContact; diff --git a/apps/contactsinteraction/lib/Db/CardSearchDao.php b/apps/contactsinteraction/lib/Db/CardSearchDao.php index b1dadd6cfbcaa..11ec273d64a40 100644 --- a/apps/contactsinteraction/lib/Db/CardSearchDao.php +++ b/apps/contactsinteraction/lib/Db/CardSearchDao.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Db; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/contactsinteraction/lib/Db/RecentContact.php b/apps/contactsinteraction/lib/Db/RecentContact.php index fc6ec3cc24981..82083f68f1d1e 100644 --- a/apps/contactsinteraction/lib/Db/RecentContact.php +++ b/apps/contactsinteraction/lib/Db/RecentContact.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/contactsinteraction/lib/Db/RecentContactMapper.php b/apps/contactsinteraction/lib/Db/RecentContactMapper.php index 12af1cbd9e3d3..f5e73e9b2f72e 100644 --- a/apps/contactsinteraction/lib/Db/RecentContactMapper.php +++ b/apps/contactsinteraction/lib/Db/RecentContactMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Db; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php index e61f23a7b1884..9c8b0b0512d8c 100644 --- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php +++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Listeners; use OCA\ContactsInteraction\Db\CardSearchDao; diff --git a/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php b/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php index 4757635db9a12..9c9718711a837 100644 --- a/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php +++ b/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Migration; use Closure; diff --git a/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php b/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php index 4876f5b84f0c0..a5facb8e75d79 100644 --- a/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php +++ b/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ContactsInteraction\Tests\Db; use OCA\ContactsInteraction\Db\RecentContact; diff --git a/apps/dashboard/lib/Controller/DashboardApiController.php b/apps/dashboard/lib/Controller/DashboardApiController.php index 0fd6130d9c42a..c0768935dfeb7 100644 --- a/apps/dashboard/lib/Controller/DashboardApiController.php +++ b/apps/dashboard/lib/Controller/DashboardApiController.php @@ -29,7 +29,6 @@ use OCP\Dashboard\IWidget; use OCP\Dashboard\Model\WidgetButton; use OCP\Dashboard\Model\WidgetItem; - use OCP\Dashboard\Model\WidgetOptions; use OCP\IRequest; diff --git a/apps/dashboard/lib/Controller/DashboardController.php b/apps/dashboard/lib/Controller/DashboardController.php index d9b8afec231e9..533fd1cf1f961 100644 --- a/apps/dashboard/lib/Controller/DashboardController.php +++ b/apps/dashboard/lib/Controller/DashboardController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Dashboard\Controller; use OCA\Dashboard\Service\DashboardService; diff --git a/apps/dashboard/lib/Service/DashboardService.php b/apps/dashboard/lib/Service/DashboardService.php index c94617d69417b..b995099fc3814 100644 --- a/apps/dashboard/lib/Service/DashboardService.php +++ b/apps/dashboard/lib/Service/DashboardService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Dashboard\Service; use JsonException; diff --git a/apps/dav/appinfo/v2/publicremote.php b/apps/dav/appinfo/v2/publicremote.php index 03b8fb21f8519..22f1fdd490820 100644 --- a/apps/dav/appinfo/v2/publicremote.php +++ b/apps/dav/appinfo/v2/publicremote.php @@ -81,7 +81,6 @@ $l10nFactory->get('dav'), ); - $linkCheckPlugin = new PublicLinkCheckPlugin(); $filesDropPlugin = new FilesDropPlugin(); diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 6b0f22a5022a5..4f6bfbd474d80 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\AppInfo; use OCA\DAV\CalDAV\AppCalendar\AppCalendarPlugin; @@ -178,7 +179,6 @@ public function register(IRegistrationContext $context): void { $context->registerEventListener(SubscriptionCreatedEvent::class, SubscriptionListener::class); $context->registerEventListener(SubscriptionDeletedEvent::class, SubscriptionListener::class); - $context->registerEventListener(AddressBookCreatedEvent::class, AddressbookListener::class); $context->registerEventListener(AddressBookDeletedEvent::class, AddressbookListener::class); $context->registerEventListener(AddressBookUpdatedEvent::class, AddressbookListener::class); diff --git a/apps/dav/lib/AppInfo/PluginManager.php b/apps/dav/lib/AppInfo/PluginManager.php index a740962fb4719..9814e2138cad3 100644 --- a/apps/dav/lib/AppInfo/PluginManager.php +++ b/apps/dav/lib/AppInfo/PluginManager.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\AppInfo; use OC\ServerContainer; @@ -238,7 +239,6 @@ private function createClass(string $className): object { throw new \Exception('Could not load ' . $className, 0, $e); } - /** * @param string[] $classes * @return ServerPlugin[] diff --git a/apps/dav/lib/Avatars/AvatarHome.php b/apps/dav/lib/Avatars/AvatarHome.php index a804969ab561a..58bb3b0182590 100644 --- a/apps/dav/lib/Avatars/AvatarHome.php +++ b/apps/dav/lib/Avatars/AvatarHome.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Avatars; use OCP\IAvatarManager; diff --git a/apps/dav/lib/Avatars/AvatarNode.php b/apps/dav/lib/Avatars/AvatarNode.php index 951262f3a5903..eb5604cf96fca 100644 --- a/apps/dav/lib/Avatars/AvatarNode.php +++ b/apps/dav/lib/Avatars/AvatarNode.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Avatars; use OCP\IAvatar; diff --git a/apps/dav/lib/Avatars/RootCollection.php b/apps/dav/lib/Avatars/RootCollection.php index c9c9b14ef5c60..e1bf75d1d4ef3 100644 --- a/apps/dav/lib/Avatars/RootCollection.php +++ b/apps/dav/lib/Avatars/RootCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Avatars; use OCP\IAvatarManager; diff --git a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php index db2dc48f20ef6..b98a095c019bb 100644 --- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\CalDAV\Reminder\ReminderService; diff --git a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php index c80844297cd37..98cecc3ab5ce9 100644 --- a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php +++ b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\CalDAV\RetentionService; diff --git a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php index c84c8d0b2a854..8d24df646e694 100644 --- a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php +++ b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\Db\DirectMapper; diff --git a/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php b/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php index daceb0ad16501..e514082fcadd8 100644 --- a/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php +++ b/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php b/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php index c943f58115e2d..158cd2b5610ed 100644 --- a/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php +++ b/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/BackgroundJob/EventReminderJob.php b/apps/dav/lib/BackgroundJob/EventReminderJob.php index 76617a30c4226..57e7e12a04d7d 100644 --- a/apps/dav/lib/BackgroundJob/EventReminderJob.php +++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OC\User\NoUserException; diff --git a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php index b32759ac5276a..84d290337cade 100644 --- a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php +++ b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php index b522ebb5b3295..d82716aed8ce7 100644 --- a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php +++ b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php b/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php index 7e24a96df2f1b..a3027e74bbaee 100644 --- a/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php +++ b/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use DateInterval; diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php index 7ce7494aa19ae..897ce135f7c42 100644 --- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php +++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index 836b60e1b48ee..713b1910df075 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\BackgroundJob; use OC\User\NoUserException; diff --git a/apps/dav/lib/BulkUpload/MultipartRequestParser.php b/apps/dav/lib/BulkUpload/MultipartRequestParser.php index 50f8cff76ba4a..aa0f67e6b0e05 100644 --- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php +++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php @@ -109,7 +109,6 @@ private function isAt(string $expectedContent): bool { return $expectedContent === $content; } - /** * Check whether the stream's cursor is sitting right before the boundary. */ diff --git a/apps/dav/lib/CalDAV/Activity/Backend.php b/apps/dav/lib/CalDAV/Activity/Backend.php index f0c49e6e28c9f..e2721f8b03ebb 100644 --- a/apps/dav/lib/CalDAV/Activity/Backend.php +++ b/apps/dav/lib/CalDAV/Activity/Backend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity; use OCA\DAV\CalDAV\Activity\Provider\Calendar; @@ -464,7 +465,6 @@ public function onTouchCalendarObject($action, array $calendarData, array $share $params['object']['link']['owner'] = $owner; } - $event->setAffectedUser($user) ->setSubject( $user === $currentUser ? $action . '_self' : $action, diff --git a/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php b/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php index f2f5e6a731c7d..7a5ff4df2e56c 100644 --- a/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Filter; use OCP\Activity\IFilter; diff --git a/apps/dav/lib/CalDAV/Activity/Filter/Todo.php b/apps/dav/lib/CalDAV/Activity/Filter/Todo.php index eb0f0cbec69b4..d797f24118c69 100644 --- a/apps/dav/lib/CalDAV/Activity/Filter/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Filter/Todo.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Filter; use OCP\Activity\IFilter; diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Base.php b/apps/dav/lib/CalDAV/Activity/Provider/Base.php index 558abe0ca1a4b..4d57bbdd12bef 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Base.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Base.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Provider; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php index 2cf52d3784c8a..90a638f5626ee 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Provider; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php index f24379ef4b55c..dec14b8e5e4a5 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Provider; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php index f51bc0af67c15..bfd3c1a02b233 100644 --- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Provider; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php b/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php index 5e128103e9270..f02da23efb6ab 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Setting; use OCP\Activity\ActivitySettings; diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php index 874f24a310ceb..29745ee11499e 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Setting; class Calendar extends CalDAVSetting { diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Event.php b/apps/dav/lib/CalDAV/Activity/Setting/Event.php index d6899e0fc1d46..feb4397cad8fa 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Event.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Event.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Setting; class Event extends CalDAVSetting { diff --git a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php index 7633967881155..33ee98ca78202 100644 --- a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php +++ b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Activity\Setting; class Todo extends CalDAVSetting { diff --git a/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php b/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php index 454afa79b2288..b26bb619a3d88 100644 --- a/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php +++ b/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Auth; use Sabre\DAV\Auth\Plugin; diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php index 621f642bd216a..8dcea77cdbbf8 100644 --- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php +++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\BirthdayCalendar; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index 06c5e9c78ccb5..01174ff11d33f 100644 --- a/apps/dav/lib/CalDAV/BirthdayService.php +++ b/apps/dav/lib/CalDAV/BirthdayService.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CalDAV; use Exception; diff --git a/apps/dav/lib/CalDAV/CachedSubscription.php b/apps/dav/lib/CalDAV/CachedSubscription.php index c8a1a23102d1b..7b5a809c61e32 100644 --- a/apps/dav/lib/CalDAV/CachedSubscription.php +++ b/apps/dav/lib/CalDAV/CachedSubscription.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use OCA\DAV\Exception\UnsupportedLimitOnInitialSyncException; @@ -99,7 +100,6 @@ public function getOwner() { return parent::getOwner(); } - #[\Override] public function delete() { $this->caldavBackend->deleteSubscription($this->calendarInfo['id']); diff --git a/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php b/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php index 3e72f9194abe5..20b4634752a0d 100644 --- a/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php +++ b/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use OCP\Calendar\ICalendar; diff --git a/apps/dav/lib/CalDAV/CachedSubscriptionObject.php b/apps/dav/lib/CalDAV/CachedSubscriptionObject.php index 4be1c30f0f176..7e9a7609d6128 100644 --- a/apps/dav/lib/CalDAV/CachedSubscriptionObject.php +++ b/apps/dav/lib/CalDAV/CachedSubscriptionObject.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use Sabre\DAV\Exception\MethodNotAllowed; diff --git a/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php b/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php index efd46b4cfad96..145203d4f39a9 100644 --- a/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php +++ b/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use OCP\Calendar\ICalendarProvider; diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 66d216c1f5af8..e961b3415f5ca 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CalDAV; use DateTime; diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 0f2a12f7f759e..f7de4cbdaef82 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -1,11 +1,11 @@ rdateIterator?->concludesAfter(); // return count return !empty($count) ? $count : null; - } /** @@ -438,7 +435,6 @@ public function recurringConcludesOn(): ?DateTime { } return null; - } /** diff --git a/apps/dav/lib/CalDAV/Export/ExportService.php b/apps/dav/lib/CalDAV/Export/ExportService.php index 552b9e2b675dc..c1a2ed7230b5f 100644 --- a/apps/dav/lib/CalDAV/Export/ExportService.php +++ b/apps/dav/lib/CalDAV/Export/ExportService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Export; use Generator; diff --git a/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php b/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php index 89255de289551..6e21f7cc805b6 100644 --- a/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php +++ b/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php @@ -180,7 +180,6 @@ public function propPatch(PropPatch $propPatch): void { } } - public function getChildACL(): array { return $this->getACL(); } diff --git a/apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php b/apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php index 310db9a308824..3f5babd4459da 100644 --- a/apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php +++ b/apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\ICSExportPlugin; use OCP\IConfig; diff --git a/apps/dav/lib/CalDAV/IRestorable.php b/apps/dav/lib/CalDAV/IRestorable.php index 5850e0a564553..66c4f2c056a18 100644 --- a/apps/dav/lib/CalDAV/IRestorable.php +++ b/apps/dav/lib/CalDAV/IRestorable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use Sabre\DAV\Exception; diff --git a/apps/dav/lib/CalDAV/Import/ImportService.php b/apps/dav/lib/CalDAV/Import/ImportService.php index 052451ef19281..579fb4fe2ade9 100644 --- a/apps/dav/lib/CalDAV/Import/ImportService.php +++ b/apps/dav/lib/CalDAV/Import/ImportService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Import; use Exception; diff --git a/apps/dav/lib/CalDAV/Import/TextImporter.php b/apps/dav/lib/CalDAV/Import/TextImporter.php index 7871c783bb8ce..6ffcc02b831f3 100644 --- a/apps/dav/lib/CalDAV/Import/TextImporter.php +++ b/apps/dav/lib/CalDAV/Import/TextImporter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Import; use Exception; diff --git a/apps/dav/lib/CalDAV/Import/XmlImporter.php b/apps/dav/lib/CalDAV/Import/XmlImporter.php index b37e65170ebfd..1c9032d0f9e6f 100644 --- a/apps/dav/lib/CalDAV/Import/XmlImporter.php +++ b/apps/dav/lib/CalDAV/Import/XmlImporter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Import; use Exception; diff --git a/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php b/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php index a985ff5e8615b..6f993bd3061ec 100644 --- a/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php +++ b/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Integration; use Sabre\CalDAV; diff --git a/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php b/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php index d913b91f1f0ef..437685908a274 100644 --- a/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php +++ b/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Integration; /** diff --git a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php index c8a7109abde41..de7815c68f2d7 100644 --- a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php +++ b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\InvitationResponse; use OCA\DAV\AppInfo\PluginManager; diff --git a/apps/dav/lib/CalDAV/Outbox.php b/apps/dav/lib/CalDAV/Outbox.php index 22907fad07f6e..363a5584d47c0 100644 --- a/apps/dav/lib/CalDAV/Outbox.php +++ b/apps/dav/lib/CalDAV/Outbox.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use OCP\IConfig; diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php index 328e27f428e13..d950669d61fd9 100644 --- a/apps/dav/lib/CalDAV/Plugin.php +++ b/apps/dav/lib/CalDAV/Plugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CalDAV; class Plugin extends \Sabre\CalDAV\Plugin { diff --git a/apps/dav/lib/CalDAV/Principal/Collection.php b/apps/dav/lib/CalDAV/Principal/Collection.php index 568053711682b..b7c01be08955e 100644 --- a/apps/dav/lib/CalDAV/Principal/Collection.php +++ b/apps/dav/lib/CalDAV/Principal/Collection.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Principal; /** diff --git a/apps/dav/lib/CalDAV/Principal/User.php b/apps/dav/lib/CalDAV/Principal/User.php index 65b55befbedcf..28c2d55770ccc 100644 --- a/apps/dav/lib/CalDAV/Principal/User.php +++ b/apps/dav/lib/CalDAV/Principal/User.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Principal; /** diff --git a/apps/dav/lib/CalDAV/Proxy/Proxy.php b/apps/dav/lib/CalDAV/Proxy/Proxy.php index ef1ad8c634f88..9711ceeef7279 100644 --- a/apps/dav/lib/CalDAV/Proxy/Proxy.php +++ b/apps/dav/lib/CalDAV/Proxy/Proxy.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Proxy; use OCP\AppFramework\Db\Entity; diff --git a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php index 3b9b9c3d9eb12..7348b9d040ee1 100644 --- a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php +++ b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Proxy; use OCP\AppFramework\Db\QBMapper; diff --git a/apps/dav/lib/CalDAV/PublicCalendar.php b/apps/dav/lib/CalDAV/PublicCalendar.php index 5decc50f823ba..a37b9fa7a8ecb 100644 --- a/apps/dav/lib/CalDAV/PublicCalendar.php +++ b/apps/dav/lib/CalDAV/PublicCalendar.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use Sabre\DAV\Exception\NotFound; diff --git a/apps/dav/lib/CalDAV/PublicCalendarObject.php b/apps/dav/lib/CalDAV/PublicCalendarObject.php index f98a3652d23a1..e6da729f15d7b 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarObject.php +++ b/apps/dav/lib/CalDAV/PublicCalendarObject.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; class PublicCalendarObject extends CalendarObject { diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php index 3d7a97cedabca..aec3f7b622486 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php +++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CalDAV; use OCP\IConfig; diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 5ba76dd418e0f..619d0fc29310d 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Publishing; use OCA\DAV\CalDAV\CalDavBackend; @@ -173,7 +174,6 @@ public function httpPost(RequestInterface $request, ResponseInterface $response) $this->server->xml->parse($requestBody, $request->getUrl(), $documentType); switch ($documentType) { - case '{' . self::NS_CALENDARSERVER . '}publish-calendar': // We can only deal with IShareableCalendar objects @@ -208,7 +208,6 @@ public function httpPost(RequestInterface $request, ResponseInterface $response) // Breaking the event chain return false; - case '{' . self::NS_CALENDARSERVER . '}unpublish-calendar': // We can only deal with IShareableCalendar objects @@ -242,7 +241,6 @@ public function httpPost(RequestInterface $request, ResponseInterface $response) // Breaking the event chain return false; - } } } diff --git a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php index d5d0bc45603f7..651b0fa6101d1 100644 --- a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php +++ b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Publishing\Xml; use Sabre\Xml\Writer; diff --git a/apps/dav/lib/CalDAV/Reminder/Backend.php b/apps/dav/lib/CalDAV/Reminder/Backend.php index eca7081928ea4..5ea4566fa4c36 100644 --- a/apps/dav/lib/CalDAV/Reminder/Backend.php +++ b/apps/dav/lib/CalDAV/Reminder/Backend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php index 31d60f1531ddc..aa13276a33b51 100644 --- a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; use OCP\IUser; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php index c558c2a05479e..17fc82bde9b53 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\INotificationProvider; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php index 01d51489a3bcd..5d8b3b3983735 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder\NotificationProvider; /** diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php index 22a1fa48fdd11..430617617ad5f 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder\NotificationProvider; use DateTime; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php index 15994bacf49b3..5cd05574149ef 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder\NotificationProvider; class ProviderNotAvailableException extends \Exception { diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php index cfea7e1fc45f0..a7f0aa44810d3 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder\NotificationProvider; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php b/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php index d474017e608e7..91b5b4cebcf72 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; use OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php b/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php index 6fd2a29ede5d5..0446efecdbee9 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; class NotificationTypeDoesNotExistException extends \Exception { diff --git a/apps/dav/lib/CalDAV/Reminder/Notifier.php b/apps/dav/lib/CalDAV/Reminder/Notifier.php index cefbc0ce548df..8422830a7bc3f 100644 --- a/apps/dav/lib/CalDAV/Reminder/Notifier.php +++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; use DateTime; @@ -87,10 +88,8 @@ public function prepare(INotification $notification, switch ($notification->getSubject()) { case 'calendar_reminder': return $this->prepareReminderNotification($notification); - default: throw new UnknownNotificationException('Unknown subject'); - } } diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index c75090e1560ca..ef480a310b2b6 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Reminder; use DateTimeImmutable; diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 993f460b7f353..462bc637e72f5 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\Proxy\ProxyMapper; @@ -287,7 +288,6 @@ public function searchPrincipals($prefixPath, array $searchProperties, $test = ' switch ($test) { case 'anyof': return array_values(array_unique(array_merge(...$results))); - case 'allof': default: return array_values(array_intersect(...$results)); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php index adeb8939c887d..327674067ac85 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\Proxy\ProxyMapper; diff --git a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php index 1cc8770739fae..16208645c71d0 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\Proxy\ProxyMapper; diff --git a/apps/dav/lib/CalDAV/RetentionService.php b/apps/dav/lib/CalDAV/RetentionService.php index 399d1a4663973..56bfbcd7eaa9b 100644 --- a/apps/dav/lib/CalDAV/RetentionService.php +++ b/apps/dav/lib/CalDAV/RetentionService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 01e4eb1f393a1..18d7559f1a702 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2007-2015 fruux GmbH (https://fruux.com/) * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CalDAV\Schedule; use OCA\DAV\CalDAV\CalendarObject; diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index 5fd20a7684352..156d5967fcf8e 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -438,7 +438,9 @@ public function generateWhenStringRecurringWeekly(EventReader $er): string { $startTime = null; $conclusion = null; // days of the week - $days = implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed())); + $days = implode(', ', array_map(function ($value) { + return $this->localizeDayName($value); + }, $er->recurringDaysOfWeekNamed())); // time of the day if (!$er->entireDay()) { $startTime = $this->l10n->l('time', $er->startDateTime(), ['width' => 'short']); @@ -492,8 +494,12 @@ public function generateWhenStringRecurringMonthly(EventReader $er): string { $conclusion = null; // days of month if ($er->recurringPattern() === 'R') { - $days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' ' - . implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed())); + $days = implode(', ', array_map(function ($value) { + return $this->localizeRelativePositionName($value); + }, $er->recurringRelativePositionNamed())) . ' ' + . implode(', ', array_map(function ($value) { + return $this->localizeDayName($value); + }, $er->recurringDaysOfWeekNamed())); } else { $days = implode(', ', $er->recurringDaysOfMonth()); } @@ -556,11 +562,17 @@ public function generateWhenStringRecurringYearly(EventReader $er): string { $startTime = null; $conclusion = null; // months of year - $months = implode(', ', array_map(function ($value) { return $this->localizeMonthName($value); }, $er->recurringMonthsOfYearNamed())); + $months = implode(', ', array_map(function ($value) { + return $this->localizeMonthName($value); + }, $er->recurringMonthsOfYearNamed())); // days of month if ($er->recurringPattern() === 'R') { - $days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' ' - . implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed())); + $days = implode(', ', array_map(function ($value) { + return $this->localizeRelativePositionName($value); + }, $er->recurringRelativePositionNamed())) . ' ' + . implode(', ', array_map(function ($value) { + return $this->localizeDayName($value); + }, $er->recurringDaysOfWeekNamed())); } else { $days = $er->startDateTime()->format('jS'); } diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 0bfcb17cb89db..3cc0d190d3b93 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Schedule; use DateTimeZone; @@ -590,12 +591,10 @@ private function isAvailableAtTime(string $email, \DateTimeInterface $start, \Da '{' . self::NS_CALDAV . '}calendar-home-set', '{' . self::NS_CALDAV . '}schedule-inbox-URL', '{http://sabredav.org/ns}email-address', - ] ); $this->server->on('propFind', [$aclPlugin, 'propFind'], 20); - // Grabbing the calendar list $objects = []; $calendarTimeZone = new DateTimeZone('UTC'); diff --git a/apps/dav/lib/CalDAV/Search/SearchPlugin.php b/apps/dav/lib/CalDAV/Search/SearchPlugin.php index b695276f7a822..ca5696926914d 100644 --- a/apps/dav/lib/CalDAV/Search/SearchPlugin.php +++ b/apps/dav/lib/CalDAV/Search/SearchPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search; use OCA\DAV\CalDAV\CalendarHome; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php index 485fd33be2cf8..55ea5f2dd16bd 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php index 4ff684913b768..caf80352cb469 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php index 7e36bf65b3a6a..e6e67049d057e 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php index fb69479c75b64..f24edd5dbf687 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php index e6a0151ae2960..25f7ea1df62d5 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php index a6e6846a206c6..ef7eb90ca2f98 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Filter; use OCA\DAV\CalDAV\Search\SearchPlugin; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php index e00b7095a57c1..0385f26405f10 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Search\Xml\Request; use OCA\DAV\CalDAV\Search\SearchPlugin; @@ -144,7 +145,6 @@ public static function xmlDeserialize(Reader $reader) { throw new BadRequest('At least one{' . SearchPlugin::NS_Nextcloud . '}prop-filter or {' . SearchPlugin::NS_Nextcloud . '}param-filter is required for this request'); } - $obj = new self(); foreach ($newProps as $key => $value) { $obj->$key = $value; diff --git a/apps/dav/lib/CalDAV/Status/StatusService.php b/apps/dav/lib/CalDAV/Status/StatusService.php index 9ee0e9bf35603..fbe8d27732723 100644 --- a/apps/dav/lib/CalDAV/Status/StatusService.php +++ b/apps/dav/lib/CalDAV/Status/StatusService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Status; use DateTimeImmutable; diff --git a/apps/dav/lib/CalDAV/TipBroker.php b/apps/dav/lib/CalDAV/TipBroker.php index e23d81f44c501..e83111330328b 100644 --- a/apps/dav/lib/CalDAV/TipBroker.php +++ b/apps/dav/lib/CalDAV/TipBroker.php @@ -464,7 +464,6 @@ protected function generateMessage( $message->message = $vObject; return $message; - } protected function componentSanitizeScheduling(Component $component): Component { diff --git a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php index f622cb439952d..b1f9b445aa9f9 100644 --- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php +++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Trashbin; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php index d853ed773f3d3..ccef08ca55462 100644 --- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php +++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Trashbin; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/CalDAV/Trashbin/Plugin.php b/apps/dav/lib/CalDAV/Trashbin/Plugin.php index 14c33956225bb..ccc87409d0ca4 100644 --- a/apps/dav/lib/CalDAV/Trashbin/Plugin.php +++ b/apps/dav/lib/CalDAV/Trashbin/Plugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Trashbin; use Closure; diff --git a/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php b/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php index 4a7b1d5915b30..ff8e5728c900e 100644 --- a/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php +++ b/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Trashbin; use OCA\DAV\CalDAV\IRestorable; diff --git a/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php b/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php index bd4bdfda76375..aa42c5355b13f 100644 --- a/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php +++ b/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Trashbin; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php b/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php index dd5d9cb6c1521..87f7b1be7fc93 100644 --- a/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php +++ b/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\Validation; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Connection.php b/apps/dav/lib/CalDAV/WebcalCaching/Connection.php index 559cff141b6c2..1728b9c211483 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/Connection.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/Connection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\WebcalCaching; use Exception; diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php index d0727076125bc..2f8da0b4f6c56 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\WebcalCaching; use OCA\DAV\CalDAV\CalendarRoot; diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php index 7b22adc889e10..0ed3a21957934 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CalDAV\WebcalCaching; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Capabilities.php b/apps/dav/lib/Capabilities.php index c437df76a8202..e710ea3b3d1b1 100644 --- a/apps/dav/lib/Capabilities.php +++ b/apps/dav/lib/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV; use OCP\Capabilities\ICapability; diff --git a/apps/dav/lib/CardDAV/Activity/Backend.php b/apps/dav/lib/CardDAV/Activity/Backend.php index b08414d3b027b..0f3588c0cfd2e 100644 --- a/apps/dav/lib/CardDAV/Activity/Backend.php +++ b/apps/dav/lib/CardDAV/Activity/Backend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity; use OCA\DAV\CardDAV\Activity\Provider\Addressbook; @@ -419,7 +420,6 @@ public function triggerCardActivity(string $action, array $addressbookData, arra ], ]; - $event->setAffectedUser($user) ->setSubject( $user === $currentUser ? $action . '_self' : $action, diff --git a/apps/dav/lib/CardDAV/Activity/Filter.php b/apps/dav/lib/CardDAV/Activity/Filter.php index cee7092bff4cf..e839f7496f8c2 100644 --- a/apps/dav/lib/CardDAV/Activity/Filter.php +++ b/apps/dav/lib/CardDAV/Activity/Filter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity; use OCP\Activity\IFilter; diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php index b505583d236fc..8a06d808f20ef 100644 --- a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php +++ b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity\Provider; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Base.php b/apps/dav/lib/CardDAV/Activity/Provider/Base.php index ea7680aed60a4..1fa007eaa467b 100644 --- a/apps/dav/lib/CardDAV/Activity/Provider/Base.php +++ b/apps/dav/lib/CardDAV/Activity/Provider/Base.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity\Provider; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Card.php b/apps/dav/lib/CardDAV/Activity/Provider/Card.php index f1434e75eb9b9..695261cb66550 100644 --- a/apps/dav/lib/CardDAV/Activity/Provider/Card.php +++ b/apps/dav/lib/CardDAV/Activity/Provider/Card.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity\Provider; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/dav/lib/CardDAV/Activity/Setting.php b/apps/dav/lib/CardDAV/Activity/Setting.php index b498ebd3374a0..55f7072cb2581 100644 --- a/apps/dav/lib/CardDAV/Activity/Setting.php +++ b/apps/dav/lib/CardDAV/Activity/Setting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Activity; use OCA\DAV\CalDAV\Activity\Setting\CalDAVSetting; diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index b02edb145a7ec..18451f17e5427 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCA\DAV\DAV\Sharing\IShareable; @@ -36,7 +37,6 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable, IMov public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) { parent::__construct($carddavBackend, $addressBookInfo); - if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME && $this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) { $this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts'); diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php index f22e38a41b47f..0668d8fdb7367 100644 --- a/apps/dav/lib/CardDAV/AddressBookImpl.php +++ b/apps/dav/lib/CardDAV/AddressBookImpl.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCA\DAV\Db\PropertyMapper; diff --git a/apps/dav/lib/CardDAV/AddressBookRoot.php b/apps/dav/lib/CardDAV/AddressBookRoot.php index 7f713f85e0f1b..655974cb58686 100644 --- a/apps/dav/lib/CardDAV/AddressBookRoot.php +++ b/apps/dav/lib/CardDAV/AddressBookRoot.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCA\DAV\AppInfo\PluginManager; diff --git a/apps/dav/lib/CardDAV/Card.php b/apps/dav/lib/CardDAV/Card.php index 0cd307b4f5c95..53e60b8ab69cf 100644 --- a/apps/dav/lib/CardDAV/Card.php +++ b/apps/dav/lib/CardDAV/Card.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; class Card extends \Sabre\CardDAV\Card { diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 14f03e6ce8f3f..140a1b44fa169 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OC\Search\Filter\DateTimeFilter; @@ -140,7 +141,6 @@ public function getAddressBooksForUser($principalUri) { ->where($subSelect->expr()->eq('d.access', $select->createNamedParameter(\OCA\DAV\CardDAV\Sharing\Backend::ACCESS_UNSHARED, IQueryBuilder::PARAM_INT), IQueryBuilder::PARAM_INT)) ->andWhere($subSelect->expr()->in('d.principaluri', $select->createNamedParameter($principals, IQueryBuilder::PARAM_STR_ARRAY), IQueryBuilder::PARAM_STR_ARRAY)); - $select->select(['a.id', 'a.uri', 'a.displayname', 'a.principaluri', 'a.description', 'a.synctoken', 's.access']) ->from('dav_shares', 's') ->join('s', 'addressbooks', 'a', $select->expr()->eq('s.resourceid', 'a.id')) @@ -273,7 +273,6 @@ public function getAddressBooksByUri(string $principal, string $addressBookUri): '{' . Plugin::NS_CARDDAV . '}addressbook-description' => $row['description'], '{http://calendarserver.org/ns/}getctag' => $row['synctoken'], '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', - ]; // system address books are always read only diff --git a/apps/dav/lib/CardDAV/ContactsManager.php b/apps/dav/lib/CardDAV/ContactsManager.php index 89f1dbb39bd93..feca586d94638 100644 --- a/apps/dav/lib/CardDAV/ContactsManager.php +++ b/apps/dav/lib/CardDAV/ContactsManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index 30dba99839ef7..fd35a5cf35108 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use DateTimeImmutable; diff --git a/apps/dav/lib/CardDAV/HasPhotoPlugin.php b/apps/dav/lib/CardDAV/HasPhotoPlugin.php index 07217901da94b..19c926dfcf605 100644 --- a/apps/dav/lib/CardDAV/HasPhotoPlugin.php +++ b/apps/dav/lib/CardDAV/HasPhotoPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV; use Sabre\CardDAV\Card; diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php index 42c15e94a7f74..61bc6a8f7cb7d 100644 --- a/apps/dav/lib/CardDAV/ImageExportPlugin.php +++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCP\AppFramework\Http; diff --git a/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php b/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php index 46eb6e2a625a5..3db90a6bb0836 100644 --- a/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php +++ b/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Integration; use Sabre\CardDAV\IAddressBook; diff --git a/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php b/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php index a8fa074f6359b..4bf74b988040a 100644 --- a/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php +++ b/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Integration; /** diff --git a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php index 4759bd33563b9..d3883631c968e 100644 --- a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php +++ b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV; use OCP\AppFramework\Http; diff --git a/apps/dav/lib/CardDAV/Notification/Notifier.php b/apps/dav/lib/CardDAV/Notification/Notifier.php index d9e6a259f50fb..1c7a142705858 100644 --- a/apps/dav/lib/CardDAV/Notification/Notifier.php +++ b/apps/dav/lib/CardDAV/Notification/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\CardDAV\Notification; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/CardDAV/Plugin.php b/apps/dav/lib/CardDAV/Plugin.php index 09123790c2e6a..fd9e5af381dcd 100644 --- a/apps/dav/lib/CardDAV/Plugin.php +++ b/apps/dav/lib/CardDAV/Plugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\CardDAV; use OCA\DAV\CardDAV\Xml\Groups; diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 5ba0a1e529de7..6e76cae30b468 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -1,11 +1,11 @@ getPath() . '/' . $targetName; - $targetNodeExists = $this->childExists($targetName); // at getNodeForPath we also check the path for isForbiddenFileOrDir @@ -466,7 +466,6 @@ public function moveInto($targetName, $fullSourcePath, INode $sourceNode) { return true; } - #[\Override] public function copyInto($targetName, $sourcePath, INode $sourceNode) { if ($sourceNode instanceof File || $sourceNode instanceof Directory) { diff --git a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php index 6a092f35cef0e..f72e4f3308d9f 100644 --- a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php +++ b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OCP\AppFramework\Http; diff --git a/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php b/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php index 12a9318863201..78f9e1355c0d0 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php +++ b/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; /** diff --git a/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php b/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php index 12c451f5579f7..2571ea5c9e588 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php +++ b/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; /** diff --git a/apps/dav/lib/Connector/Sabre/Exception/FileLocked.php b/apps/dav/lib/Connector/Sabre/Exception/FileLocked.php index 9e02d0d1949b1..c288a187aeb68 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/FileLocked.php +++ b/apps/dav/lib/Connector/Sabre/Exception/FileLocked.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; use Exception; diff --git a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php index 9ad510d39b11a..42568659adb56 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php +++ b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; class Forbidden extends \Sabre\DAV\Exception\Forbidden { diff --git a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php index 7a4a67ee77814..e32bda94edbba 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php +++ b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; use Sabre\DAV\Exception; diff --git a/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php b/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php index a9afce3e71ecd..2fdad94eebe3e 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php +++ b/apps/dav/lib/Connector/Sabre/Exception/PasswordLoginForbidden.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; use DOMElement; diff --git a/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php b/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php index cd468023391be..31ed78aa941e6 100644 --- a/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php +++ b/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre\Exception; /** diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php index 1909a2c4305a9..42d4f8ee42608 100644 --- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OCA\DAV\Connector\Sabre\Exception\FileLocked; diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index 5ce2613dab108..5a46f216d3376 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OCP\AppFramework\Http; diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index f2bb588cbc450..be6ee18c738e2 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use Icewind\Streams\CallbackWrapper; diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 51c3845adc437..d4e14a11a4b97 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\AppFramework\Http\Request; @@ -622,7 +623,6 @@ public function handleUpdateProperties($path, PropPatch $propPatch) { }); } - /** * handle the update of metadata from PROPPATCH requests * diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 510ef678f7892..025b8470fc68a 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\Files\View; @@ -310,7 +311,6 @@ private function getCirclesFileIds(array $circlesIds) { return Circles::getFilesForCircles($circlesIds); } - /** * Prepare propfind response for the given nodes * diff --git a/apps/dav/lib/Connector/Sabre/LockPlugin.php b/apps/dav/lib/Connector/Sabre/LockPlugin.php index 338c2528d07a2..1634af44be2e0 100644 --- a/apps/dav/lib/Connector/Sabre/LockPlugin.php +++ b/apps/dav/lib/Connector/Sabre/LockPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OCA\DAV\Connector\Sabre\Exception\FileLocked; diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php index 1f05b2c8ae4de..1a831a4b65881 100644 --- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php +++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OCA\DAV\Exception\ServerMaintenanceMode; @@ -36,7 +37,6 @@ public function __construct( $this->l10n = \OC::$server->getL10N('dav'); } - /** * This initializes the plugin. * diff --git a/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php b/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php index 7b26a76c2aafa..ab33325d6869c 100644 --- a/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php +++ b/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; class MtimeSanitizer { diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index b2ecf9b2f6a22..5bbe1990117a8 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\Files\Node\File; diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index afff6c0fe39dc..0feb7032b8507 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\Files\FileInfo; @@ -158,7 +159,6 @@ public function copy($sourcePath, $destinationPath) { throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup'); } - $info = $this->fileView->getFileInfo(dirname($destinationPath)); if ($this->fileView->file_exists($destinationPath)) { $destinationPermission = $info && $info->isUpdateable(); diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index 31395f61ae97d..6d406b1739a5b 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\KnownUser\KnownUserService; @@ -399,7 +400,6 @@ protected function searchUserPrincipals(array $searchProperties, $test = 'allof' switch ($test) { case 'anyof': return array_values(array_unique(array_merge(...$results))); - case 'allof': default: return array_values(array_intersect(...$results)); @@ -421,7 +421,6 @@ public function searchPrincipals($prefixPath, array $searchProperties, $test = ' switch ($prefixPath) { case 'principals/users': return $this->searchUserPrincipals($searchProperties, $test); - default: return []; } diff --git a/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php b/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php index 78ca10d5eb4ff..a9bc79f6d7b8d 100644 --- a/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php +++ b/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Connector\Sabre; use Sabre\DAV\Server as SabreServer; diff --git a/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php b/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php index 94328b8be965c..bfe1f92e6e974 100644 --- a/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php +++ b/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Connector\Sabre; use Sabre\DAV\ICollection; diff --git a/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php b/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php index bbdb66df4ed10..c2724e38ac5fa 100644 --- a/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php +++ b/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Connector\Sabre; use Sabre\DAV\ServerPlugin; diff --git a/apps/dav/lib/Connector/Sabre/PublicAuth.php b/apps/dav/lib/Connector/Sabre/PublicAuth.php index 912e5800aec1a..4f41b95c220af 100644 --- a/apps/dav/lib/Connector/Sabre/PublicAuth.php +++ b/apps/dav/lib/Connector/Sabre/PublicAuth.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. diff --git a/apps/dav/lib/Connector/Sabre/Server.php b/apps/dav/lib/Connector/Sabre/Server.php index ca756a34174db..22e67e734f20c 100644 --- a/apps/dav/lib/Connector/Sabre/Server.php +++ b/apps/dav/lib/Connector/Sabre/Server.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\DB\Connection; diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 4226cc9579604..7a1b6191014bf 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\Files\View; diff --git a/apps/dav/lib/Connector/Sabre/ShareTypeList.php b/apps/dav/lib/Connector/Sabre/ShareTypeList.php index 9ab4117efdbaa..694c64325131c 100644 --- a/apps/dav/lib/Connector/Sabre/ShareTypeList.php +++ b/apps/dav/lib/Connector/Sabre/ShareTypeList.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use Sabre\Xml\Element; diff --git a/apps/dav/lib/Connector/Sabre/ShareeList.php b/apps/dav/lib/Connector/Sabre/ShareeList.php index 4074742408fdb..cf224f99e605e 100644 --- a/apps/dav/lib/Connector/Sabre/ShareeList.php +++ b/apps/dav/lib/Connector/Sabre/ShareeList.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Connector\Sabre; use OCP\Share\IShare; diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index d1837d3204dc9..bf0205f2565c7 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use OC\Share20\Exception\BackendError; diff --git a/apps/dav/lib/Connector/Sabre/TagList.php b/apps/dav/lib/Connector/Sabre/TagList.php index 8726576336150..bd239370e3648 100644 --- a/apps/dav/lib/Connector/Sabre/TagList.php +++ b/apps/dav/lib/Connector/Sabre/TagList.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; use Sabre\Xml\Element; diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php index 9f9c3be24c5ef..5d9549e08a282 100644 --- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php +++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Connector\Sabre; /** diff --git a/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php b/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php index 38ce71b0f2f4d..4b465ec255bb5 100644 --- a/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php +++ b/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Connector\Sabre; use OC\Streamer; diff --git a/apps/dav/lib/Controller/BirthdayCalendarController.php b/apps/dav/lib/Controller/BirthdayCalendarController.php index f6bfb229a9c1e..5f43342a6d6f6 100644 --- a/apps/dav/lib/Controller/BirthdayCalendarController.php +++ b/apps/dav/lib/Controller/BirthdayCalendarController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Controller; use OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob; diff --git a/apps/dav/lib/Controller/DirectController.php b/apps/dav/lib/Controller/DirectController.php index ea209168123ac..531b6bd2d0014 100644 --- a/apps/dav/lib/Controller/DirectController.php +++ b/apps/dav/lib/Controller/DirectController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Controller; use OCA\DAV\Db\Direct; diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php index 425f491adef1c..5a5105a439165 100644 --- a/apps/dav/lib/Controller/InvitationResponseController.php +++ b/apps/dav/lib/Controller/InvitationResponseController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Controller; use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer; diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index c95e1ea1a7024..698fdee496ea8 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -35,7 +35,6 @@ use Sabre\DAV\Xml\Property\LocalHref; use Sabre\Xml\ParseException; use Sabre\Xml\Service as XmlService; - use function array_intersect; class CustomPropertiesBackend implements BackendInterface { diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index ffd3079461846..dbc90bd070aa9 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV; use OCP\Constants; @@ -235,7 +236,6 @@ public function searchPrincipals($prefixPath, array $searchProperties, $test = ' switch ($test) { case 'anyof': return array_values(array_unique(array_merge(...$results))); - case 'allof': default: return array_values(array_intersect(...$results)); diff --git a/apps/dav/lib/DAV/PublicAuth.php b/apps/dav/lib/DAV/PublicAuth.php index aeaa6113de9a9..34b9e20d09ae0 100644 --- a/apps/dav/lib/DAV/PublicAuth.php +++ b/apps/dav/lib/DAV/PublicAuth.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV; use Sabre\DAV\Auth\Backend\BackendInterface; diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 1405a481dc9d7..ba64cea69d825 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV\Sharing; use OCA\DAV\CalDAV\Federation\FederationSharingService; diff --git a/apps/dav/lib/DAV/Sharing/IShareable.php b/apps/dav/lib/DAV/Sharing/IShareable.php index 019559548ad57..0affc36a96d4c 100644 --- a/apps/dav/lib/DAV/Sharing/IShareable.php +++ b/apps/dav/lib/DAV/Sharing/IShareable.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV\Sharing; use Sabre\DAV\INode; diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php index bdc5a552a8aa0..a5d9fad9aa9c9 100644 --- a/apps/dav/lib/DAV/Sharing/Plugin.php +++ b/apps/dav/lib/DAV/Sharing/Plugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV\Sharing; use OCA\DAV\CalDAV\CalDavBackend; @@ -130,7 +131,6 @@ public function httpPost(RequestInterface $request, ResponseInterface $response) $message = $this->server->xml->parse($requestBody, $request->getUrl(), $documentType); switch ($documentType) { - // Dealing with the 'share' document, which modified invitees on a // calendar. case '{' . self::NS_OWNCLOUD . '}share': diff --git a/apps/dav/lib/DAV/Sharing/SharingMapper.php b/apps/dav/lib/DAV/Sharing/SharingMapper.php index cab45907077d0..2a2287b9353bc 100644 --- a/apps/dav/lib/DAV/Sharing/SharingMapper.php +++ b/apps/dav/lib/DAV/Sharing/SharingMapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\DAV\Sharing; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/dav/lib/DAV/Sharing/SharingService.php b/apps/dav/lib/DAV/Sharing/SharingService.php index 798ed26fbca53..02e4ea0801d32 100644 --- a/apps/dav/lib/DAV/Sharing/SharingService.php +++ b/apps/dav/lib/DAV/Sharing/SharingService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\DAV\Sharing; abstract class SharingService { diff --git a/apps/dav/lib/DAV/Sharing/Xml/Invite.php b/apps/dav/lib/DAV/Sharing/Xml/Invite.php index bde3dee98da37..588e92844183d 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/Invite.php +++ b/apps/dav/lib/DAV/Sharing/Xml/Invite.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: fruux GmbH (https://fruux.com/) * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV\Sharing\Xml; use OCA\DAV\DAV\Sharing\Plugin; diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index 75d7e98b0098d..e68df276ae767 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV\Sharing\Xml; use OCA\DAV\DAV\Sharing\Plugin; @@ -42,7 +43,6 @@ public static function xmlDeserialize(Reader $reader) { foreach ($elements as $elem) { switch ($elem['name']) { - case '{' . Plugin::NS_OWNCLOUD . '}set': $sharee = $elem['value']; diff --git a/apps/dav/lib/DAV/SystemPrincipalBackend.php b/apps/dav/lib/DAV/SystemPrincipalBackend.php index 4813f6d6ea3a0..fb9513f1d6242 100644 --- a/apps/dav/lib/DAV/SystemPrincipalBackend.php +++ b/apps/dav/lib/DAV/SystemPrincipalBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\DAV; use Sabre\DAVACL\PrincipalBackend\AbstractBackend; diff --git a/apps/dav/lib/Db/Direct.php b/apps/dav/lib/Db/Direct.php index 4e4a12d225f54..8041c01b143b8 100644 --- a/apps/dav/lib/Db/Direct.php +++ b/apps/dav/lib/Db/Direct.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/dav/lib/Db/DirectMapper.php b/apps/dav/lib/Db/DirectMapper.php index 4fedac35b7296..061f0a09b7997 100644 --- a/apps/dav/lib/Db/DirectMapper.php +++ b/apps/dav/lib/Db/DirectMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Db; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/apps/dav/lib/Direct/DirectFile.php b/apps/dav/lib/Direct/DirectFile.php index 12b5d317c9db2..0dc4c5b8cb67d 100644 --- a/apps/dav/lib/Direct/DirectFile.php +++ b/apps/dav/lib/Direct/DirectFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Direct; use OCA\DAV\Db\Direct; diff --git a/apps/dav/lib/Direct/DirectHome.php b/apps/dav/lib/Direct/DirectHome.php index 514576b29d95e..e295615c2c9bd 100644 --- a/apps/dav/lib/Direct/DirectHome.php +++ b/apps/dav/lib/Direct/DirectHome.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Direct; use OCA\DAV\Db\DirectMapper; diff --git a/apps/dav/lib/Direct/Server.php b/apps/dav/lib/Direct/Server.php index 5b75b89c5ce23..fe8bd1c0a06dc 100644 --- a/apps/dav/lib/Direct/Server.php +++ b/apps/dav/lib/Direct/Server.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Direct; class Server extends \Sabre\DAV\Server { diff --git a/apps/dav/lib/Direct/ServerFactory.php b/apps/dav/lib/Direct/ServerFactory.php index 473439361c2e4..be73afd01c468 100644 --- a/apps/dav/lib/Direct/ServerFactory.php +++ b/apps/dav/lib/Direct/ServerFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Direct; use OCA\DAV\Connector\Sabre\MaintenancePlugin; diff --git a/apps/dav/lib/Events/AddressBookCreatedEvent.php b/apps/dav/lib/Events/AddressBookCreatedEvent.php index 1a56bcbf63f2e..affabf482bad0 100644 --- a/apps/dav/lib/Events/AddressBookCreatedEvent.php +++ b/apps/dav/lib/Events/AddressBookCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/AddressBookDeletedEvent.php b/apps/dav/lib/Events/AddressBookDeletedEvent.php index b1ec4125513e0..d4f61e2208020 100644 --- a/apps/dav/lib/Events/AddressBookDeletedEvent.php +++ b/apps/dav/lib/Events/AddressBookDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php index 9a574fb548e23..f7772bd979de1 100644 --- a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php +++ b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/AddressBookUpdatedEvent.php b/apps/dav/lib/Events/AddressBookUpdatedEvent.php index fe6dc024cd272..122cf0b34dd1a 100644 --- a/apps/dav/lib/Events/AddressBookUpdatedEvent.php +++ b/apps/dav/lib/Events/AddressBookUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php b/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php index a79d730e8ffec..da02b8bf4349f 100644 --- a/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php +++ b/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php index ea1c344ed2766..378040e6f29ce 100644 --- a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php +++ b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php index 8f8e55d32e5b1..a0e42d08963db 100644 --- a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php +++ b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php index 0adb4164dc9da..bfeb60921ceef 100644 --- a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php +++ b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarCreatedEvent.php b/apps/dav/lib/Events/CalendarCreatedEvent.php index 46d1194914e9c..73b1dc896c355 100644 --- a/apps/dav/lib/Events/CalendarCreatedEvent.php +++ b/apps/dav/lib/Events/CalendarCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarDeletedEvent.php b/apps/dav/lib/Events/CalendarDeletedEvent.php index c8ab4265b2732..9613e94765a57 100644 --- a/apps/dav/lib/Events/CalendarDeletedEvent.php +++ b/apps/dav/lib/Events/CalendarDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php index 8bb660a98c670..33756affb6c47 100644 --- a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php +++ b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarPublishedEvent.php b/apps/dav/lib/Events/CalendarPublishedEvent.php index 32fb1c3696386..cd85c44a0d1c6 100644 --- a/apps/dav/lib/Events/CalendarPublishedEvent.php +++ b/apps/dav/lib/Events/CalendarPublishedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarRestoredEvent.php b/apps/dav/lib/Events/CalendarRestoredEvent.php index f404771dea22b..2bb4bfa70bc03 100644 --- a/apps/dav/lib/Events/CalendarRestoredEvent.php +++ b/apps/dav/lib/Events/CalendarRestoredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php index 0f8b23ad3ac72..e200cdd45ffe4 100644 --- a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php +++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Events/CalendarUnpublishedEvent.php b/apps/dav/lib/Events/CalendarUnpublishedEvent.php index 10d1712686dfd..7ab00904c3d7c 100644 --- a/apps/dav/lib/Events/CalendarUnpublishedEvent.php +++ b/apps/dav/lib/Events/CalendarUnpublishedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CalendarUpdatedEvent.php b/apps/dav/lib/Events/CalendarUpdatedEvent.php index a603d3152f081..1e217d2aed222 100644 --- a/apps/dav/lib/Events/CalendarUpdatedEvent.php +++ b/apps/dav/lib/Events/CalendarUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CardCreatedEvent.php b/apps/dav/lib/Events/CardCreatedEvent.php index 5a66d73e707e8..a2a6c4081d232 100644 --- a/apps/dav/lib/Events/CardCreatedEvent.php +++ b/apps/dav/lib/Events/CardCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CardDeletedEvent.php b/apps/dav/lib/Events/CardDeletedEvent.php index 237ffa7d623c2..537078507c267 100644 --- a/apps/dav/lib/Events/CardDeletedEvent.php +++ b/apps/dav/lib/Events/CardDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CardMovedEvent.php b/apps/dav/lib/Events/CardMovedEvent.php index be69a046537ec..3a183b8cc89e0 100644 --- a/apps/dav/lib/Events/CardMovedEvent.php +++ b/apps/dav/lib/Events/CardMovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/CardUpdatedEvent.php b/apps/dav/lib/Events/CardUpdatedEvent.php index 10fc5b745943b..a86319e7aaad6 100644 --- a/apps/dav/lib/Events/CardUpdatedEvent.php +++ b/apps/dav/lib/Events/CardUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/SabrePluginAddEvent.php b/apps/dav/lib/Events/SabrePluginAddEvent.php index 866fae2e22470..76a34bdb8e8f0 100644 --- a/apps/dav/lib/Events/SabrePluginAddEvent.php +++ b/apps/dav/lib/Events/SabrePluginAddEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/SabrePluginAuthInitEvent.php b/apps/dav/lib/Events/SabrePluginAuthInitEvent.php index d3d93770c7406..d2fd9417578c3 100644 --- a/apps/dav/lib/Events/SabrePluginAuthInitEvent.php +++ b/apps/dav/lib/Events/SabrePluginAuthInitEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/SubscriptionCreatedEvent.php b/apps/dav/lib/Events/SubscriptionCreatedEvent.php index 433b6db59b078..282c1bbda7732 100644 --- a/apps/dav/lib/Events/SubscriptionCreatedEvent.php +++ b/apps/dav/lib/Events/SubscriptionCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/SubscriptionDeletedEvent.php b/apps/dav/lib/Events/SubscriptionDeletedEvent.php index 58d47ae98a438..7d88df64583e7 100644 --- a/apps/dav/lib/Events/SubscriptionDeletedEvent.php +++ b/apps/dav/lib/Events/SubscriptionDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php index 1a1b28046635f..ab89527887740 100644 --- a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php +++ b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Events; use OCP\EventDispatcher\Event; diff --git a/apps/dav/lib/Exception/ServerMaintenanceMode.php b/apps/dav/lib/Exception/ServerMaintenanceMode.php index 8f621588fdc05..7fd72b1bc3c2e 100644 --- a/apps/dav/lib/Exception/ServerMaintenanceMode.php +++ b/apps/dav/lib/Exception/ServerMaintenanceMode.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Exception; use Sabre\DAV\Exception\ServiceUnavailable; diff --git a/apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php b/apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php index 264c034423d77..811b8c363be91 100644 --- a/apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php +++ b/apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Exception; use Sabre\DAV\Exception\InsufficientStorage; diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php index 8f77946f9b300..5d72ba0bbf579 100644 --- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php +++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Files; use OC\AppFramework\Http\Request; diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php index 206d812bd4333..05e495ff51fa6 100644 --- a/apps/dav/lib/Files/FileSearchBackend.php +++ b/apps/dav/lib/Files/FileSearchBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Files; use OC\Files\Search\SearchBinaryOperator; @@ -112,7 +113,6 @@ public function getPropertyDefinitionsForScope(string $href, ?string $path): arr return array_merge($props, $this->getPropertyDefinitionsForMetadata()); } - private function getPropertyDefinitionsForMetadata(): array { $metadataProps = []; $metadata = $this->filesMetadataManager->getKnownMetadata(); @@ -249,7 +249,6 @@ private function sort(SearchResult $a, SearchResult $b, array $orders) { $v1 = $this->getSearchResultProperty($a, $order->property); $v2 = $this->getSearchResultProperty($b, $order->property); - if ($v1 === null && $v2 === null) { continue; } diff --git a/apps/dav/lib/Files/FilesHome.php b/apps/dav/lib/Files/FilesHome.php index 391df3e4ccadd..d9179ece7311f 100644 --- a/apps/dav/lib/Files/FilesHome.php +++ b/apps/dav/lib/Files/FilesHome.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Files; use OC\Files\Filesystem; diff --git a/apps/dav/lib/Files/LazySearchBackend.php b/apps/dav/lib/Files/LazySearchBackend.php index f9cdbf289cc7a..94e2f271d4b35 100644 --- a/apps/dav/lib/Files/LazySearchBackend.php +++ b/apps/dav/lib/Files/LazySearchBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Files; use SearchDAV\Backend\ISearchBackend; diff --git a/apps/dav/lib/Files/RootCollection.php b/apps/dav/lib/Files/RootCollection.php index c18cd1e7a1b7b..358d9eaa57e03 100644 --- a/apps/dav/lib/Files/RootCollection.php +++ b/apps/dav/lib/Files/RootCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Files; use OCP\Files\FileInfo; diff --git a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php index b3871474afea1..35879c509118e 100644 --- a/apps/dav/lib/Files/Sharing/FilesDropPlugin.php +++ b/apps/dav/lib/Files/Sharing/FilesDropPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Files\Sharing; use OCP\Files\Folder; diff --git a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php index 548a04f4fedef..2ed87d0ef7213 100644 --- a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php +++ b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Files\Sharing; use OCP\Files\FileInfo; diff --git a/apps/dav/lib/Listener/ActivityUpdaterListener.php b/apps/dav/lib/Listener/ActivityUpdaterListener.php index 2617080343661..debd278526ea6 100644 --- a/apps/dav/lib/Listener/ActivityUpdaterListener.php +++ b/apps/dav/lib/Listener/ActivityUpdaterListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CalDAV\Activity\Backend as ActivityBackend; diff --git a/apps/dav/lib/Listener/AddMissingIndicesListener.php b/apps/dav/lib/Listener/AddMissingIndicesListener.php index 2370dffa35024..96b4e38c50169 100644 --- a/apps/dav/lib/Listener/AddMissingIndicesListener.php +++ b/apps/dav/lib/Listener/AddMissingIndicesListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCP\DB\Events\AddMissingIndicesEvent; diff --git a/apps/dav/lib/Listener/AddressbookListener.php b/apps/dav/lib/Listener/AddressbookListener.php index fe91aae65c964..2491fab29e904 100644 --- a/apps/dav/lib/Listener/AddressbookListener.php +++ b/apps/dav/lib/Listener/AddressbookListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CardDAV\Activity\Backend as ActivityBackend; diff --git a/apps/dav/lib/Listener/BirthdayListener.php b/apps/dav/lib/Listener/BirthdayListener.php index 68a31667400c3..5d7ef3a7348f3 100644 --- a/apps/dav/lib/Listener/BirthdayListener.php +++ b/apps/dav/lib/Listener/BirthdayListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/lib/Listener/CalendarContactInteractionListener.php b/apps/dav/lib/Listener/CalendarContactInteractionListener.php index 1f7556a361e35..5e3dac1e8358b 100644 --- a/apps/dav/lib/Listener/CalendarContactInteractionListener.php +++ b/apps/dav/lib/Listener/CalendarContactInteractionListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\Connector\Sabre\Principal; diff --git a/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php b/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php index 3b67774107dba..3b7ccafac3703 100644 --- a/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php +++ b/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\Events\CalendarDeletedEvent; diff --git a/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php b/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php index c87c157484b18..3104c48b3b1de 100644 --- a/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php +++ b/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Listener/CalendarPublicationListener.php b/apps/dav/lib/Listener/CalendarPublicationListener.php index e2a3c7058928a..5745f6a40f81d 100644 --- a/apps/dav/lib/Listener/CalendarPublicationListener.php +++ b/apps/dav/lib/Listener/CalendarPublicationListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CalDAV\Activity\Backend; diff --git a/apps/dav/lib/Listener/CalendarShareUpdateListener.php b/apps/dav/lib/Listener/CalendarShareUpdateListener.php index 6ff42798f32b2..8756d359ae2ed 100644 --- a/apps/dav/lib/Listener/CalendarShareUpdateListener.php +++ b/apps/dav/lib/Listener/CalendarShareUpdateListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CalDAV\Activity\Backend; diff --git a/apps/dav/lib/Listener/CardListener.php b/apps/dav/lib/Listener/CardListener.php index 73c0b1979dfe3..747112143637b 100644 --- a/apps/dav/lib/Listener/CardListener.php +++ b/apps/dav/lib/Listener/CardListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CardDAV\Activity\Backend as ActivityBackend; diff --git a/apps/dav/lib/Listener/ClearPhotoCacheListener.php b/apps/dav/lib/Listener/ClearPhotoCacheListener.php index b467d556dc54a..f78776eebd8e7 100644 --- a/apps/dav/lib/Listener/ClearPhotoCacheListener.php +++ b/apps/dav/lib/Listener/ClearPhotoCacheListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CardDAV\PhotoCache; diff --git a/apps/dav/lib/Listener/DavAdminSettingsListener.php b/apps/dav/lib/Listener/DavAdminSettingsListener.php index eb7fb93287e56..99d63c74564af 100644 --- a/apps/dav/lib/Listener/DavAdminSettingsListener.php +++ b/apps/dav/lib/Listener/DavAdminSettingsListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/Listener/SubscriptionListener.php b/apps/dav/lib/Listener/SubscriptionListener.php index 8a8779f6100ea..53ac6fcf57e0c 100644 --- a/apps/dav/lib/Listener/SubscriptionListener.php +++ b/apps/dav/lib/Listener/SubscriptionListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\BackgroundJob\RefreshWebcalJob; diff --git a/apps/dav/lib/Listener/TrustedServerRemovedListener.php b/apps/dav/lib/Listener/TrustedServerRemovedListener.php index 028297d2189f5..e596f2cc23928 100644 --- a/apps/dav/lib/Listener/TrustedServerRemovedListener.php +++ b/apps/dav/lib/Listener/TrustedServerRemovedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/lib/Listener/UserPreferenceListener.php b/apps/dav/lib/Listener/UserPreferenceListener.php index 93085d163cae0..bc7da82fe488a 100644 --- a/apps/dav/lib/Listener/UserPreferenceListener.php +++ b/apps/dav/lib/Listener/UserPreferenceListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Listener; use OCA\DAV\BackgroundJob\UserStatusAutomation; diff --git a/apps/dav/lib/Migration/BuildCalendarSearchIndex.php b/apps/dav/lib/Migration/BuildCalendarSearchIndex.php index 2a40e18e72035..36760716365a5 100644 --- a/apps/dav/lib/Migration/BuildCalendarSearchIndex.php +++ b/apps/dav/lib/Migration/BuildCalendarSearchIndex.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\BackgroundJob\IJobList; diff --git a/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php index 06ac9ec222a4b..fc6680fb11320 100644 --- a/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php +++ b/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndex.php b/apps/dav/lib/Migration/BuildSocialSearchIndex.php index 48e2a6bde5794..ced2125d3849d 100644 --- a/apps/dav/lib/Migration/BuildSocialSearchIndex.php +++ b/apps/dav/lib/Migration/BuildSocialSearchIndex.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\BackgroundJob\IJobList; diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php index 1ae5704ad19f9..e6a2a7e24d057 100644 --- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php +++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php b/apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php index 4826f730397dc..161d8248bc87b 100644 --- a/apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php +++ b/apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Migration/ChunkCleanup.php b/apps/dav/lib/Migration/ChunkCleanup.php index 5ba45a1516adb..d4ca079c3f06f 100644 --- a/apps/dav/lib/Migration/ChunkCleanup.php +++ b/apps/dav/lib/Migration/ChunkCleanup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\UploadCleanup; @@ -64,7 +65,6 @@ public function run(IOutput $output) { }); $output->finishProgress(); - $this->config->setAppValue('dav', 'chunks_migrated', '1'); } } diff --git a/apps/dav/lib/Migration/DeleteSchedulingObjects.php b/apps/dav/lib/Migration/DeleteSchedulingObjects.php index 1a08d0869219d..b431bab57b436 100644 --- a/apps/dav/lib/Migration/DeleteSchedulingObjects.php +++ b/apps/dav/lib/Migration/DeleteSchedulingObjects.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\DeleteOutdatedSchedulingObjects; diff --git a/apps/dav/lib/Migration/DisableSystemAddressBook.php b/apps/dav/lib/Migration/DisableSystemAddressBook.php index df1c1c0eedaa0..17005a6dd4c5b 100644 --- a/apps/dav/lib/Migration/DisableSystemAddressBook.php +++ b/apps/dav/lib/Migration/DisableSystemAddressBook.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/Migration/FixBirthdayCalendarComponent.php b/apps/dav/lib/Migration/FixBirthdayCalendarComponent.php index 6264a5e81ce13..2fb33b5f8fcca 100644 --- a/apps/dav/lib/Migration/FixBirthdayCalendarComponent.php +++ b/apps/dav/lib/Migration/FixBirthdayCalendarComponent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Migration; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php b/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php index a15cf95f2aec8..2d67ea4d1d6e5 100644 --- a/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php +++ b/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\RefreshWebcalJob; diff --git a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php index 3a1a5ac5e3f2a..bf414a4a74f94 100644 --- a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php +++ b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\RegisterRegenerateBirthdayCalendars; diff --git a/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php b/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php index ccae2deb254fc..6db597b72138b 100644 --- a/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php +++ b/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\BuildReminderIndexBackgroundJob; diff --git a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php index 0bfa00483e54b..8d487b48aba29 100644 --- a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php +++ b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php index db5a8f5c7d9b1..76c678d061507 100644 --- a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php +++ b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\Exception; diff --git a/apps/dav/lib/Migration/RemoveObjectProperties.php b/apps/dav/lib/Migration/RemoveObjectProperties.php index c5a7daeea822b..e976ee4f0f89a 100644 --- a/apps/dav/lib/Migration/RemoveObjectProperties.php +++ b/apps/dav/lib/Migration/RemoveObjectProperties.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Migration; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php index 39fd8f246d9b3..89974b7d30e0d 100644 --- a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php +++ b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCA\DAV\BackgroundJob\CleanupOrphanedChildrenJob; diff --git a/apps/dav/lib/Migration/Version1004Date20170825134824.php b/apps/dav/lib/Migration/Version1004Date20170825134824.php index 153db25ae837d..77c8af234f9f8 100644 --- a/apps/dav/lib/Migration/Version1004Date20170825134824.php +++ b/apps/dav/lib/Migration/Version1004Date20170825134824.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1004Date20170919104507.php b/apps/dav/lib/Migration/Version1004Date20170919104507.php index 929b4c393733f..47ccd80a8e114 100644 --- a/apps/dav/lib/Migration/Version1004Date20170919104507.php +++ b/apps/dav/lib/Migration/Version1004Date20170919104507.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1004Date20170924124212.php b/apps/dav/lib/Migration/Version1004Date20170924124212.php index 04daf171a59a8..91f8a737656c9 100644 --- a/apps/dav/lib/Migration/Version1004Date20170924124212.php +++ b/apps/dav/lib/Migration/Version1004Date20170924124212.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1004Date20170926103422.php b/apps/dav/lib/Migration/Version1004Date20170926103422.php index 0a48ceeac7bec..1e403e4da4b01 100644 --- a/apps/dav/lib/Migration/Version1004Date20170926103422.php +++ b/apps/dav/lib/Migration/Version1004Date20170926103422.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\Migration\BigIntMigration; diff --git a/apps/dav/lib/Migration/Version1005Date20180413093149.php b/apps/dav/lib/Migration/Version1005Date20180413093149.php index 41d4d0c8389c0..57d60a90c8710 100644 --- a/apps/dav/lib/Migration/Version1005Date20180413093149.php +++ b/apps/dav/lib/Migration/Version1005Date20180413093149.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1005Date20180530124431.php b/apps/dav/lib/Migration/Version1005Date20180530124431.php index 26c8589431b73..37a77d9b7e008 100644 --- a/apps/dav/lib/Migration/Version1005Date20180530124431.php +++ b/apps/dav/lib/Migration/Version1005Date20180530124431.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1006Date20180619154313.php b/apps/dav/lib/Migration/Version1006Date20180619154313.php index 23d2a69187561..ea3d39bfa60a4 100644 --- a/apps/dav/lib/Migration/Version1006Date20180619154313.php +++ b/apps/dav/lib/Migration/Version1006Date20180619154313.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1006Date20180628111625.php b/apps/dav/lib/Migration/Version1006Date20180628111625.php index 3d657969ca0d9..0047e48acc5eb 100644 --- a/apps/dav/lib/Migration/Version1006Date20180628111625.php +++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; @@ -60,7 +61,6 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op 'default' => 0, ]); - if ($calendarObjectsPropsTable->hasIndex('calendarobject_index')) { $calendarObjectsPropsTable->dropIndex('calendarobject_index'); } diff --git a/apps/dav/lib/Migration/Version1008Date20181030113700.php b/apps/dav/lib/Migration/Version1008Date20181030113700.php index a63485d3153d6..d8a42f09219a4 100644 --- a/apps/dav/lib/Migration/Version1008Date20181030113700.php +++ b/apps/dav/lib/Migration/Version1008Date20181030113700.php @@ -6,10 +6,10 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; - use OCP\DB\ISchemaWrapper; use OCP\DB\Types; use OCP\Migration\IOutput; diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php index b899e4c65414d..772679971724f 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105104826.php +++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1008Date20181105104833.php b/apps/dav/lib/Migration/Version1008Date20181105104833.php index c81e2b45012b3..f9c145b52c5e0 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105104833.php +++ b/apps/dav/lib/Migration/Version1008Date20181105104833.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1008Date20181105110300.php b/apps/dav/lib/Migration/Version1008Date20181105110300.php index 093094baa8efb..45a2ab82f1609 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105110300.php +++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1008Date20181105112049.php b/apps/dav/lib/Migration/Version1008Date20181105112049.php index e67deb09ce43e..554921e2aa001 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105112049.php +++ b/apps/dav/lib/Migration/Version1008Date20181105112049.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1008Date20181114084440.php b/apps/dav/lib/Migration/Version1008Date20181114084440.php index cd6aafc4b40d4..49d178a36c3ce 100644 --- a/apps/dav/lib/Migration/Version1008Date20181114084440.php +++ b/apps/dav/lib/Migration/Version1008Date20181114084440.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; @@ -15,7 +16,6 @@ class Version1008Date20181114084440 extends SimpleMigrationStep { - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/apps/dav/lib/Migration/Version1011Date20190725113607.php b/apps/dav/lib/Migration/Version1011Date20190725113607.php index 5420c7ebf9d44..384d93b3fd2a5 100644 --- a/apps/dav/lib/Migration/Version1011Date20190725113607.php +++ b/apps/dav/lib/Migration/Version1011Date20190725113607.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1011Date20190806104428.php b/apps/dav/lib/Migration/Version1011Date20190806104428.php index f1503f7940c2c..484494ee9f73f 100644 --- a/apps/dav/lib/Migration/Version1011Date20190806104428.php +++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1012Date20190808122342.php b/apps/dav/lib/Migration/Version1012Date20190808122342.php index 47f64bb976754..73a1560267a13 100644 --- a/apps/dav/lib/Migration/Version1012Date20190808122342.php +++ b/apps/dav/lib/Migration/Version1012Date20190808122342.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/dav/lib/Migration/Version1016Date20201109085907.php b/apps/dav/lib/Migration/Version1016Date20201109085907.php index d27b03b0bf777..0a490f243cf78 100644 --- a/apps/dav/lib/Migration/Version1016Date20201109085907.php +++ b/apps/dav/lib/Migration/Version1016Date20201109085907.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1017Date20210216083742.php b/apps/dav/lib/Migration/Version1017Date20210216083742.php index 2bff85746bc4b..1602d9ca61946 100644 --- a/apps/dav/lib/Migration/Version1017Date20210216083742.php +++ b/apps/dav/lib/Migration/Version1017Date20210216083742.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1018Date20210312100735.php b/apps/dav/lib/Migration/Version1018Date20210312100735.php index 697952bf984ce..aceddc924ae98 100644 --- a/apps/dav/lib/Migration/Version1018Date20210312100735.php +++ b/apps/dav/lib/Migration/Version1018Date20210312100735.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Migration/Version1024Date20211221144219.php b/apps/dav/lib/Migration/Version1024Date20211221144219.php index 6715c6b25aee2..9cf01cc686253 100644 --- a/apps/dav/lib/Migration/Version1024Date20211221144219.php +++ b/apps/dav/lib/Migration/Version1024Date20211221144219.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Migration; use Closure; diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php index f67724e011b6a..ca0739016dea9 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Provisioning\Apple; use OCP\AppFramework\Utility\ITimeFactory; @@ -34,7 +35,6 @@ public function getName() { return self::FILENAME; } - #[\Override] public function setName($name) { throw new Forbidden('Renaming ' . self::FILENAME . ' is forbidden'); diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 8c99ba437d78f..586b5a99fa333 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Provisioning\Apple; use OCP\AppFramework\Http; diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php index 08e945f47ad37..ce9ad59e81950 100644 --- a/apps/dav/lib/RootCollection.php +++ b/apps/dav/lib/RootCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV; use OC\KnownUser\KnownUserService; diff --git a/apps/dav/lib/Search/ACalendarSearchProvider.php b/apps/dav/lib/Search/ACalendarSearchProvider.php index 331d05cb50093..489b07aad57be 100644 --- a/apps/dav/lib/Search/ACalendarSearchProvider.php +++ b/apps/dav/lib/Search/ACalendarSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Search; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Search/ContactsSearchProvider.php b/apps/dav/lib/Search/ContactsSearchProvider.php index 0e75611f9369a..f179d83ea89b4 100644 --- a/apps/dav/lib/Search/ContactsSearchProvider.php +++ b/apps/dav/lib/Search/ContactsSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Search; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/lib/Search/EventsSearchProvider.php b/apps/dav/lib/Search/EventsSearchProvider.php index efe12bc54e2ab..92c32f3de8cb4 100644 --- a/apps/dav/lib/Search/EventsSearchProvider.php +++ b/apps/dav/lib/Search/EventsSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Search; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Search/TasksSearchProvider.php b/apps/dav/lib/Search/TasksSearchProvider.php index fcdaf385df3cb..622e564d1364e 100644 --- a/apps/dav/lib/Search/TasksSearchProvider.php +++ b/apps/dav/lib/Search/TasksSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Search; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 86768176536e0..ea4350bc1529d 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV; use OC\Files\Filesystem; diff --git a/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php b/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php index abc69ad29fb57..9b96314238bae 100644 --- a/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php +++ b/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Settings\Admin; use OCP\IL10N; diff --git a/apps/dav/lib/Settings/CalDAVSettings.php b/apps/dav/lib/Settings/CalDAVSettings.php index 9bf9154a5694f..a8d8c2f830fce 100644 --- a/apps/dav/lib/Settings/CalDAVSettings.php +++ b/apps/dav/lib/Settings/CalDAVSettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Settings; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/Settings/ExampleContentSettings.php b/apps/dav/lib/Settings/ExampleContentSettings.php index 79f29aeb7a0d9..057a07fb6516b 100644 --- a/apps/dav/lib/Settings/ExampleContentSettings.php +++ b/apps/dav/lib/Settings/ExampleContentSettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Settings; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/lib/Storage/PublicOwnerWrapper.php b/apps/dav/lib/Storage/PublicOwnerWrapper.php index 23c7aca944c1d..cd4f52fb54bb3 100644 --- a/apps/dav/lib/Storage/PublicOwnerWrapper.php +++ b/apps/dav/lib/Storage/PublicOwnerWrapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Storage; use OC\Files\Storage\Wrapper\Wrapper; diff --git a/apps/dav/lib/Storage/PublicShareWrapper.php b/apps/dav/lib/Storage/PublicShareWrapper.php index 61bb7d0d1acf2..cfa828b842d3c 100644 --- a/apps/dav/lib/Storage/PublicShareWrapper.php +++ b/apps/dav/lib/Storage/PublicShareWrapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Storage; use OC\Files\Storage\Wrapper\Wrapper; diff --git a/apps/dav/lib/SystemTag/SystemTagList.php b/apps/dav/lib/SystemTag/SystemTagList.php index 5013f992f20fa..029728fe3e097 100644 --- a/apps/dav/lib/SystemTag/SystemTagList.php +++ b/apps/dav/lib/SystemTag/SystemTagList.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IUser; diff --git a/apps/dav/lib/SystemTag/SystemTagMappingNode.php b/apps/dav/lib/SystemTag/SystemTagMappingNode.php index bb01f92171ad0..649134082eb75 100644 --- a/apps/dav/lib/SystemTag/SystemTagMappingNode.php +++ b/apps/dav/lib/SystemTag/SystemTagMappingNode.php @@ -5,12 +5,12 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IUser; use OCP\SystemTag\ISystemTag; use OCP\SystemTag\ISystemTagManager; - use OCP\SystemTag\ISystemTagObjectMapper; use OCP\SystemTag\TagNotFoundException; use Sabre\DAV\Exception\Forbidden; diff --git a/apps/dav/lib/SystemTag/SystemTagNode.php b/apps/dav/lib/SystemTag/SystemTagNode.php index 3416442d2202d..fe551335e3a3b 100644 --- a/apps/dav/lib/SystemTag/SystemTagNode.php +++ b/apps/dav/lib/SystemTag/SystemTagNode.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IUser; diff --git a/apps/dav/lib/SystemTag/SystemTagObjectType.php b/apps/dav/lib/SystemTag/SystemTagObjectType.php index f36e3cb446097..37a6ff3ef1903 100644 --- a/apps/dav/lib/SystemTag/SystemTagObjectType.php +++ b/apps/dav/lib/SystemTag/SystemTagObjectType.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\SystemTag\ISystemTag; diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php index d9652436adc51..db506e9b720cf 100644 --- a/apps/dav/lib/SystemTag/SystemTagPlugin.php +++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php index b49ee269b6d90..991d174e4bd7b 100644 --- a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IGroupManager; diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectList.php b/apps/dav/lib/SystemTag/SystemTagsObjectList.php index c3f9e86f832d0..6292702c95ee9 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectList.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectList.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\SystemTag; use Sabre\Xml\Reader; diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index 0c047c5d7c793..a8047ee296b80 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IUser; diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php index 37c00f46eef63..f7ef08a42d612 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\IGroupManager; diff --git a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php index 1d794a143ab58..757d65ac229cc 100644 --- a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\SystemTag; use OCP\Constants; diff --git a/apps/dav/lib/Traits/PrincipalProxyTrait.php b/apps/dav/lib/Traits/PrincipalProxyTrait.php index feec485fe5c3f..bbcd77737ea9f 100644 --- a/apps/dav/lib/Traits/PrincipalProxyTrait.php +++ b/apps/dav/lib/Traits/PrincipalProxyTrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Traits; use OCA\DAV\CalDAV\Proxy\Proxy; diff --git a/apps/dav/lib/Upload/AssemblyStream.php b/apps/dav/lib/Upload/AssemblyStream.php index bf6ee16bc9d28..3761e777b49db 100644 --- a/apps/dav/lib/Upload/AssemblyStream.php +++ b/apps/dav/lib/Upload/AssemblyStream.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use Sabre\DAV\IFile; @@ -237,7 +238,6 @@ public function stream_close() { return true; } - /** * Load the source from the stream context and return the context options * diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php index d23b2374b76ab..0f71f3437f0fb 100644 --- a/apps/dav/lib/Upload/ChunkingPlugin.php +++ b/apps/dav/lib/Upload/ChunkingPlugin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/lib/Upload/ChunkingV2Plugin.php b/apps/dav/lib/Upload/ChunkingV2Plugin.php index a0b059abfb853..117bdb835d265 100644 --- a/apps/dav/lib/Upload/ChunkingV2Plugin.php +++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php @@ -202,7 +202,6 @@ public function beforeMove($sourcePath, $destination): bool { $destinationParent = $this->server->tree->getNodeForPath($destinationDir); $destinationExists = $destinationParent->childExists($destinationName); - // allow sync clients to send the modification and creation time along in a header $updateFileInfo = []; if ($this->server->httpRequest->getHeader('X-OC-MTime') !== null) { diff --git a/apps/dav/lib/Upload/CleanupService.php b/apps/dav/lib/Upload/CleanupService.php index ffa6bad533c04..51373bb5a52cf 100644 --- a/apps/dav/lib/Upload/CleanupService.php +++ b/apps/dav/lib/Upload/CleanupService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Upload; use OCA\DAV\BackgroundJob\UploadCleanup; diff --git a/apps/dav/lib/Upload/FutureFile.php b/apps/dav/lib/Upload/FutureFile.php index c8375db248897..034b757d8f64b 100644 --- a/apps/dav/lib/Upload/FutureFile.php +++ b/apps/dav/lib/Upload/FutureFile.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/lib/Upload/PartFile.php b/apps/dav/lib/Upload/PartFile.php index 1c8d4aabf55cc..4a0ea48b25e52 100644 --- a/apps/dav/lib/Upload/PartFile.php +++ b/apps/dav/lib/Upload/PartFile.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/lib/Upload/RootCollection.php b/apps/dav/lib/Upload/RootCollection.php index 9f722dc98a7e8..9292d40927628 100644 --- a/apps/dav/lib/Upload/RootCollection.php +++ b/apps/dav/lib/Upload/RootCollection.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OCP\Files\IRootFolder; diff --git a/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php b/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php index b217430d4daa2..83b54c41a9b15 100644 --- a/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php +++ b/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Upload; use Sabre\DAV\Exception\NotFound; diff --git a/apps/dav/lib/Upload/UploadFile.php b/apps/dav/lib/Upload/UploadFile.php index 9d2f3654abfde..0605f7f025d2c 100644 --- a/apps/dav/lib/Upload/UploadFile.php +++ b/apps/dav/lib/Upload/UploadFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Upload; use OCA\DAV\Connector\Sabre\File; diff --git a/apps/dav/lib/Upload/UploadFolder.php b/apps/dav/lib/Upload/UploadFolder.php index 44c790d186c79..74512640a8f64 100644 --- a/apps/dav/lib/Upload/UploadFolder.php +++ b/apps/dav/lib/Upload/UploadFolder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OC\Files\ObjectStore\ObjectStoreStorage; diff --git a/apps/dav/lib/Upload/UploadHome.php b/apps/dav/lib/Upload/UploadHome.php index 4fbba0ad91b92..eb60430e6c69f 100644 --- a/apps/dav/lib/Upload/UploadHome.php +++ b/apps/dav/lib/Upload/UploadHome.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Upload; use OC\Files\View; diff --git a/apps/dav/tests/unit/AppInfo/ApplicationTest.php b/apps/dav/tests/unit/AppInfo/ApplicationTest.php index 59e7a74640ded..14bf89fb93bdd 100644 --- a/apps/dav/tests/unit/AppInfo/ApplicationTest.php +++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\AppInfo; use OCA\DAV\AppInfo\Application; diff --git a/apps/dav/tests/unit/AppInfo/PluginManagerTest.php b/apps/dav/tests/unit/AppInfo/PluginManagerTest.php index 0082aa4528633..23cc408edb26e 100644 --- a/apps/dav/tests/unit/AppInfo/PluginManagerTest.php +++ b/apps/dav/tests/unit/AppInfo/PluginManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\AppInfo; use OC\App\AppManager; diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index 5b613091ed4ff..87183592a7d3f 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Avatars; use OCA\DAV\Avatars\AvatarHome; diff --git a/apps/dav/tests/unit/Avatars/AvatarNodeTest.php b/apps/dav/tests/unit/Avatars/AvatarNodeTest.php index 0ca147a1f3ba3..86f5c8d860007 100644 --- a/apps/dav/tests/unit/Avatars/AvatarNodeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarNodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Avatars; use OCA\DAV\Avatars\AvatarNode; diff --git a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php index 61f39e0a8d9b2..e396732a68c86 100644 --- a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\CleanupInvitationTokenJob; diff --git a/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php b/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php index 6cb4f220e07ee..5030f4d01c01d 100644 --- a/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\EventReminderJob; diff --git a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php index 88a76ae133274..c37f5c1fc2b51 100644 --- a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob; diff --git a/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php b/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php index 32b24377d06a1..4232c84e785fe 100644 --- a/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use InvalidArgumentException; diff --git a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php index 14cc1bce72c56..f715dc60504b0 100644 --- a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\RefreshWebcalJob; @@ -15,7 +16,6 @@ use OCP\IConfig; use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; - use Test\TestCase; class RefreshWebcalJobTest extends TestCase { diff --git a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php index 6c9214d026851..29103c317e25f 100644 --- a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob; diff --git a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php index 38a981787cdc3..d9173d3a49a5c 100644 --- a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php +++ b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php @@ -6,10 +6,10 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\BackgroundJob; use OCA\DAV\BackgroundJob\UpdateCalendarResourcesRoomsBackgroundJob; - use OCP\AppFramework\Utility\ITimeFactory; use OCP\Calendar\Resource\IManager as IResourceManager; use OCP\Calendar\Room\IManager as IRoomManager; diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php index f8d29fdd418d4..dc59eb82205e9 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CalDAV; use OC\KnownUser\KnownUserService; @@ -45,7 +46,6 @@ #[\PHPUnit\Framework\Attributes\Group(name: 'DB')] abstract class AbstractCalDavBackend extends TestCase { - protected CalDavBackend $backend; protected Principal&MockObject $principal; protected IUserManager&MockObject $userManager; diff --git a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php index 037aa19f9171a..020546c7a1f41 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity; use OCA\DAV\CalDAV\Activity\Backend; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php index 10f089fd9893d..b4dfe802246da 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/CalendarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Filter; use OCA\DAV\CalDAV\Activity\Filter\Calendar; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/GenericTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/GenericTest.php index ea47c64048c66..501d8391fabde 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/GenericTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/GenericTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Filter; use OCA\DAV\CalDAV\Activity\Filter\Calendar; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php index 7236e7c11b14e..858a0a6620eba 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Filter/TodoTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Filter; use OCA\DAV\CalDAV\Activity\Filter\Todo; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php index 0abe0915ac0fc..6bd72bf6dc75a 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Provider; use OCA\DAV\CalDAV\Activity\Provider\Base; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php index f0e75e0a17058..287bbf6f96573 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Provider; use InvalidArgumentException; diff --git a/apps/dav/tests/unit/CalDAV/Activity/Setting/GenericTest.php b/apps/dav/tests/unit/CalDAV/Activity/Setting/GenericTest.php index 14d44a3352828..a0a8b825cc1b7 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Setting/GenericTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Setting/GenericTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Activity\Setting; use OCA\DAV\CalDAV\Activity\Setting\Calendar; diff --git a/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php b/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php index 84879e8723856..457081fb4184b 100644 --- a/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\AppCalendar; use OCA\DAV\CalDAV\AppCalendar\AppCalendar; @@ -13,7 +14,6 @@ use OCP\Constants; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; - use function rewind; class AppCalendarTest extends TestCase { diff --git a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php index 3d72d5c97b813..36ff7280e53b4 100644 --- a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php +++ b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\AppCalendar; use OCA\DAV\CalDAV\AppCalendar\AppCalendar; diff --git a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php index a5811271ce270..2921eeba0e4aa 100644 --- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php +++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\BirthdayCalendar; use OCA\DAV\CalDAV\BirthdayCalendar\EnablePlugin; @@ -163,7 +164,6 @@ public function testHttpPostNotAuthorized(): void { $this->birthdayService->expects($this->never()) ->method('syncUser'); - $result = $this->plugin->httpPost($this->request, $this->response); $this->assertEquals(false, $result); diff --git a/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php b/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php index 03a2c9f20ee4d..70310e4e52821 100644 --- a/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php +++ b/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\CachedSubscriptionObject; @@ -34,7 +35,6 @@ public function testGet(): void { $this->assertEquals('BEGIN...', $calendarObject->get()); } - public function testPut(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); $this->expectExceptionMessage('Creating objects in a cached subscription is not allowed'); @@ -54,7 +54,6 @@ public function testPut(): void { $calendarObject->put(''); } - public function testDelete(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); $this->expectExceptionMessage('Deleting objects in a cached subscription is not allowed'); diff --git a/apps/dav/tests/unit/CalDAV/CachedSubscriptionTest.php b/apps/dav/tests/unit/CalDAV/CachedSubscriptionTest.php index ba0da42229081..18fe0521436a3 100644 --- a/apps/dav/tests/unit/CalDAV/CachedSubscriptionTest.php +++ b/apps/dav/tests/unit/CalDAV/CachedSubscriptionTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\CachedSubscription; @@ -128,7 +129,6 @@ public function testPropPatch(): void { $calendar->propPatch($propPatch); } - public function testGetChild(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); $this->expectExceptionMessage('Calendar object not found'); @@ -227,7 +227,6 @@ public function testGetMultipleChildren(): void { $this->assertInstanceOf(CachedSubscriptionObject::class, $res[1]); } - public function testCreateFile(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); $this->expectExceptionMessage('Creating objects in cached subscription is not allowed'); diff --git a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php index 985fc3d67a5cf..e0f507fbe358d 100644 --- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php @@ -107,7 +107,6 @@ public static function providesSharingData(): array { ], [ self::UNIT_TEST_USER1, ]], - ]; } @@ -264,7 +263,6 @@ public function testCalendarObjectsOperations(): void { $this->assertCount(0, $calendarObjects); } - public function testMultipleCalendarObjectsWithSameUID(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('Calendar object with uid already exists in this calendar collection.'); @@ -446,7 +444,6 @@ public function testGetCalendarObjectByUID(): void { END:VCALENDAR EOD; - $this->backend->createCalendarObject($calendarId, $uri, $calData); $co = $this->backend->getCalendarObjectByUID(self::UNIT_TEST_USER, '47d15e3ec8'); @@ -777,7 +774,6 @@ public function testCalendarSearch(): void { ]); $this->assertEquals(count($search1), 1); - // update the card $calData = <<<'EOD' BEGIN:VCALENDAR diff --git a/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php b/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php index e515e6fbea05a..25150ddcca1c1 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\AppInfo\PluginManager; diff --git a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php index 5df78b02d8f87..03978ad6cfc86 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\Auth\CustomPrincipalPlugin; @@ -60,7 +61,6 @@ protected function setUp(): void { ]); } - public function testGetKey(): void { $this->assertEquals($this->calendarImpl->getKey(), '123'); } diff --git a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php index e8159ffe07c90..4224fbd104f32 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OC\Calendar\Manager; diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index fedc339d9108b..2509996dd171e 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\BirthdayService; @@ -55,7 +56,6 @@ public function testDelete(): void { $c->delete(); } - public function testDeleteFromGroup(): void { /** @var CalDavBackend&MockObject $backend */ $backend = $this->createMock(CalDavBackend::class); @@ -537,8 +537,6 @@ public function testRemoveVAlarms(): void { EOD; - - $publicObject = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC, 'calendardata' => $publicObjectData]; @@ -564,10 +562,8 @@ public function testRemoveVAlarms(): void { switch ($uri) { case 'event-0': return $publicObject; - case 'event-1': return $confidentialObject; - default: throw new \Exception('unexpected uri'); } diff --git a/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php b/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php index 90b6f9ec0db21..37bab8c5fe083 100644 --- a/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php @@ -184,5 +184,4 @@ public function testSequenceNumberIncrementDetectedForFirstModificationToEventWi $this->assertEquals([$vEventNew], $result['new']); } - } diff --git a/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php b/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php index 838dfc18f2fdf..0fd9dce9ca23f 100644 --- a/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Export; use Generator; diff --git a/apps/dav/tests/unit/CalDAV/Import/ImportServiceTest.php b/apps/dav/tests/unit/CalDAV/Import/ImportServiceTest.php index 0cfafae22bcdd..27db3ff9d8452 100644 --- a/apps/dav/tests/unit/CalDAV/Import/ImportServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Import/ImportServiceTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Import; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php b/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php index ed95db848229e..3862560b93055 100644 --- a/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Integration; use OCA\DAV\CalDAV\Integration\ExternalCalendar; diff --git a/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php b/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php index 3ba0b8325936a..5cd473d816ae0 100644 --- a/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php +++ b/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Listeners; use OCA\DAV\CalDAV\Activity\Backend; diff --git a/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php b/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php index d5697a862db5c..e78d371dfc6a4 100644 --- a/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php +++ b/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Listeners; use OCA\DAV\CalDAV\Activity\Backend; diff --git a/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php b/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php index cbfdfd6b9b758..4885bb274535e 100644 --- a/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php +++ b/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Listeners; use OCA\DAV\BackgroundJob\RefreshWebcalJob; diff --git a/apps/dav/tests/unit/CalDAV/OutboxTest.php b/apps/dav/tests/unit/CalDAV/OutboxTest.php index cc0a3f0405f0b..e8f9770a97cc9 100644 --- a/apps/dav/tests/unit/CalDAV/OutboxTest.php +++ b/apps/dav/tests/unit/CalDAV/OutboxTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\Outbox; diff --git a/apps/dav/tests/unit/CalDAV/PluginTest.php b/apps/dav/tests/unit/CalDAV/PluginTest.php index a9e868c688f4a..00c80e178585b 100644 --- a/apps/dav/tests/unit/CalDAV/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/PluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\Plugin; diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index 7d1f9eaf8018c..71d5b1233e3e1 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php index 34ad5ab970294..bb4552cc8cfd5 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php index 5344ec5d7cd50..e1979325c5574 100644 --- a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php +++ b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Publishing; use OCA\DAV\CalDAV\Publishing\Xml\Publisher; @@ -44,7 +45,6 @@ public function testSerializeNotPublished(): void { urltopublish', $xml); } - protected array $elementMap = []; protected array $namespaceMap = ['DAV:' => 'd']; protected string $contextUri = '/'; diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php index ec2ae37a929ec..8c8059e8fea52 100644 --- a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php +++ b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Publishing; use OCA\DAV\CalDAV\Calendar; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php b/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php index 29d4e11ea342c..f29b88c5085da 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder; use OCA\DAV\CalDAV\Reminder\Backend as ReminderBackend; @@ -40,7 +41,6 @@ protected function tearDown(): void { parent::tearDown(); } - public function testCleanRemindersForEvent(): void { $query = self::$realDatabase->getQueryBuilder(); $rows = $query->select('*') @@ -252,7 +252,6 @@ public function testUpdateReminder(): void { $this->assertEquals((int)$row['notification_date'], 123700); } - private function createRemindersTestSet(): void { $query = self::$realDatabase->getQueryBuilder(); $query->insert('calendars') diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTestCase.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTestCase.php index 70b374298ea62..9fa2e265ca413 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTestCase.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AbstractNotificationProviderTestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\NotificationProvider\AbstractProvider; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php index d03205eaeb974..1cee7c67fc8ce 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\NotificationProvider\AudioProvider; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php index d9978a76fd839..f0fb9e25c985c 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\NotificationProvider\EmailProvider; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php index 5034af49cae6c..498dc3ccfeb9a 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/PushProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\NotificationProvider\PushProvider; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php index 4b50185b61989..7726e4ee5ce6d 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder; use OCA\DAV\CalDAV\Reminder\NotificationProvider\EmailProvider; diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php index 078f892121a14..7558d304cbc64 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder; use OCA\DAV\AppInfo\Application; @@ -78,7 +79,6 @@ public function testGetName():void { $this->assertEquals($this->notifier->getName(), 'Calendar'); } - public function testPrepareWrongApp(): void { $this->expectException(UnknownNotificationException::class); $this->expectExceptionMessage('Notification not from this app'); @@ -95,7 +95,6 @@ public function testPrepareWrongApp(): void { $this->notifier->prepare($notification, 'en'); } - public function testPrepareWrongSubject(): void { $this->expectException(UnknownNotificationException::class); $this->expectExceptionMessage('Unknown subject'); diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php index c18901c5f58ac..bb5fa5ec538be 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Reminder; use DateTime; @@ -752,7 +753,6 @@ public function testProcessReminders():void { $this->assertEquals($expected, func_get_args()); }); - $insertReminderCalls = [ [1337, 42, 'wej2z68l9h', true, 1467849600, false, 'fbdb2726bc0f7dfacac1d881c1453e20', 'ecacbf07d413c3c78d1ac7ad8c469602', 'EMAIL', true, 1467848700, false], [1337, 42, 'wej2z68l9h', true, 1467849600, false, 'fbdb2726bc0f7dfacac1d881c1453e20', 'ecacbf07d413c3c78d1ac7ad8c469602', 'EMAIL', true, 1467848820, true], diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php index 80a5a90ad2309..d13443c8c66e8 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\Proxy\Proxy; diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php index 168e21c3a918a..1e3068cdfc4f1 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\ResourcePrincipalBackend; diff --git a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php index 8a53b0ee25e4f..845ff74dc1016 100644 --- a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\ResourceBooking; use OCA\DAV\CalDAV\ResourceBooking\RoomPrincipalBackend; diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 1f11e8bd7fd03..048dcd13b67e3 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CalDAV\Schedule; use OCA\DAV\CalDAV\EventComparisonService; diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php index c1fab03b5172d..ac3aa17873745 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php @@ -39,7 +39,6 @@ class IMipServiceTest extends TestCase { private IMipService $service; private IUserManager&MockObject $userManager; - private VCalendar $vCalendar1a; private VCalendar $vCalendar1b; private VCalendar $vCalendar2; diff --git a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php index bb0b3070f9ead..6f765ab21c817 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Schedule; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/CalDAV/Search/Request/CalendarSearchReportTest.php b/apps/dav/tests/unit/CalDAV/Search/Request/CalendarSearchReportTest.php index 02ae504bce0e6..1e9fbb848089e 100644 --- a/apps/dav/tests/unit/CalDAV/Search/Request/CalendarSearchReportTest.php +++ b/apps/dav/tests/unit/CalDAV/Search/Request/CalendarSearchReportTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Search\Xml\Request; use OCA\DAV\CalDAV\Search\Xml\Request\CalendarSearchReport; @@ -114,7 +115,6 @@ public function testNoLimitOffset(): void { ); } - public function testRequiresCompFilter(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('{http://nextcloud.com/ns}prop-filter or {http://nextcloud.com/ns}param-filter given without any {http://nextcloud.com/ns}comp-filter'); @@ -141,7 +141,6 @@ public function testRequiresCompFilter(): void { $this->parse($xml); } - public function testRequiresFilter(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('The {http://nextcloud.com/ns}filter element is required for this request'); @@ -159,7 +158,6 @@ public function testRequiresFilter(): void { $this->parse($xml); } - public function testNoSearchTerm(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('{http://nextcloud.com/ns}search-term is required for this request'); @@ -187,7 +185,6 @@ public function testNoSearchTerm(): void { $this->parse($xml); } - public function testCompOnly(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('At least one{http://nextcloud.com/ns}prop-filter or {http://nextcloud.com/ns}param-filter is required for this request'); diff --git a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php index e576fbae34cfc..cfdabd99aad56 100644 --- a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Search; use OCA\DAV\CalDAV\CalendarHome; diff --git a/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php b/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php index ee0ef2334ecce..0dec2b887ebb6 100644 --- a/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\Status; use OC\Calendar\CalendarQuery; @@ -254,7 +255,6 @@ public function testCalendarNoEventObjects(): void { $this->userStatusService->expects(self::never()) ->method('setUserStatus'); - $this->service->processCalendarStatus('admin'); } @@ -298,7 +298,6 @@ public function testCalendarEvent(): void { $this->userStatusService->expects(self::once()) ->method('setUserStatus'); - $this->service->processCalendarStatus('admin'); } @@ -345,7 +344,6 @@ public function testCallStatus(): void { $this->userStatusService->expects(self::never()) ->method('setUserStatus'); - $this->service->processCalendarStatus('admin'); } @@ -392,7 +390,6 @@ public function testInvisibleStatus(): void { $this->userStatusService->expects(self::never()) ->method('setUserStatus'); - $this->service->processCalendarStatus('admin'); } @@ -439,7 +436,6 @@ public function testDNDStatus(): void { $this->userStatusService->expects(self::never()) ->method('setUserStatus'); - $this->service->processCalendarStatus('admin'); } } diff --git a/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php b/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php index 2d6d0e8635842..41c9ff55bd0bf 100644 --- a/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php +++ b/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use DateTimeZone; diff --git a/apps/dav/tests/unit/CalDAV/TipBrokerTest.php b/apps/dav/tests/unit/CalDAV/TipBrokerTest.php index 9d4c27c9bfbc0..0af957823787b 100644 --- a/apps/dav/tests/unit/CalDAV/TipBrokerTest.php +++ b/apps/dav/tests/unit/CalDAV/TipBrokerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\TipBroker; @@ -227,7 +228,6 @@ public function testParseEventForOrganizerRemoveAttendee(): void { $this->assertEquals('mailto:attendee2@example.org', $messages[1]->recipient); } - /** * Tests user converts existing singleton or recurring (base) event from attended to attendeless */ diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php index 1a0eade56f7c8..271fbece99ec2 100644 --- a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php +++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\WebcalCaching; use OCA\DAV\CalDAV\WebcalCaching\Connection; @@ -15,7 +16,6 @@ use OCP\IAppConfig; use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; - use Test\TestCase; class ConnectionTest extends TestCase { diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php index 804af021d5a33..4cd3de9dd3e5a 100644 --- a/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\WebcalCaching; use OCA\DAV\CalDAV\WebcalCaching\Plugin; diff --git a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php index 06f04019d8e1d..b4792ca25678d 100644 --- a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CalDAV\WebcalCaching; use OCA\DAV\CalDAV\CalDavBackend; @@ -17,7 +18,6 @@ use Sabre\DAV\Exception\BadRequest; use Sabre\VObject; use Sabre\VObject\Recur\NoInstancesException; - use Test\TestCase; class RefreshWebcalServiceTest extends TestCase { diff --git a/apps/dav/tests/unit/CapabilitiesTest.php b/apps/dav/tests/unit/CapabilitiesTest.php index cfbcb2155fd9d..1c8edd250ca14 100644 --- a/apps/dav/tests/unit/CapabilitiesTest.php +++ b/apps/dav/tests/unit/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit; use OCA\DAV\Capabilities; diff --git a/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php b/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php index b5b5e9799ec7d..389d5a01c6d9a 100644 --- a/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php +++ b/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\CardDAV\Activity; use OCA\DAV\CardDAV\Activity\Backend; diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index 1c346bf984658..c5b95e006af13 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CardDAV\AddressBook; diff --git a/apps/dav/tests/unit/CardDAV/AddressBookTest.php b/apps/dav/tests/unit/CardDAV/AddressBookTest.php index e89232297d349..4ca1a8a63ba2e 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CardDAV\AddressBook; @@ -60,7 +61,6 @@ public function testDelete(): void { $addressBook->delete(); } - public function testDeleteFromGroup(): void { $this->expectException(Forbidden::class); @@ -83,7 +83,6 @@ public function testDeleteFromGroup(): void { $addressBook->delete(); } - public function testPropPatchShared(): void { /** @var MockObject | CardDavBackend $backend */ $backend = $this->createMock(CardDavBackend::class); diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index 14a21dd7a770c..51e6f18296c10 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index 195eb75545770..5fb84bd0e3d14 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OC\KnownUser\KnownUserService; @@ -649,7 +650,6 @@ public function testGetCardId(): void { $this->invokePrivate($this->backend, 'getCardId', [1, 'uri'])); } - public function testGetCardIdFailed(): void { $this->expectException(\InvalidArgumentException::class); @@ -802,7 +802,6 @@ public function testGetCardUri(): void { $this->assertSame('uri', $this->backend->getCardUri($id)); } - public function testGetCardUriFailed(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php index 90caeed666880..00cb16aada4a6 100644 --- a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php +++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php index 96cf8993de646..ddbb6ffc6bee9 100644 --- a/apps/dav/tests/unit/CardDAV/ConverterTest.php +++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CardDAV\Converter; diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index d996845a61ef7..d1e9082f710e4 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\CardDAV; use OCA\DAV\CardDAV\AddressBook; diff --git a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php index e76d5d929f83b..13e05c6156b45 100644 --- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php @@ -125,7 +125,6 @@ public function testSyncWithNewElement(): void { $this->backend->method('getCard') ->willReturn(false); - $body = ' @@ -196,7 +195,6 @@ public function testSyncWithUpdatedElement(): void { $this->backend->method('getCard') ->willReturn(true); - $body = ' diff --git a/apps/dav/tests/unit/Command/ListAddressbooksTest.php b/apps/dav/tests/unit/Command/ListAddressbooksTest.php index d78e020aa03d2..49674dae46a6b 100644 --- a/apps/dav/tests/unit/Command/ListAddressbooksTest.php +++ b/apps/dav/tests/unit/Command/ListAddressbooksTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Command; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/tests/unit/Command/ListCalendarsTest.php b/apps/dav/tests/unit/Command/ListCalendarsTest.php index fde5e8b4103ca..6255e84ef976d 100644 --- a/apps/dav/tests/unit/Command/ListCalendarsTest.php +++ b/apps/dav/tests/unit/Command/ListCalendarsTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Command; use OCA\DAV\CalDAV\BirthdayService; diff --git a/apps/dav/tests/unit/Command/MoveCalendarTest.php b/apps/dav/tests/unit/Command/MoveCalendarTest.php index 391624ae1cae7..800718b8e114e 100644 --- a/apps/dav/tests/unit/Command/MoveCalendarTest.php +++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Command; use InvalidArgumentException; @@ -83,7 +84,6 @@ public function testWithBadUserOrigin(bool $userOriginExists, bool $userDestinat ]); } - public function testMoveWithInexistantCalendar(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('User has no calendar named . You can run occ dav:list-calendars to list calendars URIs for this user.'); @@ -107,7 +107,6 @@ public function testMoveWithInexistantCalendar(): void { ]); } - public function testMoveWithExistingDestinationCalendar(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('User already has a calendar named .'); diff --git a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php index 57462535438bb..d685553e58bcd 100644 --- a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php +++ b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Command; use OCA\DAV\Command\RemoveInvalidShares; diff --git a/apps/dav/tests/unit/Comments/CommentsNodeTest.php b/apps/dav/tests/unit/Comments/CommentsNodeTest.php index a1bbfe816f61e..240c621268a08 100644 --- a/apps/dav/tests/unit/Comments/CommentsNodeTest.php +++ b/apps/dav/tests/unit/Comments/CommentsNodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Comments; use OCA\DAV\Comments\CommentNode; @@ -74,7 +75,6 @@ public function testDelete(): void { $this->node->delete(); } - public function testDeleteForbidden(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -113,7 +113,6 @@ public function testGetName(): void { $this->assertSame($this->node->getName(), $id); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); @@ -155,7 +154,6 @@ public function testUpdateComment(): void { $this->assertTrue($this->node->updateComment($msg)); } - public function testUpdateCommentLogException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('buh!'); @@ -193,7 +191,6 @@ public function testUpdateCommentLogException(): void { $this->node->updateComment($msg); } - public function testUpdateCommentMessageTooLongException(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('Message exceeds allowed character limit of'); @@ -229,7 +226,6 @@ public function testUpdateCommentMessageTooLongException(): void { $this->node->updateComment('foo'); } - public function testUpdateForbiddenByUser(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -261,7 +257,6 @@ public function testUpdateForbiddenByUser(): void { $this->node->updateComment($msg); } - public function testUpdateForbiddenByType(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -288,7 +283,6 @@ public function testUpdateForbiddenByType(): void { $this->node->updateComment($msg); } - public function testUpdateForbiddenByNotLoggedIn(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); diff --git a/apps/dav/tests/unit/Comments/CommentsPluginTest.php b/apps/dav/tests/unit/Comments/CommentsPluginTest.php index 18d32772f7bcc..4849404467d57 100644 --- a/apps/dav/tests/unit/Comments/CommentsPluginTest.php +++ b/apps/dav/tests/unit/Comments/CommentsPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Comments; use OC\Comments\Comment; @@ -137,7 +138,6 @@ public function testCreateComment(): void { $this->plugin->httpPost($request, $response); } - public function testCreateCommentInvalidObject(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -219,7 +219,6 @@ public function testCreateCommentInvalidObject(): void { $this->plugin->httpPost($request, $response); } - public function testCreateCommentInvalidActor(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); @@ -307,7 +306,6 @@ public function testCreateCommentInvalidActor(): void { $this->plugin->httpPost($request, $response); } - public function testCreateCommentUnsupportedMediaType(): void { $this->expectException(\Sabre\DAV\Exception\UnsupportedMediaType::class); @@ -395,7 +393,6 @@ public function testCreateCommentUnsupportedMediaType(): void { $this->plugin->httpPost($request, $response); } - public function testCreateCommentInvalidPayload(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); @@ -489,7 +486,6 @@ public function testCreateCommentInvalidPayload(): void { $this->plugin->httpPost($request, $response); } - public function testCreateCommentMessageTooLong(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('Message exceeds allowed character limit of'); @@ -583,7 +579,6 @@ public function testCreateCommentMessageTooLong(): void { $this->plugin->httpPost($request, $response); } - public function testOnReportInvalidNode(): void { $this->expectException(\Sabre\DAV\Exception\ReportNotSupported::class); @@ -606,7 +601,6 @@ public function testOnReportInvalidNode(): void { $this->plugin->onReport(CommentsPluginImplementation::REPORT_NAME, [], '/' . $path); } - public function testOnReportInvalidReportName(): void { $this->expectException(\Sabre\DAV\Exception\ReportNotSupported::class); diff --git a/apps/dav/tests/unit/Comments/EntityCollectionTest.php b/apps/dav/tests/unit/Comments/EntityCollectionTest.php index 2c31b56268f3a..1501789bca1ec 100644 --- a/apps/dav/tests/unit/Comments/EntityCollectionTest.php +++ b/apps/dav/tests/unit/Comments/EntityCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Comments; use OCA\DAV\Comments\CommentNode; @@ -63,7 +64,6 @@ public function testGetChild(): void { $this->assertInstanceOf(CommentNode::class, $node); } - public function testGetChildException(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); diff --git a/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php index e5178a3e786f3..fa10d2e66f9eb 100644 --- a/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php +++ b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Comments; use OCA\DAV\Comments\EntityCollection as EntityCollectionImplemantation; @@ -61,14 +62,12 @@ public function testGetChild(): void { $this->assertInstanceOf(EntityCollectionImplemantation::class, $ec); } - public function testGetChildException(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); $this->collection->getChild('17'); } - public function testGetChildren(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); diff --git a/apps/dav/tests/unit/Comments/RootCollectionTest.php b/apps/dav/tests/unit/Comments/RootCollectionTest.php index 9a05d996c8c7e..666dd7b1e0dc6 100644 --- a/apps/dav/tests/unit/Comments/RootCollectionTest.php +++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Comments; use OC\EventDispatcher\EventDispatcher; @@ -69,14 +70,12 @@ protected function prepareForInitCollections(): void { }); } - public function testCreateFile(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->collection->createFile('foo'); } - public function testCreateDirectory(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -89,7 +88,6 @@ public function testGetChild(): void { $this->assertInstanceOf(EntityTypeCollectionImplementation::class, $etc); } - public function testGetChildInvalid(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -97,7 +95,6 @@ public function testGetChildInvalid(): void { $this->collection->getChild('robots'); } - public function testGetChildNoAuth(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); @@ -113,7 +110,6 @@ public function testGetChildren(): void { } } - public function testGetChildrenNoAuth(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); @@ -130,14 +126,12 @@ public function testChildExistsNo(): void { $this->assertFalse($this->collection->childExists('robots')); } - public function testChildExistsNoAuth(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); $this->collection->childExists('files'); } - public function testDelete(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -148,7 +142,6 @@ public function testGetName(): void { $this->assertSame('comments', $this->collection->getName()); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); diff --git a/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php b/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php index 8fc54de645a2e..f72869015fc3a 100644 --- a/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php +++ b/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector; use OCA\DAV\Connector\LegacyPublicAuth; @@ -96,7 +97,6 @@ public function testSharePasswordFancyShareType(): void { $this->assertFalse($result); } - public function testSharePasswordRemote(): void { $share = $this->createMock(IShare::class); $share->method('getPassword')->willReturn('password'); @@ -199,7 +199,6 @@ public function testSharePasswordLinkInvalidSession(): void { $this->assertFalse($result); } - public function testSharePasswordMailInvalidSession(): void { $share = $this->createMock(IShare::class); $share->method('getPassword')->willReturn('password'); diff --git a/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php index fc19ed590a0cc..2906afea7d8d3 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace unit\Connector\Sabre; use LogicException; diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php index e05c46705652c..e5b51fc974bf1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Authentication\Exceptions\PasswordLoginForbiddenException; @@ -186,7 +187,6 @@ public function testValidateUserPassWithInvalidPassword(): void { $this->assertFalse(self::invokePrivate($this->auth, 'validateUserPass', ['MyTestUser', 'MyTestPassword'])); } - public function testValidateUserPassWithPasswordLoginForbidden(): void { $this->expectException(PasswordLoginForbidden::class); @@ -278,7 +278,6 @@ public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenAndCorrectlyDavAu $this->auth->check($request, $response); } - public function testAuthenticateAlreadyLoggedInWithoutTwoFactorChallengePassed(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); $this->expectExceptionMessage('2FA challenge not passed.'); @@ -321,7 +320,6 @@ public function testAuthenticateAlreadyLoggedInWithoutTwoFactorChallengePassed() $this->auth->check($request, $response); } - public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenAndIncorrectlyDavAuthenticated(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); $this->expectExceptionMessage('CSRF check not passed.'); @@ -462,7 +460,6 @@ public function testAuthenticateNoBasicAuthenticateHeadersProvided(): void { $this->assertEquals([false, 'No \'Authorization: Basic\' header found. Either the client didn\'t send one, or the server is misconfigured'], $response); } - public function testAuthenticateNoBasicAuthenticateHeadersProvidedWithAjax(): void { $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); $this->expectExceptionMessage('Cannot authenticate over ajax calls'); diff --git a/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php b/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php index e85158db083b2..4b8255efa31ca 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\User\Session; diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index fc177034c0314..4f1a369676b6d 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php index e3f296353e353..ab8ec5becb449 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\CommentPropertiesPlugin as CommentPropertiesPluginImplementation; diff --git a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php index 907825e4237bd..2e074b0bf16a7 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\CopyEtagHeaderPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index af72d1cfc4cba..cdf4bda8d988c 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\CalDAV\DefaultCalendarValidator; diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 4fe6dd88ad909..b45ee17a0bae1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Files\FileInfo; @@ -57,7 +58,6 @@ public function getRelativePath($path): ?string { } } - #[\PHPUnit\Framework\Attributes\Group(name: 'DB')] class DirectoryTest extends \Test\TestCase { use UserTrait; @@ -98,7 +98,6 @@ private function getDir(string $path = '/'): Directory { return new Directory($this->view, $this->info); } - public function testDeleteRootFolderFails(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -111,7 +110,6 @@ public function testDeleteRootFolderFails(): void { $dir->delete(); } - public function testDeleteForbidden(): void { $this->expectException(Forbidden::class); @@ -130,7 +128,6 @@ public function testDeleteForbidden(): void { $dir->delete(); } - public function testDeleteFolderWhenAllowed(): void { // deletion allowed $this->info->expects($this->once()) @@ -147,7 +144,6 @@ public function testDeleteFolderWhenAllowed(): void { $dir->delete(); } - public function testDeleteFolderFailsWhenNotAllowed(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -159,7 +155,6 @@ public function testDeleteFolderFailsWhenNotAllowed(): void { $dir->delete(); } - public function testDeleteFolderThrowsWhenDeletionFailed(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -222,7 +217,6 @@ public function testGetChildren(): void { $dir->getChildren(); } - public function testGetChildrenNoPermission(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -239,7 +233,6 @@ public function testGetChildrenNoPermission(): void { $dir->getChildren(); } - public function testGetChildNoPermission(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -255,7 +248,6 @@ public function testGetChildNoPermission(): void { $dir->getChild('test'); } - public function testGetChildThrowStorageNotAvailableException(): void { $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); @@ -271,7 +263,6 @@ public function testGetChildThrowStorageNotAvailableException(): void { $dir->getChild('.'); } - public function testGetChildThrowInvalidPath(): void { $this->expectException(InvalidPath::class); @@ -601,7 +592,6 @@ private function moveTest(string $source, string $destination, array $updatables $this->assertTrue($targetNode->moveInto(basename($destination), $source, $sourceNode)); } - public function testFailingMove(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->expectExceptionMessage('Could not copy directory b, target exists'); diff --git a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php index 4dd8dc9409f4a..40b16ea93c460 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\DummyGetResponsePlugin; @@ -38,7 +39,6 @@ public function testInitialize(): void { $this->dummyGetResponsePlugin->initialize($server); } - public function testHttpGet(): void { $request = $this->createMock(RequestInterface::class); $response = $this->createMock(ResponseInterface::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php index 2f9e0ae91964e..02ddbbf8b0abd 100644 --- a/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\Exception; use OCA\DAV\Connector\Sabre\Exception\Forbidden; diff --git a/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php index 6f62bef86a3b1..6cb47547f32a3 100644 --- a/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\Exception; use OCA\DAV\Connector\Sabre\Exception\InvalidPath; diff --git a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php index 4539dd998d2a0..c805d2b9fbeca 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\SystemConfig; diff --git a/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php index 4de8642e41ab6..6407f1afe4eec 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\FakeLockerPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 25b09db1c54b9..7708eefef443b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\AppFramework\Http\Request; @@ -101,7 +102,6 @@ private function getStream(string $string) { return $stream; } - public static function fopenFailuresProvider(): array { return [ [ @@ -625,7 +625,6 @@ public function testSetNameInvalidChars(): void { $file->setName("/i\nvalid"); } - public function testUploadAbort(): void { // setup /** @var View&MockObject */ @@ -675,7 +674,6 @@ public function testUploadAbort(): void { $this->assertEmpty($this->listPartFiles($view, ''), 'No stray part files'); } - public function testDeleteWhenAllowed(): void { // setup /** @var View&MockObject */ @@ -701,7 +699,6 @@ public function testDeleteWhenAllowed(): void { $file->delete(); } - public function testDeleteThrowsWhenDeletionNotAllowed(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -725,7 +722,6 @@ public function testDeleteThrowsWhenDeletionNotAllowed(): void { $file->delete(); } - public function testDeleteThrowsWhenDeletionFailed(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -754,7 +750,6 @@ public function testDeleteThrowsWhenDeletionFailed(): void { $file->delete(); } - public function testDeleteThrowsWhenDeletionThrows(): void { $this->expectException(Forbidden::class); @@ -931,7 +926,6 @@ private function getFileInfos($path = '', ?View $userView = null) { ]; } - public function testGetFopenFails(): void { $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); @@ -953,7 +947,6 @@ public function testGetFopenFails(): void { $file->get(); } - public function testGetFopenThrows(): void { $this->expectException(Forbidden::class); @@ -975,7 +968,6 @@ public function testGetFopenThrows(): void { $file->get(); } - public function testGetThrowsIfNoPermission(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 2e2be008829fa..a67181bb9a21d 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Accounts\Account; @@ -471,7 +472,6 @@ public function testUpdateProps(): void { FilesPlugin::CREATIONDATE_PROPERTYNAME => $testCreationDate, ]); - $this->plugin->handleUpdateProperties( '/dummypath', $propPatch diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index 717cecda7588d..cb05fe3c30d22 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Files\View; @@ -283,7 +284,6 @@ public function testFindNodesByFileIdsSubDir(): void { ->method('getPath') ->willReturn('/sub1/sub2'); - $subNode = $this->createMock(Folder::class); $this->userFolder->expects($this->once()) @@ -714,7 +714,6 @@ public function testProcessFilterRulesInvisibleTagAsAdmin(): void { $this->assertEquals([$filesNode2], array_values(self::invokePrivate($this->plugin, 'processFilterRulesForFileNodes', [$rules, null, null]))); } - public function testProcessFilterRulesInvisibleTagAsUser(): void { $this->expectException(TagNotFoundException::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php index bc1d50ac41f2d..72712f4f1620a 100644 --- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\MaintenancePlugin; @@ -32,7 +33,6 @@ protected function setUp(): void { $this->maintenancePlugin = new MaintenancePlugin($this->config, $this->l10n); } - public function testMaintenanceMode(): void { $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); $this->expectExceptionMessage('System is in maintenance mode.'); diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php index d46232e34adc4..919f6e9b6b68e 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Files\FileInfo; @@ -202,13 +203,11 @@ public static function nodeForPathProvider(): array { ]; } - public function testGetNodeForPathInvalidPath(): void { $this->expectException(InvalidPath::class); $path = '/foo\bar'; - $storage = new Temporary([]); $view = $this->getMockBuilder(View::class) @@ -232,7 +231,6 @@ public function testGetNodeForPathInvalidPath(): void { public function testGetNodeForPathRoot(): void { $path = '/'; - $storage = new Temporary([]); $view = $this->getMockBuilder(View::class) diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 1be48b85c3b65..8699903e1ec10 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\KnownUser\KnownUserService; @@ -259,7 +260,6 @@ public function testGetGroupMemberSet(): void { $this->assertSame([], $response); } - public function testGetGroupMemberSetEmpty(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('Principal not found'); @@ -384,7 +384,6 @@ public function testGetGroupMembership(): void { $this->assertSame($expectedResponse, $response); } - public function testGetGroupMembershipEmpty(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('Principal not found'); @@ -398,7 +397,6 @@ public function testGetGroupMembershipEmpty(): void { $this->connector->getGroupMembership('principals/users/foo'); } - public function testSetGroupMembership(): void { $this->expectException(Exception::class); $this->expectExceptionMessage('Setting members of the group is not supported yet'); @@ -532,7 +530,6 @@ public function testSearchPrincipals(bool $sharingEnabled, bool $groupsOnly, str ->method('getUserGroupIds') ->willReturnMap($getUserGroupIdsReturnMap); - $this->assertEquals($result, $this->connector->searchPrincipals('principals/users', ['{http://sabredav.org/ns}email-address' => 'user@example.com', '{DAV:}displayname' => 'User 12'], $test)); @@ -699,7 +696,6 @@ public function testSearchPrincipalWithEnumerationDisabledEmailOnFullMatch(): vo ->method('allowEnumerationFullMatch') ->willReturn(false); - $this->assertEquals([], $this->connector->searchPrincipals('principals/users', ['{http://sabredav.org/ns}email-address' => 'user2@foo.bar'])); } @@ -734,7 +730,6 @@ public function testSearchPrincipalWithEnumerationLimitedDisplayname(): void { $user4->method('getDisplayName')->willReturn('User 222'); $user4->method('getSystemEMailAddress')->willReturn('user2@foo.bar456'); - $this->userSession->expects($this->once()) ->method('getUser') ->willReturn($user2); @@ -752,7 +747,6 @@ public function testSearchPrincipalWithEnumerationLimitedDisplayname(): void { ->with('User') ->willReturn([$user2, $user3, $user4]); - $this->assertEquals([ 'principals/users/user2', 'principals/users/user3', @@ -790,7 +784,6 @@ public function testSearchPrincipalWithEnumerationLimitedMail(): void { $user4->method('getDisplayName')->willReturn('User 222'); $user4->method('getSystemEMailAddress')->willReturn('user2@foo.bar456'); - $this->userSession->expects($this->once()) ->method('getUser') ->willReturn($user2); @@ -808,7 +801,6 @@ public function testSearchPrincipalWithEnumerationLimitedMail(): void { ->with('user') ->willReturn([$user2, $user3, $user4]); - $this->assertEquals([ 'principals/users/user2', 'principals/users/user3' diff --git a/apps/dav/tests/unit/Connector/Sabre/PropFindMonitorPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/PropFindMonitorPluginTest.php index 261f916badf69..097eb22ece8ee 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PropFindMonitorPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PropFindMonitorPluginTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\PropFindMonitorPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php index 52fe3eba5bfbf..42c5ddc4b4acc 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\PropFindPreloadNotifyPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php index e6f696ed16080..a94ba73af1882 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\PropfindCompressionPlugin; @@ -67,7 +68,6 @@ public function testHeaderGzipButNoStringBody(): void { $this->assertSame($response, $result); } - public function testProperGzip(): void { $request = $this->createMock(Request::class); $response = $this->createMock(Response::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php b/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php index 2f18b4305087e..b853358569c7e 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector; use OCA\DAV\Connector\Sabre\PublicAuth; @@ -227,7 +228,6 @@ public function testSharePasswordFancyShareType(): void { $this->assertFalse($result); } - public function testSharePasswordRemote(): void { $this->request->method('getPathInfo') ->willReturn('/dav/files/GX9HSGQrGE'); @@ -352,7 +352,6 @@ public function testSharePasswordLinkInvalidSession(): void { $this->assertFalse($result); } - public function testSharePasswordMailInvalidSession(): void { $this->request->method('getPathInfo') ->willReturn('/dav/files/GX9HSGQrGE'); diff --git a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php index 45bb058ca7d90..d355ee87f6f7d 100644 --- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2013-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OC\Files\View; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php index b01807d5bbba3..2fd5617254904 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OCP\IUserSession; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DeleteTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DeleteTest.php index 1cc0ec711cb8b..84426987c19d8 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DeleteTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DeleteTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OCP\AppFramework\Http; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php index 70bff8c04300e..91f7c046bd802 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OCP\AppFramework\Http; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionMasterKeyUploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionMasterKeyUploadTest.php index abdabb1cb7acc..64ab7bfbeaff2 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionMasterKeyUploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionMasterKeyUploadTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OC\Files\View; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php index c1ae71ac28f74..4baab8927d056 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/EncryptionUploadTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OC\Files\View; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php index 0c53e4b1009a6..0e2142e9fbc56 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/ExceptionPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php index 0962c9516fb40..0a67bf5307397 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OC\AllConfig; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php index 404dc7fa5d7b4..b4f08f77c2579 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use OC\Files\View; diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php index 08d774e56b82a..f75c0ae228cb9 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre\RequestTest; use Sabre\HTTP\Request; diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index ff6d7f3c3dd42..30b192fe4d910 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php index 4c4f10463e582..e50cc9280845c 100644 --- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\Directory; diff --git a/apps/dav/tests/unit/Connector/ServerTest.php b/apps/dav/tests/unit/Connector/ServerTest.php index 768db1a85cbeb..8c3e5afa8b681 100644 --- a/apps/dav/tests/unit/Connector/ServerTest.php +++ b/apps/dav/tests/unit/Connector/ServerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Connector\Sabre; use OCA\DAV\Connector\Sabre\Server; diff --git a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php index 9aa0ef3a2a7e7..04157adc8d07b 100644 --- a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php +++ b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Controller; use OCA\DAV\BackgroundJob\GenerateBirthdayCalendarBackgroundJob; diff --git a/apps/dav/tests/unit/Controller/DirectControllerTest.php b/apps/dav/tests/unit/Controller/DirectControllerTest.php index 837adde1da7fd..dcaa3c4a3a5f0 100644 --- a/apps/dav/tests/unit/Controller/DirectControllerTest.php +++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Controller; use OCA\DAV\Controller\DirectController; diff --git a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php index 3b535ceed22fc..6f60e0c362039 100644 --- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php +++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php @@ -396,7 +396,6 @@ public function testProcessMoreOptionsResult(bool $isExternalAttendee): void { ->method('isExternalAttendee') ->willReturn($isExternalAttendee); - $response = $this->controller->processMoreOptionsResult('TOKEN123'); $this->assertInstanceOf(TemplateResponse::class, $response); $this->assertEquals('schedule-response-success', $response->getTemplateName()); diff --git a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php index c99ebf327c88a..9fc3370c9d8af 100644 --- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php +++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV; use OCA\DAV\Connector\Sabre\AnonymousOptionsPlugin; diff --git a/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php b/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php index cb8d8f0169e2b..b5a4973088b8f 100644 --- a/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php +++ b/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\DAV; use OCA\DAV\Files\BrowserErrorPagePlugin; diff --git a/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php index 4d48e70af57a6..4a6e7d4430b54 100644 --- a/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV; use OCA\DAV\CalDAV\Calendar; diff --git a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php index 068dd28eafb9f..d0f06f4e752c2 100644 --- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php +++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\DAV; use OC\Group\Group; @@ -171,7 +172,6 @@ public function testGetGroupMembership(): void { $this->assertSame([], $response); } - public function testSetGroupMembership(): void { $this->expectException(\Sabre\DAV\Exception::class); $this->expectExceptionMessage('Setting members of the group is not supported yet'); diff --git a/apps/dav/tests/unit/DAV/Sharing/BackendTest.php b/apps/dav/tests/unit/DAV/Sharing/BackendTest.php index d4104ee859352..cd33522b24d48 100644 --- a/apps/dav/tests/unit/DAV/Sharing/BackendTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/BackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Sharing; use OCA\DAV\CalDAV\Federation\FederationSharingService; @@ -259,7 +260,6 @@ public function testUnshareWithBobGroup(): void { ] ]; - $this->shareCache->expects(self::once()) ->method('clear'); $this->principalBackend->expects(self::once()) @@ -294,7 +294,6 @@ public function testGetShares(): void { ] ]; - $this->shareCache->expects(self::once()) ->method('get') ->with((string)$resourceId) diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php index 5f4b9f00b748a..526b81b51a426 100644 --- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\DAV\Sharing; use OCA\DAV\Connector\Sabre\Auth; diff --git a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php index 275aa1782f743..e323230ee0f20 100644 --- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php +++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\DAV; use OCA\DAV\DAV\SystemPrincipalBackend; diff --git a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php index c9da767d3b519..f859d10d6ab88 100644 --- a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php +++ b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\DAV; use OCA\DAV\Connector\Sabre\Exception\Forbidden; diff --git a/apps/dav/tests/unit/Direct/DirectFileTest.php b/apps/dav/tests/unit/Direct/DirectFileTest.php index f6f0f49fa8c37..a40b04bfc5fce 100644 --- a/apps/dav/tests/unit/Direct/DirectFileTest.php +++ b/apps/dav/tests/unit/Direct/DirectFileTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Direct; use OCA\DAV\Db\Direct; diff --git a/apps/dav/tests/unit/Direct/DirectHomeTest.php b/apps/dav/tests/unit/Direct/DirectHomeTest.php index 94c82c2b7c5b9..cb3c17333589e 100644 --- a/apps/dav/tests/unit/Direct/DirectHomeTest.php +++ b/apps/dav/tests/unit/Direct/DirectHomeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Direct; use OCA\DAV\Db\Direct; @@ -49,7 +50,6 @@ protected function setUp(): void { $this->request->method('getRemoteAddress') ->willReturn('1.2.3.4'); - $this->directHome = new DirectHome( $this->rootFolder, $this->directMapper, diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php index df98df60e9828..5d57ca4bd035e 100644 --- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php +++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php @@ -229,7 +229,6 @@ public function testSearchIsCollection(): void { $this->assertEquals('/files/test/test/path', $result[0]->href); } - public function testSearchInvalidProp(): void { $this->expectException(\InvalidArgumentException::class); @@ -266,7 +265,6 @@ private function getBasicQuery(string $type, string $property, int|string|null $ return new Query($select, $from, $where, $orderBy, $limit); } - public function testSearchNonFolder(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php index dc0e884f07c04..78b1cc557e257 100644 --- a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php +++ b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php @@ -75,7 +75,6 @@ private function getMultipartParser(array $parts, array $headers = [], string $b return new MultipartRequestParser($request, $this->logger); } - /** * Test validation of the request's body type */ @@ -316,7 +315,6 @@ public function testNullContentType(): void { $this->getMultipartParser( $bodyObject, ['Content-Type' => null], - ); } } diff --git a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php index a9c03e67a9cbd..070902ffe425f 100644 --- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php +++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Files\Sharing; use OCA\DAV\Files\Sharing\FilesDropPlugin; diff --git a/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php b/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php index 5b2b8c66ac0ea..774ab64223329 100644 --- a/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php +++ b/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Listener; use OCA\DAV\CalDAV\Activity\Backend as ActivityBackend; diff --git a/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php b/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php index 0ee641006a219..1e18745cfff6f 100644 --- a/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php +++ b/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Listener; use OCA\DAV\Connector\Sabre\Principal; diff --git a/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php b/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php index 86535af18da66..10e0864478e6c 100644 --- a/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php +++ b/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Migration; use OCA\DAV\CalDAV\CalDavBackend; @@ -165,7 +166,6 @@ public function testRunValid(): void { $this->output->expects($this->once()) ->method('finishProgress'); - $this->backend->expects($this->exactly(1)) ->method('getCalendarObject') ->with(42, 'myuri') @@ -207,7 +207,6 @@ public function testRunStillInvalid(): void { $this->output->expects($this->once()) ->method('finishProgress'); - $this->backend->expects($this->exactly(1)) ->method('getCalendarObject') ->with(42, 'myuri') diff --git a/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php b/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php index 54162df72d2a4..9823e70d48239 100644 --- a/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php +++ b/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Migration; use OCA\DAV\BackgroundJob\RefreshWebcalJob; diff --git a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php index 6f681badb8bfc..9693de06cce3e 100644 --- a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php +++ b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Migration; use OCA\DAV\BackgroundJob\RegisterRegenerateBirthdayCalendars; diff --git a/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php b/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php index 619549a6c3408..cb0df5604e024 100644 --- a/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php +++ b/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Migration; use OCA\DAV\Migration\RemoveDeletedUsersCalendarSubscriptions; @@ -27,7 +28,6 @@ class RemoveDeletedUsersCalendarSubscriptionsTest extends TestCase { private IOutput&MockObject $output; private RemoveDeletedUsersCalendarSubscriptions $migration; - protected function setUp(): void { parent::setUp(); @@ -97,7 +97,6 @@ public function testRun(array $subscriptions, array $userExists, int $deletions) $this->dbConnection->method('getQueryBuilder')->willReturn($qb); - $this->output->expects($this->once())->method('startProgress'); $this->output->expects($subscriptions === [] ? $this->never(): $this->once())->method('advance'); diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php index 4f04aebb3e80d..c9a25af04d371 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Provisioning\Apple; use OCA\DAV\Provisioning\Apple\AppleProvisioningNode; @@ -39,7 +40,6 @@ public function testGetLastModified(): void { $this->assertEquals(null, $this->node->getLastModified()); } - public function testDelete(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->expectExceptionMessage('apple-provisioning.mobileconfig may not be deleted'); @@ -58,7 +58,6 @@ public function testGetProperties(): void { ], $this->node->getProperties([])); } - public function testGetPropPatch(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->expectExceptionMessage('apple-provisioning.mobileconfig\'s properties may not be altered.'); diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php index 9c0b2cefa39bc..93cdc127204ea 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Provisioning\Apple; use OCA\DAV\Provisioning\Apple\AppleProvisioningPlugin; diff --git a/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php b/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php index f4dc13a5c0641..87570145f44db 100644 --- a/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php +++ b/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit; use OCA\DAV\CardDAV\CardDavBackend; diff --git a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php index 63139fbd9acda..561eb3e21b083 100644 --- a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php +++ b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Search; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/Search/TasksSearchProviderTest.php b/apps/dav/tests/unit/Search/TasksSearchProviderTest.php index fda96b5b2296a..1424f8c4dbb7c 100644 --- a/apps/dav/tests/unit/Search/TasksSearchProviderTest.php +++ b/apps/dav/tests/unit/Search/TasksSearchProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Search; use OCA\DAV\CalDAV\CalDavBackend; diff --git a/apps/dav/tests/unit/ServerTest.php b/apps/dav/tests/unit/ServerTest.php index 2233feb398838..62713b223a03a 100644 --- a/apps/dav/tests/unit/ServerTest.php +++ b/apps/dav/tests/unit/ServerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit; use OCA\DAV\Server; diff --git a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php index 032759d64b7e9..6da45cde4f3f4 100644 --- a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php +++ b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\DAV\Settings; use OCA\DAV\Settings\CalDAVSettings; diff --git a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php index b626c2474d2d8..599eadd4d73bd 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OC\SystemTag\SystemTag; @@ -132,7 +133,6 @@ public function testDeleteTagExpectedException(ISystemTag $tag, $expectedExcepti $this->assertInstanceOf($expectedException, $thrown); } - public function testDeleteTagNotFound(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index 9c476ec735e0e..14ebae7772eda 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OC\SystemTag\SystemTag; @@ -57,7 +58,6 @@ public function testGetters(bool $isAdmin): void { $this->assertEquals($tag, $node->getSystemTag()); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); @@ -170,7 +170,6 @@ public function testUpdateTagPermissionException(ISystemTag $originalTag, array $this->assertInstanceOf($expectedException, $thrown); } - public function testUpdateTagAlreadyExists(): void { $this->expectException(\Sabre\DAV\Exception\Conflict::class); @@ -190,7 +189,6 @@ public function testUpdateTagAlreadyExists(): void { $this->getTagNode(false, $tag)->update('Renamed', true, true, null); } - public function testUpdateTagNotFound(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -254,7 +252,6 @@ public function testDeleteTagPermissionException(ISystemTag $tag, string $expect $this->getTagNode(false, $tag)->delete(); } - public function testDeleteTagNotFound(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index f46450cf045be..ae15fa6166bcb 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OC\SystemTag\SystemTag; @@ -190,7 +191,6 @@ public function testGetProperties(ISystemTag $systemTag, array $groups, array $r $this->assertEquals($expectedProperties, $result[200]); } - public function testGetPropertiesForbidden(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -287,7 +287,6 @@ public function testUpdatePropertiesAdmin(): void { $this->assertEquals(200, $result[self::USERVISIBLE_PROPERTYNAME]); } - public function testUpdatePropertiesForbidden(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -587,7 +586,6 @@ public function testCreateTagInMappingCollection(): void { $this->plugin->httpPost($request, $response); } - public function testCreateTagToUnknownNode(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php index 53173c66d6ed8..2f600b6322832 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OC\SystemTag\SystemTag; @@ -61,14 +62,12 @@ public static function adminFlagProvider(): array { return [[true], [false]]; } - public function testForbiddenCreateFile(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->getNode()->createFile('555'); } - public function testForbiddenCreateDirectory(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -94,7 +93,6 @@ public function testGetChild(): void { $this->assertEquals($tag, $childNode->getSystemTag()); } - public function testGetChildInvalidName(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); @@ -106,7 +104,6 @@ public function testGetChildInvalidName(): void { $this->getNode()->getChild('invalid'); } - public function testGetChildNotFound(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -118,7 +115,6 @@ public function testGetChildNotFound(): void { $this->getNode()->getChild('444'); } - public function testGetChildUserNotVisible(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -210,7 +206,6 @@ public function testChildExistsNotFound(): void { $this->assertFalse($this->getNode()->childExists('123')); } - public function testChildExistsBadRequest(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index 84674ee57c5e6..fd98e45a2ecec 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OC\SystemTag\SystemTag; @@ -122,7 +123,6 @@ public function testAssignTagNoPermission(bool $userVisible, bool $userAssignabl $this->assertInstanceOf($expectedException, $thrown); } - public function testAssignTagNotFound(): void { $this->expectException(\Sabre\DAV\Exception\PreconditionFailed::class); @@ -134,7 +134,6 @@ public function testAssignTagNotFound(): void { $this->getNode()->createFile('555'); } - public function testForbiddenCreateDirectory(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -164,7 +163,6 @@ public function testGetChild(): void { $this->assertEquals('555', $childNode->getName()); } - public function testGetChildNonVisible(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -187,7 +185,6 @@ public function testGetChildNonVisible(): void { $this->getNode()->getChild('555'); } - public function testGetChildRelationNotFound(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -199,7 +196,6 @@ public function testGetChildRelationNotFound(): void { $this->getNode()->getChild('777'); } - public function testGetChildInvalidId(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); @@ -211,7 +207,6 @@ public function testGetChildInvalidId(): void { $this->getNode()->getChild('badid'); } - public function testGetChildTagDoesNotExist(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -315,7 +310,6 @@ public function testChildExistsTagNotFound(): void { $this->assertFalse($this->getNode()->childExists('555')); } - public function testChildExistsInvalidId(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); @@ -327,14 +321,12 @@ public function testChildExistsInvalidId(): void { $this->getNode()->childExists('555'); } - public function testDelete(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->getNode()->delete(); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php index 301eb528436ae..e21083f4f6f2e 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\SystemTag; use OCA\DAV\SystemTag\SystemTagsObjectTypeCollection; @@ -72,14 +73,12 @@ protected function setUp(): void { ); } - public function testForbiddenCreateFile(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->node->createFile('555'); } - public function testForbiddenCreateDirectory(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -97,7 +96,6 @@ public function testGetChild(): void { $this->assertEquals('555', $childNode->getName()); } - public function testGetChildWithoutAccess(): void { $this->expectException(\Sabre\DAV\Exception\NotFound::class); @@ -108,7 +106,6 @@ public function testGetChildWithoutAccess(): void { $this->node->getChild('555'); } - public function testGetChildren(): void { $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); @@ -131,14 +128,12 @@ public function testChildExistsWithoutAccess(): void { $this->assertFalse($this->node->childExists('555')); } - public function testDelete(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); $this->node->delete(); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php index ee4d0b605bb3c..bd41c3f8962cb 100644 --- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php +++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Upload; use OCA\DAV\Upload\AssemblyStream; diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index 00ed7657dd38f..62f2d5e9c98c1 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Upload; use OCA\DAV\Connector\Sabre\Directory; @@ -154,7 +155,6 @@ public function testBeforeMoveFutureFileMoveIt(): void { $this->assertFalse($this->plugin->beforeMove('source', 'target')); } - public function testBeforeMoveSizeIsWrong(): void { $this->expectException(\Sabre\DAV\Exception\BadRequest::class); $this->expectExceptionMessage('Chunks on server do not sum up to 4 but to 3 bytes'); diff --git a/apps/dav/tests/unit/Upload/FutureFileTest.php b/apps/dav/tests/unit/Upload/FutureFileTest.php index 1409df937c077..8ab086516ac38 100644 --- a/apps/dav/tests/unit/Upload/FutureFileTest.php +++ b/apps/dav/tests/unit/Upload/FutureFileTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\DAV\Tests\unit\Upload; use OCA\DAV\Connector\Sabre\Directory; @@ -56,7 +57,6 @@ public function testDelete(): void { $f->delete(); } - public function testPut(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); @@ -64,7 +64,6 @@ public function testPut(): void { $f->put(''); } - public function testSetName(): void { $this->expectException(\Sabre\DAV\Exception\Forbidden::class); diff --git a/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php b/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php index 1cef4f0e47039..79ce7f87aa65a 100644 --- a/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php +++ b/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\DAV\Tests\unit\Upload; use Generator; diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php index 7497f56fcf4bb..f75bf289e4aeb 100644 --- a/apps/encryption/lib/AppInfo/Application.php +++ b/apps/encryption/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\AppInfo; use OC\Core\Events\BeforePasswordResetEvent; diff --git a/apps/encryption/lib/Command/CleanOrphanedKeys.php b/apps/encryption/lib/Command/CleanOrphanedKeys.php index 526f5ea574293..dad49775f6fa1 100644 --- a/apps/encryption/lib/Command/CleanOrphanedKeys.php +++ b/apps/encryption/lib/Command/CleanOrphanedKeys.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Command; use OC\Encryption\Util; diff --git a/apps/encryption/lib/Command/DisableMasterKey.php b/apps/encryption/lib/Command/DisableMasterKey.php index ff12ff9b93d05..1829ff385ef3b 100644 --- a/apps/encryption/lib/Command/DisableMasterKey.php +++ b/apps/encryption/lib/Command/DisableMasterKey.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Command; use OCA\Encryption\Util; diff --git a/apps/encryption/lib/Command/EnableMasterKey.php b/apps/encryption/lib/Command/EnableMasterKey.php index 20b425c83f1f3..d7c6c2e72d935 100644 --- a/apps/encryption/lib/Command/EnableMasterKey.php +++ b/apps/encryption/lib/Command/EnableMasterKey.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Command; use OCA\Encryption\Util; diff --git a/apps/encryption/lib/Command/FixKeyLocation.php b/apps/encryption/lib/Command/FixKeyLocation.php index fb64db93f0629..a869f967277c9 100644 --- a/apps/encryption/lib/Command/FixKeyLocation.php +++ b/apps/encryption/lib/Command/FixKeyLocation.php @@ -51,7 +51,6 @@ public function __construct( parent::__construct(); } - #[\Override] protected function configure(): void { parent::configure(); diff --git a/apps/encryption/lib/Command/RecoverUser.php b/apps/encryption/lib/Command/RecoverUser.php index 63fa4dfcd2b44..3834549f40c52 100644 --- a/apps/encryption/lib/Command/RecoverUser.php +++ b/apps/encryption/lib/Command/RecoverUser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Command; use OCA\Encryption\Util; diff --git a/apps/encryption/lib/Command/ScanLegacyFormat.php b/apps/encryption/lib/Command/ScanLegacyFormat.php index 36a3a0d45881c..a79ea2220c5f1 100644 --- a/apps/encryption/lib/Command/ScanLegacyFormat.php +++ b/apps/encryption/lib/Command/ScanLegacyFormat.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Command; use OC\Files\View; diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php index cc172d18b3035..66e5d6308c862 100644 --- a/apps/encryption/lib/Controller/RecoveryController.php +++ b/apps/encryption/lib/Controller/RecoveryController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Controller; use OCA\Encryption\Recovery; diff --git a/apps/encryption/lib/Controller/SettingsController.php b/apps/encryption/lib/Controller/SettingsController.php index fd3637e0d7963..f36ed60b56ebc 100644 --- a/apps/encryption/lib/Controller/SettingsController.php +++ b/apps/encryption/lib/Controller/SettingsController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Controller; use OCA\Encryption\Crypto\Crypt; @@ -51,7 +52,6 @@ public function __construct( parent::__construct($appName, $request); } - /** * @param string $oldPassword * @param string $newPassword diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php index 582401502a1f3..b221dc4b0a7ab 100644 --- a/apps/encryption/lib/Controller/StatusController.php +++ b/apps/encryption/lib/Controller/StatusController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Controller; use OCA\Encryption\Session; diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 0aadd64eaec1d..806b6b954b723 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Crypto; use OC\Encryption\Exceptions\DecryptionFailedException; @@ -469,7 +470,6 @@ private function createSignature(string $data, string $passPhrase): string { return hash_hmac('sha256', $data, $passPhrase); } - /** * @param bool $hasSignature did the block contain a signature, in this case we use a different padding */ @@ -533,7 +533,6 @@ private function hasSignature(string $catFile, string $cipher): bool { return ($signaturePosition !== false); } - /** * @throws DecryptionFailedException */ diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php index 7123d0f9a6403..707fa971e3adb 100644 --- a/apps/encryption/lib/Crypto/DecryptAll.php +++ b/apps/encryption/lib/Crypto/DecryptAll.php @@ -79,7 +79,6 @@ public function prepare(InputInterface $input, OutputInterface $output, ?string $output->writeln('Could not decrypt private key, maybe you entered the wrong password?'); } - return false; } diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index e44c7fd8b5627..5cbd105d9a93a 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -84,7 +84,6 @@ public function encryptAll(InputInterface $input, OutputInterface $output): void $this->createKeyPairs(); } - // output generated encryption key passwords if ($this->util->isMasterKeyEnabled() === false) { //send-out or display password list and write it to a file diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index f28d31d6dd5b2..1ae615822a588 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Crypto; use OC\Encryption\Exceptions\DecryptionFailedException; @@ -114,7 +115,6 @@ public function begin($path, $user, $mode, array $header, array $accessList) { $this->writeCache = ''; $this->useLegacyBase64Encoding = true; - if (isset($header['encoding'])) { $this->useLegacyBase64Encoding = $header['encoding'] !== Crypt::BINARY_ENCODING_FORMAT; } @@ -243,8 +243,6 @@ public function end($path, $position = '0') { return $result ?: ''; } - - /** * encrypt data * @@ -492,7 +490,6 @@ public function prepareDecryptAll(InputInterface $input, OutputInterface $output return $this->decryptAll->prepare($input, $output, $user); } - /** * @param string $path * @return string diff --git a/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php b/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php index 77cef173f32af..f672a34b8414c 100644 --- a/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php +++ b/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php b/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php index b3eb441d7fcf6..49c2b11ea88e9 100644 --- a/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php +++ b/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php b/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php index 784ba0b088504..842d02a51a915 100644 --- a/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php +++ b/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/apps/encryption/lib/Exceptions/PublicKeyMissingException.php b/apps/encryption/lib/Exceptions/PublicKeyMissingException.php index 41209106fa334..670cee33b238c 100644 --- a/apps/encryption/lib/Exceptions/PublicKeyMissingException.php +++ b/apps/encryption/lib/Exceptions/PublicKeyMissingException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php index b74b9a73028dd..1f65dfe0936e2 100644 --- a/apps/encryption/lib/KeyManager.php +++ b/apps/encryption/lib/KeyManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption; use OC\Encryption\Exceptions\DecryptionFailedException; @@ -457,7 +458,6 @@ public function deleteShareKey($path, $keyId) { Encryption::ID); } - /** * @param $path * @param $uid diff --git a/apps/encryption/lib/Migration/SetMasterKeyStatus.php b/apps/encryption/lib/Migration/SetMasterKeyStatus.php index e3b90e9ff9018..64931685cfe07 100644 --- a/apps/encryption/lib/Migration/SetMasterKeyStatus.php +++ b/apps/encryption/lib/Migration/SetMasterKeyStatus.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Migration; use OCP\IConfig; @@ -17,7 +18,6 @@ */ class SetMasterKeyStatus implements IRepairStep { - public function __construct( private IConfig $config, ) { diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php index 38d0c48ad8935..7dcd2ca330e23 100644 --- a/apps/encryption/lib/Recovery.php +++ b/apps/encryption/lib/Recovery.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption; use OC\Files\View; diff --git a/apps/encryption/lib/Settings/Admin.php b/apps/encryption/lib/Settings/Admin.php index 422d338d45e03..e9302e199636e 100644 --- a/apps/encryption/lib/Settings/Admin.php +++ b/apps/encryption/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Settings; use OC\Files\View; diff --git a/apps/encryption/lib/Settings/Personal.php b/apps/encryption/lib/Settings/Personal.php index f047850bd33d9..e6bb1ed192fd4 100644 --- a/apps/encryption/lib/Settings/Personal.php +++ b/apps/encryption/lib/Settings/Personal.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Settings; use OCA\Encryption\AppInfo\Application; diff --git a/apps/encryption/lib/Users/Setup.php b/apps/encryption/lib/Users/Setup.php index 7f50fd8b23e13..a20f13b92e1fd 100644 --- a/apps/encryption/lib/Users/Setup.php +++ b/apps/encryption/lib/Users/Setup.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Users; use OCA\Encryption\Crypto\Crypt; diff --git a/apps/encryption/lib/Util.php b/apps/encryption/lib/Util.php index ccbdcdcb242b1..fbe98767f47ea 100644 --- a/apps/encryption/lib/Util.php +++ b/apps/encryption/lib/Util.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption; use OC\Files\Storage\Storage; diff --git a/apps/encryption/tests/Command/TestEnableMasterKey.php b/apps/encryption/tests/Command/TestEnableMasterKey.php index 460e3c59aeb73..4cfa5894e89fe 100644 --- a/apps/encryption/tests/Command/TestEnableMasterKey.php +++ b/apps/encryption/tests/Command/TestEnableMasterKey.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Command; use OCA\Encryption\Command\EnableMasterKey; diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index c1a3fdf9a92d2..5bbe60ddce8c1 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Controller; use OCA\Encryption\Controller\RecoveryController; @@ -58,7 +59,6 @@ public function testAdminRecovery($recoveryPassword, $passConfirm, $enableRecove $passConfirm, $enableRecovery); - $this->assertEquals($expectedMessage, $response->getData()['data']['message']); $this->assertEquals($expectedStatus, $response->getStatus()); } @@ -120,7 +120,6 @@ public function testUserSetRecovery($enableRecovery, $expectedMessage, $expected ['0', false] ]); - $response = $this->controller->userSetRecovery($enableRecovery); $this->assertEquals($expectedMessage, $response->getData()['data']['message']); diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index bee20f67cecdb..6f1e0bb935dc3 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Controller; use OCA\Encryption\Controller\SettingsController; diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index 369f0e8f9b291..2202e76d9f666 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Controller; use OCA\Encryption\Controller\StatusController; diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 3221fcb4ed3ea..da51ebe83bf47 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Crypto; use OCA\Encryption\Crypto\Crypt; @@ -77,7 +78,6 @@ public function testGetOpenSSLConfig(): void { $this->assertSame('bar', $result['foo']); } - /** * test generateHeader with valid key formats */ diff --git a/apps/encryption/tests/Crypto/DecryptAllTest.php b/apps/encryption/tests/Crypto/DecryptAllTest.php index f2a56bc2fbc2c..b0d50bd75135b 100644 --- a/apps/encryption/tests/Crypto/DecryptAllTest.php +++ b/apps/encryption/tests/Crypto/DecryptAllTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Crypto; use OCA\Encryption\Crypto\Crypt; diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index 91d3559c70a35..3267cc964e530 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Crypto; use OC\Files\View; @@ -110,7 +111,6 @@ protected function setUp(): void { $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->disableOriginalConstructor()->getMock(); $this->secureRandom->expects($this->any())->method('generate')->willReturn('12345678'); - $this->encryptAll = new EncryptAll( $this->setupUser, $this->userManager, @@ -221,7 +221,6 @@ public function testCreateKeyPairs(): void { ->onlyMethods(['generateOneTimePassword', 'setupUserFileSystem']) ->getMock(); - // set protected property $output $this->invokePrivate($encryptAll, 'output', [$this->outputInterface]); @@ -390,7 +389,6 @@ public function testEncryptFile($isEncrypted): void { ->willReturn($isEncrypted); $this->view->expects($this->never())->method('getFileInfo'); - if ($isEncrypted) { $this->view->expects($this->never())->method('copy'); $this->view->expects($this->never())->method('rename'); diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index bea53f9efa813..c0cfeb4d2b139 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Crypto; use OC\Encryption\Exceptions\DecryptionFailedException; @@ -137,7 +138,6 @@ public function endTest() { $this->instance->end('/foo/bar'); } - public function getPublicKeyCallback($uid) { if ($uid === 'user2') { throw new PublicKeyMissingException($uid); @@ -219,7 +219,6 @@ public static function dataTestBegin(): array { ]; } - /** * test begin() if decryptAll mode was activated */ @@ -384,7 +383,6 @@ public static function dataTestShouldEncrypt(): array { ]; } - public function testDecrypt(): void { $this->expectException(DecryptionFailedException::class); $this->expectExceptionMessage('Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.'); diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index ac8238ddd0000..4ab727a56f1b4 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests; use OC\Files\FileInfo; @@ -96,7 +97,6 @@ public function testGetPrivateKey(): void { ->with($this->equalTo($this->userId), $this->equalTo('privateKey')) ->willReturn('privateKey'); - $this->assertSame('privateKey', $this->instance->getPrivateKey($this->userId) ); @@ -108,7 +108,6 @@ public function testGetPublicKey(): void { ->with($this->equalTo($this->userId), $this->equalTo('publicKey')) ->willReturn('publicKey'); - $this->assertSame('publicKey', $this->instance->getPublicKey($this->userId) ); @@ -120,7 +119,6 @@ public function testRecoveryKeyExists(): void { ->with($this->equalTo($this->systemKeyId . '.publicKey')) ->willReturn('recoveryKey'); - $this->assertTrue($this->instance->recoveryKeyExists()); } @@ -146,7 +144,6 @@ public function testSetPublicKey(): void { $this->equalTo('key')) ->willReturn(true); - $this->assertTrue( $this->instance->setPublicKey($this->userId, 'key') ); @@ -161,7 +158,6 @@ public function testSetPrivateKey(): void { $this->equalTo('key')) ->willReturn(true); - $this->assertTrue( $this->instance->setPrivateKey($this->userId, 'key') ); @@ -174,7 +170,6 @@ public function testUserHasKeys($key, $expected): void { ->with($this->equalTo($this->userId), $this->anything()) ->willReturn($key); - $this->assertSame($expected, $this->instance->userHasKeys($this->userId) ); @@ -187,7 +182,6 @@ public static function dataTestUserHasKeys(): array { ]; } - public function testUserHasKeysMissingPrivateKey(): void { $this->expectException(PrivateKeyMissingException::class); @@ -203,7 +197,6 @@ public function testUserHasKeysMissingPrivateKey(): void { $this->instance->userHasKeys($this->userId); } - public function testUserHasKeysMissingPublicKey(): void { $this->expectException(PublicKeyMissingException::class); @@ -282,7 +275,6 @@ public static function dataTestInit(): array { ]; } - public function testSetRecoveryKey(): void { $this->keyStorageMock->expects($this->exactly(2)) ->method('setSystemUserKey') @@ -292,7 +284,6 @@ public function testSetRecoveryKey(): void { ->with($this->equalTo('privateKey'), $this->equalTo('pass')) ->willReturn('decryptedPrivateKey'); - $this->assertTrue( $this->instance->setRecoveryKey('pass', ['publicKey' => 'publicKey', 'privateKey' => 'privateKey']) @@ -305,7 +296,6 @@ public function testSetSystemPrivateKey(): void { ->with($this->equalTo('keyId.privateKey'), $this->equalTo('key')) ->willReturn(true); - $this->assertTrue( $this->instance->setSystemPrivateKey('keyId', 'key') ); @@ -317,7 +307,6 @@ public function testGetSystemPrivateKey(): void { ->with($this->equalTo('keyId.privateKey')) ->willReturn('systemPrivateKey'); - $this->assertSame('systemPrivateKey', $this->instance->getSystemPrivateKey('keyId') ); @@ -529,7 +518,6 @@ public function testGetMasterKeyPassword(): void { ); } - public function testGetMasterKeyPasswordException(): void { $this->expectException(\Exception::class); diff --git a/apps/encryption/tests/Listeners/UserEventsListenersTest.php b/apps/encryption/tests/Listeners/UserEventsListenersTest.php index 08a7f40035b6f..ebd9238b25b51 100644 --- a/apps/encryption/tests/Listeners/UserEventsListenersTest.php +++ b/apps/encryption/tests/Listeners/UserEventsListenersTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Tests\Listeners; use OC\Core\Events\BeforePasswordResetEvent; diff --git a/apps/encryption/tests/PassphraseServiceTest.php b/apps/encryption/tests/PassphraseServiceTest.php index 29a800f3a8a09..bffcd7d95a683 100644 --- a/apps/encryption/tests/PassphraseServiceTest.php +++ b/apps/encryption/tests/PassphraseServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Tests; use OCA\Encryption\Crypto\Crypt; diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index 74d472adeec52..19d7a5ecd63a0 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -206,7 +206,6 @@ public function testRecoverFile(): void { ->with($this->anything(), $this->anything(), $this->equalTo('admin')) ->willReturn(['admin' => 'publicKey']); - $this->cryptMock->expects($this->once()) ->method('multiKeyEncrypt') ->willReturn(['admin' => 'shareKey']); @@ -259,7 +258,6 @@ protected function setUp(): void { $this->viewMock); } - /** * @param $app * @param $key diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index 7769b1949d8e9..21768332c9cf6 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests; use OCA\Encryption\Exceptions\PrivateKeyMissingException; @@ -95,7 +96,6 @@ public function testGetDecryptAllKeyException2(): void { $this->instance->getDecryptAllKey(); } - public function testSetAndGetStatusWillSetAndReturn(): void { // Check if get status will return 0 if it has not been set before $this->assertEquals(0, $this->instance->getStatus()); @@ -163,7 +163,6 @@ public function getValueTester($key) { return null; } - public function testClearWillRemoveValues(): void { $this->instance->setPrivateKey('privateKey'); $this->instance->setStatus('initStatus'); @@ -173,7 +172,6 @@ public function testClearWillRemoveValues(): void { $this->assertEmpty(self::$tempStorage); } - protected function setUp(): void { parent::setUp(); $this->sessionMock = $this->createMock(ISession::class); @@ -190,7 +188,6 @@ protected function setUp(): void { ->method('remove') ->willReturnCallback([$this, 'removeValueTester']); - $this->instance = new Session($this->sessionMock); } diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php index 10d2a61c5279e..f82d9fce1194e 100644 --- a/apps/encryption/tests/Settings/AdminTest.php +++ b/apps/encryption/tests/Settings/AdminTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Encryption\Tests\Settings; use OCA\Encryption\Settings\Admin; diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 1f95425884436..aecdfd51392ed 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests\Users; use OCA\Encryption\Crypto\Crypt; @@ -46,7 +47,6 @@ protected function setUp(): void { ); } - public function testSetupSystem(): void { $this->keyManagerMock->expects($this->once())->method('validateShareKey'); $this->keyManagerMock->expects($this->once())->method('validateMasterKey'); diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index ed274f74ab5ca..757a1b092b4f1 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Encryption\Tests; use OC\Files\View; diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php index 4588e6da288e6..a4502c939f8c1 100644 --- a/apps/federatedfilesharing/lib/AddressHandler.php +++ b/apps/federatedfilesharing/lib/AddressHandler.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing; use OCP\Federation\ICloudIdManager; diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php index a46644a2485d1..b8ea5dcad5947 100644 --- a/apps/federatedfilesharing/lib/AppInfo/Application.php +++ b/apps/federatedfilesharing/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\AppInfo; use Closure; diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php index 25a2f0e5ce136..42a82176242dd 100644 --- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php +++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\BackgroundJob; use OCA\FederatedFileSharing\Notifications; diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index cf755610dca2f..ceac2388f7b24 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Controller; use OCA\DAV\Connector\Sabre\PublicAuth; diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php index 2fc262a1e67da..3ecbee61080f1 100644 --- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php +++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Controller; use OCA\FederatedFileSharing\FederatedShareProvider; @@ -170,7 +171,6 @@ public function reShare(string $id, ?string $token = null, ?string $shareWith = throw new OCSBadRequestException(); } - /** * accept server-to-server share * @@ -274,7 +274,6 @@ private function cleanupRemote(string $remote): string { return rtrim($remote, '/'); } - /** * federated share was revoked, either by the owner or the re-sharer * diff --git a/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php b/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php index 2a79f434b8c08..8320acf7957a5 100644 --- a/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php +++ b/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Events; use OCP\EventDispatcher\Event; diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index cd72ec3e32cdb..0957b1c0ef214 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing; use OC\Share20\Exception\InvalidShare; @@ -105,7 +106,6 @@ public function create(IShare $share): IShare { throw new \Exception($message_t); } - // don't allow federated shares if source and target server are the same $cloudId = $this->cloudIdManager->resolveCloudId($shareWith); $currentServer = $this->addressHandler->generateRemoteURL(); @@ -342,7 +342,6 @@ protected function sendPermissionUpdate(IShare $share): void { $this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions()); } - /** * Update successful reShare with the correct token. */ @@ -500,7 +499,6 @@ public function restore(IShare $share, string $recipient): IShare { throw new GenericShareException('not implemented'); } - #[\Override] public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) { if (!$shallow) { @@ -708,7 +706,6 @@ public function getSharedWith($userId, $shareType, $node, $limit, $offset) { } $cursor->closeCursor(); - return $shares; } @@ -926,7 +923,6 @@ public function isIncomingServer2serverShareEnabled(): bool { return $result === 'yes'; } - /** * Check if users from other Nextcloud instances are allowed to send federated group shares */ @@ -970,7 +966,6 @@ public function isLookupServerQueriesEnabled(): bool { return false; } - /** * Check if it is allowed to publish user specific data to the lookup server */ diff --git a/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php b/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php index b936f462e8865..dcc8737f75f66 100644 --- a/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php +++ b/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Listeners; use OCA\FederatedFileSharing\AppInfo\Application; diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php index be002fe79528b..f621dddd30471 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php +++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Migration; use Closure; diff --git a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php index 133b2a1da8035..43e84ed1795f5 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php +++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Migration; use Closure; diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index 4a909048a95d6..d96c171d8af43 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing; use OC\ServerNotAvailableException; @@ -268,7 +269,6 @@ public function sendUpdateToRemote($remote, $remoteId, $token, $action, $data = return false; } - /** * return current timestamp * diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php index 7bf90e3365099..207d040a61b4a 100644 --- a/apps/federatedfilesharing/lib/Notifier.php +++ b/apps/federatedfilesharing/lib/Notifier.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing; use OCP\Contacts\IManager; @@ -135,7 +136,6 @@ public function prepare(INotification $notification, string $languageCode): INot $notification->addParsedAction($action); } return $notification; - default: // Unknown subject => Unknown notification => throw throw new UnknownNotificationException(); diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php index d276128958532..419d9ebd7c631 100644 --- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php +++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\OCM; use OC\AppFramework\Http; @@ -297,7 +298,6 @@ private function shareAccepted(string $id, array $notification): array { 'sharedSecret' => $token, 'message' => 'Recipient accepted the re-share' ] - ); $this->cloudFederationProviderManager->sendNotification($remote, $notification); } @@ -618,8 +618,6 @@ protected function verifyShare(IShare $share, string $token): bool { throw new AuthenticationFailedException(); } - - /** * Check if server-to-server sharing is enabled */ diff --git a/apps/federatedfilesharing/lib/Settings/Admin.php b/apps/federatedfilesharing/lib/Settings/Admin.php index 79c174678734e..facfc4d16b662 100644 --- a/apps/federatedfilesharing/lib/Settings/Admin.php +++ b/apps/federatedfilesharing/lib/Settings/Admin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Settings; use OCA\FederatedFileSharing\AppInfo\Application; diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php index 07895cfbba327..270b1a0af8c3e 100644 --- a/apps/federatedfilesharing/lib/Settings/Personal.php +++ b/apps/federatedfilesharing/lib/Settings/Personal.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Settings; use OCA\FederatedFileSharing\AppInfo\Application; diff --git a/apps/federatedfilesharing/lib/Settings/PersonalSection.php b/apps/federatedfilesharing/lib/Settings/PersonalSection.php index b5170e6d8e4a5..678afb099b8c9 100644 --- a/apps/federatedfilesharing/lib/Settings/PersonalSection.php +++ b/apps/federatedfilesharing/lib/Settings/PersonalSection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Settings; use OCP\IL10N; diff --git a/apps/federatedfilesharing/lib/TokenHandler.php b/apps/federatedfilesharing/lib/TokenHandler.php index f3fdaead8cd9e..c1260706906db 100644 --- a/apps/federatedfilesharing/lib/TokenHandler.php +++ b/apps/federatedfilesharing/lib/TokenHandler.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing; use OCP\Security\ISecureRandom; diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 40557eeb07db5..1d31ea07d4e4a 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use OC\Federation\CloudIdManager; diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index 83df80022559f..cee2af40a8838 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests\Controller; use OC\Federation\CloudIdManager; diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index 0e4e75a331664..86d7eb11d9715 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use OCA\FederatedFileSharing\Controller\RequestHandlerController; @@ -136,7 +137,6 @@ public function testDeclineShare(): void { $this->assertInstanceOf(DataResponse::class, $result); } - public function testAcceptShare(): void { $id = '42'; diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderReshareRemoteTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderReshareRemoteTest.php index deb0938578a95..2aa6f8790cde8 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderReshareRemoteTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderReshareRemoteTest.php @@ -49,7 +49,6 @@ class FederatedShareProviderReshareRemoteTest extends \Test\TestCase { private LoggerInterface $logger; private FederatedShareProvider $shareProvider; - protected function setUp(): void { $this->connection = $this->createMock(IDBConnection::class); $this->addressHandler = $this->createMock(AddressHandler::class); @@ -248,7 +247,6 @@ public function testCreateRemoteOwner(): void { $qb6->method('createNamedParameter')->willReturn(''); $qb6->method('executeQuery')->willReturn($result6); - $queryBuilderMatcher = $this->exactly(7); $this->connection ->expects($queryBuilderMatcher) diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index da37617c121dd..ddf16bb4e06ae 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use LogicException; @@ -353,7 +354,6 @@ public function testCreateAlreadyShared(): void { $node->method('getId')->willReturn(42); $node->method('getName')->willReturn('myFile'); - $this->addressHandler->expects($this->any())->method('splitUserRemote') ->willReturn(['user', 'server.com']); @@ -781,7 +781,6 @@ public function testIsLookupServerQueriesEnabled(bool $gsEnabled, string $isEnab ); } - public static function dataTestIsLookupServerQueriesEnabled(): array { return [ [true, 'yes', true], diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index 761dbcce3bf9f..462def25eefb9 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use OCA\FederatedFileSharing\AddressHandler; @@ -77,7 +78,6 @@ private function getInstance(array $mockedMethods = []) { ->getMock(); } - #[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'dataTestSendUpdateToRemote')] public function testSendUpdateToRemote(int $try, array $httpRequestResult, bool $expected): void { $remote = 'http://remote'; @@ -117,7 +117,6 @@ public function testSendUpdateToRemote(int $try, array $httpRequestResult, bool ); } - public static function dataTestSendUpdateToRemote(): array { return [ // test if background job is added correctly diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php index 54b36f1dea2b8..033d98e222e09 100644 --- a/apps/federatedfilesharing/tests/Settings/AdminTest.php +++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\FederatedFileSharing\Tests\Settings; use OCA\FederatedFileSharing\FederatedShareProvider; diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php index 5132a2c8fd0d6..ade1eb1facb88 100644 --- a/apps/federatedfilesharing/tests/TestCase.php +++ b/apps/federatedfilesharing/tests/TestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use OC\Files\Filesystem; diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php index 7a2102740136d..7105c56711ae3 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\FederatedFileSharing\Tests; use OCA\FederatedFileSharing\TokenHandler; diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php index 375cfcdd55dbd..7dde4b300557f 100644 --- a/apps/federation/lib/AppInfo/Application.php +++ b/apps/federation/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\AppInfo; use OCA\DAV\Events\SabrePluginAuthInitEvent; diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php index fdfa24fb5669f..04abd4614c3eb 100644 --- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php index 3818f9e14627c..2d1a02b4e5ad1 100644 --- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\BackgroundJob; use GuzzleHttp\Exception\ClientException; @@ -54,7 +55,6 @@ public function __construct( $this->httpClient = $httpClientService->newClient(); } - /** * run the job, then remove it from the joblist */ diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php index f50147274a92f..38a0e9fc50086 100644 --- a/apps/federation/lib/Command/SyncFederationAddressBooks.php +++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Command; use OCA\Federation\SyncFederationAddressBooks as SyncService; diff --git a/apps/federation/lib/Controller/OCSAuthAPIController.php b/apps/federation/lib/Controller/OCSAuthAPIController.php index 1a4cc5d5817a0..026cc2fc7b46b 100644 --- a/apps/federation/lib/Controller/OCSAuthAPIController.php +++ b/apps/federation/lib/Controller/OCSAuthAPIController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Controller; use OCA\Federation\DbHandler; @@ -64,7 +65,6 @@ public function requestSharedSecretLegacy(string $url, string $token): DataRespo return $this->requestSharedSecret($url, $token); } - /** * Create shared secret and return it, for legacy end-points * diff --git a/apps/federation/lib/Controller/SettingsController.php b/apps/federation/lib/Controller/SettingsController.php index 541c821d56986..9d9ceec1a8c00 100644 --- a/apps/federation/lib/Controller/SettingsController.php +++ b/apps/federation/lib/Controller/SettingsController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Controller; use OCA\Federation\Settings\Admin; @@ -31,7 +32,6 @@ public function __construct( parent::__construct($appName, $request); } - /** * Add server to the list of trusted Nextcloud servers * @@ -108,7 +108,6 @@ public function getServers(): DataResponse { return new DataResponse($servers); } - /** * Check if the server should be added to the list of trusted servers or not. */ diff --git a/apps/federation/lib/DAV/FedAuth.php b/apps/federation/lib/DAV/FedAuth.php index 76af6e3e187f0..beec4b6d5122f 100644 --- a/apps/federation/lib/DAV/FedAuth.php +++ b/apps/federation/lib/DAV/FedAuth.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\DAV; use OCA\Federation\DbHandler; diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php index 1dac5a2f45fc9..13cee661ba289 100644 --- a/apps/federation/lib/DbHandler.php +++ b/apps/federation/lib/DbHandler.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation; use OC\Files\Filesystem; diff --git a/apps/federation/lib/Listener/SabrePluginAuthInitListener.php b/apps/federation/lib/Listener/SabrePluginAuthInitListener.php index efc6d4b2e42c9..9a186ed02f4cd 100644 --- a/apps/federation/lib/Listener/SabrePluginAuthInitListener.php +++ b/apps/federation/lib/Listener/SabrePluginAuthInitListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Federation\Listener; use OCA\DAV\Events\SabrePluginAuthInitEvent; diff --git a/apps/federation/lib/Migration/Version1010Date20200630191302.php b/apps/federation/lib/Migration/Version1010Date20200630191302.php index 27a0efd0cfbfb..bd019bc2fa01f 100644 --- a/apps/federation/lib/Migration/Version1010Date20200630191302.php +++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Federation\Migration; use Closure; diff --git a/apps/federation/lib/Settings/Admin.php b/apps/federation/lib/Settings/Admin.php index 449db1f07c034..73be43ec887c8 100644 --- a/apps/federation/lib/Settings/Admin.php +++ b/apps/federation/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Federation\Settings; use OCA\Federation\AppInfo\Application; diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php index 5ad64708bb737..f61cde8e10d3a 100644 --- a/apps/federation/lib/SyncFederationAddressBooks.php +++ b/apps/federation/lib/SyncFederationAddressBooks.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation; use OCA\DAV\CardDAV\SyncService; diff --git a/apps/federation/lib/SyncJob.php b/apps/federation/lib/SyncJob.php index c73e9ea2b3e10..c4b1dd8bbd82f 100644 --- a/apps/federation/lib/SyncJob.php +++ b/apps/federation/lib/SyncJob.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/federation/lib/TrustedServers.php b/apps/federation/lib/TrustedServers.php index 0b4f004add233..93add0541d2a0 100644 --- a/apps/federation/lib/TrustedServers.php +++ b/apps/federation/lib/TrustedServers.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation; use OCA\Federation\BackgroundJob\RequestSharedSecret; diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index 21dbf61a5bb64..f73fe5888cf33 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests\BackgroundJob; use GuzzleHttp\Exception\ConnectException; diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index c1108731625cd..7326692596f14 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests\BackgroundJob; use GuzzleHttp\Exception\ConnectException; diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php index 68a8525c76939..c3294f6a1fff9 100644 --- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php +++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests\Controller; use OC\BackgroundJob\JobList; @@ -87,7 +88,6 @@ public function testRequestSharedSecret(string $token, string $localToken, bool } } - try { $this->ocsAuthApi->requestSharedSecret($url, $token); $this->assertTrue($isTrustedServer); diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index aa46559431687..bb7df0fa25a0a 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests\Controller; use OCA\Federation\Controller\SettingsController; diff --git a/apps/federation/tests/DAV/FedAuthTest.php b/apps/federation/tests/DAV/FedAuthTest.php index f68bfe9297ea8..b8520801d8e86 100644 --- a/apps/federation/tests/DAV/FedAuthTest.php +++ b/apps/federation/tests/DAV/FedAuthTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests\DAV; use OCA\Federation\DAV\FedAuth; diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index a812c28b6344d..149841367f979 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests; use OCA\Federation\DbHandler; @@ -105,7 +106,6 @@ public function testRemove(): void { $this->assertSame($id1, (int)$result[0]['id']); } - public function testGetServerById(): void { $this->dbHandler->addServer('server1'); $id = $this->dbHandler->addServer('server2'); diff --git a/apps/federation/tests/Settings/AdminTest.php b/apps/federation/tests/Settings/AdminTest.php index 44c8b8ae3c4e8..ee9d4fd484d03 100644 --- a/apps/federation/tests/Settings/AdminTest.php +++ b/apps/federation/tests/Settings/AdminTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Federation\Tests\Settings; use OCA\Federation\Settings\Admin; diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php index ff03f5cf44232..1dacbb288ba8e 100644 --- a/apps/federation/tests/SyncFederationAddressbooksTest.php +++ b/apps/federation/tests/SyncFederationAddressbooksTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests; use OC\OCS\DiscoveryService; diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index e08736a26d5c0..5f10a5f1cf89d 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Federation\Tests; use OCA\Federation\BackgroundJob\RequestSharedSecret; diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index 04afe578c477e..d3c74bd424c17 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\AppInfo; return [ diff --git a/apps/files/lib/Activity/FavoriteProvider.php b/apps/files/lib/Activity/FavoriteProvider.php index a2529b1787459..b6bd740ab2505 100644 --- a/apps/files/lib/Activity/FavoriteProvider.php +++ b/apps/files/lib/Activity/FavoriteProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files/lib/Activity/Filter/Favorites.php b/apps/files/lib/Activity/Filter/Favorites.php index 5aed2dd22e7b8..417d93d1bf0bb 100644 --- a/apps/files/lib/Activity/Filter/Favorites.php +++ b/apps/files/lib/Activity/Filter/Favorites.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Filter; use OCA\Files\Activity\Helper; diff --git a/apps/files/lib/Activity/Filter/FileChanges.php b/apps/files/lib/Activity/Filter/FileChanges.php index fa726bf414d8c..9df0998213383 100644 --- a/apps/files/lib/Activity/Filter/FileChanges.php +++ b/apps/files/lib/Activity/Filter/FileChanges.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Filter; use OCP\Activity\IFilter; diff --git a/apps/files/lib/Activity/Helper.php b/apps/files/lib/Activity/Helper.php index 9b8ad9cd44203..8c97a3e44e8b6 100644 --- a/apps/files/lib/Activity/Helper.php +++ b/apps/files/lib/Activity/Helper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Activity; use OCP\Files\Folder; diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php index 7344cf2b06c1f..c780392140456 100644 --- a/apps/files/lib/Activity/Provider.php +++ b/apps/files/lib/Activity/Provider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files/lib/Activity/Settings/FavoriteAction.php b/apps/files/lib/Activity/Settings/FavoriteAction.php index 6dd6b62cb9cd2..56033025d07d5 100644 --- a/apps/files/lib/Activity/Settings/FavoriteAction.php +++ b/apps/files/lib/Activity/Settings/FavoriteAction.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Settings; class FavoriteAction extends FileActivitySettings { diff --git a/apps/files/lib/Activity/Settings/FileActivitySettings.php b/apps/files/lib/Activity/Settings/FileActivitySettings.php index a7d0db4bddf99..3fb78ee2ba722 100644 --- a/apps/files/lib/Activity/Settings/FileActivitySettings.php +++ b/apps/files/lib/Activity/Settings/FileActivitySettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Settings; use OCP\Activity\ActivitySettings; diff --git a/apps/files/lib/Activity/Settings/FileChanged.php b/apps/files/lib/Activity/Settings/FileChanged.php index 72b46798ebb38..d1d888b810652 100644 --- a/apps/files/lib/Activity/Settings/FileChanged.php +++ b/apps/files/lib/Activity/Settings/FileChanged.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Settings; class FileChanged extends FileActivitySettings { diff --git a/apps/files/lib/Activity/Settings/FileFavoriteChanged.php b/apps/files/lib/Activity/Settings/FileFavoriteChanged.php index a743cb5ac678e..73adec3e12e91 100644 --- a/apps/files/lib/Activity/Settings/FileFavoriteChanged.php +++ b/apps/files/lib/Activity/Settings/FileFavoriteChanged.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Activity\Settings; class FileFavoriteChanged extends FileActivitySettings { diff --git a/apps/files/lib/AdvancedCapabilities.php b/apps/files/lib/AdvancedCapabilities.php index 7ecc1d89cb693..01b585b79c82a 100644 --- a/apps/files/lib/AdvancedCapabilities.php +++ b/apps/files/lib/AdvancedCapabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files; use OCA\Files\Service\SettingsService; diff --git a/apps/files/lib/App.php b/apps/files/lib/App.php index 0326b670608a7..844c92a7ef826 100644 --- a/apps/files/lib/App.php +++ b/apps/files/lib/App.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files; use OCA\Files\Service\ChunkedUploadConfig; diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php index 54e6b2c678ad0..fdf0f0cf9c034 100644 --- a/apps/files/lib/AppInfo/Application.php +++ b/apps/files/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\AppInfo; use Closure; diff --git a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php index 193c4051c92d4..8a61e7d7b942b 100644 --- a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php +++ b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/files/lib/BackgroundJob/CleanupFileLocks.php b/apps/files/lib/BackgroundJob/CleanupFileLocks.php index 81ed3a0c1fd8d..f2c77699b1d51 100644 --- a/apps/files/lib/BackgroundJob/CleanupFileLocks.php +++ b/apps/files/lib/BackgroundJob/CleanupFileLocks.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\BackgroundJob; use OC\Lock\DBLockingProvider; diff --git a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php index 55a3dfe80f497..e99fa85856a07 100644 --- a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php +++ b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/files/lib/BackgroundJob/SanitizeFilenames.php b/apps/files/lib/BackgroundJob/SanitizeFilenames.php index a0c54687bf085..b4c690988670c 100644 --- a/apps/files/lib/BackgroundJob/SanitizeFilenames.php +++ b/apps/files/lib/BackgroundJob/SanitizeFilenames.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\BackgroundJob; use OCA\Files\AppInfo\Application; @@ -153,7 +154,6 @@ private function retryFailedUserNodes(IUser $user, array $errors): bool { return $hasErrors; } - private function sanitizeUserFiles(IUser $user): void { // Set an active user so that event listeners can correctly work (e.g. files versions) $this->session->setVolatileActiveUser($user); diff --git a/apps/files/lib/BackgroundJob/TransferOwnership.php b/apps/files/lib/BackgroundJob/TransferOwnership.php index 8b7bd7e553f5d..9960d10d3a007 100644 --- a/apps/files/lib/BackgroundJob/TransferOwnership.php +++ b/apps/files/lib/BackgroundJob/TransferOwnership.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\BackgroundJob; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Capabilities.php b/apps/files/lib/Capabilities.php index 04c60de0ff8f6..1b6a3695dce7b 100644 --- a/apps/files/lib/Capabilities.php +++ b/apps/files/lib/Capabilities.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files; use OC\Files\FilenameValidator; diff --git a/apps/files/lib/Collaboration/Resources/Listener.php b/apps/files/lib/Collaboration/Resources/Listener.php index e4ff5d83b7af4..cb129c7fb63bd 100644 --- a/apps/files/lib/Collaboration/Resources/Listener.php +++ b/apps/files/lib/Collaboration/Resources/Listener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Collaboration\Resources; use OCP\Collaboration\Resources\IManager; diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php index 38c6aebbbb2fe..521cd891f4cdf 100644 --- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php +++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Collaboration\Resources; use OCP\Collaboration\Resources\IProvider; diff --git a/apps/files/lib/Command/DeleteOrphanedFiles.php b/apps/files/lib/Command/DeleteOrphanedFiles.php index 7d8012ea15774..c5a15c304a6fd 100644 --- a/apps/files/lib/Command/DeleteOrphanedFiles.php +++ b/apps/files/lib/Command/DeleteOrphanedFiles.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Command; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/files/lib/Command/RepairTree.php b/apps/files/lib/Command/RepairTree.php index 3964cfb012f29..b7134d02a4dfc 100644 --- a/apps/files/lib/Command/RepairTree.php +++ b/apps/files/lib/Command/RepairTree.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Command; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/files/lib/Command/SanitizeFilenames.php b/apps/files/lib/Command/SanitizeFilenames.php index a7475f1dae179..3432cc835a976 100644 --- a/apps/files/lib/Command/SanitizeFilenames.php +++ b/apps/files/lib/Command/SanitizeFilenames.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Command; use Exception; diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 16830f1806bb2..8e17671e2ef97 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Command; use OC\Core\Command\Base; @@ -351,7 +352,6 @@ protected function presentStats(OutputInterface $output): void { $table->render(); } - /** * Formats microtime into a human-readable format */ diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php index 1399229c2945f..eab0237486c53 100644 --- a/apps/files/lib/Command/ScanAppData.php +++ b/apps/files/lib/Command/ScanAppData.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Command; use OC\Core\Command\Base; @@ -137,7 +138,6 @@ protected function scanFiles(OutputInterface $output, string $folder): int { return self::SUCCESS; } - #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { # restrict the verbosity level to VERBOSITY_VERBOSE @@ -231,7 +231,6 @@ protected function displayTable($output, $headers, $rows): void { $table->render(); } - /** * Formats microtime into a human-readable format */ diff --git a/apps/files/lib/Command/WindowsCompatibleFilenames.php b/apps/files/lib/Command/WindowsCompatibleFilenames.php index 9d8e17d4e0f79..d595d5731b68b 100644 --- a/apps/files/lib/Command/WindowsCompatibleFilenames.php +++ b/apps/files/lib/Command/WindowsCompatibleFilenames.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Command; use OC\Core\Command\Base; diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php index 20eb7dba5def3..3a96b7e178cbe 100644 --- a/apps/files/lib/Controller/ApiController.php +++ b/apps/files/lib/Controller/ApiController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Controller; use OC\Files\Node\Node; @@ -393,7 +394,6 @@ public function setViewConfig(string $view, string $key, $value): JSONResponse { return new JSONResponse(['message' => 'ok', 'data' => $this->viewConfig->getConfig($view)]); } - /** * Get the user view config * @@ -422,7 +422,6 @@ public function setConfig(string $key, $value): JSONResponse { return new JSONResponse(['message' => 'ok', 'data' => ['key' => $key, 'value' => $value]]); } - /** * Get the user config * diff --git a/apps/files/lib/Controller/DirectEditingController.php b/apps/files/lib/Controller/DirectEditingController.php index c8addc33e9868..6159de224079c 100644 --- a/apps/files/lib/Controller/DirectEditingController.php +++ b/apps/files/lib/Controller/DirectEditingController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Controller; use Exception; @@ -119,8 +120,6 @@ public function open(string $path, ?string $editorId = null, ?int $fileId = null } } - - /** * Get the templates for direct editing * diff --git a/apps/files/lib/Controller/DirectEditingViewController.php b/apps/files/lib/Controller/DirectEditingViewController.php index b13e68f7766bc..76f2acd112e08 100644 --- a/apps/files/lib/Controller/DirectEditingViewController.php +++ b/apps/files/lib/Controller/DirectEditingViewController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Controller; use Exception; diff --git a/apps/files/lib/Controller/FilenamesController.php b/apps/files/lib/Controller/FilenamesController.php index 5b9ee17fd51ff..d76759b8b04f2 100644 --- a/apps/files/lib/Controller/FilenamesController.php +++ b/apps/files/lib/Controller/FilenamesController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Controller; use OCA\Files\BackgroundJob\SanitizeFilenames; diff --git a/apps/files/lib/Controller/TemplateController.php b/apps/files/lib/Controller/TemplateController.php index ee4c86941c730..4b4ea3c156985 100644 --- a/apps/files/lib/Controller/TemplateController.php +++ b/apps/files/lib/Controller/TemplateController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Controller; use OCA\Files\ResponseDefinitions; diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php index 51a25400efb8a..93039e6b7c9e7 100644 --- a/apps/files/lib/Controller/TransferOwnershipController.php +++ b/apps/files/lib/Controller/TransferOwnershipController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Controller; use OCA\Files\BackgroundJob\TransferOwnership; @@ -40,7 +41,6 @@ public function __construct( parent::__construct($appName, $request); } - /** * Transfer the ownership to another user * diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index d9a5b24b6416d..87aa4377ea80c 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Controller; use OC\Files\FilenameValidator; @@ -102,7 +103,6 @@ public function showFile(?string $fileid = null, ?string $opendetails = null, ?s } } - /** * @param string $dir * @param string $view diff --git a/apps/files/lib/Db/TransferOwnership.php b/apps/files/lib/Db/TransferOwnership.php index ae78c19b76db0..f1e89d5fcb888 100644 --- a/apps/files/lib/Db/TransferOwnership.php +++ b/apps/files/lib/Db/TransferOwnership.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/files/lib/Db/TransferOwnershipMapper.php b/apps/files/lib/Db/TransferOwnershipMapper.php index 8b29399f7688c..dc7b01ee4ba18 100644 --- a/apps/files/lib/Db/TransferOwnershipMapper.php +++ b/apps/files/lib/Db/TransferOwnershipMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Db; use OCP\AppFramework\Db\QBMapper; diff --git a/apps/files/lib/DirectEditingCapabilities.php b/apps/files/lib/DirectEditingCapabilities.php index b51cabc583c88..c48b8998dc85d 100644 --- a/apps/files/lib/DirectEditingCapabilities.php +++ b/apps/files/lib/DirectEditingCapabilities.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files; use OCA\Files\Service\DirectEditingService; diff --git a/apps/files/lib/Event/LoadAdditionalScriptsEvent.php b/apps/files/lib/Event/LoadAdditionalScriptsEvent.php index d1cf7f4016ef1..6f50ea714107e 100644 --- a/apps/files/lib/Event/LoadAdditionalScriptsEvent.php +++ b/apps/files/lib/Event/LoadAdditionalScriptsEvent.php @@ -6,6 +6,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/apps/files/lib/Event/LoadSearchPlugins.php b/apps/files/lib/Event/LoadSearchPlugins.php index 9c6c81fcca561..f0aeb96ba2d52 100644 --- a/apps/files/lib/Event/LoadSearchPlugins.php +++ b/apps/files/lib/Event/LoadSearchPlugins.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Event; use OCP\EventDispatcher\Event; diff --git a/apps/files/lib/Event/LoadSidebar.php b/apps/files/lib/Event/LoadSidebar.php index 01db57bb562ef..e52459ed2630b 100644 --- a/apps/files/lib/Event/LoadSidebar.php +++ b/apps/files/lib/Event/LoadSidebar.php @@ -6,6 +6,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/apps/files/lib/Exception/TransferOwnershipException.php b/apps/files/lib/Exception/TransferOwnershipException.php index 531c5d513da2b..91acb93172ac4 100644 --- a/apps/files/lib/Exception/TransferOwnershipException.php +++ b/apps/files/lib/Exception/TransferOwnershipException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Exception; use Exception; diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php index 6f738dc9be7b6..be8f2229495a9 100644 --- a/apps/files/lib/Helper.php +++ b/apps/files/lib/Helper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files; use OC\Files\Filesystem; diff --git a/apps/files/lib/Listener/LoadSidebarListener.php b/apps/files/lib/Listener/LoadSidebarListener.php index 397e1974bd694..c543819702d5a 100644 --- a/apps/files/lib/Listener/LoadSidebarListener.php +++ b/apps/files/lib/Listener/LoadSidebarListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Listener; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Listener/NodeAddedToFavoriteListener.php b/apps/files/lib/Listener/NodeAddedToFavoriteListener.php index 86b98669c22d1..5eab65daaa5e0 100644 --- a/apps/files/lib/Listener/NodeAddedToFavoriteListener.php +++ b/apps/files/lib/Listener/NodeAddedToFavoriteListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Listener; use OCA\Files\Activity\FavoriteProvider; diff --git a/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php b/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php index 5decf02f5d84e..dc204c4e6e793 100644 --- a/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php +++ b/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Listener; use OCA\Files\Activity\FavoriteProvider; diff --git a/apps/files/lib/Listener/SyncLivePhotosListener.php b/apps/files/lib/Listener/SyncLivePhotosListener.php index a3213310b486f..aa1d109b67bf6 100644 --- a/apps/files/lib/Listener/SyncLivePhotosListener.php +++ b/apps/files/lib/Listener/SyncLivePhotosListener.php @@ -163,7 +163,6 @@ private function handleMove(Node $sourceFile, Node $targetFile, Node $peerFile): $this->pendingRenames = array_diff($this->pendingRenames, [$sourceFile->getId()]); } - /** * handle copy, we already know if it is doable from BeforeNodeCopiedEvent, so we just copy the linked file */ diff --git a/apps/files/lib/Migration/Version11301Date20191205150729.php b/apps/files/lib/Migration/Version11301Date20191205150729.php index ae47e85e3bc09..4f49a4a141ef7 100644 --- a/apps/files/lib/Migration/Version11301Date20191205150729.php +++ b/apps/files/lib/Migration/Version11301Date20191205150729.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Migration; use Closure; diff --git a/apps/files/lib/Notification/Notifier.php b/apps/files/lib/Notification/Notifier.php index 9f32001707f27..a041d3ab9ad20 100644 --- a/apps/files/lib/Notification/Notifier.php +++ b/apps/files/lib/Notification/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Notification; use OCA\Files\BackgroundJob\TransferOwnership; diff --git a/apps/files/lib/Search/FilesSearchProvider.php b/apps/files/lib/Search/FilesSearchProvider.php index b171b2a745615..93af94db391c9 100644 --- a/apps/files/lib/Search/FilesSearchProvider.php +++ b/apps/files/lib/Search/FilesSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Search; use InvalidArgumentException; diff --git a/apps/files/lib/Service/DirectEditingService.php b/apps/files/lib/Service/DirectEditingService.php index 3d756ee56fa94..842ba43a66d4a 100644 --- a/apps/files/lib/Service/DirectEditingService.php +++ b/apps/files/lib/Service/DirectEditingService.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Service; use OCP\DirectEditing\ACreateEmpty; diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 3864710ba3d88..3b4a990c569d9 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -139,7 +139,6 @@ public function transfer( throw new TransferOwnershipException('Destination path does not exists or is not empty', 1); } - // analyse source folder $this->analyse( $sourceUid, @@ -435,7 +434,6 @@ private function collectIncomingShares( $offset += 50; } - $progress->finish(); $output->writeln(''); return $shares; diff --git a/apps/files/lib/Service/SettingsService.php b/apps/files/lib/Service/SettingsService.php index 6afec4e65494b..f37cac5263faf 100644 --- a/apps/files/lib/Service/SettingsService.php +++ b/apps/files/lib/Service/SettingsService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Service; use OC\Files\FilenameValidator; diff --git a/apps/files/lib/Service/TagService.php b/apps/files/lib/Service/TagService.php index 9e5661eef6fcc..3040bc329e63c 100644 --- a/apps/files/lib/Service/TagService.php +++ b/apps/files/lib/Service/TagService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Service; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Service/UserConfig.php b/apps/files/lib/Service/UserConfig.php index dcf30b7796db6..d660449cb9bac 100644 --- a/apps/files/lib/Service/UserConfig.php +++ b/apps/files/lib/Service/UserConfig.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Service; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Service/ViewConfig.php b/apps/files/lib/Service/ViewConfig.php index cf8bebd537284..185328d39a833 100644 --- a/apps/files/lib/Service/ViewConfig.php +++ b/apps/files/lib/Service/ViewConfig.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Service; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Settings/AdminSettings.php b/apps/files/lib/Settings/AdminSettings.php index f09b42912f172..573dff7a6bdc7 100644 --- a/apps/files/lib/Settings/AdminSettings.php +++ b/apps/files/lib/Settings/AdminSettings.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Settings; use OCA\Files\AppInfo\Application; diff --git a/apps/files/lib/Settings/PersonalSettings.php b/apps/files/lib/Settings/PersonalSettings.php index d0a060d5d609a..d3c616cddd63b 100644 --- a/apps/files/lib/Settings/PersonalSettings.php +++ b/apps/files/lib/Settings/PersonalSettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Settings; use OCA\Files\AppInfo\Application; diff --git a/apps/files/tests/Activity/Filter/GenericTest.php b/apps/files/tests/Activity/Filter/GenericTest.php index af3419c8c674f..fefa70a35f2bb 100644 --- a/apps/files/tests/Activity/Filter/GenericTest.php +++ b/apps/files/tests/Activity/Filter/GenericTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Tests\Activity\Filter; use OCA\Files\Activity\Filter\Favorites; diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php index 1a7f25609a930..3542b2839bc2f 100644 --- a/apps/files/tests/Activity/ProviderTest.php +++ b/apps/files/tests/Activity/ProviderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Tests\Activity; use OCA\Files\Activity\Provider; @@ -117,7 +118,6 @@ public function testGetFile(array|string $parameter, ?int $eventId, string $id, $this->assertSame('link-' . $id, $result['link']); } - public function testGetFileThrows(): void { $this->expectException(UnknownActivityException::class); diff --git a/apps/files/tests/Activity/Setting/GenericTest.php b/apps/files/tests/Activity/Setting/GenericTest.php index 3b4584a8f1b1a..e351b8b3501c6 100644 --- a/apps/files/tests/Activity/Setting/GenericTest.php +++ b/apps/files/tests/Activity/Setting/GenericTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Tests\Activity\Setting; use OCA\Files\Activity\Settings\FavoriteAction; diff --git a/apps/files/tests/AdvancedCapabilitiesTest.php b/apps/files/tests/AdvancedCapabilitiesTest.php index 921f7a6b353f1..a9d545027f537 100644 --- a/apps/files/tests/AdvancedCapabilitiesTest.php +++ b/apps/files/tests/AdvancedCapabilitiesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files; use OCA\Files\Service\SettingsService; diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php index a0aaeafc4dc3f..8f3ec56c94105 100644 --- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php +++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Tests\BackgroundJob; use OCA\Files\BackgroundJob\DeleteOrphanedItems; diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index d6f19ff7f0c71..389bc3c0ca75b 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Tests\BackgroundJob; use OC\Files\Mount\MountPoint; diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index 13c7a36785ae6..9b370b8fa5d56 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Tests\Command; use OC\Files\View; @@ -103,7 +104,6 @@ public function testClearFiles(): void { $this->assertCount(1, $this->getFile($fileInfo->getId()), 'Asserts that file is still available'); $this->assertEquals(1, $this->getMountsCount($numericStorageId), 'Asserts that mount is still available'); - $deletedRows = $this->connection->executeUpdate('DELETE FROM `*PREFIX*storages` WHERE `id` = ?', [$storageId]); $this->assertNotNull($deletedRows, 'Asserts that storage got deleted'); $this->assertSame(1, $deletedRows, 'Asserts that storage got deleted'); diff --git a/apps/files/tests/Command/ScanAppDataTest.php b/apps/files/tests/Command/ScanAppDataTest.php index a0fc5b18afe6d..04e55804fbd73 100644 --- a/apps/files/tests/Command/ScanAppDataTest.php +++ b/apps/files/tests/Command/ScanAppDataTest.php @@ -69,7 +69,8 @@ public function setUp(): void { $this->scanner->method('getScanner')->willReturn($this->internalScanner); $this->scanner->method('initTools') - ->willReturnCallback(function (): void {}); + ->willReturnCallback(function (): void { + }); try { $this->rootFolder->get($this->rootFolder->getAppDataDirectoryName() . '/preview')->delete(); } catch (NotFoundException) { @@ -121,7 +122,6 @@ public function testScanAppDataRoot(): void { $this->assertEquals(ScanAppData::SUCCESS, $errorCode); } - public static function scanPreviewLocalData(): \Generator { yield 'initial migration done' => [true, null]; yield 'initial migration not done' => [false, false]; diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index 1bc0af3de50fc..a3681ddf0e6e9 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Controller; use OCA\Files\Service\TagService; diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index b049e8b7a9fc1..37b9a6602d961 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Tests\Controller; use OC\Files\FilenameValidator; diff --git a/apps/files/tests/Service/ChunkedUploadConfigTest.php b/apps/files/tests/Service/ChunkedUploadConfigTest.php index 9b0f51f2d26c0..484dc970841a1 100644 --- a/apps/files/tests/Service/ChunkedUploadConfigTest.php +++ b/apps/files/tests/Service/ChunkedUploadConfigTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files\Tests\Service; use OCA\Files\Service\ChunkedUploadConfig; diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index b914489053fbc..6b88c999d486f 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files\Tests\Service; use OCA\Files\Service\TagService; diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index 19160f5e9e506..be04c01050445 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\AppInfo; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php index 1888b16fcfcc9..dbc25f6a1d06c 100644 --- a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php +++ b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\BackgroundJob; use OCA\Files_External\Lib\Auth\Password\LoginCredentials; diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php index 43e42665a8afc..ad7a976698451 100644 --- a/apps/files_external/lib/Command/Applicable.php +++ b/apps/files_external/lib/Command/Applicable.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Backends.php b/apps/files_external/lib/Command/Backends.php index 5f610f8b367b5..52b05abc50ef7 100644 --- a/apps/files_external/lib/Command/Backends.php +++ b/apps/files_external/lib/Command/Backends.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php index 0247beaba5f4b..62016d66c31a1 100644 --- a/apps/files_external/lib/Command/Config.php +++ b/apps/files_external/lib/Command/Config.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 60a2df28dc8dd..fd63641f160da 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index af2135ed06422..97e1d380351d1 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Dependencies.php b/apps/files_external/lib/Command/Dependencies.php index 54107b3651fc5..acdc60d1304ca 100644 --- a/apps/files_external/lib/Command/Dependencies.php +++ b/apps/files_external/lib/Command/Dependencies.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Export.php b/apps/files_external/lib/Command/Export.php index 2bbf5b1237ee5..365884fb4b7da 100644 --- a/apps/files_external/lib/Command/Export.php +++ b/apps/files_external/lib/Command/Export.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use Symfony\Component\Console\Input\ArrayInput; diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index b4aabf2d192f0..299e50ec2e573 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index 3ca9c7725c19d..e8979e40115ed 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index b5ea3e9fa5f6f..3c9e93f882687 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Command; use Doctrine\DBAL\Exception\DriverException; @@ -213,7 +214,6 @@ private function reconnectToDatabase(IDBConnection $connection, OutputInterface return $connection; } - private function selfTest(IStorage $storage, INotifyHandler $notifyHandler, OutputInterface $output): void { usleep(100 * 1000); //give time for the notify to start if (!$storage->file_put_contents('/.nc_test_file.txt', 'test content')) { diff --git a/apps/files_external/lib/Command/Option.php b/apps/files_external/lib/Command/Option.php index 6bf582543c78d..618a6f8f26b7f 100644 --- a/apps/files_external/lib/Command/Option.php +++ b/apps/files_external/lib/Command/Option.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/lib/Command/Scan.php b/apps/files_external/lib/Command/Scan.php index 29efee447484a..7d40d2d4cff75 100644 --- a/apps/files_external/lib/Command/Scan.php +++ b/apps/files_external/lib/Command/Scan.php @@ -154,7 +154,6 @@ protected function showSummary(array $headers, array $rows, OutputInterface $out $table->render(); } - /** * Formats microtime into a human readable format * diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php index c618291edf879..9826f3a71e5ce 100644 --- a/apps/files_external/lib/Command/Verify.php +++ b/apps/files_external/lib/Command/Verify.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Command; use OC\Core\Command\Base; diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index ed65b0d860030..e7e11bd19c626 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Config; use OC\Files\Cache\Storage; @@ -114,7 +115,6 @@ private function getAvailableStorages(array $storageConfigs, IUser $user): array } }, $storageConfigs); - Storage::getGlobalCache()->loadForStorageIds(array_map(function (IStorage $storage) { return $storage->getId(); }, $storages)); diff --git a/apps/files_external/lib/Config/ExternalMountPoint.php b/apps/files_external/lib/Config/ExternalMountPoint.php index 26e11446e6dac..46ee871eae8d0 100644 --- a/apps/files_external/lib/Config/ExternalMountPoint.php +++ b/apps/files_external/lib/Config/ExternalMountPoint.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Config; use OC\Files\Mount\MountPoint; diff --git a/apps/files_external/lib/Config/IConfigHandler.php b/apps/files_external/lib/Config/IConfigHandler.php index aa9709db60080..a07ac85690f86 100644 --- a/apps/files_external/lib/Config/IConfigHandler.php +++ b/apps/files_external/lib/Config/IConfigHandler.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Config; /** diff --git a/apps/files_external/lib/Config/SimpleSubstitutionTrait.php b/apps/files_external/lib/Config/SimpleSubstitutionTrait.php index 85a76054fa8cb..9250a5b53d921 100644 --- a/apps/files_external/lib/Config/SimpleSubstitutionTrait.php +++ b/apps/files_external/lib/Config/SimpleSubstitutionTrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Config; /** diff --git a/apps/files_external/lib/Config/UserContext.php b/apps/files_external/lib/Config/UserContext.php index a6ba80a5da22f..f655a69e66618 100644 --- a/apps/files_external/lib/Config/UserContext.php +++ b/apps/files_external/lib/Config/UserContext.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Config; use OCP\IRequest; diff --git a/apps/files_external/lib/Config/UserPlaceholderHandler.php b/apps/files_external/lib/Config/UserPlaceholderHandler.php index 7284bab00defc..744c617218517 100644 --- a/apps/files_external/lib/Config/UserPlaceholderHandler.php +++ b/apps/files_external/lib/Config/UserPlaceholderHandler.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Config; class UserPlaceholderHandler extends UserContext implements IConfigHandler { diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php index 6ec60406d0c0c..5e3ceb91842d8 100644 --- a/apps/files_external/lib/Controller/AjaxController.php +++ b/apps/files_external/lib/Controller/AjaxController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OC\Settings\AuthorizedGroupMapper; diff --git a/apps/files_external/lib/Controller/ApiController.php b/apps/files_external/lib/Controller/ApiController.php index 49547357e6bba..cd5c5c0e898eb 100644 --- a/apps/files_external/lib/Controller/ApiController.php +++ b/apps/files_external/lib/Controller/ApiController.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 9712ed0874355..bfefe6bc78092 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OCA\Files_External\NotFoundException; diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index e216539ceb0e3..119c7527754e6 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php index 21fac9fccf099..7ef6910892300 100644 --- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php +++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index 1cd2fa291869c..76a2647ee9a27 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Controller; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php index 1bf479b4eac46..8ce16a43afc23 100644 --- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php +++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\AmazonS3; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php index ae11760708da5..e8521c6335c2c 100644 --- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php +++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth; use OCA\Files_External\Lib\FrontendDefinitionTrait; diff --git a/apps/files_external/lib/Lib/Auth/Builtin.php b/apps/files_external/lib/Lib/Auth/Builtin.php index 1fb16c14dcc28..9a12aab526763 100644 --- a/apps/files_external/lib/Lib/Auth/Builtin.php +++ b/apps/files_external/lib/Lib/Auth/Builtin.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth; use OCP\IL10N; diff --git a/apps/files_external/lib/Lib/Auth/IUserProvided.php b/apps/files_external/lib/Lib/Auth/IUserProvided.php index 225c8c84d5fa8..793515e25c8cd 100644 --- a/apps/files_external/lib/Lib/Auth/IUserProvided.php +++ b/apps/files_external/lib/Lib/Auth/IUserProvided.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth; use OCP\IUser; diff --git a/apps/files_external/lib/Lib/Auth/InvalidAuth.php b/apps/files_external/lib/Lib/Auth/InvalidAuth.php index 2af24f1ea07f4..b5df2ff240dd3 100644 --- a/apps/files_external/lib/Lib/Auth/InvalidAuth.php +++ b/apps/files_external/lib/Lib/Auth/InvalidAuth.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth; /** diff --git a/apps/files_external/lib/Lib/Auth/NullMechanism.php b/apps/files_external/lib/Lib/Auth/NullMechanism.php index 00f75822c6574..7cf733df541e5 100644 --- a/apps/files_external/lib/Lib/Auth/NullMechanism.php +++ b/apps/files_external/lib/Lib/Auth/NullMechanism.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth; use OCP\IL10N; diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php index aa3dc14c42d37..a755d587c03ad 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV2.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\OpenStack; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php index b5d185fd3747b..72ae1b76a5c0b 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStackV3.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Auth\OpenStack; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php index d64f5f8dc5b23..0c72e546c78be 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\OpenStack; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php index c6b7f233aeb33..104812736d6c9 100644 --- a/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php +++ b/apps/files_external/lib/Lib/Auth/Password/GlobalAuth.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php index fb00bbb0aaf2e..ad9a974f4cecb 100644 --- a/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php +++ b/apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/Password.php b/apps/files_external/lib/Lib/Auth/Password/Password.php index e3299e9366962..32092f8132a3b 100644 --- a/apps/files_external/lib/Lib/Auth/Password/Password.php +++ b/apps/files_external/lib/Lib/Auth/Password/Password.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php index a5cf3710074bd..2dcda2da71a20 100644 --- a/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php +++ b/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php index d24106f858920..df61187fe904a 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php index 4542c591dc2ab..1367719f9cafb 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserProvided.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserProvided.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\Password; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 3235759713c9b..807445f0e27d2 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Auth\PublicKey; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php index 5fc56697d12fd..a954467ebe96c 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Auth\PublicKey; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php b/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php index 3eeec85ca130e..59634dc1e7d78 100644 --- a/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php +++ b/apps/files_external/lib/Lib/Auth/SMB/KerberosApacheAuth.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Auth\SMB; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php b/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php index 45b0b5825094d..8f5025fec07b0 100644 --- a/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php +++ b/apps/files_external/lib/Lib/Auth/SMB/KerberosAuth.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Auth\SMB; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index 5597289b1b83f..06196e8216cb7 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AmazonS3\AccessKey; diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php index af6111d882274..62cfa0f7e17d2 100644 --- a/apps/files_external/lib/Lib/Backend/Backend.php +++ b/apps/files_external/lib/Lib/Backend/Backend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/DAV.php b/apps/files_external/lib/Lib/Backend/DAV.php index 7c393393be873..0edabcb59d42e 100644 --- a/apps/files_external/lib/Lib/Backend/DAV.php +++ b/apps/files_external/lib/Lib/Backend/DAV.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index 3e8d34137d65a..1a3c85b1e9a9a 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/InvalidBackend.php b/apps/files_external/lib/Lib/Backend/InvalidBackend.php index ca4e3ddb4f785..2450def8f0f47 100644 --- a/apps/files_external/lib/Lib/Backend/InvalidBackend.php +++ b/apps/files_external/lib/Lib/Backend/InvalidBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/lib/Lib/Backend/LegacyBackend.php b/apps/files_external/lib/Lib/Backend/LegacyBackend.php index 87e362ecf25d4..11b5e686b4940 100644 --- a/apps/files_external/lib/Lib/Backend/LegacyBackend.php +++ b/apps/files_external/lib/Lib/Backend/LegacyBackend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\Builtin; diff --git a/apps/files_external/lib/Lib/Backend/Local.php b/apps/files_external/lib/Lib/Backend/Local.php index ae1249ca4f227..ef674ea65a7d9 100644 --- a/apps/files_external/lib/Lib/Backend/Local.php +++ b/apps/files_external/lib/Lib/Backend/Local.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php index 13c08e723e1e3..69ebee2afd758 100644 --- a/apps/files_external/lib/Lib/Backend/OwnCloud.php +++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/SFTP.php b/apps/files_external/lib/Lib/Backend/SFTP.php index 0168785872a5f..d9755fd690be1 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP.php +++ b/apps/files_external/lib/Lib/Backend/SFTP.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/SFTP_Key.php b/apps/files_external/lib/Lib/Backend/SFTP_Key.php index b8559711dcd7b..987abc9911f75 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP_Key.php +++ b/apps/files_external/lib/Lib/Backend/SFTP_Key.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/SMB_OC.php b/apps/files_external/lib/Lib/Backend/SMB_OC.php index 9e64cf0f0fa3a..207405c99d21d 100644 --- a/apps/files_external/lib/Lib/Backend/SMB_OC.php +++ b/apps/files_external/lib/Lib/Backend/SMB_OC.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index c771c6fa21bae..24670a616a961 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Backend; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php b/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php index c34c261ffd7e1..ceb85cfd60db0 100644 --- a/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php +++ b/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Config; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/lib/Lib/Config/IBackendProvider.php b/apps/files_external/lib/Lib/Config/IBackendProvider.php index 9a88ff84556cc..55a2d7d997087 100644 --- a/apps/files_external/lib/Lib/Config/IBackendProvider.php +++ b/apps/files_external/lib/Lib/Config/IBackendProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Config; use OCA\Files_External\Lib\Backend\Backend; diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php index 7dde725f529f8..34eac37aa2026 100644 --- a/apps/files_external/lib/Lib/DefinitionParameter.php +++ b/apps/files_external/lib/Lib/DefinitionParameter.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; /** diff --git a/apps/files_external/lib/Lib/DependencyTrait.php b/apps/files_external/lib/Lib/DependencyTrait.php index 745231255b237..1c26719a56e98 100644 --- a/apps/files_external/lib/Lib/DependencyTrait.php +++ b/apps/files_external/lib/Lib/DependencyTrait.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; /** diff --git a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php index 0f280d1d48609..99888e9b72390 100644 --- a/apps/files_external/lib/Lib/FrontendDefinitionTrait.php +++ b/apps/files_external/lib/Lib/FrontendDefinitionTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; /** diff --git a/apps/files_external/lib/Lib/IFrontendDefinition.php b/apps/files_external/lib/Lib/IFrontendDefinition.php index 7eb9a509c14ee..fab5da2d57f9f 100644 --- a/apps/files_external/lib/Lib/IFrontendDefinition.php +++ b/apps/files_external/lib/Lib/IFrontendDefinition.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib; interface IFrontendDefinition { diff --git a/apps/files_external/lib/Lib/IIdentifier.php b/apps/files_external/lib/Lib/IIdentifier.php index e17b908a0b1bb..41b1f2b929e98 100644 --- a/apps/files_external/lib/Lib/IIdentifier.php +++ b/apps/files_external/lib/Lib/IIdentifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib; interface IIdentifier { diff --git a/apps/files_external/lib/Lib/IdentifierTrait.php b/apps/files_external/lib/Lib/IdentifierTrait.php index f5ffde323078e..e9b6dda6f07d0 100644 --- a/apps/files_external/lib/Lib/IdentifierTrait.php +++ b/apps/files_external/lib/Lib/IdentifierTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; /** diff --git a/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php b/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php index 1e872b350726d..d541a958a0090 100644 --- a/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php +++ b/apps/files_external/lib/Lib/InsufficientDataForMeaningfulAnswerException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCP\Files\StorageNotAvailableException; diff --git a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php index f6311fae83e16..08d5c45d8023b 100644 --- a/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php +++ b/apps/files_external/lib/Lib/LegacyDependencyCheckPolyfill.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCP\Files\Storage\IStorage; diff --git a/apps/files_external/lib/Lib/MissingDependency.php b/apps/files_external/lib/Lib/MissingDependency.php index c2da7fcadbfee..c1ddd879deaf6 100644 --- a/apps/files_external/lib/Lib/MissingDependency.php +++ b/apps/files_external/lib/Lib/MissingDependency.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; /** diff --git a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php index 683c3d051510a..5c77fe0f7b4bb 100644 --- a/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php +++ b/apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Notify; use OC\Files\Notify\Change; diff --git a/apps/files_external/lib/Lib/PersonalMount.php b/apps/files_external/lib/Lib/PersonalMount.php index 148825ffdaf74..25073bc09d877 100644 --- a/apps/files_external/lib/Lib/PersonalMount.php +++ b/apps/files_external/lib/Lib/PersonalMount.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCA\Files_External\Config\ExternalMountPoint; diff --git a/apps/files_external/lib/Lib/PriorityTrait.php b/apps/files_external/lib/Lib/PriorityTrait.php index fad2c07e58c0b..9d47a31898ec5 100644 --- a/apps/files_external/lib/Lib/PriorityTrait.php +++ b/apps/files_external/lib/Lib/PriorityTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCA\Files_External\Service\BackendService; diff --git a/apps/files_external/lib/Lib/SessionStorageWrapper.php b/apps/files_external/lib/Lib/SessionStorageWrapper.php index 881f9b3689cf4..eac98bf770600 100644 --- a/apps/files_external/lib/Lib/SessionStorageWrapper.php +++ b/apps/files_external/lib/Lib/SessionStorageWrapper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OC\Files\Storage\Wrapper\PermissionsMask; diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index a45019b98f9de..31c8f70f3fc54 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use Aws\S3\Exception\S3Exception; @@ -179,7 +180,6 @@ private function doesDirectoryExist(string $path): bool { throw $e; } - $this->directoryCache[$path] = false; return false; } @@ -231,7 +231,6 @@ public function file_exists(string $path): bool { return $this->filetype($path) !== false; } - #[\Override] public function rmdir(string $path): bool { $path = $this->normalizePath($path); diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index e7c818a62596d..2761f0123b97a 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use Icewind\Streams\CallbackWrapper; diff --git a/apps/files_external/lib/Lib/Storage/OwnCloud.php b/apps/files_external/lib/Lib/Storage/OwnCloud.php index 1d3e05f60ff3b..9250f27beb07b 100644 --- a/apps/files_external/lib/Lib/Storage/OwnCloud.php +++ b/apps/files_external/lib/Lib/Storage/OwnCloud.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use OC\Files\Storage\DAV; diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index e9c0804c23aa4..f2b8924673a61 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use Icewind\Streams\CallbackWrapper; diff --git a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php index e373dbdb43349..5007c251a47eb 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Storage; use Icewind\Streams\File; diff --git a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php index ececbf39bbffa..4673573589047 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Lib\Storage; use Icewind\Streams\File; diff --git a/apps/files_external/lib/Lib/Storage/StreamWrapper.php b/apps/files_external/lib/Lib/Storage/StreamWrapper.php index b5387d31d683f..542e35905d0b2 100644 --- a/apps/files_external/lib/Lib/Storage/StreamWrapper.php +++ b/apps/files_external/lib/Lib/Storage/StreamWrapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use OC\Files\Storage\Common; diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 291e8bf38981f..2c7e3c143cbab 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib\Storage; use GuzzleHttp\Psr7\Uri; diff --git a/apps/files_external/lib/Lib/StorageConfig.php b/apps/files_external/lib/Lib/StorageConfig.php index ee0f34406f437..a37cbaec1a61a 100644 --- a/apps/files_external/lib/Lib/StorageConfig.php +++ b/apps/files_external/lib/Lib/StorageConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OC\Files\Filesystem; diff --git a/apps/files_external/lib/Lib/StorageModifierTrait.php b/apps/files_external/lib/Lib/StorageModifierTrait.php index 21ddd6bf82847..ae670c3f85d73 100644 --- a/apps/files_external/lib/Lib/StorageModifierTrait.php +++ b/apps/files_external/lib/Lib/StorageModifierTrait.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCP\Files\Storage\IStorage; diff --git a/apps/files_external/lib/Lib/VisibilityTrait.php b/apps/files_external/lib/Lib/VisibilityTrait.php index 62b26f3edb196..2fe36ec27bef7 100644 --- a/apps/files_external/lib/Lib/VisibilityTrait.php +++ b/apps/files_external/lib/Lib/VisibilityTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Lib; use OCA\Files_External\Service\BackendService; diff --git a/apps/files_external/lib/Listener/LoadAdditionalListener.php b/apps/files_external/lib/Listener/LoadAdditionalListener.php index 42d93ae6c1e5b..eb9dd6d9827b9 100644 --- a/apps/files_external/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_external/lib/Listener/LoadAdditionalListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Listener; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/files_external/lib/Listener/StorePasswordListener.php b/apps/files_external/lib/Listener/StorePasswordListener.php index f8e964a1f190d..7b6e48b37a1ae 100644 --- a/apps/files_external/lib/Listener/StorePasswordListener.php +++ b/apps/files_external/lib/Listener/StorePasswordListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Listener; use OCA\Files_External\Lib\Auth\Password\LoginCredentials; diff --git a/apps/files_external/lib/Migration/DummyUserSession.php b/apps/files_external/lib/Migration/DummyUserSession.php index 19e070ef674af..cfb8bf6796ff2 100644 --- a/apps/files_external/lib/Migration/DummyUserSession.php +++ b/apps/files_external/lib/Migration/DummyUserSession.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Migration; use OCP\IUser; diff --git a/apps/files_external/lib/Migration/Version1011Date20200630192246.php b/apps/files_external/lib/Migration/Version1011Date20200630192246.php index 81fef2002aec3..84af96d2d88e9 100644 --- a/apps/files_external/lib/Migration/Version1011Date20200630192246.php +++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Migration; use Closure; diff --git a/apps/files_external/lib/Migration/Version1015Date20211104103506.php b/apps/files_external/lib/Migration/Version1015Date20211104103506.php index 6fb1fb92a9ecd..51fed99a7a926 100644 --- a/apps/files_external/lib/Migration/Version1015Date20211104103506.php +++ b/apps/files_external/lib/Migration/Version1015Date20211104103506.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Migration; use Closure; diff --git a/apps/files_external/lib/Migration/Version22000Date20210216084416.php b/apps/files_external/lib/Migration/Version22000Date20210216084416.php index 4e359a5b70481..16c92fd0f8159 100644 --- a/apps/files_external/lib/Migration/Version22000Date20210216084416.php +++ b/apps/files_external/lib/Migration/Version22000Date20210216084416.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Migration; use Closure; diff --git a/apps/files_external/lib/NotFoundException.php b/apps/files_external/lib/NotFoundException.php index c4534be6c1923..0b5ea7858fe73 100644 --- a/apps/files_external/lib/NotFoundException.php +++ b/apps/files_external/lib/NotFoundException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External; /** diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index c9fc5473acfe6..bb147f1d84b5e 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OC\Files\Storage\Common; diff --git a/apps/files_external/lib/Service/GlobalStoragesService.php b/apps/files_external/lib/Service/GlobalStoragesService.php index d6bcd81306586..a060f06683648 100644 --- a/apps/files_external/lib/Service/GlobalStoragesService.php +++ b/apps/files_external/lib/Service/GlobalStoragesService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OC\Files\Filesystem; diff --git a/apps/files_external/lib/Service/ImportLegacyStoragesService.php b/apps/files_external/lib/Service/ImportLegacyStoragesService.php index a71aec7917611..661ba66adc9a2 100644 --- a/apps/files_external/lib/Service/ImportLegacyStoragesService.php +++ b/apps/files_external/lib/Service/ImportLegacyStoragesService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; class ImportLegacyStoragesService extends LegacyStoragesService { diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php index 08cef135bc71b..feffd6f438519 100644 --- a/apps/files_external/lib/Service/LegacyStoragesService.php +++ b/apps/files_external/lib/Service/LegacyStoragesService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index 828d91d2987e0..a0088f4950346 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OC\Files\Cache\Storage; diff --git a/apps/files_external/lib/Service/UserGlobalStoragesService.php b/apps/files_external/lib/Service/UserGlobalStoragesService.php index 70fbd8f198eb1..0d1a19aaad0b0 100644 --- a/apps/files_external/lib/Service/UserGlobalStoragesService.php +++ b/apps/files_external/lib/Service/UserGlobalStoragesService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OCA\Files_External\Lib\StorageConfig; @@ -135,7 +136,6 @@ protected function isApplicable(StorageConfig $config): bool { return false; } - /** * Gets all storages for the user, admin, personal, global, etc * @@ -160,7 +160,6 @@ public function getAllStoragesForUser(?IUser $user = null): array { return array_filter($storages, $this->validateStorage(...)); } - /** * @return StorageConfig[] */ diff --git a/apps/files_external/lib/Service/UserStoragesService.php b/apps/files_external/lib/Service/UserStoragesService.php index 39f306219ae3d..1616b05e27c45 100644 --- a/apps/files_external/lib/Service/UserStoragesService.php +++ b/apps/files_external/lib/Service/UserStoragesService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OC\Files\Filesystem; diff --git a/apps/files_external/lib/Service/UserTrait.php b/apps/files_external/lib/Service/UserTrait.php index 679066283a553..9608ebcc7bef3 100644 --- a/apps/files_external/lib/Service/UserTrait.php +++ b/apps/files_external/lib/Service/UserTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Service; use OCP\IUser; diff --git a/apps/files_external/lib/Settings/Admin.php b/apps/files_external/lib/Settings/Admin.php index d91487a67e774..7f9e5cf2b20ea 100644 --- a/apps/files_external/lib/Settings/Admin.php +++ b/apps/files_external/lib/Settings/Admin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Settings; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; diff --git a/apps/files_external/lib/Settings/CommonSettingsTrait.php b/apps/files_external/lib/Settings/CommonSettingsTrait.php index 03193374c0521..466d6fe11c901 100644 --- a/apps/files_external/lib/Settings/CommonSettingsTrait.php +++ b/apps/files_external/lib/Settings/CommonSettingsTrait.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Settings; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; diff --git a/apps/files_external/lib/Settings/Personal.php b/apps/files_external/lib/Settings/Personal.php index d7ee76bba77d7..7bd2ba036778b 100644 --- a/apps/files_external/lib/Settings/Personal.php +++ b/apps/files_external/lib/Settings/Personal.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Settings; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; diff --git a/apps/files_external/lib/Settings/PersonalSection.php b/apps/files_external/lib/Settings/PersonalSection.php index fce0e99a67c40..874d706733cf8 100644 --- a/apps/files_external/lib/Settings/PersonalSection.php +++ b/apps/files_external/lib/Settings/PersonalSection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Settings; use OCA\Files_External\Service\BackendService; diff --git a/apps/files_external/lib/Settings/Section.php b/apps/files_external/lib/Settings/Section.php index cd18e3c105cd8..4445b6e6a3fa1 100644 --- a/apps/files_external/lib/Settings/Section.php +++ b/apps/files_external/lib/Settings/Section.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Settings; use OCP\IL10N; diff --git a/apps/files_external/tests/Auth/AuthMechanismTest.php b/apps/files_external/tests/Auth/AuthMechanismTest.php index 5d859a66868f2..57c20dc2b9bdf 100644 --- a/apps/files_external/tests/Auth/AuthMechanismTest.php +++ b/apps/files_external/tests/Auth/AuthMechanismTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Auth; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_external/tests/Auth/Password/GlobalAuthTest.php b/apps/files_external/tests/Auth/Password/GlobalAuthTest.php index 6d83655403efa..1d37032948e9c 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuthTest.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuthTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Auth\Password; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; @@ -81,7 +82,6 @@ public function testSavedCredentials(): void { ], $storage->getBackendOptions()); } - public function testNoCredentialsPersonal(): void { $this->expectException(InsufficientDataForMeaningfulAnswerException::class); diff --git a/apps/files_external/tests/Backend/BackendTest.php b/apps/files_external/tests/Backend/BackendTest.php index 0fe119567ab53..9572b8befa9b7 100644 --- a/apps/files_external/tests/Backend/BackendTest.php +++ b/apps/files_external/tests/Backend/BackendTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Backend; use OCA\Files_External\Lib\Backend\Backend; diff --git a/apps/files_external/tests/Backend/LegacyBackendTest.php b/apps/files_external/tests/Backend/LegacyBackendTest.php index c4ddfedf6e21a..63580c4eb0f0e 100644 --- a/apps/files_external/tests/Backend/LegacyBackendTest.php +++ b/apps/files_external/tests/Backend/LegacyBackendTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Backend; use OCA\Files_External\Lib\Auth\Builtin; diff --git a/apps/files_external/tests/Command/ApplicableTest.php b/apps/files_external/tests/Command/ApplicableTest.php index 59db18a42de2c..2bfa21010a2fd 100644 --- a/apps/files_external/tests/Command/ApplicableTest.php +++ b/apps/files_external/tests/Command/ApplicableTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Command; use OCA\Files_External\Command\Applicable; diff --git a/apps/files_external/tests/Command/CommandTestCase.php b/apps/files_external/tests/Command/CommandTestCase.php index e42ad9cd68a7f..5c13c89e69cdd 100644 --- a/apps/files_external/tests/Command/CommandTestCase.php +++ b/apps/files_external/tests/Command/CommandTestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Command; use OCA\Files_External\Lib\StorageConfig; diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php index 5b84e500e3f4c..3b436a50b8945 100644 --- a/apps/files_external/tests/Command/ListCommandTest.php +++ b/apps/files_external/tests/Command/ListCommandTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Command; use OCA\Files_External\Command\ListCommand; diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index 22d49cafe911e..334cd91adbf48 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Tests\Config; use OCA\Files_External\Config\UserPlaceholderHandler; diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php index 5a2e0981ebc72..b186c48b29ced 100644 --- a/apps/files_external/tests/Controller/AjaxControllerTest.php +++ b/apps/files_external/tests/Controller/AjaxControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Tests\Controller; use OC\Settings\AuthorizedGroupMapper; diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index 21182010c9563..b6527fde871cd 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Controller; use OC\User\User; diff --git a/apps/files_external/tests/Controller/StoragesControllerTestCase.php b/apps/files_external/tests/Controller/StoragesControllerTestCase.php index 2370588193f50..6c16589139c62 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTestCase.php +++ b/apps/files_external/tests/Controller/StoragesControllerTestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Controller; use OCA\Files_External\Controller\GlobalStoragesController; diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index 138b5e1225dd8..981f8981198fe 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Controller; use OC\User\User; diff --git a/apps/files_external/tests/DefinitionParameterTest.php b/apps/files_external/tests/DefinitionParameterTest.php index 7ccd3a6406c01..b7dcb92c636fc 100644 --- a/apps/files_external/tests/DefinitionParameterTest.php +++ b/apps/files_external/tests/DefinitionParameterTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\DefinitionParameter as Param; diff --git a/apps/files_external/tests/FrontendDefinitionTraitTest.php b/apps/files_external/tests/FrontendDefinitionTraitTest.php index df83814bbc770..fdf42f2687f14 100644 --- a/apps/files_external/tests/FrontendDefinitionTraitTest.php +++ b/apps/files_external/tests/FrontendDefinitionTraitTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\DefinitionParameter; diff --git a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php index 3edefe5188bc1..78e98c83cdcb2 100644 --- a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php +++ b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\LegacyDependencyCheckPolyfill; diff --git a/apps/files_external/tests/OwnCloudFunctionsTest.php b/apps/files_external/tests/OwnCloudFunctionsTest.php index f6ad0f5c91c74..921e70969c7f8 100644 --- a/apps/files_external/tests/OwnCloudFunctionsTest.php +++ b/apps/files_external/tests/OwnCloudFunctionsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\Storage\OwnCloud; diff --git a/apps/files_external/tests/PersonalMountTest.php b/apps/files_external/tests/PersonalMountTest.php index 618048c3335a8..c5f959bf3c1bc 100644 --- a/apps/files_external/tests/PersonalMountTest.php +++ b/apps/files_external/tests/PersonalMountTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OC\Files\Mount\Manager; diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index 6fca74124a5fe..7e00d0eab445f 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OCA\Files_External\Config\IConfigHandler; diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index d41c2ee31813c..989f8b918adf9 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OCA\Files_External\Service\DBConfigService; diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 9dd5ed590ad47..59bab4d044487 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -6,11 +6,11 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OC\Files\Filesystem; use OCA\Files_External\MountConfig; - use OCA\Files_External\Service\GlobalStoragesService; #[\PHPUnit\Framework\Attributes\Group(name: 'DB')] @@ -445,7 +445,6 @@ public function testHooksUpdateStorage( } } - public function testHooksRenameMountPoint(): void { $storage = $this->makeTestStorageData(); $storage->setApplicableUsers(['user1', 'user2']); diff --git a/apps/files_external/tests/Service/StoragesServiceTestCase.php b/apps/files_external/tests/Service/StoragesServiceTestCase.php index 5eed8294b8f8c..7baa3a8e3d248 100644 --- a/apps/files_external/tests/Service/StoragesServiceTestCase.php +++ b/apps/files_external/tests/Service/StoragesServiceTestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OC\Files\Cache\Storage; @@ -206,7 +207,6 @@ protected function makeStorageConfig(array $data): StorageConfig { return $storage; } - protected function ActualNonExistingStorageTest() { $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index ad068aef915a5..4a35796b97f46 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OC\User\User; @@ -128,7 +129,6 @@ public function testGetStorageWithApplicable($applicableUsers, $applicableGroups } } - public function testAddStorage($storageParams = null): void { $this->expectException(\DomainException::class); @@ -144,7 +144,6 @@ public function testAddStorage($storageParams = null): void { $this->service->addStorage($storage); } - public function testUpdateStorage($storageParams = null): void { $this->expectException(\DomainException::class); @@ -164,7 +163,6 @@ public function testUpdateStorage($storageParams = null): void { $this->service->updateStorage($retrievedStorage); } - public function testNonExistingStorage(): void { $this->expectException(\DomainException::class); @@ -190,7 +188,6 @@ public function testDeleteStorage($backendOptions, $rustyStorageId): void { $this->service->removeStorage($id); } - public function testDeleteUnexistingStorage(): void { $this->expectException(\DomainException::class); diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index 073b2093a841f..287ccbf377822 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Service; use OC\Files\Filesystem; @@ -13,7 +14,6 @@ use OCA\Files_External\MountConfig; use OCA\Files_External\NotFoundException; use OCA\Files_External\Service\GlobalStoragesService; - use OCA\Files_External\Service\StoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\IUserManager; @@ -168,7 +168,6 @@ public function testHooksRenameMountPoint(): void { ); } - public function testGetAdminStorage(): void { $this->expectException(NotFoundException::class); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 0070b0ef224f3..72cfd1d9e50d8 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Tests\Settings; use OCA\Files_External\Lib\Auth\Password\GlobalAuth; diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php index c64849ff7ba24..78ebe0a8feef3 100644 --- a/apps/files_external/tests/Settings/SectionTest.php +++ b/apps/files_external/tests/Settings/SectionTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Tests\Settings; use OCA\Files_External\Settings\Section; diff --git a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php index b62030492a64f..8a694e2095646 100644 --- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php +++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\AmazonS3; diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index 90e36d5fdbd74..c07578b0ab8e2 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\AmazonS3; diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index a6845ff71e26a..6d756b1d977fc 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\FTP; @@ -51,7 +52,6 @@ public static function directoryProvider(): array { }); } - /** * mtime for folders is only with a minute resolution */ diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 34b70b0483dc2..de88cbc739bd6 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\OwnCloud; diff --git a/apps/files_external/tests/Storage/SftpTest.php b/apps/files_external/tests/Storage/SftpTest.php index c675445a2451e..20bb441c7e2b1 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OCA\Files_External\Lib\Storage\SFTP; diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index 6fd074cc35e96..7384d13f05bc4 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OC\Files\Notify\Change; diff --git a/apps/files_external/tests/Storage/SwiftTest.php b/apps/files_external/tests/Storage/SwiftTest.php index a34b2e6b8453e..3a38c51d26a81 100644 --- a/apps/files_external/tests/Storage/SwiftTest.php +++ b/apps/files_external/tests/Storage/SwiftTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use GuzzleHttp\Exception\ClientException; diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index d73daa6fb6977..ae4d23372b61a 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests\Storage; use OC\Files\Storage\DAV; diff --git a/apps/files_external/tests/StorageConfigTest.php b/apps/files_external/tests/StorageConfigTest.php index b3024cb228cd7..fae6dbd1151be 100644 --- a/apps/files_external/tests/StorageConfigTest.php +++ b/apps/files_external/tests/StorageConfigTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_External\Tests; use OCA\Files_External\Lib\Auth\AuthMechanism; diff --git a/apps/files_reminders/lib/Service/ReminderService.php b/apps/files_reminders/lib/Service/ReminderService.php index 6ee395620765c..342997ff44a0c 100644 --- a/apps/files_reminders/lib/Service/ReminderService.php +++ b/apps/files_reminders/lib/Service/ReminderService.php @@ -203,7 +203,6 @@ private function deleteReminder(Reminder $reminder): void { $this->cache->set("{$reminder->getUserId()}-{$reminder->getFileId()}", false); } - /** * @throws NodeNotFoundException */ diff --git a/apps/files_sharing/lib/Activity/Filter.php b/apps/files_sharing/lib/Activity/Filter.php index cc2d50ec8b397..71c4ca4b1148c 100644 --- a/apps/files_sharing/lib/Activity/Filter.php +++ b/apps/files_sharing/lib/Activity/Filter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity; use OCP\Activity\IFilter; diff --git a/apps/files_sharing/lib/Activity/Providers/Base.php b/apps/files_sharing/lib/Activity/Providers/Base.php index a558e73aabdba..71fc956c18666 100644 --- a/apps/files_sharing/lib/Activity/Providers/Base.php +++ b/apps/files_sharing/lib/Activity/Providers/Base.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Providers; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php index 3ed631531d3b3..f4541ddff5463 100644 --- a/apps/files_sharing/lib/Activity/Providers/Downloads.php +++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Providers; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php index 06915298d4c2b..0e7fe415763ef 100644 --- a/apps/files_sharing/lib/Activity/Providers/Groups.php +++ b/apps/files_sharing/lib/Activity/Providers/Groups.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Providers; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php index 63822d8a5e3b3..c11f126f7451b 100644 --- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php +++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Providers; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php index f19bae4b8f382..f342fa9093dec 100644 --- a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php +++ b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Settings; class PublicLinks extends ShareActivitySettings { diff --git a/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php b/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php index 1552fb496de50..9510f22df771b 100644 --- a/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php +++ b/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Settings; class PublicLinksUpload extends ShareActivitySettings { diff --git a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php index b39b1d0b558da..0ccf6d11cb05c 100644 --- a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php +++ b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Settings; class RemoteShare extends ShareActivitySettings { diff --git a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php index 34b0a19cedf9f..76eb224957455 100644 --- a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php +++ b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Settings; use OCP\Activity\ActivitySettings; diff --git a/apps/files_sharing/lib/Activity/Settings/Shared.php b/apps/files_sharing/lib/Activity/Settings/Shared.php index f558289d3125a..5f4654f6fd6da 100644 --- a/apps/files_sharing/lib/Activity/Settings/Shared.php +++ b/apps/files_sharing/lib/Activity/Settings/Shared.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Activity\Settings; class Shared extends ShareActivitySettings { diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 824a7f8b640ae..16e16d23dd060 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\AppInfo; use OC\Group\DisplayNameCache as GroupDisplayNameCache; @@ -141,7 +142,6 @@ public function boot(IBootContext $context): void { Helper::registerHooks(); } - public function registerMountProviders(IMountProviderCollection $mountProviderCollection, MountProvider $mountProvider, ExternalMountProvider $externalMountProvider): void { $mountProviderCollection->registerProvider($mountProvider); $mountProviderCollection->registerProvider($externalMountProvider); diff --git a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php index 857052829d72d..b2163bd46d1c4 100644 --- a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php +++ b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index c2b5e08f1e4a4..52664b9820f86 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Files\Cache\CacheDependencies; diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index 6d4cf0a504527..9352213489cd8 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Core\AppInfo\ConfigLexicon; diff --git a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php index 5ce4f7dde7cec..9395b0600c69d 100644 --- a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php +++ b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Collaboration; use OCP\Collaboration\AutoComplete\ISorter; diff --git a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php index f3550fb6f0958..32946a382ebd4 100644 --- a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php +++ b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Command; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/files_sharing/lib/Command/ExiprationNotification.php b/apps/files_sharing/lib/Command/ExiprationNotification.php index 4b409230e747b..a0b4570cfe182 100644 --- a/apps/files_sharing/lib/Command/ExiprationNotification.php +++ b/apps/files_sharing/lib/Command/ExiprationNotification.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Command; use OCA\Files_Sharing\OrphanHelper; diff --git a/apps/files_sharing/lib/Controller/AcceptController.php b/apps/files_sharing/lib/Controller/AcceptController.php index 10a8a73cd3a83..4ae8f7dfce5b3 100644 --- a/apps/files_sharing/lib/Controller/AcceptController.php +++ b/apps/files_sharing/lib/Controller/AcceptController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Controller; use OCA\Files_Sharing\AppInfo\Application; diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php index 42105dca1333c..58d0cad848169 100644 --- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php +++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Controller; use OCA\Deck\Sharing\ShareAPIHelper; diff --git a/apps/files_sharing/lib/Controller/ExternalSharesController.php b/apps/files_sharing/lib/Controller/ExternalSharesController.php index 7f266ea53a3b7..201a460d32a88 100644 --- a/apps/files_sharing/lib/Controller/ExternalSharesController.php +++ b/apps/files_sharing/lib/Controller/ExternalSharesController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Controller; use OCA\Files_Sharing\External\Manager; diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php index 01a08a0674ab0..24a537e110d1d 100644 --- a/apps/files_sharing/lib/Controller/PublicPreviewController.php +++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Controller; use OCP\AppFramework\Http; @@ -62,7 +63,6 @@ protected function isPasswordProtected(): bool { return $this->share->getPassword() !== null; } - /** * Get a preview for a shared file * diff --git a/apps/files_sharing/lib/Controller/RemoteController.php b/apps/files_sharing/lib/Controller/RemoteController.php index d95ea251d894f..eff5654292810 100644 --- a/apps/files_sharing/lib/Controller/RemoteController.php +++ b/apps/files_sharing/lib/Controller/RemoteController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Controller; use OCA\Files_Sharing\External\ExternalShare; diff --git a/apps/files_sharing/lib/Controller/SettingsController.php b/apps/files_sharing/lib/Controller/SettingsController.php index 67d9193be7824..615b5faf1c87e 100644 --- a/apps/files_sharing/lib/Controller/SettingsController.php +++ b/apps/files_sharing/lib/Controller/SettingsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Controller; use OCA\Files_Sharing\AppInfo\Application; diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index c6636a5260384..ec7b0c51515c0 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -339,7 +339,6 @@ protected function formatShare(IShare $share, ?Node $recipientNode = null): arra } } - $result['mail_send'] = $share->getMailSend() ? 1 : 0; $result['hide_download'] = $share->getHideDownload() ? 1 : 0; @@ -390,7 +389,6 @@ private function getDisplayNameFromAddressBook(string $query, string $property): return $query; } - /** * @param list $shares * @param array|null $updatedDisplayName @@ -432,7 +430,6 @@ private function fixMissingDisplayName(array $shares, ?array $updatedDisplayName return $this->fixMissingDisplayName($shares, $displayNames); } - /** * get displayName of a list of userIds from the lookup-server; through the globalsiteselector app. * returns an array with userIds as keys and displayName as values. @@ -464,7 +461,6 @@ private function retrieveFederatedDisplayName(array $userIds, bool $cacheOnly = return $slaveService->getUsersDisplayName($userIds, $cacheOnly); } - /** * retrieve displayName from cache if available (should be used on federated shares) * if not available in cache/lus, try for get from address-book, else returns empty string. @@ -484,8 +480,6 @@ private function getCachedFederatedDisplayName(string $userId, bool $cacheOnly = return ($displayName === $userId) ? '' : $displayName; } - - /** * Get a specific share by id * @@ -1138,7 +1132,6 @@ private function getFormattedShares( return $formatted; } - /** * Get all shares relative to a file, including parent folders shares rights * @@ -1881,7 +1874,6 @@ private function getSharesFromNode(string $viewer, $node, bool $reShares): array return $shares; } - /** * @param Node $node * @@ -1893,7 +1885,6 @@ private function confirmSharingRights(Node $node): void { } } - /** * @param string $viewer * @param Node $node @@ -1920,7 +1911,6 @@ private function hasResharingRights($viewer, $node): bool { return false; } - /** * Returns if we can find resharing rights in an IShare object for a specific user. * @@ -2020,7 +2010,6 @@ private function getAllShares(?Node $path = null, bool $reshares = false) { return array_merge($userShares, $groupShares, $linkShares, $mailShares, $circleShares, $roomShares, $deckShares, $federatedShares, $federatedGroupShares); } - /** * merging already formatted shares. * We'll make an associative array to easily detect duplicate Ids. diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 69db73374692f..fe4b132392fdd 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Controller; use OC\ServerNotAvailableException; @@ -325,7 +326,6 @@ public function showShare($path = ''): TemplateResponse { throw $e; } - $this->emitAccessShareHook($share); $this->emitShareAccessEvent($share, self::SHARE_ACCESS); diff --git a/apps/files_sharing/lib/Controller/ShareInfoController.php b/apps/files_sharing/lib/Controller/ShareInfoController.php index b7e79aec8304a..e7e42e8b6c771 100644 --- a/apps/files_sharing/lib/Controller/ShareInfoController.php +++ b/apps/files_sharing/lib/Controller/ShareInfoController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Controller; use OCA\Files_External\NotFoundException; diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 0645ef184842c..72a8af5cd53cd 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Controller; use Generator; @@ -361,7 +362,6 @@ protected function isRemoteGroupSharingAllowed(): bool { return $this->federatedShareProvider->isOutgoingServer2serverGroupShareEnabled(); } - /** * Generates a bunch of pagination links for the current page * diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php index 981a12625a41b..af755fc0eb444 100644 --- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php +++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php @@ -257,7 +257,6 @@ protected function addMetaHeaders(IShare $share): void { Util::addHeader('meta', ['property' => 'og:video:type', 'content' => $shareNode->getMimeType()]); } - // Twitter Support: https://developer.x.com/en/docs/x-for-websites/cards/overview/markup Util::addHeader('meta', ['property' => 'twitter:title', 'content' => $title]); Util::addHeader('meta', ['property' => 'twitter:description', 'content' => $description]); diff --git a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php index a212f4add2838..c0828caca1675 100644 --- a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php +++ b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OCP\AppFramework\Db\TTransactional; diff --git a/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php b/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php index 709d7bacd4ab0..232c981d314e8 100644 --- a/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php +++ b/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 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/apps/files_sharing/lib/Exceptions/BrokenPath.php b/apps/files_sharing/lib/Exceptions/BrokenPath.php index 1bd0c9cc8ab66..25e174e79b8d6 100644 --- a/apps/files_sharing/lib/Exceptions/BrokenPath.php +++ b/apps/files_sharing/lib/Exceptions/BrokenPath.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Exceptions; /** diff --git a/apps/files_sharing/lib/Exceptions/S2SException.php b/apps/files_sharing/lib/Exceptions/S2SException.php index 00c66a55655ef..e930359a3d9d4 100644 --- a/apps/files_sharing/lib/Exceptions/S2SException.php +++ b/apps/files_sharing/lib/Exceptions/S2SException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Exceptions; /** diff --git a/apps/files_sharing/lib/Exceptions/SharingRightsException.php b/apps/files_sharing/lib/Exceptions/SharingRightsException.php index e1144bc6a1758..dd51751317cc2 100644 --- a/apps/files_sharing/lib/Exceptions/SharingRightsException.php +++ b/apps/files_sharing/lib/Exceptions/SharingRightsException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Exceptions; use Exception; diff --git a/apps/files_sharing/lib/ExpireSharesJob.php b/apps/files_sharing/lib/ExpireSharesJob.php index c262f9e72c1c7..5c8c60b459888 100644 --- a/apps/files_sharing/lib/ExpireSharesJob.php +++ b/apps/files_sharing/lib/ExpireSharesJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OCP\AppFramework\Utility\ITimeFactory; @@ -32,7 +33,6 @@ public function __construct( $this->setTimeSensitivity(self::TIME_INSENSITIVE); } - /** * Makes the background job do its work * diff --git a/apps/files_sharing/lib/External/Cache.php b/apps/files_sharing/lib/External/Cache.php index e004ed84d8bf2..7407b52ea2347 100644 --- a/apps/files_sharing/lib/External/Cache.php +++ b/apps/files_sharing/lib/External/Cache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; use OCP\Federation\ICloudId; diff --git a/apps/files_sharing/lib/External/Manager.php b/apps/files_sharing/lib/External/Manager.php index 9693e52439b89..f40e5d4a34927 100644 --- a/apps/files_sharing/lib/External/Manager.php +++ b/apps/files_sharing/lib/External/Manager.php @@ -376,7 +376,6 @@ protected function tryOCMEndPoint(ExternalShare $externalShare, string $feedback 'sharedSecret' => $externalShare->getShareToken(), 'message' => 'Recipient accept the share' ] - ); return $this->cloudFederationProviderManager->sendNotification($externalShare->getRemote(), $notification); case 'decline': diff --git a/apps/files_sharing/lib/External/Mount.php b/apps/files_sharing/lib/External/Mount.php index a83a0a25a2a18..6f9a578fe6d16 100644 --- a/apps/files_sharing/lib/External/Mount.php +++ b/apps/files_sharing/lib/External/Mount.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; use OC\Files\Mount\MountPoint; diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php index 06191927e0c59..e0cd7f7ec8aa1 100644 --- a/apps/files_sharing/lib/External/MountProvider.php +++ b/apps/files_sharing/lib/External/MountProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; use OCA\Files_Sharing\External\Storage as ExternalShareStorage; diff --git a/apps/files_sharing/lib/External/Scanner.php b/apps/files_sharing/lib/External/Scanner.php index 0ed7aea9c8105..ecf37729da85b 100644 --- a/apps/files_sharing/lib/External/Scanner.php +++ b/apps/files_sharing/lib/External/Scanner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; use OC\Files\Cache\CacheEntry; diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php index f074d86d54fd4..90a50f785dd98 100644 --- a/apps/files_sharing/lib/External/Storage.php +++ b/apps/files_sharing/lib/External/Storage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; use GuzzleHttp\Exception\ClientException; diff --git a/apps/files_sharing/lib/External/Watcher.php b/apps/files_sharing/lib/External/Watcher.php index 3c0d753ce8a48..01ad3617aa07e 100644 --- a/apps/files_sharing/lib/External/Watcher.php +++ b/apps/files_sharing/lib/External/Watcher.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\External; class Watcher extends \OC\Files\Cache\Watcher { diff --git a/apps/files_sharing/lib/Helper.php b/apps/files_sharing/lib/Helper.php index 9c690709fec4a..593c823eabaa1 100644 --- a/apps/files_sharing/lib/Helper.php +++ b/apps/files_sharing/lib/Helper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Files\Filesystem; diff --git a/apps/files_sharing/lib/Hooks.php b/apps/files_sharing/lib/Hooks.php index 9f00afa1079c5..1d2617d06aa0f 100644 --- a/apps/files_sharing/lib/Hooks.php +++ b/apps/files_sharing/lib/Hooks.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Files\Filesystem; diff --git a/apps/files_sharing/lib/ISharedStorage.php b/apps/files_sharing/lib/ISharedStorage.php index e611f0d918fb4..3ab5ca14ef35c 100644 --- a/apps/files_sharing/lib/ISharedStorage.php +++ b/apps/files_sharing/lib/ISharedStorage.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OCP\Files\Storage\IStorage; diff --git a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php index 4ba3a0266ef96..b897583a68315 100644 --- a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Listener; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php b/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php index 840cb0211953a..d2f38224df1fd 100644 --- a/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php +++ b/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Listener; use OCA\Files_Sharing\AppInfo\Application; diff --git a/apps/files_sharing/lib/Listener/ShareInteractionListener.php b/apps/files_sharing/lib/Listener/ShareInteractionListener.php index d57424fbd9fd0..b7270536e16df 100644 --- a/apps/files_sharing/lib/Listener/ShareInteractionListener.php +++ b/apps/files_sharing/lib/Listener/ShareInteractionListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Listener; use OCP\Contacts\Events\ContactInteractedWithEvent; diff --git a/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php b/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php index 25433b58ba680..a8d29f0cc68db 100644 --- a/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php +++ b/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Listener; use OCA\Files_Sharing\AppInfo\Application; @@ -53,7 +54,6 @@ public function handle(Event $event): void { } } - private function hasAutoAccept(string $userId): bool { $defaultAcceptSystemConfig = $this->config->getSystemValueBool('sharing.enable_share_accept', false) ? 'no' : 'yes'; $acceptDefault = $this->config->getUserValue($userId, Application::APP_ID, 'default_accept', $defaultAcceptSystemConfig) === 'yes'; diff --git a/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php b/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php index 0ff1767893a71..711bf6c856cec 100644 --- a/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php +++ b/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Listener; use OCA\Files_Sharing\AppInfo\Application; diff --git a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php index 2e3a936f1590f..46e4cf6cba171 100644 --- a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php +++ b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Middleware; use OCA\Files_Sharing\Controller\ShareAPIController; diff --git a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php index a05e999047650..5931f3d48fc04 100644 --- a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php +++ b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Middleware; use OCA\Files_Sharing\Controller\ShareInfoController; diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index 69339601ea77a..b60297f1e822d 100644 --- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Middleware; use OCA\Files_Sharing\Controller\ExternalSharesController; diff --git a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php index cf68a41935fd9..8b3224ac3af6d 100644 --- a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php +++ b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use OCP\IConfig; diff --git a/apps/files_sharing/lib/Migration/SetAcceptedStatus.php b/apps/files_sharing/lib/Migration/SetAcceptedStatus.php index a51570e15fb41..e6e69ad720b59 100644 --- a/apps/files_sharing/lib/Migration/SetAcceptedStatus.php +++ b/apps/files_sharing/lib/Migration/SetAcceptedStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/apps/files_sharing/lib/Migration/SetPasswordColumn.php b/apps/files_sharing/lib/Migration/SetPasswordColumn.php index 3e466c225baf5..e37f9e13e1a9f 100644 --- a/apps/files_sharing/lib/Migration/SetPasswordColumn.php +++ b/apps/files_sharing/lib/Migration/SetPasswordColumn.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use OCP\IConfig; diff --git a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php index 29b7f423d813e..78035d9ccda9c 100644 --- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php +++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use Closure; diff --git a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php index f5a0ae2dd451b..74788c8fc0867 100644 --- a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php +++ b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use Closure; diff --git a/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php b/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php index 38f504c9d2fdf..8d767a9409d4f 100644 --- a/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php +++ b/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use Closure; diff --git a/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php b/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php index 4886fceb2b8ed..533f3dda970a8 100644 --- a/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php +++ b/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Migration; use Closure; diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 8047a0934a709..9a99eb849e9f7 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use Exception; @@ -26,7 +27,6 @@ use OCP\Share\IShare; use Override; use Psr\Log\LoggerInterface; - use function count; class MountProvider implements IMountProvider, IAuthoritativeMountProvider, IPartialMountProvider { diff --git a/apps/files_sharing/lib/Notification/Listener.php b/apps/files_sharing/lib/Notification/Listener.php index 1cf0f845e7a51..6894937a3a73e 100644 --- a/apps/files_sharing/lib/Notification/Listener.php +++ b/apps/files_sharing/lib/Notification/Listener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Notification; use OCP\IGroup; diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php index d43af2781808f..d4f53bebe4edc 100644 --- a/apps/files_sharing/lib/Notification/Notifier.php +++ b/apps/files_sharing/lib/Notification/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Notification; use OCP\Files\IRootFolder; diff --git a/apps/files_sharing/lib/Settings/Personal.php b/apps/files_sharing/lib/Settings/Personal.php index b31118746d471..16661d9628f7b 100644 --- a/apps/files_sharing/lib/Settings/Personal.php +++ b/apps/files_sharing/lib/Settings/Personal.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Settings; use OCA\Files_Sharing\AppInfo\Application; diff --git a/apps/files_sharing/lib/ShareTargetValidator.php b/apps/files_sharing/lib/ShareTargetValidator.php index e77dc5ddad07a..a8149edcf13a7 100644 --- a/apps/files_sharing/lib/ShareTargetValidator.php +++ b/apps/files_sharing/lib/ShareTargetValidator.php @@ -110,7 +110,6 @@ public function verifyMountPoint( return $newMountPoint; } - /** * @param callable(string):?ICachedMountInfo $getMountByPath */ diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index c1e8faeae338b..49a1399548182 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Files\Cache\CacheDependencies; diff --git a/apps/files_sharing/lib/SharesReminderJob.php b/apps/files_sharing/lib/SharesReminderJob.php index 8cbf9351e02d6..1a1ee1873902d 100644 --- a/apps/files_sharing/lib/SharesReminderJob.php +++ b/apps/files_sharing/lib/SharesReminderJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing; use OCP\AppFramework\Utility\ITimeFactory; @@ -54,7 +55,6 @@ public function __construct( $this->folderMimeTypeId = $mimeTypeLoader->getId(ICacheEntry::DIRECTORY_MIMETYPE); } - /** * Makes the background job do its work * diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php index 019542fa6bf9a..e2c0eef89706f 100644 --- a/apps/files_sharing/lib/Updater.php +++ b/apps/files_sharing/lib/Updater.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing; use OC\Files\Cache\FileAccess; diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index e0340b3ce0015..a4d1b71e42605 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Core\AppInfo\ConfigLexicon; diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index 0e4736ff25c2b..a3c62db96b75a 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Cache\Cache; @@ -41,7 +42,6 @@ protected function setUp(): void { $this->shareManager = Server::get(\OCP\Share\IManager::class); - $userManager = Server::get(IUserManager::class); $userManager->get(self::TEST_FILES_SHARING_API_USER1)->setDisplayName('User One'); $userManager->get(self::TEST_FILES_SHARING_API_USER2)->setDisplayName('User Two'); diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 787a31c0626f2..99b1712e38e9f 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\KnownUser\KnownUserService; diff --git a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php index 2a2e1c2909667..296132919c7c7 100644 --- a/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php +++ b/apps/files_sharing/tests/Collaboration/ShareRecipientSorterTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Tests\Collaboration; use OCA\Files_Sharing\Collaboration\ShareRecipientSorter; diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index 3650b812a3c05..a1a3a2fe623f6 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Command; use OCA\Files_Sharing\Command\CleanupRemoteStorages; diff --git a/apps/files_sharing/tests/Command/FixShareOwnersTest.php b/apps/files_sharing/tests/Command/FixShareOwnersTest.php index 0fde61895b173..e5da22427106e 100644 --- a/apps/files_sharing/tests/Command/FixShareOwnersTest.php +++ b/apps/files_sharing/tests/Command/FixShareOwnersTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Command; use OCA\Files_Sharing\Command\FixShareOwners; diff --git a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php index 620b770511eeb..e926cd51ba57c 100644 --- a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Controllers; use OCA\Files_Sharing\Controller\ExternalSharesController; diff --git a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php index 94ecd0bc23e43..d8cbaed227fd1 100644 --- a/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php +++ b/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Tests\Controller; use OCA\Files_Sharing\Controller\PublicPreviewController; @@ -252,7 +253,6 @@ public function testPreviewFolderInvalidFile(): void { $this->assertEquals($expected, $res); } - public function testPreviewFolderValidFile(): void { $share = $this->createMock(IShare::class); $this->shareManager->method('getShareByToken') diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index b6ca22329f6a2..55cf24d79d788 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -205,7 +205,6 @@ private function newShare() { return Server::get(IManager::class)->newShare(); } - private function mockShareAttributes() { $formattedShareAttributes = [ [ @@ -270,7 +269,6 @@ public function testDeleteShare(): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testDeleteShareLocked(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Could not delete share'); @@ -974,7 +972,6 @@ public function testGetShare(array $shareParams, array $result, bool $attributes $this->assertEquals($result, $data); } - public function testGetShareInvalidNode(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -1859,7 +1856,6 @@ public function testCreateShareNoPath(): void { $this->ocs->createShare(); } - public function testCreateShareInvalidPath(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Wrong path, file/folder does not exist'); @@ -1931,7 +1927,6 @@ public function testCreateShareUserNoShareWith(): void { $this->ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_USER); } - public function testCreateShareUserNoValidShareWith(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a valid account to share with'); @@ -2032,7 +2027,6 @@ public function testCreateShareUser(): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareGroupNoValidShareWith(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Please specify a valid group'); @@ -2142,7 +2136,6 @@ public function testCreateShareGroup(): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareGroupNotAllowed(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Group sharing is disabled by the administrator'); @@ -2171,7 +2164,6 @@ public function testCreateShareGroupNotAllowed(): void { $this->ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_GROUP, 'invalidGroup'); } - public function testCreateShareLinkNoLinksAllowed(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Public link sharing is disabled by the administrator'); @@ -2204,7 +2196,6 @@ public function testCreateShareLinkNoLinksAllowed(): void { $this->ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_LINK); } - public function testCreateShareLinkNoPublicUpload(): void { $this->expectException(OCSForbiddenException::class); $this->expectExceptionMessage('Public upload disabled by the administrator'); @@ -2229,7 +2220,6 @@ public function testCreateShareLinkNoPublicUpload(): void { $this->ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_LINK, null, 'true'); } - public function testCreateShareLinkPublicUploadFile(): void { $this->expectException(OCSBadRequestException::class); $this->expectExceptionMessage('Public upload is only possible for publicly shared folders'); @@ -2377,7 +2367,6 @@ public function testCreateShareLinkSendPasswordByTalk(): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareLinkSendPasswordByTalkWithTalkDisabled(): void { $this->expectException(OCSForbiddenException::class); $this->expectExceptionMessage('Sharing valid-path sending the password by Nextcloud Talk failed because Nextcloud Talk is not enabled'); @@ -2462,7 +2451,6 @@ public function testCreateShareValidExpireDate(): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareInvalidExpireDate(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Invalid date. Format must be YYYY-MM-DD'); @@ -2698,7 +2686,6 @@ function ($share): void { $this->assertEquals($expected->getData(), $result->getData()); } - public function testCreateShareRoomHelperNotAvailable(): void { $this->expectException(OCSForbiddenException::class); $this->expectExceptionMessage('Sharing valid-path failed because the back end does not support room shares'); @@ -2734,7 +2721,6 @@ public function testCreateShareRoomHelperNotAvailable(): void { $ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_ROOM, 'recipientRoom'); } - public function testCreateShareRoomHelperThrowException(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Exception thrown by the helper'); @@ -2858,7 +2844,6 @@ public function testCreateReshareOfFederatedMountNoDeletePermissions(): void { $ocs->createShare('valid-path', Constants::PERMISSION_ALL, IShare::TYPE_USER, 'validUser'); } - public function testUpdateShareCantAccess(): void { $this->expectException(OCSNotFoundException::class); $this->expectExceptionMessage('Wrong share ID, share does not exist'); @@ -2884,7 +2869,6 @@ public function testUpdateShareCantAccess(): void { $this->ocs->updateShare(42); } - public function testUpdateNoParametersLink(): void { $this->expectException(OCSBadRequestException::class); $this->expectExceptionMessage('Wrong or no update parameter given'); @@ -2905,7 +2889,6 @@ public function testUpdateNoParametersLink(): void { $this->ocs->updateShare(42); } - public function testUpdateNoParametersOther(): void { $this->expectException(OCSBadRequestException::class); $this->expectExceptionMessage('Wrong or no update parameter given'); @@ -3092,7 +3075,6 @@ public function testUpdateLinkShareEnablePublicUpload($permissions, $publicUploa $this->assertEquals($expected->getData(), $result->getData()); } - public static function publicLinkValidPermissionsProvider() { return [ [Constants::PERMISSION_CREATE], @@ -3251,7 +3233,6 @@ public function testUpdateLinkSharePublicUploadNotAllowed($permissions, $publicU $ocs->updateShare(42, $permissions, $password, null, $publicUpload, $expireDate); } - public function testUpdateLinkSharePublicUploadOnFile(): void { $this->expectException(OCSBadRequestException::class); $this->expectExceptionMessage('Public upload is only possible for publicly shared folders'); @@ -3396,7 +3377,6 @@ public function testUpdateLinkShareSendPasswordByTalkDoesNotChangeOther(): void $this->assertEquals($expected->getData(), $result->getData()); } - public function testUpdateLinkShareSendPasswordByTalkWithTalkDisabledDoesNotChangeOther(): void { $this->expectException(OCSForbiddenException::class); $this->expectExceptionMessage('"Sending the password by Nextcloud Talk" for sharing a file or folder failed because Nextcloud Talk is not enabled.'); diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 4e724a45a90f3..2d73ea2da464c 100644 --- a/apps/files_sharing/tests/Controller/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Controllers; use OC\Files\Filesystem; @@ -143,7 +144,6 @@ protected function setUp(): void { $this->publicShareTemplateFactory, ); - // Store current user $this->oldUser = \OC_User::getUser(); @@ -206,7 +206,6 @@ public function testShowShareNotAuthenticated(): void { $this->shareController->showShare(); } - public function testShowShare(): void { $note = 'personal note'; $filename = 'file1.txt'; @@ -646,7 +645,6 @@ public function testShowShareWithPrivateName(): void { $this->assertEquals($expectedResponse, $response); } - public function testShowShareInvalid(): void { $this->expectException(NotFoundException::class); diff --git a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php index 1a678610805ea..e795ccba92316 100644 --- a/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareInfoControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Tests\Controller; use OCA\Files_Sharing\Controller\ShareInfoController; @@ -24,7 +25,6 @@ class ShareInfoControllerTest extends TestCase { protected ShareInfoController $controller; protected ShareManager&MockObject $shareManager; - protected function setUp(): void { parent::setUp(); @@ -184,7 +184,6 @@ private function prepareFolder() { $root->method('getType')->willReturn('folder'); $root->method('getEtag')->willReturn('etag'); - //Subfolder $sub = $this->createMock(Folder::class); diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index 3426b4147b7c5..771c01ae12b70 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Controller; use OCA\FederatedFileSharing\FederatedShareProvider; @@ -199,7 +200,6 @@ public static function dataSearch(): array { [[ 'itemType' => 'folder', ], 'no', 'no', false, true, true, true, $allTypes, false, false, true], - ]; } @@ -284,7 +284,6 @@ public function testSearch( ->method('isRemoteSharingAllowed') ->willReturn($remoteSharingEnabled); - $sharees->expects($this->any()) ->method('isRemoteGroupSharingAllowed') ->willReturn($isRemoteGroupSharingEnabled); diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index bc67141f88d8e..5a43419113233 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; diff --git a/apps/files_sharing/tests/EncryptedSizePropagationTest.php b/apps/files_sharing/tests/EncryptedSizePropagationTest.php index 92773bdc72d78..fc3ff77f68788 100644 --- a/apps/files_sharing/tests/EncryptedSizePropagationTest.php +++ b/apps/files_sharing/tests/EncryptedSizePropagationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\View; diff --git a/apps/files_sharing/tests/EtagPropagationTest.php b/apps/files_sharing/tests/EtagPropagationTest.php index 597e584fa2f9d..8c977cfe9db34 100644 --- a/apps/files_sharing/tests/EtagPropagationTest.php +++ b/apps/files_sharing/tests/EtagPropagationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; diff --git a/apps/files_sharing/tests/ExpireSharesJobTest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index 50c490a7cea60..22d2487005c68 100644 --- a/apps/files_sharing/tests/ExpireSharesJobTest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\SystemConfig; diff --git a/apps/files_sharing/tests/External/CacheTest.php b/apps/files_sharing/tests/External/CacheTest.php index 38aff2573578e..c2a5316ddc480 100644 --- a/apps/files_sharing/tests/External/CacheTest.php +++ b/apps/files_sharing/tests/External/CacheTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\External; use OC\Federation\CloudIdManager; diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index 31ce7155704ce..44efcb3412671 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\External; use OC\Federation\CloudIdManager; diff --git a/apps/files_sharing/tests/External/ScannerTest.php b/apps/files_sharing/tests/External/ScannerTest.php index 89e3d1a48b31c..378ed64673366 100644 --- a/apps/files_sharing/tests/External/ScannerTest.php +++ b/apps/files_sharing/tests/External/ScannerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\External; use OC\Files\Cache\Cache; diff --git a/apps/files_sharing/tests/ExternalStorageTest.php b/apps/files_sharing/tests/ExternalStorageTest.php index 781961e55f7a8..b038d2c73497e 100644 --- a/apps/files_sharing/tests/ExternalStorageTest.php +++ b/apps/files_sharing/tests/ExternalStorageTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Federation\CloudId; diff --git a/apps/files_sharing/tests/GroupEtagPropagationTest.php b/apps/files_sharing/tests/GroupEtagPropagationTest.php index 9cabc52e14b84..47357f206269c 100644 --- a/apps/files_sharing/tests/GroupEtagPropagationTest.php +++ b/apps/files_sharing/tests/GroupEtagPropagationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index 0377812679b9d..9ec54c2d47f1e 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; @@ -65,7 +66,6 @@ protected function tearDown(): void { parent::tearDown(); } - public function testLockAsRecipient(): void { $this->expectException(LockedException::class); diff --git a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php index 631b6a0f51c9b..fa2c6518bd369 100644 --- a/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/ShareInfoMiddlewareTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Tests\Middleware; use OCA\Files_Sharing\Controller\ShareInfoController; @@ -66,7 +67,6 @@ public function testAfterExceptionNoShareInfo(): void { } } - public function testAfterExceptionNoS2S(): void { $exeption = new \Exception(); diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index 0169668130f46..a5bfdaefb7c86 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Middleware; use OCA\Files_Sharing\Controller\ExternalSharesController; @@ -173,7 +174,6 @@ public function testBeforeControllerWithShareControllerWithSharingEnabled(): voi $this->sharingCheckMiddleware->beforeController($controller, 'myMethod'); } - public function testBeforeControllerWithSharingDisabled(): void { $this->expectException(NotFoundException::class); $this->expectExceptionMessage('Sharing is disabled.'); @@ -187,7 +187,6 @@ public function testBeforeControllerWithSharingDisabled(): void { $this->sharingCheckMiddleware->beforeController($this->controllerMock, 'myMethod'); } - public function testAfterExceptionWithRegularException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('My Exception message'); diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php index 610f3658e4b29..c911ff92b12d3 100644 --- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php +++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Migration; use OCA\Files_Sharing\Migration\SetPasswordColumn; diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index b406c8af7b5c8..d6eae0f22b373 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Share20\Share; @@ -465,7 +466,6 @@ public function testMergeSharesInGetMountsForPath(array $userShares, array $grou $mounts = $this->provider->getMountsForPath('/', true, $mountArgs, $this->loader); } - $this->assertCount(\count($expectedShares), $mounts); foreach (array_values($mounts) as $index => $mount) { diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index 98bf5ad92fd62..a3f7164600868 100644 --- a/apps/files_sharing/tests/PropagationTestCase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\View; diff --git a/apps/files_sharing/tests/Repair/CleanupShareTargetTest.php b/apps/files_sharing/tests/Repair/CleanupShareTargetTest.php index aaa653135ce4b..e781a8ec72ef2 100644 --- a/apps/files_sharing/tests/Repair/CleanupShareTargetTest.php +++ b/apps/files_sharing/tests/Repair/CleanupShareTargetTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2026 * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests\Repair; use OC\Migration\NullOutput; diff --git a/apps/files_sharing/tests/ShareTargetValidatorTest.php b/apps/files_sharing/tests/ShareTargetValidatorTest.php index 1c5b8b619c27a..d1e0f5d122d12 100644 --- a/apps/files_sharing/tests/ShareTargetValidatorTest.php +++ b/apps/files_sharing/tests/ShareTargetValidatorTest.php @@ -39,7 +39,6 @@ protected function setUp(): void { $this->filename = '/share-api-storage.txt'; - $this->view->mkdir($this->folder); $this->view->mkdir($this->folder2); @@ -63,7 +62,6 @@ protected function setUp(): void { ->willReturn(self::TEST_FILES_SHARING_API_USER2); } - /** * test if the mount point moves up if the parent folder no longer exists */ @@ -157,7 +155,6 @@ public function testShareMountOverShare(): void { $this->view->unlink($this->folder); } - /** * test if the parent folder is created if asked for */ diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php index 3556849854295..1ed6bc9b3fe01 100644 --- a/apps/files_sharing/tests/ShareTest.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\FileInfo; diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php index 020b6ec41c5c8..cc7d5058f5d42 100644 --- a/apps/files_sharing/tests/SharedMountTest.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; @@ -34,7 +35,6 @@ protected function setUp(): void { $this->filename = '/share-api-storage.txt'; - $this->view->mkdir($this->folder); $this->view->mkdir($this->folder2); diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index cd0a06f24363e..26e1e0a5e81c0 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Cache\FailedCache; @@ -36,7 +37,6 @@ protected function setUp(): void { $this->filename = '/share-api-storage.txt'; - $this->view->mkdir($this->folder); // save file with content @@ -70,7 +70,6 @@ public function testRenamePartFile(): void { Constants::PERMISSION_ALL ); - self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $user2View = new View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files'); @@ -118,7 +117,6 @@ public function testFilesize(): void { Constants::PERMISSION_READ | Constants::PERMISSION_UPDATE | Constants::PERMISSION_SHARE ); - self::loginHelper(self::TEST_FILES_SHARING_API_USER2); // compare file size between user1 and user2, should always be the same @@ -140,7 +138,6 @@ public function testGetPermissions(): void { Constants::PERMISSION_READ ); - self::loginHelper(self::TEST_FILES_SHARING_API_USER2); $this->assertTrue(Filesystem::is_dir($this->folder)); @@ -156,7 +153,6 @@ public function testGetPermissions(): void { $subfileInfo = Filesystem::getFileInfo($this->folder . $this->filename); $this->assertSame(1, $subfileInfo->getPermissions()); - //cleanup $this->shareManager->deleteShare($share); } diff --git a/apps/files_sharing/tests/SharesReminderJobTest.php b/apps/files_sharing/tests/SharesReminderJobTest.php index 641d9a5295fca..c26122883d5d2 100644 --- a/apps/files_sharing/tests/SharesReminderJobTest.php +++ b/apps/files_sharing/tests/SharesReminderJobTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Sharing\Tests; use OC\SystemConfig; diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php index 9b2f82cc99e0d..c89667d3e4240 100644 --- a/apps/files_sharing/tests/SizePropagationTest.php +++ b/apps/files_sharing/tests/SizePropagationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\View; diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index 02ee66d096118..e9732b5ff0209 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Cache\Storage; diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php index 1174a3204aae7..93378205ca1ab 100644 --- a/apps/files_sharing/tests/UnshareChildrenTest.php +++ b/apps/files_sharing/tests/UnshareChildrenTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index 6ca9801dc98f7..ae5a3f71eb9b9 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\FileInfo; diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index 8c3c3890c88ed..6bd58358083fe 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Sharing\Tests; use OC\Files\Cache\Cache; diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php index f63015548d524..ff02450da3541 100644 --- a/apps/files_trashbin/lib/AppInfo/Application.php +++ b/apps/files_trashbin/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\AppInfo; use OCA\DAV\Connector\Sabre\Principal; diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php index 7305c24cc57ea..f1e2bf75f1a60 100644 --- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php +++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\BackgroundJob; use OCA\Files_Trashbin\AppInfo\Application; diff --git a/apps/files_trashbin/lib/Capabilities.php b/apps/files_trashbin/lib/Capabilities.php index 35d84dced1c07..84e34a3f56424 100644 --- a/apps/files_trashbin/lib/Capabilities.php +++ b/apps/files_trashbin/lib/Capabilities.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin; use OCA\Files_Trashbin\Service\ConfigService; diff --git a/apps/files_trashbin/lib/Command/CleanUp.php b/apps/files_trashbin/lib/Command/CleanUp.php index 33e2c81eea8c6..9021b19ef86ad 100644 --- a/apps/files_trashbin/lib/Command/CleanUp.php +++ b/apps/files_trashbin/lib/Command/CleanUp.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Command; use OC\Core\Command\Base; diff --git a/apps/files_trashbin/lib/Command/Expire.php b/apps/files_trashbin/lib/Command/Expire.php index 233be4ee5f924..fad9bc574387c 100644 --- a/apps/files_trashbin/lib/Command/Expire.php +++ b/apps/files_trashbin/lib/Command/Expire.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Command; use OC\Command\FileAccess; diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php index b4aa0a9e0a985..021bb54e9aa15 100644 --- a/apps/files_trashbin/lib/Command/ExpireTrash.php +++ b/apps/files_trashbin/lib/Command/ExpireTrash.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Command; use OC\Core\Command\Base; diff --git a/apps/files_trashbin/lib/Command/RestoreAllFiles.php b/apps/files_trashbin/lib/Command/RestoreAllFiles.php index 05c327cb5ccdd..7855e6688907e 100644 --- a/apps/files_trashbin/lib/Command/RestoreAllFiles.php +++ b/apps/files_trashbin/lib/Command/RestoreAllFiles.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Command; use OC\Core\Command\Base; diff --git a/apps/files_trashbin/lib/Command/Size.php b/apps/files_trashbin/lib/Command/Size.php index f28511cace78e..90c9402c7b227 100644 --- a/apps/files_trashbin/lib/Command/Size.php +++ b/apps/files_trashbin/lib/Command/Size.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Command; use OC\Core\Command\Base; diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php index a4e911d88ef81..3ca66ec3047b8 100644 --- a/apps/files_trashbin/lib/Controller/PreviewController.php +++ b/apps/files_trashbin/lib/Controller/PreviewController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Controller; use OCA\Files_Trashbin\Trash\ITrashManager; diff --git a/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php b/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php index 405d9b6396eda..d0c4ef0de8a60 100644 --- a/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php +++ b/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Events; use OCP\Exceptions\AbortedEventException; diff --git a/apps/files_trashbin/lib/Events/MoveToTrashEvent.php b/apps/files_trashbin/lib/Events/MoveToTrashEvent.php index 9deba9002017c..0c43d469b146d 100644 --- a/apps/files_trashbin/lib/Events/MoveToTrashEvent.php +++ b/apps/files_trashbin/lib/Events/MoveToTrashEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Events; use OCP\EventDispatcher\Event; diff --git a/apps/files_trashbin/lib/Events/NodeRestoredEvent.php b/apps/files_trashbin/lib/Events/NodeRestoredEvent.php index 4278d6cfe9515..fd0b0f1bf6c01 100644 --- a/apps/files_trashbin/lib/Events/NodeRestoredEvent.php +++ b/apps/files_trashbin/lib/Events/NodeRestoredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Events; use OCP\Files\Events\Node\AbstractNodesEvent; diff --git a/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php b/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php index cec6c92ce6f2f..6405c9b75deba 100644 --- a/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php +++ b/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Exceptions; class CopyRecursiveException extends \Exception { diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php index 0bbe39a931435..3a96270a86ecb 100644 --- a/apps/files_trashbin/lib/Expiration.php +++ b/apps/files_trashbin/lib/Expiration.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php index 746832e9280cd..fc7e97ec8f80d 100644 --- a/apps/files_trashbin/lib/Helper.php +++ b/apps/files_trashbin/lib/Helper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin; use OC\Files\FileInfo; diff --git a/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php b/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php index 652cd5226f391..5fd8ccfb7d151 100644 --- a/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php +++ b/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Listeners; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php index 8ca09036c8b42..aaee97321eb91 100644 --- a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php +++ b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Migration; use Closure; diff --git a/apps/files_trashbin/lib/Sabre/AbstractTrash.php b/apps/files_trashbin/lib/Sabre/AbstractTrash.php index acc872b34c7b6..72cbb74b31cde 100644 --- a/apps/files_trashbin/lib/Sabre/AbstractTrash.php +++ b/apps/files_trashbin/lib/Sabre/AbstractTrash.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Service\ConfigService; diff --git a/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php b/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php index 28749502e5c6d..4ed2b9e82546d 100644 --- a/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php +++ b/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use Sabre\DAV\Exception\Forbidden; diff --git a/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php b/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php index 49f74f4cf57bf..d907a574cc12f 100644 --- a/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Trash\ITrashItem; diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php index f37e1ccd9c38b..7b3abd2b5f7b5 100644 --- a/apps/files_trashbin/lib/Sabre/ITrash.php +++ b/apps/files_trashbin/lib/Sabre/ITrash.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCP\Files\FileInfo; diff --git a/apps/files_trashbin/lib/Sabre/RestoreFolder.php b/apps/files_trashbin/lib/Sabre/RestoreFolder.php index 766809d3f2be7..992011c9bffec 100644 --- a/apps/files_trashbin/lib/Sabre/RestoreFolder.php +++ b/apps/files_trashbin/lib/Sabre/RestoreFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use Sabre\DAV\Exception\Forbidden; diff --git a/apps/files_trashbin/lib/Sabre/RootCollection.php b/apps/files_trashbin/lib/Sabre/RootCollection.php index 2e1e87134f89b..f00c32cc22b34 100644 --- a/apps/files_trashbin/lib/Sabre/RootCollection.php +++ b/apps/files_trashbin/lib/Sabre/RootCollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Trash\ITrashManager; diff --git a/apps/files_trashbin/lib/Sabre/TrashFile.php b/apps/files_trashbin/lib/Sabre/TrashFile.php index fec435b2e15f2..fd0a9120ec86d 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Trashbin; diff --git a/apps/files_trashbin/lib/Sabre/TrashFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolder.php index 7906efb9ff1f7..c845839c70b2d 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Trashbin; diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php index b984e8a35b218..a11dbe60d660f 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; class TrashFolderFile extends AbstractTrashFile { diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php index 1a5cb98e114fe..6fed79518247b 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; class TrashFolderFolder extends AbstractTrashFolder { diff --git a/apps/files_trashbin/lib/Sabre/TrashHome.php b/apps/files_trashbin/lib/Sabre/TrashHome.php index 174807541f935..1a0f1fafce6a4 100644 --- a/apps/files_trashbin/lib/Sabre/TrashHome.php +++ b/apps/files_trashbin/lib/Sabre/TrashHome.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Trash\ITrashManager; diff --git a/apps/files_trashbin/lib/Sabre/TrashRoot.php b/apps/files_trashbin/lib/Sabre/TrashRoot.php index 7a009afe62f0e..9c730c69d8770 100644 --- a/apps/files_trashbin/lib/Sabre/TrashRoot.php +++ b/apps/files_trashbin/lib/Sabre/TrashRoot.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OCA\Files_Trashbin\Service\ConfigService; diff --git a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php index 6b722971bebdc..c3ca8a832389d 100644 --- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php +++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018-2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Sabre; use OC\Files\FileInfo; @@ -55,7 +56,6 @@ public function initialize(Server $server): void { $this->server->on('beforeMove', [$this, 'beforeMove']); } - public function propFind(PropFind $propFind, INode $node): void { // Only act on trashbin nodes if (!($node instanceof ITrash)) { diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index 39cd4f1c60b34..0412bf7138c40 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin; use OC\Files\Filesystem; diff --git a/apps/files_trashbin/lib/Trash/BackendNotFoundException.php b/apps/files_trashbin/lib/Trash/BackendNotFoundException.php index 2e275c3b37613..57b5e1c7cc5bf 100644 --- a/apps/files_trashbin/lib/Trash/BackendNotFoundException.php +++ b/apps/files_trashbin/lib/Trash/BackendNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; class BackendNotFoundException extends \Exception { diff --git a/apps/files_trashbin/lib/Trash/ITrashBackend.php b/apps/files_trashbin/lib/Trash/ITrashBackend.php index 0e30c5972bda6..46685ab4e9f18 100644 --- a/apps/files_trashbin/lib/Trash/ITrashBackend.php +++ b/apps/files_trashbin/lib/Trash/ITrashBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OCP\Files\Node; diff --git a/apps/files_trashbin/lib/Trash/ITrashItem.php b/apps/files_trashbin/lib/Trash/ITrashItem.php index c439ccee37e09..0be06617fcf47 100644 --- a/apps/files_trashbin/lib/Trash/ITrashItem.php +++ b/apps/files_trashbin/lib/Trash/ITrashItem.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OCP\Files\FileInfo; diff --git a/apps/files_trashbin/lib/Trash/ITrashManager.php b/apps/files_trashbin/lib/Trash/ITrashManager.php index af174bf45f34b..25a07d66c8b8c 100644 --- a/apps/files_trashbin/lib/Trash/ITrashManager.php +++ b/apps/files_trashbin/lib/Trash/ITrashManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OCP\IUser; diff --git a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php index 488dc79f541f1..54ffd6f4cabb9 100644 --- a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php +++ b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OC\Files\Filesystem; diff --git a/apps/files_trashbin/lib/Trash/TrashItem.php b/apps/files_trashbin/lib/Trash/TrashItem.php index 9e1a28a5ee76d..153625cfb4cc7 100644 --- a/apps/files_trashbin/lib/Trash/TrashItem.php +++ b/apps/files_trashbin/lib/Trash/TrashItem.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OCP\Files\Cache\ICacheEntry; diff --git a/apps/files_trashbin/lib/Trash/TrashManager.php b/apps/files_trashbin/lib/Trash/TrashManager.php index b82fbbc6da977..3706a6a2e8033 100644 --- a/apps/files_trashbin/lib/Trash/TrashManager.php +++ b/apps/files_trashbin/lib/Trash/TrashManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Trash; use OCP\Files\Storage\IStorage; diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index e66045f03cbfe..b5edf37bf2f2c 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin; use OC\Files\Cache\Cache; @@ -175,7 +176,6 @@ private static function setUpTrash($user): void { } } - /** * copy file to owners trash * @@ -204,7 +204,6 @@ private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, self::copy_recursive($source, $target, $view); } - if ($view->file_exists($target)) { $query = Server::get(IDBConnection::class)->getQueryBuilder(); $query->insert('files_trash') @@ -220,7 +219,6 @@ private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, } } - /** * move file to the trash bin * diff --git a/apps/files_trashbin/tests/CapabilitiesTest.php b/apps/files_trashbin/tests/CapabilitiesTest.php index 1c460cc566589..850b87b4a5456 100644 --- a/apps/files_trashbin/tests/CapabilitiesTest.php +++ b/apps/files_trashbin/tests/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Tests; use OCA\Files_Trashbin\Capabilities; diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index 325643e7269ad..23ecc8c61a6e7 100644 --- a/apps/files_trashbin/tests/Command/CleanUpTest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Tests\Command; use OC\Files\SetupManager; diff --git a/apps/files_trashbin/tests/Command/ExpireTest.php b/apps/files_trashbin/tests/Command/ExpireTest.php index e6d96c6d79e5f..9a6c0aaffbf1b 100644 --- a/apps/files_trashbin/tests/Command/ExpireTest.php +++ b/apps/files_trashbin/tests/Command/ExpireTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Tests\Command; use OCA\Files_Trashbin\Command\Expire; diff --git a/apps/files_trashbin/tests/Command/ExpireTrashTest.php b/apps/files_trashbin/tests/Command/ExpireTrashTest.php index 55859da0557b3..6318be2450496 100644 --- a/apps/files_trashbin/tests/Command/ExpireTrashTest.php +++ b/apps/files_trashbin/tests/Command/ExpireTrashTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Tests\Command; use OC\Files\SetupManager; diff --git a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php index bb951c9c8c7b1..fd13f34032249 100644 --- a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php +++ b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Trashbin\Tests\Controller; use OCA\Files_Trashbin\Controller\PreviewController; diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php index fdc80977d79c8..9fa585e99b577 100644 --- a/apps/files_trashbin/tests/ExpirationTest.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Trashbin\Tests; use OCA\Files_Trashbin\Expiration; @@ -93,7 +94,6 @@ public function testExpiration(string $retentionObligation, int $timeNow, int $t $this->assertEquals($expectedResult, $actualResult); } - public static function timestampTestData(): array { return [ [ 'disabled', false], @@ -107,7 +107,6 @@ public static function timestampTestData(): array { ]; } - #[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'timestampTestData')] public function testGetMaxAgeAsTimestamp(string $configValue, bool|int $expectedMaxAgeTimestamp): void { $mockedConfig = $this->getMockedConfig($configValue); diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 14a0af0697baf..0eb4997648fd7 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -157,7 +157,6 @@ public function testTrashEntryNotCreatedWhenDeleteFailed(): void { $storage2->method('instanceOfStorage') ->willReturnCallback(fn (string $class) => ($class !== Local::class) && (new Temporary([]))->instanceOfStorage($class)); - Filesystem::mount($storage2, [], $this->user . '/files/substorage'); $this->userView->file_put_contents('substorage/test.txt', 'foo'); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index e34897330edd6..7431db50fad39 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -83,7 +83,6 @@ public static function setUpBeforeClass(): void { self::loginHelper(self::TEST_TRASHBIN_USER1, true); } - public static function tearDownAfterClass(): void { // cleanup test user $user = Server::get(IUserManager::class)->get(self::TEST_TRASHBIN_USER1); @@ -315,7 +314,6 @@ private function manipulateDeleteTime(array $files, string $trashRoot, int $expi return \OCA\Files\Helper::sortFiles($files, 'mtime'); } - /** * test expiration of old files in the trash bin until the max size * of the trash bin is met again @@ -709,7 +707,6 @@ public static function loginHelper($user, $create = false) { } } - // just a dummy class to make protected methods available for testing class TrashbinForTesting extends Trashbin { diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 7eb9c821a2518..b6ba8ddf31b50 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\AppInfo; return [ diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php index 6d1aa6c21baf3..c1f827af6e03f 100644 --- a/apps/files_versions/lib/AppInfo/Application.php +++ b/apps/files_versions/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\AppInfo; use OCA\DAV\Connector\Sabre\Principal; diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php index 2d9d985b4b84d..946dcc51f6c53 100644 --- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php +++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\BackgroundJob; use OC\Files\View; diff --git a/apps/files_versions/lib/Capabilities.php b/apps/files_versions/lib/Capabilities.php index 88255f5e1703f..79f7625c6186f 100644 --- a/apps/files_versions/lib/Capabilities.php +++ b/apps/files_versions/lib/Capabilities.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions; use OCP\App\IAppManager; diff --git a/apps/files_versions/lib/Command/CleanUp.php b/apps/files_versions/lib/Command/CleanUp.php index f3a71d3dbb21d..47a946b536361 100644 --- a/apps/files_versions/lib/Command/CleanUp.php +++ b/apps/files_versions/lib/Command/CleanUp.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Command; use OCA\Files_Versions\Db\VersionsMapper; @@ -44,7 +45,6 @@ protected function configure(): void { ); } - #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $users = $input->getArgument('user_id'); @@ -98,7 +98,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return self::SUCCESS; } - /** * delete versions for the given user */ diff --git a/apps/files_versions/lib/Command/Expire.php b/apps/files_versions/lib/Command/Expire.php index 19960ecdb1ba8..995f9a59f0b03 100644 --- a/apps/files_versions/lib/Command/Expire.php +++ b/apps/files_versions/lib/Command/Expire.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Command; use OC\Command\FileAccess; diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php index 5413f897d2c6f..4c3c065e7c2ab 100644 --- a/apps/files_versions/lib/Command/ExpireVersions.php +++ b/apps/files_versions/lib/Command/ExpireVersions.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Command; use OC\Files\View; diff --git a/apps/files_versions/lib/Controller/PreviewController.php b/apps/files_versions/lib/Controller/PreviewController.php index 2c3ff8da70d16..126506dbd5818 100644 --- a/apps/files_versions/lib/Controller/PreviewController.php +++ b/apps/files_versions/lib/Controller/PreviewController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Controller; use OCA\Files_Versions\Versions\IVersionManager; diff --git a/apps/files_versions/lib/Db/VersionEntity.php b/apps/files_versions/lib/Db/VersionEntity.php index 530e6effedf50..7fad605270cce 100644 --- a/apps/files_versions/lib/Db/VersionEntity.php +++ b/apps/files_versions/lib/Db/VersionEntity.php @@ -10,7 +10,6 @@ namespace OCA\Files_Versions\Db; use JsonSerializable; - use OCP\AppFramework\Db\Entity; use OCP\DB\Types; diff --git a/apps/files_versions/lib/Events/CreateVersionEvent.php b/apps/files_versions/lib/Events/CreateVersionEvent.php index 92ed26b2dd6ab..16d5fc454b350 100644 --- a/apps/files_versions/lib/Events/CreateVersionEvent.php +++ b/apps/files_versions/lib/Events/CreateVersionEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Events; use OCP\EventDispatcher\Event; @@ -18,7 +19,6 @@ */ class CreateVersionEvent extends Event { - /** @var bool */ private $createVersion; diff --git a/apps/files_versions/lib/Events/VersionCreatedEvent.php b/apps/files_versions/lib/Events/VersionCreatedEvent.php index 4dc7a7cb5053c..b1bf18720e0bd 100644 --- a/apps/files_versions/lib/Events/VersionCreatedEvent.php +++ b/apps/files_versions/lib/Events/VersionCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Events; use OCA\Files_Versions\Versions\IVersion; diff --git a/apps/files_versions/lib/Events/VersionRestoredEvent.php b/apps/files_versions/lib/Events/VersionRestoredEvent.php index 12e91bd258d15..0d7ef010b4856 100644 --- a/apps/files_versions/lib/Events/VersionRestoredEvent.php +++ b/apps/files_versions/lib/Events/VersionRestoredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Events; use OCA\Files_Versions\Versions\IVersion; diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php index 1e04d93379f99..18c5f88eabfe4 100644 --- a/apps/files_versions/lib/Expiration.php +++ b/apps/files_versions/lib/Expiration.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions; use OCP\AppFramework\Utility\ITimeFactory; @@ -168,7 +169,6 @@ private function parseRetentionObligation(): void { $maxValue = 'auto'; } - if ($minValue === 'auto' && $maxValue === 'auto') { // Default: Delete anytime if space needed $this->minAge = self::NO_OBLIGATION; diff --git a/apps/files_versions/lib/Listener/FileEventsListener.php b/apps/files_versions/lib/Listener/FileEventsListener.php index fc27e97eeaffc..5a4b25f0ccd0d 100644 --- a/apps/files_versions/lib/Listener/FileEventsListener.php +++ b/apps/files_versions/lib/Listener/FileEventsListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Listener; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/apps/files_versions/lib/Listener/LegacyRollbackListener.php b/apps/files_versions/lib/Listener/LegacyRollbackListener.php index 9970279553b07..7aaa9c0839225 100644 --- a/apps/files_versions/lib/Listener/LegacyRollbackListener.php +++ b/apps/files_versions/lib/Listener/LegacyRollbackListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Listener; use OCA\Files_Versions\Events\VersionRestoredEvent; diff --git a/apps/files_versions/lib/Listener/LoadAdditionalListener.php b/apps/files_versions/lib/Listener/LoadAdditionalListener.php index 92b6c9c692a3f..d9b66b02ad624 100644 --- a/apps/files_versions/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_versions/lib/Listener/LoadAdditionalListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Listener; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/files_versions/lib/Listener/LoadSidebarListener.php b/apps/files_versions/lib/Listener/LoadSidebarListener.php index 249c11ca488d1..ba6c487a7a4cd 100644 --- a/apps/files_versions/lib/Listener/LoadSidebarListener.php +++ b/apps/files_versions/lib/Listener/LoadSidebarListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Listener; use OCA\Files\Event\LoadSidebar; diff --git a/apps/files_versions/lib/Listener/VersionAuthorListener.php b/apps/files_versions/lib/Listener/VersionAuthorListener.php index 32189608fc17e..7a557ba8ddc24 100644 --- a/apps/files_versions/lib/Listener/VersionAuthorListener.php +++ b/apps/files_versions/lib/Listener/VersionAuthorListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Listener; use OC\Files\Node\Folder; diff --git a/apps/files_versions/lib/Sabre/Plugin.php b/apps/files_versions/lib/Sabre/Plugin.php index 37755aab6b323..a26a9c874558b 100644 --- a/apps/files_versions/lib/Sabre/Plugin.php +++ b/apps/files_versions/lib/Sabre/Plugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019-2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OC\AppFramework\Http\Request; diff --git a/apps/files_versions/lib/Sabre/RestoreFolder.php b/apps/files_versions/lib/Sabre/RestoreFolder.php index 0c340b0ca02c4..36825216b95e4 100644 --- a/apps/files_versions/lib/Sabre/RestoreFolder.php +++ b/apps/files_versions/lib/Sabre/RestoreFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use Sabre\DAV\Exception\Forbidden; diff --git a/apps/files_versions/lib/Sabre/RootCollection.php b/apps/files_versions/lib/Sabre/RootCollection.php index 0e97b3466263d..7a7d704311a65 100644 --- a/apps/files_versions/lib/Sabre/RootCollection.php +++ b/apps/files_versions/lib/Sabre/RootCollection.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OCA\Files_Versions\Versions\IVersionManager; diff --git a/apps/files_versions/lib/Sabre/VersionCollection.php b/apps/files_versions/lib/Sabre/VersionCollection.php index cc2d7f1b9830e..8a5d5e7b3a2c0 100644 --- a/apps/files_versions/lib/Sabre/VersionCollection.php +++ b/apps/files_versions/lib/Sabre/VersionCollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OCA\Files_Versions\Versions\IVersion; diff --git a/apps/files_versions/lib/Sabre/VersionFile.php b/apps/files_versions/lib/Sabre/VersionFile.php index e75b3031bad83..7346c77f1f90f 100644 --- a/apps/files_versions/lib/Sabre/VersionFile.php +++ b/apps/files_versions/lib/Sabre/VersionFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OCA\Files_Versions\Versions\IDeletableVersionBackend; diff --git a/apps/files_versions/lib/Sabre/VersionHome.php b/apps/files_versions/lib/Sabre/VersionHome.php index 4c2f256ad32ba..f04685b18b787 100644 --- a/apps/files_versions/lib/Sabre/VersionHome.php +++ b/apps/files_versions/lib/Sabre/VersionHome.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OC\User\NoUserException; diff --git a/apps/files_versions/lib/Sabre/VersionRoot.php b/apps/files_versions/lib/Sabre/VersionRoot.php index 665ff3cc1976e..9481b7a5a24bf 100644 --- a/apps/files_versions/lib/Sabre/VersionRoot.php +++ b/apps/files_versions/lib/Sabre/VersionRoot.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Sabre; use OCA\Files_Versions\Versions\IVersionManager; diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index fe9f91534fa01..1a5598b766f2c 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -216,7 +216,6 @@ public static function store($filename) { $versionManager->createVersion($user, $file); } - /** * mark file as deleted so that we can remove the versions if the file is gone * @param string $path diff --git a/apps/files_versions/lib/Versions/BackendNotFoundException.php b/apps/files_versions/lib/Versions/BackendNotFoundException.php index abed50a388b78..50960a1e6d946 100644 --- a/apps/files_versions/lib/Versions/BackendNotFoundException.php +++ b/apps/files_versions/lib/Versions/BackendNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; class BackendNotFoundException extends \Exception { diff --git a/apps/files_versions/lib/Versions/IDeletableVersionBackend.php b/apps/files_versions/lib/Versions/IDeletableVersionBackend.php index fefc038864f5e..77c015b6fe713 100644 --- a/apps/files_versions/lib/Versions/IDeletableVersionBackend.php +++ b/apps/files_versions/lib/Versions/IDeletableVersionBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; /** diff --git a/apps/files_versions/lib/Versions/IMetadataVersion.php b/apps/files_versions/lib/Versions/IMetadataVersion.php index 30b421d4174d1..2093bce19864c 100644 --- a/apps/files_versions/lib/Versions/IMetadataVersion.php +++ b/apps/files_versions/lib/Versions/IMetadataVersion.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; /** diff --git a/apps/files_versions/lib/Versions/IMetadataVersionBackend.php b/apps/files_versions/lib/Versions/IMetadataVersionBackend.php index 79db85e460b14..9428dd431bc36 100644 --- a/apps/files_versions/lib/Versions/IMetadataVersionBackend.php +++ b/apps/files_versions/lib/Versions/IMetadataVersionBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCP\Files\Node; diff --git a/apps/files_versions/lib/Versions/INameableVersion.php b/apps/files_versions/lib/Versions/INameableVersion.php index a470239f12839..9d1485a69262a 100644 --- a/apps/files_versions/lib/Versions/INameableVersion.php +++ b/apps/files_versions/lib/Versions/INameableVersion.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; /** diff --git a/apps/files_versions/lib/Versions/INameableVersionBackend.php b/apps/files_versions/lib/Versions/INameableVersionBackend.php index d2ab7ed813563..c7614561d59b2 100644 --- a/apps/files_versions/lib/Versions/INameableVersionBackend.php +++ b/apps/files_versions/lib/Versions/INameableVersionBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; /** diff --git a/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php b/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php index e52e2f8e8bc21..634a0b8e711fa 100644 --- a/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php +++ b/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCA\Files_Versions\Db\VersionEntity; diff --git a/apps/files_versions/lib/Versions/IVersion.php b/apps/files_versions/lib/Versions/IVersion.php index e5fd53d01572c..daa03e947223b 100644 --- a/apps/files_versions/lib/Versions/IVersion.php +++ b/apps/files_versions/lib/Versions/IVersion.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCP\Files\FileInfo; diff --git a/apps/files_versions/lib/Versions/IVersionBackend.php b/apps/files_versions/lib/Versions/IVersionBackend.php index 18f8c17f0ac26..1d64454cde12c 100644 --- a/apps/files_versions/lib/Versions/IVersionBackend.php +++ b/apps/files_versions/lib/Versions/IVersionBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OC\Files\Node\Node; diff --git a/apps/files_versions/lib/Versions/IVersionManager.php b/apps/files_versions/lib/Versions/IVersionManager.php index ecd424d0cc1de..6154af35255b8 100644 --- a/apps/files_versions/lib/Versions/IVersionManager.php +++ b/apps/files_versions/lib/Versions/IVersionManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCP\Files\Storage\IStorage; diff --git a/apps/files_versions/lib/Versions/IVersionsImporterBackend.php b/apps/files_versions/lib/Versions/IVersionsImporterBackend.php index db9349328e906..2af727cbaf836 100644 --- a/apps/files_versions/lib/Versions/IVersionsImporterBackend.php +++ b/apps/files_versions/lib/Versions/IVersionsImporterBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCP\Files\Node; diff --git a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php index c3ae5d2742d3a..59a52a7f47ae4 100644 --- a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php +++ b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php @@ -331,7 +331,6 @@ public function setMetadataValue(Node $node, int $revision, string $key, string $this->versionsMapper->update($versionEntity); } - /** * @inheritdoc */ diff --git a/apps/files_versions/lib/Versions/Version.php b/apps/files_versions/lib/Versions/Version.php index 2d05e97af57a8..fee72cb306976 100644 --- a/apps/files_versions/lib/Versions/Version.php +++ b/apps/files_versions/lib/Versions/Version.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCP\Files\FileInfo; diff --git a/apps/files_versions/lib/Versions/VersionManager.php b/apps/files_versions/lib/Versions/VersionManager.php index a676268fda51c..2e91a063b7021 100644 --- a/apps/files_versions/lib/Versions/VersionManager.php +++ b/apps/files_versions/lib/Versions/VersionManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Versions; use OCA\Files_Versions\Db\VersionEntity; diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php index 446b62f145d9d..d671b49cc6bc3 100644 --- a/apps/files_versions/tests/Command/CleanupTest.php +++ b/apps/files_versions/tests/Command/CleanupTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Tests\Command; use OC\User\Manager; @@ -92,7 +93,6 @@ public static function dataTestDeleteVersions(): array { ]; } - /** * test delete versions from users given as parameter */ diff --git a/apps/files_versions/tests/Command/ExpireTest.php b/apps/files_versions/tests/Command/ExpireTest.php index 030e7a1b98ab4..4889ac9a5f2b1 100644 --- a/apps/files_versions/tests/Command/ExpireTest.php +++ b/apps/files_versions/tests/Command/ExpireTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Tests\Command; use OCA\Files_Versions\Command\Expire; diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php index 252b7218b6277..c9c815959cf0a 100644 --- a/apps/files_versions/tests/ExpirationTest.php +++ b/apps/files_versions/tests/ExpirationTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Tests; use OCA\Files_Versions\Expiration; @@ -93,7 +94,6 @@ public function testExpiration(string $retentionObligation, int $timeNow, int $t $this->assertEquals($expectedResult, $actualResult); } - private function getMockedTimeFactory(int $time): ITimeFactory&MockObject { $mockedTimeFactory = $this->createMock(ITimeFactory::class); $mockedTimeFactory->expects($this->any()) diff --git a/apps/files_versions/tests/GetAutoExpireListTest.php b/apps/files_versions/tests/GetAutoExpireListTest.php index d5720da988162..efe3f8ce7e2ad 100644 --- a/apps/files_versions/tests/GetAutoExpireListTest.php +++ b/apps/files_versions/tests/GetAutoExpireListTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Tests; use OCA\Files_Versions\Storage; @@ -128,7 +129,6 @@ public static function provideBucketKeepsLatest(): array { ]; } - #[\PHPUnit\Framework\Attributes\DataProvider('provideVersionRetentionRanges')] public function testRetentionOverTimeEveryTenMinutes( int $days, diff --git a/apps/files_versions/tests/StorageTest.php b/apps/files_versions/tests/StorageTest.php index f9ed28e16d9bb..35f60d4afe868 100644 --- a/apps/files_versions/tests/StorageTest.php +++ b/apps/files_versions/tests/StorageTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { $this->userFolder = $root->getUserFolder('version_test'); } - protected function createPastFile(string $path, int $mtime): void { try { $file = $this->userFolder->get($path); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index fdc37016b5573..d627eb48f3707 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Files_Versions\Tests; use OC\AllConfig; @@ -284,7 +285,6 @@ public static function versionsProvider(): array { [], 0 ] - ]; } @@ -399,7 +399,6 @@ public function testMoveFolder(): void { $this->assertTrue($this->rootView->file_exists($v2Renamed)); } - public function testMoveFileIntoSharedFolderAsRecipient(): void { Filesystem::mkdir('folder1'); $fileInfo = Filesystem::getFileInfo('folder1'); @@ -634,7 +633,6 @@ public function testExpireNonexistingFile(): void { $this->assertFalse(Storage::expire('/void/unexist.txt', self::TEST_VERSIONS_USER)); } - public function testExpireNonexistingUser(): void { $this->expectException(NoUserException::class); diff --git a/apps/files_versions/tests/Versions/VersionManagerTest.php b/apps/files_versions/tests/Versions/VersionManagerTest.php index 623b18c904428..4be522d5fa9a8 100644 --- a/apps/files_versions/tests/Versions/VersionManagerTest.php +++ b/apps/files_versions/tests/Versions/VersionManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Files_Versions\Tests\Versions; use OC\Files\Storage\Local; diff --git a/apps/lookup_server_connector/lib/AppInfo/Application.php b/apps/lookup_server_connector/lib/AppInfo/Application.php index d09b36a70c4fe..18a5b518f43e3 100644 --- a/apps/lookup_server_connector/lib/AppInfo/Application.php +++ b/apps/lookup_server_connector/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\LookupServerConnector\AppInfo; use Closure; diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php index 981a58c1e9487..233eb119713e5 100644 --- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php +++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\LookupServerConnector\BackgroundJobs; use OC\Security\IdentityProof\Signer; diff --git a/apps/lookup_server_connector/lib/UpdateLookupServer.php b/apps/lookup_server_connector/lib/UpdateLookupServer.php index dac3e8a80fae3..5d2d630fe61b4 100644 --- a/apps/lookup_server_connector/lib/UpdateLookupServer.php +++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\LookupServerConnector; use OCA\LookupServerConnector\BackgroundJobs\RetryJob; diff --git a/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php b/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php index 876cbc3651406..14d26c873810a 100644 --- a/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php +++ b/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\OAuth2\BackgroundJob; use OCA\OAuth2\Db\AccessTokenMapper; diff --git a/apps/oauth2/lib/Controller/LoginRedirectorController.php b/apps/oauth2/lib/Controller/LoginRedirectorController.php index b41e3ebdbf891..69d65ea2dbf5f 100644 --- a/apps/oauth2/lib/Controller/LoginRedirectorController.php +++ b/apps/oauth2/lib/Controller/LoginRedirectorController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Controller; use OC\Core\Controller\ClientFlowLoginController; diff --git a/apps/oauth2/lib/Controller/OauthApiController.php b/apps/oauth2/lib/Controller/OauthApiController.php index b194674dfacb7..719f74b5b151f 100644 --- a/apps/oauth2/lib/Controller/OauthApiController.php +++ b/apps/oauth2/lib/Controller/OauthApiController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Controller; use OC\Authentication\Token\IProvider as TokenProvider; diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php index 7cd8e8655dc9b..2bcc272be903f 100644 --- a/apps/oauth2/lib/Controller/SettingsController.php +++ b/apps/oauth2/lib/Controller/SettingsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Controller; use OC\Authentication\Token\IProvider as IAuthTokenProvider; diff --git a/apps/oauth2/lib/Db/AccessToken.php b/apps/oauth2/lib/Db/AccessToken.php index 2027371892588..e0cadbc0a47e7 100644 --- a/apps/oauth2/lib/Db/AccessToken.php +++ b/apps/oauth2/lib/Db/AccessToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/oauth2/lib/Db/AccessTokenMapper.php b/apps/oauth2/lib/Db/AccessTokenMapper.php index 39dc77cea6bb9..fa13d4fd7d241 100644 --- a/apps/oauth2/lib/Db/AccessTokenMapper.php +++ b/apps/oauth2/lib/Db/AccessTokenMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Db; use OCA\OAuth2\Controller\OauthApiController; diff --git a/apps/oauth2/lib/Db/Client.php b/apps/oauth2/lib/Db/Client.php index b121951993cd4..e87266e706685 100644 --- a/apps/oauth2/lib/Db/Client.php +++ b/apps/oauth2/lib/Db/Client.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/oauth2/lib/Db/ClientMapper.php b/apps/oauth2/lib/Db/ClientMapper.php index c5ca2989d0fde..c9c261aa1ee66 100644 --- a/apps/oauth2/lib/Db/ClientMapper.php +++ b/apps/oauth2/lib/Db/ClientMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Db; use OCA\OAuth2\Exceptions\ClientNotFoundException; diff --git a/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php b/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php index 809598e258e19..8dfa3e43d94b5 100644 --- a/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php +++ b/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Exceptions; class AccessTokenNotFoundException extends \Exception { diff --git a/apps/oauth2/lib/Exceptions/ClientNotFoundException.php b/apps/oauth2/lib/Exceptions/ClientNotFoundException.php index cec7a24e22d8a..7d6c48eda91a4 100644 --- a/apps/oauth2/lib/Exceptions/ClientNotFoundException.php +++ b/apps/oauth2/lib/Exceptions/ClientNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Exceptions; class ClientNotFoundException extends \Exception { diff --git a/apps/oauth2/lib/Migration/SetTokenExpiration.php b/apps/oauth2/lib/Migration/SetTokenExpiration.php index eb852c3ec421e..edf363313762b 100644 --- a/apps/oauth2/lib/Migration/SetTokenExpiration.php +++ b/apps/oauth2/lib/Migration/SetTokenExpiration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use OC\Authentication\Token\IProvider as TokenProvider; diff --git a/apps/oauth2/lib/Migration/Version010401Date20181207190718.php b/apps/oauth2/lib/Migration/Version010401Date20181207190718.php index eeecbd6001bca..46ac0a4034790 100644 --- a/apps/oauth2/lib/Migration/Version010401Date20181207190718.php +++ b/apps/oauth2/lib/Migration/Version010401Date20181207190718.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Migration/Version010402Date20190107124745.php b/apps/oauth2/lib/Migration/Version010402Date20190107124745.php index a6d3849020f9a..ac203740ab587 100644 --- a/apps/oauth2/lib/Migration/Version010402Date20190107124745.php +++ b/apps/oauth2/lib/Migration/Version010402Date20190107124745.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Migration/Version011601Date20230522143227.php b/apps/oauth2/lib/Migration/Version011601Date20230522143227.php index 465f72c352b55..f667b23e6077e 100644 --- a/apps/oauth2/lib/Migration/Version011601Date20230522143227.php +++ b/apps/oauth2/lib/Migration/Version011601Date20230522143227.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Migration/Version011602Date20230613160650.php b/apps/oauth2/lib/Migration/Version011602Date20230613160650.php index 48492d79dd044..87233a09dfc2e 100644 --- a/apps/oauth2/lib/Migration/Version011602Date20230613160650.php +++ b/apps/oauth2/lib/Migration/Version011602Date20230613160650.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Migration/Version011603Date20230620111039.php b/apps/oauth2/lib/Migration/Version011603Date20230620111039.php index 02c166ddac654..c2d1f2cab013f 100644 --- a/apps/oauth2/lib/Migration/Version011603Date20230620111039.php +++ b/apps/oauth2/lib/Migration/Version011603Date20230620111039.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Migration/Version011901Date20240829164356.php b/apps/oauth2/lib/Migration/Version011901Date20240829164356.php index 1f5ce908a60b7..dd022c87451cc 100644 --- a/apps/oauth2/lib/Migration/Version011901Date20240829164356.php +++ b/apps/oauth2/lib/Migration/Version011901Date20240829164356.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Migration; use Closure; diff --git a/apps/oauth2/lib/Settings/Admin.php b/apps/oauth2/lib/Settings/Admin.php index ac2f2418a6683..68d580c79b2f9 100644 --- a/apps/oauth2/lib/Settings/Admin.php +++ b/apps/oauth2/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Settings; use OCA\OAuth2\Db\ClientMapper; diff --git a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php index 673c95ebcde9a..d3fd059b5a701 100644 --- a/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php +++ b/apps/oauth2/tests/Controller/LoginRedirectorControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Controller; use OC\Core\Controller\ClientFlowLoginController; @@ -160,7 +161,6 @@ public function testAuthorizeWrongResponseType(): void { ->expects($this->never()) ->method('set'); - $expected = new RedirectResponse('http://foo.bar?error=unsupported_response_type&state=MyState'); $this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'wrongcode')); } @@ -232,7 +232,6 @@ public function testAuthorizeNotForwardingUntrustedURIs(): void { $this->assertEquals($expected, $this->loginRedirectorController->authorize('MyClientId', 'MyState', 'code', 'http://untrusted-uri.com')); } - public function testClientNotFound(): void { $clientNotFound = new ClientNotFoundException('could not find client test123', 0); $this->clientMapper diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php index 5ef86626cde2c..bc4275960d9ae 100644 --- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php +++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Controller; use OC\Authentication\Exceptions\ExpiredTokenException; diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index 41db7fe595abe..9a44f7e16f2aa 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Controller; use OC\Authentication\Token\IProvider as IAuthTokenProvider; diff --git a/apps/oauth2/tests/Db/AccessTokenMapperTest.php b/apps/oauth2/tests/Db/AccessTokenMapperTest.php index 20765b7a7010f..6156cab095eeb 100644 --- a/apps/oauth2/tests/Db/AccessTokenMapperTest.php +++ b/apps/oauth2/tests/Db/AccessTokenMapperTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Db; use OCA\OAuth2\Db\AccessToken; @@ -39,7 +40,6 @@ public function testGetByCode(): void { $this->accessTokenMapper->delete($token); } - public function testDeleteByClientId(): void { $this->expectException(AccessTokenNotFoundException::class); diff --git a/apps/oauth2/tests/Db/ClientMapperTest.php b/apps/oauth2/tests/Db/ClientMapperTest.php index 1b0a18710ec6a..ce1e31867a2af 100644 --- a/apps/oauth2/tests/Db/ClientMapperTest.php +++ b/apps/oauth2/tests/Db/ClientMapperTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Db; use OCA\OAuth2\Db\Client; diff --git a/apps/oauth2/tests/Settings/AdminTest.php b/apps/oauth2/tests/Settings/AdminTest.php index 0f08bb3027670..0060bc0dacf61 100644 --- a/apps/oauth2/tests/Settings/AdminTest.php +++ b/apps/oauth2/tests/Settings/AdminTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\OAuth2\Tests\Settings; use OCA\OAuth2\Db\ClientMapper; diff --git a/apps/profile/lib/AppInfo/Application.php b/apps/profile/lib/AppInfo/Application.php index ff2d3f8601683..0e7ebace3b689 100644 --- a/apps/profile/lib/AppInfo/Application.php +++ b/apps/profile/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Profile\AppInfo; use OCA\Profile\Listener\ProfilePickerReferenceListener; @@ -13,7 +14,6 @@ use OCP\AppFramework\App; use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; - use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\Collaboration\Reference\RenderReferenceEvent; diff --git a/apps/profile/lib/Listener/ProfilePickerReferenceListener.php b/apps/profile/lib/Listener/ProfilePickerReferenceListener.php index c43b9fe9d55c2..908bcdd28ce62 100644 --- a/apps/profile/lib/Listener/ProfilePickerReferenceListener.php +++ b/apps/profile/lib/Listener/ProfilePickerReferenceListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Profile\Listener; use OCA\Profile\AppInfo\Application; diff --git a/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php b/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php index dbc34a28973be..76c926176fc4d 100644 --- a/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php +++ b/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php @@ -6,15 +6,14 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Profile\Reference; use OCA\Profile\AppInfo\Application; use OCP\Accounts\IAccountManager; - use OCP\Collaboration\Reference\ADiscoverableReferenceProvider; use OCP\Collaboration\Reference\IReference; use OCP\Collaboration\Reference\Reference; - use OCP\IAppConfig; use OCP\IL10N; use OCP\IURLGenerator; diff --git a/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php b/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php index dd56dcf80db7e..1ecee36806fd2 100644 --- a/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php +++ b/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php @@ -16,7 +16,6 @@ use OCP\Collaboration\Reference\Reference; use OCP\IAppConfig; use OCP\IL10N; - use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; diff --git a/apps/provisioning_api/lib/AppInfo/Application.php b/apps/provisioning_api/lib/AppInfo/Application.php index deef1738c45ff..9efd66269cda1 100644 --- a/apps/provisioning_api/lib/AppInfo/Application.php +++ b/apps/provisioning_api/lib/AppInfo/Application.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\AppInfo; use OC\Group\Manager as GroupManager; diff --git a/apps/provisioning_api/lib/Capabilities.php b/apps/provisioning_api/lib/Capabilities.php index 1297fcd275410..b2303d9261fc2 100644 --- a/apps/provisioning_api/lib/Capabilities.php +++ b/apps/provisioning_api/lib/Capabilities.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API; use OCA\FederatedFileSharing\FederatedShareProvider; diff --git a/apps/provisioning_api/lib/Controller/AUserDataOCSController.php b/apps/provisioning_api/lib/Controller/AUserDataOCSController.php index 5f3f474ec7b7b..e5c9e13d0f95e 100644 --- a/apps/provisioning_api/lib/Controller/AUserDataOCSController.php +++ b/apps/provisioning_api/lib/Controller/AUserDataOCSController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Controller; use OC\Group\Manager as GroupManager; diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index 0c53e3c009110..ade9e8a73c84a 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Controller; use OC\AppConfig; diff --git a/apps/provisioning_api/lib/Controller/AppsController.php b/apps/provisioning_api/lib/Controller/AppsController.php index 51d293aae043f..aa37ee8ed45f0 100644 --- a/apps/provisioning_api/lib/Controller/AppsController.php +++ b/apps/provisioning_api/lib/Controller/AppsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Provisioning_API\Controller; use OC\App\AppStore\AppNotFoundException; diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index 62f639b48e4e4..b251610e67f96 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Provisioning_API\Controller; use OCA\Provisioning_API\ResponseDefinitions; diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 8d668c6469165..3697d6b36a2aa 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -343,8 +343,6 @@ public function getLastLoggedInUsers( ]); } - - /** * @NoSubAdminRequired * diff --git a/apps/provisioning_api/lib/Listener/UserDeletedListener.php b/apps/provisioning_api/lib/Listener/UserDeletedListener.php index 2300ac19a60d6..dff12497f961d 100644 --- a/apps/provisioning_api/lib/Listener/UserDeletedListener.php +++ b/apps/provisioning_api/lib/Listener/UserDeletedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Listener; use OC\KnownUser\KnownUserService; diff --git a/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php b/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php index 771d29bbafbb3..3d4cfda5972e6 100644 --- a/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php +++ b/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Middleware\Exceptions; use OCP\AppFramework\Http; diff --git a/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php b/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php index 937590cde8ed3..f3184c48c11ba 100644 --- a/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php +++ b/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Middleware; use OCA\Provisioning_API\Middleware\Exceptions\NotSubAdminException; diff --git a/apps/provisioning_api/tests/CapabilitiesTest.php b/apps/provisioning_api/tests/CapabilitiesTest.php index 463d0f064989c..9a1bfa874d92a 100644 --- a/apps/provisioning_api/tests/CapabilitiesTest.php +++ b/apps/provisioning_api/tests/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Tests; use OCA\FederatedFileSharing\FederatedShareProvider; diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index 55885aabf0a42..305eb29e88ba0 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Tests\Controller; use OC\AppConfig; diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php index aac589d9a1575..2528138fd46ac 100644 --- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Provisioning_API\Tests\Controller; use OC\Installer; @@ -63,7 +64,6 @@ public function testGetAppInfo(): void { $this->assertEquals($expected, $result->getData()); } - public function testGetAppInfoOnBadAppID(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -100,7 +100,6 @@ public function testGetAppsDisabled(): void { $this->assertEquals(count($disabled), count($data['apps'])); } - public function testGetAppsInvalidFilter(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index 129853d0c9bd2..2d5089ead8094 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Provisioning_API\Tests\Controller; use OC\Group\Manager; @@ -39,7 +40,6 @@ class GroupsControllerTest extends \Test\TestCase { private IRootFolder $rootFolder; - protected function setUp(): void { parent::setUp(); @@ -240,7 +240,6 @@ public function testGetGroupAsSubadmin(): void { $this->assertEquals(['users' => ['user1', 'user2']], $result->getData()); } - public function testGetGroupAsIrrelevantSubadmin(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(403); @@ -285,7 +284,6 @@ public function testGetGroupAsAdmin(): void { $this->assertEquals(['users' => ['user1', 'user2']], $result->getData()); } - public function testGetGroupNonExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('The requested group could not be found'); @@ -296,7 +294,6 @@ public function testGetGroupNonExisting(): void { $this->api->getGroup($this->getUniqueID()); } - public function testGetSubAdminsOfGroupsNotExists(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Group does not exist'); @@ -343,7 +340,6 @@ public function testGetSubAdminsOfGroupEmptyList(): void { $this->assertEquals([], $result->getData()); } - public function testAddGroupEmptyGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Invalid group name'); @@ -352,7 +348,6 @@ public function testAddGroupEmptyGroup(): void { $this->api->addGroup(''); } - public function testAddGroupExistingGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(102); @@ -397,7 +392,6 @@ public function testAddGroupWithSpecialChar(): void { $this->api->addGroup('Iñtërnâtiônàlizætiøn'); } - public function testDeleteGroupNonExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -405,7 +399,6 @@ public function testDeleteGroupNonExisting(): void { $this->api->deleteGroup('NonExistingGroup'); } - public function testDeleteAdminGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(102); @@ -497,7 +490,6 @@ public function testGetGroupUsersDetails(): void { ->method('getSubAdminsGroups') ->willReturn([]); - $this->api->getGroupUsersDetails($gid); } @@ -542,7 +534,6 @@ public function testGetGroupUsersDetailsEncoded(): void { ->method('getSubAdminsGroups') ->willReturn([]); - $this->api->getGroupUsersDetails(urlencode($gid)); } } diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index 7ad501dffe82a..20a0cf6bffc24 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -1,11 +1,11 @@ createUserMock('john', true), ]); - $expected = [ 'users' => [ 'user1' => ['id' => 'user1'], @@ -341,7 +340,6 @@ public function testGetDisabledUsersAsSubAdmin(): void { $this->assertEquals($expected, $this->api->getDisabledUsersDetails('MyCustomSearch', 3)->getData()); } - public function testAddUserAlreadyExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(102); @@ -375,7 +373,6 @@ public function testAddUserAlreadyExisting(): void { $this->api->addUser('AlreadyExistingUser', 'password', '', '', []); } - public function testAddUserNonExistingGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Group NonExistingGroup does not exist'); @@ -411,7 +408,6 @@ public function testAddUserNonExistingGroup(): void { $this->api->addUser('NewUser', 'pass', '', '', ['NonExistingGroup']); } - public function testAddUserExistingGroupNonExistingGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Group NonExistingGroup does not exist'); @@ -697,7 +693,6 @@ public function testAddUserSuccessfulLowercaseEmail(): void { )); } - public function testAddUserFailedToGenerateUserID(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Could not create non-existing user ID'); @@ -740,7 +735,6 @@ public function testAddUserFailedToGenerateUserID(): void { $this->api->addUser('', 'PasswordOfTheNewUser')->getData(); } - public function testAddUserEmailRequired(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Required email address was not provided'); @@ -849,7 +843,6 @@ public function testAddUserExistingGroup(): void { $this->assertArrayHasKey('id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup'])->getData()); } - public function testAddUserUnsuccessful(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Bad request'); @@ -896,7 +889,6 @@ public function testAddUserUnsuccessful(): void { $this->api->addUser('NewUser', 'PasswordOfTheNewUser'); } - public function testAddUserAsSubAdminNoGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('No group specified (required for sub-admins)'); @@ -929,7 +921,6 @@ public function testAddUserAsSubAdminNoGroup(): void { $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', []); } - public function testAddUserAsSubAdminValidGroupNotSubAdmin(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Insufficient privileges for group ExistingGroup'); @@ -1066,7 +1057,6 @@ public function testAddUserAsSubAdminExistingGroups(): void { $this->assertArrayHasKey('id', $this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup1', 'ExistingGroup2'])->getData()); } - public function testGetUserTargetDoesNotExist(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('User does not exist'); @@ -1395,8 +1385,6 @@ public function testGetUserDataAsSubAdminAndUserIsAccessible(): void { $this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID'])); } - - public function testGetUserDataAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -2093,8 +2081,6 @@ public function testEditUserRegularUserSelfEditChangePassword(): void { $this->assertEquals([], $this->api->editUser('UserToEdit', 'password', 'NewPassword')->getData()); } - - public function testEditUserRegularUserSelfEditChangeQuota(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(113); @@ -2175,8 +2161,6 @@ public function testEditUserAdminUserSelfEditChangeValidQuota(): void { $this->assertEquals([], $this->api->editUser('UserToEdit', 'quota', '3042824')->getData()); } - - public function testEditUserAdminUserSelfEditChangeInvalidQuota(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Invalid quota value: ABC'); @@ -2419,7 +2403,6 @@ public function testEditUserAdminEditChangeLanguage(): void { public function testEditUserAdminEditChangeLanguageInvalidLanguage(): void { $this->expectException(OCSException::class); - $this->l10nFactory->expects($this->once()) ->method('languageExists') ->willReturnCallback(fn ($app, $lang) => in_array($lang, ['en', 'de', 'sv'], true)); @@ -2515,7 +2498,6 @@ public function testEditUserSubadminUserAccessible(): void { $this->assertEquals([], $this->api->editUser('UserToEdit', 'quota', '3042824')->getData()); } - public function testEditUserSubadminUserInaccessible(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -2555,7 +2537,6 @@ public function testEditUserSubadminUserInaccessible(): void { $this->api->editUser('UserToEdit', 'quota', 'value'); } - public function testUpdateUserAsAdminMultipleFields(): void { $currentUser = $this->createMock(IUser::class); $currentUser->method('getUID')->willReturn('admin'); @@ -2867,7 +2848,6 @@ public function testEditUserMultiFieldClearDisplayNameResetsToUserId(): void { $this->assertSame(Http::STATUS_OK, $result->getStatus()); } - public function testDeleteUserNotExistingUser(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -2890,7 +2870,6 @@ public function testDeleteUserNotExistingUser(): void { $this->api->deleteUser('UserToDelete'); } - public function testDeleteUserSelf(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -2951,7 +2930,6 @@ public function testDeleteSuccessfulUserAsAdmin(): void { $this->assertEquals([], $this->api->deleteUser('UserToDelete')->getData()); } - public function testDeleteUnsuccessfulUserAsAdmin(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -3032,7 +3010,6 @@ public function testDeleteSuccessfulUserAsSubadmin(): void { $this->assertEquals([], $this->api->deleteUser('UserToDelete')->getData()); } - public function testDeleteUnsuccessfulUserAsSubadmin(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -3080,7 +3057,6 @@ public function testDeleteUnsuccessfulUserAsSubadmin(): void { $this->api->deleteUser('UserToDelete'); } - public function testDeleteUserAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -3124,7 +3100,6 @@ public function testDeleteUserAsSubAdminAndUserIsNotAccessible(): void { $this->api->deleteUser('UserToDelete'); } - public function testGetUsersGroupsTargetUserNotExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -3261,7 +3236,6 @@ public function testGetUsersGroupsForSubAdminUserAndUserIsAccessible(): void { $this->assertEquals(['groups' => ['Group1']], $this->api->getUsersGroups('UserToLookup')->getData()); } - public function testGetUsersGroupsForSubAdminUserAndUserIsInaccessible(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -3310,7 +3284,6 @@ public function testGetUsersGroupsForSubAdminUserAndUserIsInaccessible(): void { $this->api->getUsersGroups('UserToLookup'); } - public function testAddToGroupWithTargetGroupNotExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(102); @@ -3323,7 +3296,6 @@ public function testAddToGroupWithTargetGroupNotExisting(): void { $this->api->addToGroup('TargetUser', 'GroupToAddTo'); } - public function testAddToGroupWithNoGroupSpecified(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -3331,7 +3303,6 @@ public function testAddToGroupWithNoGroupSpecified(): void { $this->api->addToGroup('TargetUser'); } - public function testAddToGroupWithTargetUserNotExisting(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(103); @@ -3345,7 +3316,6 @@ public function testAddToGroupWithTargetUserNotExisting(): void { $this->api->addToGroup('TargetUser', 'GroupToAddTo'); } - public function testAddToGroupNoSubadmin(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(104); @@ -3366,7 +3336,6 @@ public function testAddToGroupNoSubadmin(): void { ->with('GroupToAddTo') ->willReturn($targetGroup); - $subAdminManager = $this->createMock(SubAdmin::class); $subAdminManager->expects($this->once()) ->method('isSubAdminOfGroup') @@ -3410,7 +3379,6 @@ public function testAddToGroupSuccessAsSubadmin(): void { ->with('GroupToAddTo') ->willReturn($targetGroup); - $subAdminManager = $this->createMock(SubAdmin::class); $subAdminManager->expects($this->once()) ->method('isSubAdminOfGroup') @@ -3454,7 +3422,6 @@ public function testAddToGroupSuccessAsAdmin(): void { ->with('GroupToAddTo') ->willReturn($targetGroup); - $subAdminManager = $this->createMock(SubAdmin::class); $subAdminManager->expects($this->never()) ->method('isSubAdminOfGroup'); @@ -3479,7 +3446,6 @@ public function testAddToGroupSuccessAsAdmin(): void { $this->assertEquals(new DataResponse(), $this->api->addToGroup('TargetUser', 'GroupToAddTo')); } - public function testRemoveFromGroupWithNoTargetGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -3493,7 +3459,6 @@ public function testRemoveFromGroupWithNoTargetGroup(): void { $this->api->removeFromGroup('TargetUser', ''); } - public function testRemoveFromGroupWithEmptyTargetGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(101); @@ -3507,7 +3472,6 @@ public function testRemoveFromGroupWithEmptyTargetGroup(): void { $this->api->removeFromGroup('TargetUser', ''); } - public function testRemoveFromGroupWithNotExistingTargetGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(102); @@ -3526,7 +3490,6 @@ public function testRemoveFromGroupWithNotExistingTargetGroup(): void { $this->api->removeFromGroup('TargetUser', 'TargetGroup'); } - public function testRemoveFromGroupWithNotExistingTargetUser(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(103); @@ -3551,7 +3514,6 @@ public function testRemoveFromGroupWithNotExistingTargetUser(): void { $this->api->removeFromGroup('TargetUser', 'TargetGroup'); } - public function testRemoveFromGroupWithoutPermission(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(104); @@ -3592,7 +3554,6 @@ public function testRemoveFromGroupWithoutPermission(): void { $this->api->removeFromGroup('TargetUser', 'TargetGroup'); } - public function testRemoveFromGroupAsAdminFromAdmin(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Cannot remove yourself from the admin group'); @@ -3642,7 +3603,6 @@ public function testRemoveFromGroupAsAdminFromAdmin(): void { $this->api->removeFromGroup('Admin', 'admin'); } - public function testRemoveFromGroupAsSubAdminFromSubAdmin(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Cannot remove yourself from this group as you are a sub-admin'); @@ -3697,7 +3657,6 @@ public function testRemoveFromGroupAsSubAdminFromSubAdmin(): void { $this->api->removeFromGroup('SubAdmin', 'subadmin'); } - public function testRemoveFromGroupAsSubAdminFromLastSubAdminGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Not viable to remove user from the last group you are sub-admin of'); @@ -3800,7 +3759,6 @@ public function testRemoveFromGroupSuccessful(): void { $this->assertEquals([], $this->api->removeFromGroup('AnotherUser', 'admin')->getData()); } - public function testAddSubAdminWithNotExistingTargetUser(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('User does not exist'); @@ -3815,13 +3773,11 @@ public function testAddSubAdminWithNotExistingTargetUser(): void { $this->api->addSubAdmin('NotExistingUser', ''); } - public function testAddSubAdminWithNotExistingTargetGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Group does not exist'); $this->expectExceptionCode(102); - $targetUser = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock(); $this->userManager ->expects($this->once()) @@ -3837,7 +3793,6 @@ public function testAddSubAdminWithNotExistingTargetGroup(): void { $this->api->addSubAdmin('ExistingUser', 'NotExistingGroup'); } - public function testAddSubAdminToAdminGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Cannot create sub-admins for admin group'); @@ -3923,7 +3878,6 @@ public function testAddSubAdminSuccessful(): void { $this->assertEquals([], $this->api->addSubAdmin('ExistingUser', 'TargetGroup')->getData()); } - public function testRemoveSubAdminNotExistingTargetUser(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('User does not exist'); @@ -3938,7 +3892,6 @@ public function testRemoveSubAdminNotExistingTargetUser(): void { $this->api->removeSubAdmin('NotExistingUser', 'GroupToDeleteFrom'); } - public function testRemoveSubAdminNotExistingTargetGroup(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Group does not exist'); @@ -3959,8 +3912,6 @@ public function testRemoveSubAdminNotExistingTargetGroup(): void { $this->api->removeSubAdmin('ExistingUser', 'GroupToDeleteFrom'); } - - public function testRemoveSubAdminFromNotASubadmin(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('User is not a sub-admin of this group'); @@ -4025,7 +3976,6 @@ public function testRemoveSubAdminSuccessful(): void { $this->assertEquals([], $this->api->removeSubAdmin('ExistingUser', 'GroupToDeleteFrom')->getData()); } - public function testGetUserSubAdminGroupsNotExistingTargetUser(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('User does not exist'); @@ -4203,11 +4153,9 @@ public function testGetCurrentUserLoggedIn(): void { $this->assertSame($expected, $api->getCurrentUser()->getData()); } - public function testGetCurrentUserNotLoggedIn(): void { $this->expectException(OCSException::class); - $this->userSession->expects($this->once())->method('getUser') ->willReturn(null); @@ -4283,7 +4231,6 @@ public function testGetUser(): void { $this->assertSame($expected, $api->getUser('currentuser')->getData()); } - public function testResendWelcomeMessageWithNotExistingTargetUser(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -4297,7 +4244,6 @@ public function testResendWelcomeMessageWithNotExistingTargetUser(): void { $this->api->resendWelcomeMessage('NotExistingUser'); } - public function testResendWelcomeMessageAsSubAdminAndUserIsNotAccessible(): void { $this->expectException(OCSException::class); $this->expectExceptionCode(998); @@ -4342,7 +4288,6 @@ public function testResendWelcomeMessageAsSubAdminAndUserIsNotAccessible(): void $this->api->resendWelcomeMessage('UserToGet'); } - public function testResendWelcomeMessageNoEmail(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Email address not available'); @@ -4387,7 +4332,6 @@ public function testResendWelcomeMessageNoEmail(): void { $this->api->resendWelcomeMessage('UserToGet'); } - public function testResendWelcomeMessageNullEmail(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Email address not available'); @@ -4534,7 +4478,6 @@ public function testResendWelcomeMessageSuccessWithFallbackLanguage(): void { $this->api->resendWelcomeMessage('UserToGet'); } - public function testResendWelcomeMessageFailed(): void { $this->expectException(OCSException::class); $this->expectExceptionMessage('Sending email failed'); @@ -4592,7 +4535,6 @@ public function testResendWelcomeMessageFailed(): void { $this->api->resendWelcomeMessage('UserToGet'); } - public static function dataGetEditableFields(): array { return [ [false, true, [ diff --git a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php index 0b55424a2558d..15760f21e16d0 100644 --- a/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php +++ b/apps/provisioning_api/tests/Middleware/ProvisioningApiMiddlewareTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Provisioning_API\Tests\Middleware; use OCA\Provisioning_API\Middleware\Exceptions\NotSubAdminException; diff --git a/apps/provisioning_api/tests/TestCase.php b/apps/provisioning_api/tests/TestCase.php index b69da0b76ebb1..c2bab1d23fdd0 100644 --- a/apps/provisioning_api/tests/TestCase.php +++ b/apps/provisioning_api/tests/TestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Provisioning_API\Tests; use OCP\IGroupManager; diff --git a/apps/settings/lib/Activity/GroupProvider.php b/apps/settings/lib/Activity/GroupProvider.php index 8abaeaa083419..38e6b9fd13951 100644 --- a/apps/settings/lib/Activity/GroupProvider.php +++ b/apps/settings/lib/Activity/GroupProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\Exceptions\UnknownActivityException; @@ -23,7 +24,6 @@ class GroupProvider implements IProvider { /** @var string[] */ protected $groupDisplayNames = []; - public function __construct( private L10nFactory $l10n, private IURLGenerator $urlGenerator, diff --git a/apps/settings/lib/Activity/GroupSetting.php b/apps/settings/lib/Activity/GroupSetting.php index 98b672f3f55f9..4a2f2054781f0 100644 --- a/apps/settings/lib/Activity/GroupSetting.php +++ b/apps/settings/lib/Activity/GroupSetting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\ISetting; diff --git a/apps/settings/lib/Activity/Provider.php b/apps/settings/lib/Activity/Provider.php index f6489833de36a..4b19366163a54 100644 --- a/apps/settings/lib/Activity/Provider.php +++ b/apps/settings/lib/Activity/Provider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/settings/lib/Activity/SecurityFilter.php b/apps/settings/lib/Activity/SecurityFilter.php index 8bb40a170f2f6..108bc36a4b897 100644 --- a/apps/settings/lib/Activity/SecurityFilter.php +++ b/apps/settings/lib/Activity/SecurityFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\IFilter; diff --git a/apps/settings/lib/Activity/SecurityProvider.php b/apps/settings/lib/Activity/SecurityProvider.php index 3b6c121439e30..bcad6566269d1 100644 --- a/apps/settings/lib/Activity/SecurityProvider.php +++ b/apps/settings/lib/Activity/SecurityProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/settings/lib/Activity/SecuritySetting.php b/apps/settings/lib/Activity/SecuritySetting.php index a3ada47b47ddf..e3c4b96c65a5c 100644 --- a/apps/settings/lib/Activity/SecuritySetting.php +++ b/apps/settings/lib/Activity/SecuritySetting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\ISetting; diff --git a/apps/settings/lib/Activity/Setting.php b/apps/settings/lib/Activity/Setting.php index 85a4efe3971bd..00cfab54f201f 100644 --- a/apps/settings/lib/Activity/Setting.php +++ b/apps/settings/lib/Activity/Setting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Activity; use OCP\Activity\ISetting; diff --git a/apps/settings/lib/AppInfo/Application.php b/apps/settings/lib/AppInfo/Application.php index ed746572ff485..bbabb2534ecb2 100644 --- a/apps/settings/lib/AppInfo/Application.php +++ b/apps/settings/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\AppInfo; use OC\AppFramework\Utility\TimeFactory; diff --git a/apps/settings/lib/BackgroundJobs/VerifyUserData.php b/apps/settings/lib/BackgroundJobs/VerifyUserData.php index f4eb595aabf56..4bef610f26654 100644 --- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php +++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\BackgroundJobs; use OCP\Accounts\IAccountManager; @@ -225,7 +226,6 @@ protected function shouldRun(array $argument) { return ((time() - $lastRun) > $this->interval); } - /** * reset verification state after max tries are reached */ diff --git a/apps/settings/lib/Command/AdminDelegation/Add.php b/apps/settings/lib/Command/AdminDelegation/Add.php index 25fc8abcf8e29..da8c0c1b63bac 100644 --- a/apps/settings/lib/Command/AdminDelegation/Add.php +++ b/apps/settings/lib/Command/AdminDelegation/Add.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Command\AdminDelegation; use OC\Core\Command\Base; diff --git a/apps/settings/lib/Command/AdminDelegation/Remove.php b/apps/settings/lib/Command/AdminDelegation/Remove.php index c04d25744e7ab..f9386e4d3c890 100644 --- a/apps/settings/lib/Command/AdminDelegation/Remove.php +++ b/apps/settings/lib/Command/AdminDelegation/Remove.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Command\AdminDelegation; use OC\Core\Command\Base; diff --git a/apps/settings/lib/Command/AdminDelegation/Show.php b/apps/settings/lib/Command/AdminDelegation/Show.php index 633888c5b6e0c..7b5f830995069 100644 --- a/apps/settings/lib/Command/AdminDelegation/Show.php +++ b/apps/settings/lib/Command/AdminDelegation/Show.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Command\AdminDelegation; use OC\Core\Command\Base; diff --git a/apps/settings/lib/ConfigLexicon.php b/apps/settings/lib/ConfigLexicon.php index a47f7cb45d1f9..ca4b6018b001b 100644 --- a/apps/settings/lib/ConfigLexicon.php +++ b/apps/settings/lib/ConfigLexicon.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings; use OCP\Config\IUserConfig; diff --git a/apps/settings/lib/Controller/AISettingsController.php b/apps/settings/lib/Controller/AISettingsController.php index 512afe9d3fd13..891f428fa6df5 100644 --- a/apps/settings/lib/Controller/AISettingsController.php +++ b/apps/settings/lib/Controller/AISettingsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Controller; use OCA\Settings\Settings\Admin\ArtificialIntelligence; diff --git a/apps/settings/lib/Controller/AdminSettingsController.php b/apps/settings/lib/Controller/AdminSettingsController.php index 15e2c39214845..cd02d68ec3800 100644 --- a/apps/settings/lib/Controller/AdminSettingsController.php +++ b/apps/settings/lib/Controller/AdminSettingsController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OCP\AppFramework\Controller; diff --git a/apps/settings/lib/Controller/AuthSettingsController.php b/apps/settings/lib/Controller/AuthSettingsController.php index dc7fa2ebd8299..afdc13b76253f 100644 --- a/apps/settings/lib/Controller/AuthSettingsController.php +++ b/apps/settings/lib/Controller/AuthSettingsController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Controller; use BadMethodCallException; diff --git a/apps/settings/lib/Controller/AuthorizedGroupController.php b/apps/settings/lib/Controller/AuthorizedGroupController.php index 3ff16b61612e8..0eaed67566776 100644 --- a/apps/settings/lib/Controller/AuthorizedGroupController.php +++ b/apps/settings/lib/Controller/AuthorizedGroupController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OC\Settings\AuthorizedGroup; diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index f54b1d63aab91..b0b240bd85512 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Controller; use OC\AppFramework\Http; @@ -110,7 +111,6 @@ public function getFailedIntegrityCheckFiles(): DataDisplayResponse { $formattedTextResponse = 'No errors have been found.'; } - return new DataDisplayResponse( $formattedTextResponse, Http::STATUS_OK, diff --git a/apps/settings/lib/Controller/HelpController.php b/apps/settings/lib/Controller/HelpController.php index 05bff158ee651..e5e70998cd680 100644 --- a/apps/settings/lib/Controller/HelpController.php +++ b/apps/settings/lib/Controller/HelpController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OCP\AppFramework\Controller; diff --git a/apps/settings/lib/Controller/LogSettingsController.php b/apps/settings/lib/Controller/LogSettingsController.php index 4f4986122d265..80083e73e7b78 100644 --- a/apps/settings/lib/Controller/LogSettingsController.php +++ b/apps/settings/lib/Controller/LogSettingsController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Controller; use OC\Log; diff --git a/apps/settings/lib/Controller/MailSettingsController.php b/apps/settings/lib/Controller/MailSettingsController.php index 9fb3266c899ac..d9333e6122cc8 100644 --- a/apps/settings/lib/Controller/MailSettingsController.php +++ b/apps/settings/lib/Controller/MailSettingsController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Controller; use OCA\Settings\Settings\Admin\Mail; diff --git a/apps/settings/lib/Controller/PersonalSettingsController.php b/apps/settings/lib/Controller/PersonalSettingsController.php index 340ca3f93eb60..be74b2ed0c7a8 100644 --- a/apps/settings/lib/Controller/PersonalSettingsController.php +++ b/apps/settings/lib/Controller/PersonalSettingsController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OCP\AppFramework\Controller; diff --git a/apps/settings/lib/Controller/ReasonsController.php b/apps/settings/lib/Controller/ReasonsController.php index 91d0a8640d190..f96797695a005 100644 --- a/apps/settings/lib/Controller/ReasonsController.php +++ b/apps/settings/lib/Controller/ReasonsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OCP\AppFramework\Controller; diff --git a/apps/settings/lib/Controller/TwoFactorSettingsController.php b/apps/settings/lib/Controller/TwoFactorSettingsController.php index 9ef62047f47ef..cf8933ecb5ce9 100644 --- a/apps/settings/lib/Controller/TwoFactorSettingsController.php +++ b/apps/settings/lib/Controller/TwoFactorSettingsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OC\Authentication\TwoFactorAuth\EnforcementState; diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index edaad01e42cb0..19da07e854b49 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -95,7 +95,6 @@ public function __construct( parent::__construct($appName, $request); } - /** * Display users list template * diff --git a/apps/settings/lib/Controller/WebAuthnController.php b/apps/settings/lib/Controller/WebAuthnController.php index 495b58e6a4bd3..1f2f1e0ceb228 100644 --- a/apps/settings/lib/Controller/WebAuthnController.php +++ b/apps/settings/lib/Controller/WebAuthnController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Controller; use OC\Authentication\WebAuthn\Manager; diff --git a/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php b/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php index b5feeffe30a87..cecf0fea2cd6f 100644 --- a/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php +++ b/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Events; use OCP\EventDispatcher\Event; diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php index 510eed6dd4387..09187d3c90278 100644 --- a/apps/settings/lib/Hooks.php +++ b/apps/settings/lib/Hooks.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings; use OCA\Settings\Activity\Provider; @@ -111,7 +112,6 @@ public function onChangePassword(PasswordUpdatedEvent $handle): void { $template->addBodyText($text . ' ' . $l->t('If you did not request this, please contact an administrator.')); $template->addFooter(); - $message = $this->mailer->createMessage(); $message->setTo([$user->getEMailAddress() => $user->getDisplayName()]); $message->useTemplate($template); @@ -167,7 +167,6 @@ public function onChangeEmail(UserChangedEvent $handle): void { } $this->activityManager->publish($event); - if ($oldMailAddress !== null) { $template = $this->mailer->createEMailTemplate('settings.EmailChanged', [ 'displayname' => $user->getDisplayName(), @@ -185,7 +184,6 @@ public function onChangeEmail(UserChangedEvent $handle): void { } $template->addFooter(); - $message = $this->mailer->createMessage(); $message->setTo([$oldMailAddress => $user->getDisplayName()]); $message->useTemplate($template); diff --git a/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php b/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php index 138cfeeb8c654..72310feef170d 100644 --- a/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php +++ b/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Listener; use BadMethodCallException; diff --git a/apps/settings/lib/Listener/GroupRemovedListener.php b/apps/settings/lib/Listener/GroupRemovedListener.php index 1a46e14d5bb70..4d64e37f0b3d3 100644 --- a/apps/settings/lib/Listener/GroupRemovedListener.php +++ b/apps/settings/lib/Listener/GroupRemovedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Listener; use OCA\Settings\Service\AuthorizedGroupService; diff --git a/apps/settings/lib/Listener/MailProviderListener.php b/apps/settings/lib/Listener/MailProviderListener.php index c0925b6a3d89f..cad0cfd3e1a68 100644 --- a/apps/settings/lib/Listener/MailProviderListener.php +++ b/apps/settings/lib/Listener/MailProviderListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Listener; use OCA\Settings\AppInfo\Application; diff --git a/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php b/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php index 4e76478b8974c..648b7d82f5a0c 100644 --- a/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php +++ b/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Listener; use OC\Group\Manager; @@ -40,7 +41,6 @@ public function handle(Event $event): void { $usersToNotify = $subAdminManager->getGroupsSubAdmins($group); $usersToNotify[] = $user; - $event = $this->activityManager->generateEvent(); $event->setApp('settings') ->setType('group_settings'); diff --git a/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php b/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php index b8fedc0975cbd..51e829925e9f2 100644 --- a/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php +++ b/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Listener; use OC\Group\Manager; @@ -40,7 +41,6 @@ public function handle(Event $event): void { $usersToNotify = $subAdminManager->getGroupsSubAdmins($group); $usersToNotify[] = $user; - $event = $this->activityManager->generateEvent(); $event->setApp('settings') ->setType('group_settings'); diff --git a/apps/settings/lib/Mailer/NewUserMailHelper.php b/apps/settings/lib/Mailer/NewUserMailHelper.php index 202495a020e49..217efaad00b82 100644 --- a/apps/settings/lib/Mailer/NewUserMailHelper.php +++ b/apps/settings/lib/Mailer/NewUserMailHelper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Mailer; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/settings/lib/Search/SectionSearch.php b/apps/settings/lib/Search/SectionSearch.php index b68768a2bac98..ee9073ea1489a 100644 --- a/apps/settings/lib/Search/SectionSearch.php +++ b/apps/settings/lib/Search/SectionSearch.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Search; use OCP\IGroupManager; diff --git a/apps/settings/lib/Search/UserSearch.php b/apps/settings/lib/Search/UserSearch.php index 79c8a6c199050..3218bbbbf6b46 100644 --- a/apps/settings/lib/Search/UserSearch.php +++ b/apps/settings/lib/Search/UserSearch.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Search; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Additional.php b/apps/settings/lib/Sections/Admin/Additional.php index 392e069526963..1c456f3a7bf35 100644 --- a/apps/settings/lib/Sections/Admin/Additional.php +++ b/apps/settings/lib/Sections/Admin/Additional.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php b/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php index 3d819a86090ea..35c5371521f4c 100644 --- a/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php +++ b/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Delegation.php b/apps/settings/lib/Sections/Admin/Delegation.php index 146058c3f9b52..7b6a654310a3e 100644 --- a/apps/settings/lib/Sections/Admin/Delegation.php +++ b/apps/settings/lib/Sections/Admin/Delegation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Groupware.php b/apps/settings/lib/Sections/Admin/Groupware.php index 8bc6ed81b8ebf..563a7f5e74038 100644 --- a/apps/settings/lib/Sections/Admin/Groupware.php +++ b/apps/settings/lib/Sections/Admin/Groupware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Overview.php b/apps/settings/lib/Sections/Admin/Overview.php index 5926f17851970..b922fdfdee118 100644 --- a/apps/settings/lib/Sections/Admin/Overview.php +++ b/apps/settings/lib/Sections/Admin/Overview.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Presets.php b/apps/settings/lib/Sections/Admin/Presets.php index 479f87de078b8..7f138a4d5ade1 100644 --- a/apps/settings/lib/Sections/Admin/Presets.php +++ b/apps/settings/lib/Sections/Admin/Presets.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Security.php b/apps/settings/lib/Sections/Admin/Security.php index 687fa1ae446b3..99da554ce2ef0 100644 --- a/apps/settings/lib/Sections/Admin/Security.php +++ b/apps/settings/lib/Sections/Admin/Security.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Server.php b/apps/settings/lib/Sections/Admin/Server.php index fcf1b7bd87337..26c7530f08b4e 100644 --- a/apps/settings/lib/Sections/Admin/Server.php +++ b/apps/settings/lib/Sections/Admin/Server.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Admin/Sharing.php b/apps/settings/lib/Sections/Admin/Sharing.php index 1c8aa624ada35..e5b4460096290 100644 --- a/apps/settings/lib/Sections/Admin/Sharing.php +++ b/apps/settings/lib/Sections/Admin/Sharing.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Personal/PersonalInfo.php b/apps/settings/lib/Sections/Personal/PersonalInfo.php index 15c101e82d161..4273aaaed8929 100644 --- a/apps/settings/lib/Sections/Personal/PersonalInfo.php +++ b/apps/settings/lib/Sections/Personal/PersonalInfo.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Personal; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Personal/Security.php b/apps/settings/lib/Sections/Personal/Security.php index fa32c1a9cbfce..d16c1ac433a82 100644 --- a/apps/settings/lib/Sections/Personal/Security.php +++ b/apps/settings/lib/Sections/Personal/Security.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Personal; use OCP\IL10N; diff --git a/apps/settings/lib/Sections/Personal/SyncClients.php b/apps/settings/lib/Sections/Personal/SyncClients.php index 349358c2a26ea..ff2044d9776cb 100644 --- a/apps/settings/lib/Sections/Personal/SyncClients.php +++ b/apps/settings/lib/Sections/Personal/SyncClients.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Sections\Personal; use OCP\IL10N; diff --git a/apps/settings/lib/Service/AuthorizedGroupService.php b/apps/settings/lib/Service/AuthorizedGroupService.php index 51eae61670ea1..f068a6e065ce1 100644 --- a/apps/settings/lib/Service/AuthorizedGroupService.php +++ b/apps/settings/lib/Service/AuthorizedGroupService.php @@ -6,11 +6,11 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Service; use OC\Settings\AuthorizedGroup; use OC\Settings\AuthorizedGroupMapper; - use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCP\DB\Exception; diff --git a/apps/settings/lib/Service/ConflictException.php b/apps/settings/lib/Service/ConflictException.php index 9dbd5aa299317..933970a834f4a 100644 --- a/apps/settings/lib/Service/ConflictException.php +++ b/apps/settings/lib/Service/ConflictException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Service; class ConflictException extends ServiceException { diff --git a/apps/settings/lib/Service/NotFoundException.php b/apps/settings/lib/Service/NotFoundException.php index b72779349a967..48dfa84da540d 100644 --- a/apps/settings/lib/Service/NotFoundException.php +++ b/apps/settings/lib/Service/NotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Service; class NotFoundException extends ServiceException { diff --git a/apps/settings/lib/Service/ServiceException.php b/apps/settings/lib/Service/ServiceException.php index a9ef5f8762733..6b84fb1d139a3 100644 --- a/apps/settings/lib/Service/ServiceException.php +++ b/apps/settings/lib/Service/ServiceException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Service; class ServiceException extends \Exception { diff --git a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php index 702dcb4a620cf..9674809778f37 100644 --- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php +++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; @@ -126,7 +127,6 @@ public function getForm() { $taskProcessingTypeSettings[$taskTypeId] = true; } - $this->initialState->provideInitialState('ai-stt-providers', $sttProviders); $this->initialState->provideInitialState('ai-translation-providers', $translationProviders); $this->initialState->provideInitialState('ai-text-processing-providers', $textProcessingProviders); diff --git a/apps/settings/lib/Settings/Admin/Delegation.php b/apps/settings/lib/Settings/Admin/Delegation.php index 19efa169267eb..2ec23954024dc 100644 --- a/apps/settings/lib/Settings/Admin/Delegation.php +++ b/apps/settings/lib/Settings/Admin/Delegation.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OCA\Settings\AppInfo\Application; diff --git a/apps/settings/lib/Settings/Admin/Mail.php b/apps/settings/lib/Settings/Admin/Mail.php index 353abb9537758..5264e521b086e 100644 --- a/apps/settings/lib/Settings/Admin/Mail.php +++ b/apps/settings/lib/Settings/Admin/Mail.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/settings/lib/Settings/Admin/MailProvider.php b/apps/settings/lib/Settings/Admin/MailProvider.php index a1badb5d5b9d0..6a451ca48ddc3 100644 --- a/apps/settings/lib/Settings/Admin/MailProvider.php +++ b/apps/settings/lib/Settings/Admin/MailProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OCP\IL10N; diff --git a/apps/settings/lib/Settings/Admin/Overview.php b/apps/settings/lib/Settings/Admin/Overview.php index 7cc37537de435..3d39b0eeec4a8 100644 --- a/apps/settings/lib/Settings/Admin/Overview.php +++ b/apps/settings/lib/Settings/Admin/Overview.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/settings/lib/Settings/Admin/Presets.php b/apps/settings/lib/Settings/Admin/Presets.php index f629beca44710..77dd3fb54220a 100644 --- a/apps/settings/lib/Settings/Admin/Presets.php +++ b/apps/settings/lib/Settings/Admin/Presets.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OC\Config\PresetManager; diff --git a/apps/settings/lib/Settings/Admin/Security.php b/apps/settings/lib/Settings/Admin/Security.php index 9cd375972d960..871dda325d877 100644 --- a/apps/settings/lib/Settings/Admin/Security.php +++ b/apps/settings/lib/Settings/Admin/Security.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor; diff --git a/apps/settings/lib/Settings/Admin/Server.php b/apps/settings/lib/Settings/Admin/Server.php index b38234361a454..51f05ca56485c 100644 --- a/apps/settings/lib/Settings/Admin/Server.php +++ b/apps/settings/lib/Settings/Admin/Server.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OC\Profile\ProfileManager; diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php index d4ebf1fedd0d9..fdc3ba9b9f311 100644 --- a/apps/settings/lib/Settings/Admin/Sharing.php +++ b/apps/settings/lib/Settings/Admin/Sharing.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Admin; use OC\Core\AppInfo\ConfigLexicon; diff --git a/apps/settings/lib/Settings/Personal/Additional.php b/apps/settings/lib/Settings/Personal/Additional.php index d4be223d4f537..28c3f47d344c4 100644 --- a/apps/settings/lib/Settings/Personal/Additional.php +++ b/apps/settings/lib/Settings/Personal/Additional.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/settings/lib/Settings/Personal/Security/Authtokens.php b/apps/settings/lib/Settings/Personal/Security/Authtokens.php index 7503637e66974..f5cf701460336 100644 --- a/apps/settings/lib/Settings/Personal/Security/Authtokens.php +++ b/apps/settings/lib/Settings/Personal/Security/Authtokens.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal\Security; use OC\Authentication\Token\INamedToken; diff --git a/apps/settings/lib/Settings/Personal/Security/Password.php b/apps/settings/lib/Settings/Personal/Security/Password.php index 599eb203f76ae..4835015d0c184 100644 --- a/apps/settings/lib/Settings/Personal/Security/Password.php +++ b/apps/settings/lib/Settings/Personal/Security/Password.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal\Security; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php index 06883d762d9fd..a9d14ea96d1a2 100644 --- a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php +++ b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal\Security; use Exception; diff --git a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php index 8ead56dc83a89..b91cc82757f20 100644 --- a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php +++ b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal\Security; use OC\Authentication\WebAuthn\Db\PublicKeyCredentialMapper; diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php index be4137b559354..f1f7ac0f4ef3c 100644 --- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php +++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Settings\Personal; use OCA\Viewer\Event\LoadViewer; diff --git a/apps/settings/lib/SetupChecks/AllowedAdminRanges.php b/apps/settings/lib/SetupChecks/AllowedAdminRanges.php index 46e6e1bfdf0b1..daeb14857aea9 100644 --- a/apps/settings/lib/SetupChecks/AllowedAdminRanges.php +++ b/apps/settings/lib/SetupChecks/AllowedAdminRanges.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\Security\Ip\Range; diff --git a/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php b/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php index cedbd6a6205f6..cf893ae50dca7 100644 --- a/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php +++ b/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/CheckUserCertificates.php b/apps/settings/lib/SetupChecks/CheckUserCertificates.php index 34c5348dabd1d..c02e8eba3b757 100644 --- a/apps/settings/lib/SetupChecks/CheckUserCertificates.php +++ b/apps/settings/lib/SetupChecks/CheckUserCertificates.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/CodeIntegrity.php b/apps/settings/lib/SetupChecks/CodeIntegrity.php index 89251f15a2685..ae99d70d8b496 100644 --- a/apps/settings/lib/SetupChecks/CodeIntegrity.php +++ b/apps/settings/lib/SetupChecks/CodeIntegrity.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\IntegrityCheck\Checker; diff --git a/apps/settings/lib/SetupChecks/DataDirectoryProtected.php b/apps/settings/lib/SetupChecks/DataDirectoryProtected.php index a49fdef4b8437..f168b707f9fb4 100644 --- a/apps/settings/lib/SetupChecks/DataDirectoryProtected.php +++ b/apps/settings/lib/SetupChecks/DataDirectoryProtected.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; @@ -69,6 +70,5 @@ public function run(): SetupResult { return SetupResult::warning($this->l10n->t('Could not check that the data directory is protected. Please check manually that your server does not allow access to the data directory.') . "\n" . $this->serverConfigHelp()); } return SetupResult::success(); - } } diff --git a/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php b/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php index 83d1fa4ad33ea..00a21c565827e 100644 --- a/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php +++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\DB\Connection; diff --git a/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php b/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php index df0ff70aa0f7a..74a5840daacab 100644 --- a/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php +++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\DB\Connection; diff --git a/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php b/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php index 4a5a342c0967d..57b22996027ec 100644 --- a/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php +++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\DB\Connection; diff --git a/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php b/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php index 4635d76d838a1..dc73f2fd3932c 100644 --- a/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php +++ b/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use Doctrine\DBAL\Types\BigIntType; diff --git a/apps/settings/lib/SetupChecks/DebugMode.php b/apps/settings/lib/SetupChecks/DebugMode.php index 2f916b2a35f7a..d1dbd2cc838f8 100644 --- a/apps/settings/lib/SetupChecks/DebugMode.php +++ b/apps/settings/lib/SetupChecks/DebugMode.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php b/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php index 70c3fc8361efd..09c277d14aca3 100644 --- a/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php +++ b/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/InternetConnectivity.php b/apps/settings/lib/SetupChecks/InternetConnectivity.php index 432a388c4caea..38286e7049983 100644 --- a/apps/settings/lib/SetupChecks/InternetConnectivity.php +++ b/apps/settings/lib/SetupChecks/InternetConnectivity.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; diff --git a/apps/settings/lib/SetupChecks/JavaScriptModules.php b/apps/settings/lib/SetupChecks/JavaScriptModules.php index de3cf231fc750..aac3a71d03a39 100644 --- a/apps/settings/lib/SetupChecks/JavaScriptModules.php +++ b/apps/settings/lib/SetupChecks/JavaScriptModules.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; @@ -58,6 +59,5 @@ public function run(): SetupResult { return SetupResult::warning($this->l10n->t('Unable to run check for JavaScript support. Please remedy or confirm manually if your webserver serves `.mjs` files using the JavaScript MIME type.') . "\n" . $this->serverConfigHelp()); } return SetupResult::error($this->l10n->t('Your webserver does not serve `.mjs` files using the JavaScript MIME type. This will break some apps by preventing browsers from executing the JavaScript files. You should configure your webserver to serve `.mjs` files with either the `text/javascript` or `application/javascript` MIME type.')); - } } diff --git a/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php b/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php index a1b4d0d89de85..3ebae231f41e3 100644 --- a/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php +++ b/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; diff --git a/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php b/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php index cb752f01385ee..95c0929386661 100644 --- a/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php +++ b/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/LoggingLevel.php b/apps/settings/lib/SetupChecks/LoggingLevel.php index e0b8809ea6254..30eaa2303e15b 100644 --- a/apps/settings/lib/SetupChecks/LoggingLevel.php +++ b/apps/settings/lib/SetupChecks/LoggingLevel.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/MemcacheConfigured.php b/apps/settings/lib/SetupChecks/MemcacheConfigured.php index 2016a4f134566..ce8814a8ae782 100644 --- a/apps/settings/lib/SetupChecks/MemcacheConfigured.php +++ b/apps/settings/lib/SetupChecks/MemcacheConfigured.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\Memcache\Memcached; diff --git a/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php b/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php index 2b5ad98d5fc8d..ae12f3f5228ce 100644 --- a/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php +++ b/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\Repair\RepairMimeTypes; diff --git a/apps/settings/lib/SetupChecks/MysqlRowFormat.php b/apps/settings/lib/SetupChecks/MysqlRowFormat.php index 7eaee90afe98f..d7d18ad30de94 100644 --- a/apps/settings/lib/SetupChecks/MysqlRowFormat.php +++ b/apps/settings/lib/SetupChecks/MysqlRowFormat.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OC\DB\Connection; diff --git a/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php b/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php index 86bee1f30cead..2b0a2e3a2306a 100644 --- a/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php +++ b/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/OcxProviders.php b/apps/settings/lib/SetupChecks/OcxProviders.php index f839585a345b4..8cbdf07861be9 100644 --- a/apps/settings/lib/SetupChecks/OcxProviders.php +++ b/apps/settings/lib/SetupChecks/OcxProviders.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; diff --git a/apps/settings/lib/SetupChecks/PhpDefaultCharset.php b/apps/settings/lib/SetupChecks/PhpDefaultCharset.php index 140ab627bee07..04e536bfe3892 100644 --- a/apps/settings/lib/SetupChecks/PhpDefaultCharset.php +++ b/apps/settings/lib/SetupChecks/PhpDefaultCharset.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php b/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php index f18a145b10bc8..ca2926c697b65 100644 --- a/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php +++ b/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/PhpGetEnv.php b/apps/settings/lib/SetupChecks/PhpGetEnv.php index 33458ff96bd27..c451a694eda2c 100644 --- a/apps/settings/lib/SetupChecks/PhpGetEnv.php +++ b/apps/settings/lib/SetupChecks/PhpGetEnv.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/PhpModules.php b/apps/settings/lib/SetupChecks/PhpModules.php index 4ee4d9165cc2f..e21226d48b807 100644 --- a/apps/settings/lib/SetupChecks/PhpModules.php +++ b/apps/settings/lib/SetupChecks/PhpModules.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php index b1ee390b9cf8d..d84e758c3c8d2 100644 --- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php +++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/apps/settings/lib/SetupChecks/PhpOutputBuffering.php b/apps/settings/lib/SetupChecks/PhpOutputBuffering.php index f594d14b4c2bf..f98b0edabc89a 100644 --- a/apps/settings/lib/SetupChecks/PhpOutputBuffering.php +++ b/apps/settings/lib/SetupChecks/PhpOutputBuffering.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IL10N; diff --git a/apps/settings/lib/SetupChecks/PushService.php b/apps/settings/lib/SetupChecks/PushService.php index 6f66bce7a57e9..da80e430397e6 100644 --- a/apps/settings/lib/SetupChecks/PushService.php +++ b/apps/settings/lib/SetupChecks/PushService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/settings/lib/SetupChecks/RandomnessSecure.php b/apps/settings/lib/SetupChecks/RandomnessSecure.php index 5280d7fe9d9c0..20c0c740fecb5 100644 --- a/apps/settings/lib/SetupChecks/RandomnessSecure.php +++ b/apps/settings/lib/SetupChecks/RandomnessSecure.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/ReadOnlyConfig.php b/apps/settings/lib/SetupChecks/ReadOnlyConfig.php index 86efabff0602f..7200895e4da93 100644 --- a/apps/settings/lib/SetupChecks/ReadOnlyConfig.php +++ b/apps/settings/lib/SetupChecks/ReadOnlyConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/SchedulingTableSize.php b/apps/settings/lib/SetupChecks/SchedulingTableSize.php index 237143bbc392e..dcfb38e8efb8d 100644 --- a/apps/settings/lib/SetupChecks/SchedulingTableSize.php +++ b/apps/settings/lib/SetupChecks/SchedulingTableSize.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IDBConnection; diff --git a/apps/settings/lib/SetupChecks/ServerIdConfig.php b/apps/settings/lib/SetupChecks/ServerIdConfig.php index 46bb41f47f13e..618f5d9c15c8c 100644 --- a/apps/settings/lib/SetupChecks/ServerIdConfig.php +++ b/apps/settings/lib/SetupChecks/ServerIdConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/SupportedDatabase.php b/apps/settings/lib/SetupChecks/SupportedDatabase.php index bf017aaec5897..cf5c949c0ce9d 100644 --- a/apps/settings/lib/SetupChecks/SupportedDatabase.php +++ b/apps/settings/lib/SetupChecks/SupportedDatabase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IDBConnection; diff --git a/apps/settings/lib/SetupChecks/TempSpaceAvailable.php b/apps/settings/lib/SetupChecks/TempSpaceAvailable.php index d4aa3db94b038..e75c2dc3866df 100644 --- a/apps/settings/lib/SetupChecks/TempSpaceAvailable.php +++ b/apps/settings/lib/SetupChecks/TempSpaceAvailable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\IConfig; diff --git a/apps/settings/lib/SetupChecks/Woff2Loading.php b/apps/settings/lib/SetupChecks/Woff2Loading.php index ce2e32d2a74b7..01ba2fe35b269 100644 --- a/apps/settings/lib/SetupChecks/Woff2Loading.php +++ b/apps/settings/lib/SetupChecks/Woff2Loading.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\SetupChecks; use OCP\Http\Client\IClientService; diff --git a/apps/settings/lib/UserMigration/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index 993d770fe6eae..842ea7b6992ad 100644 --- a/apps/settings/lib/UserMigration/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -30,7 +30,6 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { use TMigratorBasicVersionHandling; - use TAccountsHelper; private const PATH_ROOT = Application::APP_ID . '/'; diff --git a/apps/settings/templates/settings/personal/development.notice.php b/apps/settings/templates/settings/personal/development.notice.php index c581962a79508..6207dc2d8a8f0 100644 --- a/apps/settings/templates/settings/personal/development.notice.php +++ b/apps/settings/templates/settings/personal/development.notice.php @@ -66,7 +66,6 @@ $l->t('Follow us on Mastodon'), $l->t('Check out our blog'), $l->t('Subscribe to our newsletter'), - ], '{facebookopen}{facebooktext}{linkclose} {blueskyopen}{blueskytext}{linkclose} diff --git a/apps/settings/tests/Activity/SecurityFilterTest.php b/apps/settings/tests/Activity/SecurityFilterTest.php index b07c1e825b430..24b321e74fe79 100644 --- a/apps/settings/tests/Activity/SecurityFilterTest.php +++ b/apps/settings/tests/Activity/SecurityFilterTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\Activity\SecurityFilter; diff --git a/apps/settings/tests/Activity/SecurityProviderTest.php b/apps/settings/tests/Activity/SecurityProviderTest.php index 3f7fe468da360..da8c9e621bcac 100644 --- a/apps/settings/tests/Activity/SecurityProviderTest.php +++ b/apps/settings/tests/Activity/SecurityProviderTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\Activity\SecurityProvider; diff --git a/apps/settings/tests/Activity/SecuritySettingTest.php b/apps/settings/tests/Activity/SecuritySettingTest.php index ca11e38caa8e8..d5ff004b2dc6d 100644 --- a/apps/settings/tests/Activity/SecuritySettingTest.php +++ b/apps/settings/tests/Activity/SecuritySettingTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\Activity\SecuritySetting; diff --git a/apps/settings/tests/AppInfo/ApplicationTest.php b/apps/settings/tests/AppInfo/ApplicationTest.php index de73622f8122d..7da1c11c24135 100644 --- a/apps/settings/tests/AppInfo/ApplicationTest.php +++ b/apps/settings/tests/AppInfo/ApplicationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\AppInfo; use OCA\Settings\AppInfo\Application; diff --git a/apps/settings/tests/Controller/AdminSettingsControllerTest.php b/apps/settings/tests/Controller/AdminSettingsControllerTest.php index ce4f983bbbd79..e27b4b640e66b 100644 --- a/apps/settings/tests/Controller/AdminSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AdminSettingsControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Controller; use OCA\Settings\Controller\AdminSettingsController; diff --git a/apps/settings/tests/Controller/AuthSettingsControllerTest.php b/apps/settings/tests/Controller/AuthSettingsControllerTest.php index 805e810144a65..c2e20fdf8ad98 100644 --- a/apps/settings/tests/Controller/AuthSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AuthSettingsControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Settings\Controller; use OC\AppFramework\Http; @@ -144,7 +145,6 @@ public function testCreateDisabledBySystemConfig(): void { $this->tokenProvider->expects($this->never()) ->method('getPassword'); - $this->tokenProvider->expects($this->never()) ->method('generateToken'); diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 1582fe3f371df..82bce109c999e 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Settings\Tests\Controller; use OC\IntegrityCheck\Checker; @@ -103,7 +104,6 @@ public function testGetFailedIntegrityCheckDisabled(): void { $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles()); } - public function testGetFailedIntegrityCheckFilesWithNoErrorsFound(): void { $this->checker ->expects($this->once()) diff --git a/apps/settings/tests/Controller/DelegationControllerTest.php b/apps/settings/tests/Controller/DelegationControllerTest.php index c4cbe67466b37..3ccd8fc085b32 100644 --- a/apps/settings/tests/Controller/DelegationControllerTest.php +++ b/apps/settings/tests/Controller/DelegationControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Controller\Admin; use OC\Settings\AuthorizedGroup; diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php index 6064e76058a43..eadb9cce4fb21 100644 --- a/apps/settings/tests/Controller/MailSettingsControllerTest.php +++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Controller; use OC\Mail\Message; diff --git a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php index 9f8d53d4f9f02..c743cf53d8105 100644 --- a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php +++ b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Controller; use OC\Authentication\TwoFactorAuth\EnforcementState; diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index ce8de5498d9c9..39a4dbc42c0e6 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2014-2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Controller; use OC\Accounts\AccountManager; @@ -784,7 +785,6 @@ public static function dataTestSaveUserSettings(): array { 'JOHN@example.com', null ], - ]; } @@ -834,7 +834,6 @@ public function testSaveUserSettingsException( $this->invokePrivate($controller, 'saveUserSettings', [$userAccount]); } - public static function dataTestSaveUserSettingsException(): array { return [ [ @@ -867,7 +866,6 @@ public static function dataTestSaveUserSettingsException(): array { false, false ], - ]; } diff --git a/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php b/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php index 43ba37c5d0756..e5283359916a6 100644 --- a/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php +++ b/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Integration; use OC\Settings\AuthorizedGroup; diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index f352a2b733d05..395bef17f7507 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Mailer; use OC\Mail\EMailTemplate; diff --git a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php index 489359c34693e..371af67734025 100644 --- a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php +++ b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php @@ -58,7 +58,6 @@ protected function setUp(): void { ->willReturn($this->createMock(IUser::class)); } - public function testBeforeControllerAsUserWithoutAnnotation(): void { $this->expectException(NotAdminException::class); @@ -83,7 +82,6 @@ public function testBeforeControllerAsUserWithoutAnnotation(): void { $this->subadminMiddleware->beforeController($this->controller, 'foo'); } - public function testBeforeControllerWithAnnotation(): void { $this->reflector ->expects($this->once()) @@ -126,7 +124,6 @@ public function testAfterNotAdminException(): void { $this->assertEquals($expectedResponse, $this->subadminMiddleware->afterException($this->controller, 'foo', new NotAdminException(''))); } - public function testAfterRegularException(): void { $this->expectException(\Exception::class); diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php index 4030222dde88a..5d83f4d97fee3 100644 --- a/apps/settings/tests/Settings/Admin/MailTest.php +++ b/apps/settings/tests/Settings/Admin/MailTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Admin; use OCA\Settings\Settings\Admin\Mail; diff --git a/apps/settings/tests/Settings/Admin/SecurityTest.php b/apps/settings/tests/Settings/Admin/SecurityTest.php index c27e5c9992612..0d708fa4d79b4 100644 --- a/apps/settings/tests/Settings/Admin/SecurityTest.php +++ b/apps/settings/tests/Settings/Admin/SecurityTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Admin; use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor; diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php index b99e3c1f2a997..a6456f68bd5fb 100644 --- a/apps/settings/tests/Settings/Admin/ServerTest.php +++ b/apps/settings/tests/Settings/Admin/ServerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Admin; use OC\Profile\ProfileManager; diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php index 0ab11e40ce687..df4af61f4b9ad 100644 --- a/apps/settings/tests/Settings/Admin/SharingTest.php +++ b/apps/settings/tests/Settings/Admin/SharingTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Admin; use OCA\Settings\Settings\Admin\Sharing; diff --git a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php index 4935212fb49a6..9ba738c60e24a 100644 --- a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php +++ b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Personal\Security; use OC\Authentication\Token\IProvider as IAuthTokenProvider; diff --git a/apps/settings/tests/Settings/Personal/Security/PasswordTest.php b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php index 34a4b8e296fd4..155b041d3af9c 100644 --- a/apps/settings/tests/Settings/Personal/Security/PasswordTest.php +++ b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\Settings\Personal\Security; use OCA\Settings\Settings\Personal\Security\Password; diff --git a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php index dcff37a181562..411cbdd1893bb 100644 --- a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php +++ b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\AppDirsWithDifferentOwner; diff --git a/apps/settings/tests/SetupChecks/CodeIntegrityTest.php b/apps/settings/tests/SetupChecks/CodeIntegrityTest.php index 4dd54a644f5ef..262bd264bbb2e 100644 --- a/apps/settings/tests/SetupChecks/CodeIntegrityTest.php +++ b/apps/settings/tests/SetupChecks/CodeIntegrityTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OC\IntegrityCheck\Checker; diff --git a/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php b/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php index 2b5bb1b6c8af8..5d78c3d4b7ffb 100644 --- a/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php +++ b/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\DataDirectoryProtected; diff --git a/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php b/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php index 92896af868d80..ebc569826c70b 100644 --- a/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php +++ b/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\ForwardedForHeaders; diff --git a/apps/settings/tests/SetupChecks/LoggingLevelTest.php b/apps/settings/tests/SetupChecks/LoggingLevelTest.php index feeee792a3483..f2437f0a28843 100644 --- a/apps/settings/tests/SetupChecks/LoggingLevelTest.php +++ b/apps/settings/tests/SetupChecks/LoggingLevelTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\LoggingLevel; diff --git a/apps/settings/tests/SetupChecks/OcxProvicersTest.php b/apps/settings/tests/SetupChecks/OcxProvicersTest.php index 65afa1813079d..3a41088af81d9 100644 --- a/apps/settings/tests/SetupChecks/OcxProvicersTest.php +++ b/apps/settings/tests/SetupChecks/OcxProvicersTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\OcxProviders; diff --git a/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php b/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php index 3722346219af5..29e89414ed2ae 100644 --- a/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php +++ b/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\PhpDefaultCharset; diff --git a/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php b/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php index de50934704440..eaf90583da5b8 100644 --- a/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php +++ b/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\PhpOutputBuffering; diff --git a/apps/settings/tests/SetupChecks/SecurityHeadersTest.php b/apps/settings/tests/SetupChecks/SecurityHeadersTest.php index 9a6abe82b6dc1..7dc4dd970dbb4 100644 --- a/apps/settings/tests/SetupChecks/SecurityHeadersTest.php +++ b/apps/settings/tests/SetupChecks/SecurityHeadersTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\SecurityHeaders; diff --git a/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php b/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php index f63326e782162..fd31ab733caf4 100644 --- a/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php +++ b/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\SupportedDatabase; diff --git a/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php b/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php index 7ff272e86bc59..67fd0d81e1cee 100644 --- a/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php +++ b/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\SetupChecks\TaskProcessingPickupSpeed; diff --git a/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php b/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php index 8c78cd6937dd4..4b3b3e2421550 100644 --- a/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php +++ b/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\SetupChecks\TaskProcessingSuccessRate; diff --git a/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php b/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php index 43df9e599b686..2d2278e5cedfc 100644 --- a/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php +++ b/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests; use OCA\Settings\SetupChecks\TaskProcessingWorkerIsRunning; diff --git a/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php b/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php index f6eca345b4083..b2f764400cc11 100644 --- a/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php +++ b/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\SetupChecks; use OCA\Settings\SetupChecks\WellKnownUrls; diff --git a/apps/settings/tests/UserMigration/AccountMigratorTest.php b/apps/settings/tests/UserMigration/AccountMigratorTest.php index 0938f36c48cf0..b053dae82cca3 100644 --- a/apps/settings/tests/UserMigration/AccountMigratorTest.php +++ b/apps/settings/tests/UserMigration/AccountMigratorTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Settings\Tests\UserMigration; use OCA\Settings\AppInfo\Application; diff --git a/apps/sharebymail/lib/AppInfo/Application.php b/apps/sharebymail/lib/AppInfo/Application.php index 6f0edfe95bedb..d482a92c33796 100644 --- a/apps/sharebymail/lib/AppInfo/Application.php +++ b/apps/sharebymail/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail\AppInfo; use OCA\ShareByMail\Capabilities; diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php index afc0bd7048277..8d02e3646c02e 100644 --- a/apps/sharebymail/lib/Capabilities.php +++ b/apps/sharebymail/lib/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail; use OCA\ShareByMail\Settings\SettingsManager; diff --git a/apps/sharebymail/lib/Settings/Admin.php b/apps/sharebymail/lib/Settings/Admin.php index 99849ae323b3b..c9e997a774356 100644 --- a/apps/sharebymail/lib/Settings/Admin.php +++ b/apps/sharebymail/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail\Settings; use OCP\AppFramework\Http\TemplateResponse; diff --git a/apps/sharebymail/lib/Settings/SettingsManager.php b/apps/sharebymail/lib/Settings/SettingsManager.php index d487bd2ac43dc..00480380d2b8c 100644 --- a/apps/sharebymail/lib/Settings/SettingsManager.php +++ b/apps/sharebymail/lib/Settings/SettingsManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail\Settings; use OCP\IConfig; diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 12fb4158413ac..af92c13e98702 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail; use OC\Share20\DefaultShareProvider; @@ -206,7 +207,6 @@ protected function createPasswordSendActivity(IShare $share, string $sharedWith, } } - /** * publish activity if a file/folder was shared by mail */ @@ -512,7 +512,6 @@ protected function sendPassword(IShare $share, string $password, array $emails): protected function sendNote(IShare $share): void { $recipient = $share->getSharedWith(); - $filename = $share->getNode()->getName(); $initiator = $share->getSharedBy(); $note = $share->getNote(); @@ -962,7 +961,6 @@ public function getSharedWith($userId, $shareType, $node, $limit, $offset): arra } $cursor->closeCursor(); - return $shares; } diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index 7327e679533e3..7198051a6f638 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail\Tests; use OCA\ShareByMail\Capabilities; diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index aa42a9ccc63af..300bf7c94d0ec 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\ShareByMail\Tests; use DateTime; @@ -635,7 +636,6 @@ public function sendNotificationToMultipleEmails() { $instance->expects($this->once())->method('sendPassword')->with($share, 'password'); $instance->expects($this->never())->method('sendPasswordToOwner'); - $message = $this->createMock(IMessage::class); $message->expects($this->never())->method('setTo'); $message->expects($this->exactly(2))->method('setBcc')->with(['receiver1@example.com', 'receiver2@example.com', 'receiver3@example.com']); @@ -719,7 +719,6 @@ public function testAddShareToDB(): void { $expiration = new \DateTime(); $passwordExpirationTime = new \DateTime(); - $instance = $this->getInstance(); $id = $this->invokePrivate( $instance, @@ -777,7 +776,6 @@ public function testUpdate(): void { $token = 'token'; $note = 'personal note'; - $instance = $this->getInstance(); $id = $this->createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token, $note); @@ -906,7 +904,6 @@ function ($data) use ($uidOwner, $sharedBy, $id2) { $this->assertInstanceOf('OCP\Share\IShare', $result); } - public function testGetShareByIdFailed(): void { $this->expectException(ShareNotFound::class); @@ -937,7 +934,6 @@ public function testGetShareByPath(): void { $node = $this->createMock(Node::class); $node->expects($this->once())->method('getId')->willReturn($itemSource); - $instance = $this->getInstance(['createShareObject']); $this->createDummyShare($itemType, 111, $shareWith, $sharedBy, $uidOwner, $permissions, $token); @@ -989,11 +985,9 @@ function ($data) use ($idMail) { $this->assertInstanceOf('OCP\Share\IShare', $result); } - public function testGetShareByTokenFailed(): void { $this->expectException(ShareNotFound::class); - $itemSource = 11; $itemType = 'file'; $shareWith = 'user@server.com'; @@ -1074,7 +1068,6 @@ public function testUserDeleted(): void { $this->assertTrue(is_array($before)); $this->assertSame(2, count($before)); - $instance = $this->getInstance(); $instance->userDeleted($uidOwner, IShare::TYPE_EMAIL); @@ -1116,7 +1109,6 @@ public function testGetRawShare(): void { $this->assertSame($token, $result['token']); } - public function testGetRawShareFailed(): void { $this->expectException(ShareNotFound::class); diff --git a/apps/systemtags/lib/Activity/Listener.php b/apps/systemtags/lib/Activity/Listener.php index 93e3f102c94b9..4901f81b8cfdc 100644 --- a/apps/systemtags/lib/Activity/Listener.php +++ b/apps/systemtags/lib/Activity/Listener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\SystemTags\Activity; use OCP\Activity\IManager; @@ -96,7 +97,6 @@ public function event(ManagerEvent $event) { } } - if ($actor !== '' && ($event->getEvent() === ManagerEvent::EVENT_CREATE || $event->getEvent() === ManagerEvent::EVENT_UPDATE)) { $this->updateLastUsedTags($actor, $event->getTag()); } diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php index 605c3b7c282ac..6103571aabcff 100644 --- a/apps/systemtags/lib/Activity/Provider.php +++ b/apps/systemtags/lib/Activity/Provider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/systemtags/lib/Activity/Setting.php b/apps/systemtags/lib/Activity/Setting.php index b3a3e6b447710..eff7d9b1c2f16 100644 --- a/apps/systemtags/lib/Activity/Setting.php +++ b/apps/systemtags/lib/Activity/Setting.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Activity; use OCP\Activity\ActivitySettings; diff --git a/apps/systemtags/lib/AppInfo/Application.php b/apps/systemtags/lib/AppInfo/Application.php index 442a14ac66257..a6e41d34ca6f4 100644 --- a/apps/systemtags/lib/AppInfo/Application.php +++ b/apps/systemtags/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\AppInfo; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/systemtags/lib/Capabilities.php b/apps/systemtags/lib/Capabilities.php index 092a74ae6357c..942537790f3fb 100644 --- a/apps/systemtags/lib/Capabilities.php +++ b/apps/systemtags/lib/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\SystemTags; use OCP\Capabilities\ICapability; diff --git a/apps/systemtags/lib/Controller/LastUsedController.php b/apps/systemtags/lib/Controller/LastUsedController.php index 617c502d5c692..e3a3183747989 100644 --- a/apps/systemtags/lib/Controller/LastUsedController.php +++ b/apps/systemtags/lib/Controller/LastUsedController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Controller; use OCP\AppFramework\Controller; diff --git a/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php b/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php index 7491b1bdc4968..30ec26d09f733 100644 --- a/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php +++ b/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Listeners; use OCA\DAV\SystemTag\SystemTagPlugin; diff --git a/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php b/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php index e868b20654428..9bba83adcdab4 100644 --- a/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php +++ b/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Listeners; use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; diff --git a/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php b/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php index 196e01cf58dc4..0876999f4a6e2 100644 --- a/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php +++ b/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Listeners; use OCA\Files\Event\LoadAdditionalScriptsEvent; diff --git a/apps/systemtags/lib/Search/TagSearchProvider.php b/apps/systemtags/lib/Search/TagSearchProvider.php index edce457adbc33..9d6b3ee35fa9a 100644 --- a/apps/systemtags/lib/Search/TagSearchProvider.php +++ b/apps/systemtags/lib/Search/TagSearchProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Search; use OC\Files\Search\SearchComparison; diff --git a/apps/systemtags/lib/Settings/Admin.php b/apps/systemtags/lib/Settings/Admin.php index e994eef6fa763..8825efc4da3d2 100644 --- a/apps/systemtags/lib/Settings/Admin.php +++ b/apps/systemtags/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Settings; use OCA\SystemTags\AppInfo\Application; diff --git a/apps/systemtags/tests/Activity/SettingTest.php b/apps/systemtags/tests/Activity/SettingTest.php index ffbe8850dfc20..66943a5cd9d09 100644 --- a/apps/systemtags/tests/Activity/SettingTest.php +++ b/apps/systemtags/tests/Activity/SettingTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Tests\Activity; use OCA\SystemTags\Activity\Setting; diff --git a/apps/systemtags/tests/Settings/AdminTest.php b/apps/systemtags/tests/Settings/AdminTest.php index ef5fa7ec8853c..f04724f807055 100644 --- a/apps/systemtags/tests/Settings/AdminTest.php +++ b/apps/systemtags/tests/Settings/AdminTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\SystemTags\Tests\Settings; use OCA\SystemTags\Settings\Admin; diff --git a/apps/testing/lib/AlternativeHomeUserBackend.php b/apps/testing/lib/AlternativeHomeUserBackend.php index 3590c3fcb9a2f..975f76c84b797 100644 --- a/apps/testing/lib/AlternativeHomeUserBackend.php +++ b/apps/testing/lib/AlternativeHomeUserBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Testing; use OC\User\Database; diff --git a/apps/testing/lib/AppInfo/Application.php b/apps/testing/lib/AppInfo/Application.php index 756adba4cde2a..9b8dac98e39e0 100644 --- a/apps/testing/lib/AppInfo/Application.php +++ b/apps/testing/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Testing\AppInfo; use OCA\Testing\AlternativeHomeUserBackend; diff --git a/apps/testing/lib/Controller/ConfigController.php b/apps/testing/lib/Controller/ConfigController.php index 1b38666e51c5b..9b250c859acf8 100644 --- a/apps/testing/lib/Controller/ConfigController.php +++ b/apps/testing/lib/Controller/ConfigController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Testing\Controller; use OCP\AppFramework\Http\DataResponse; diff --git a/apps/testing/lib/Controller/LockingController.php b/apps/testing/lib/Controller/LockingController.php index edc66d012ee25..095f452e2b2cd 100644 --- a/apps/testing/lib/Controller/LockingController.php +++ b/apps/testing/lib/Controller/LockingController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Testing\Controller; use OC\Lock\DBLockingProvider; diff --git a/apps/testing/lib/Controller/RateLimitTestController.php b/apps/testing/lib/Controller/RateLimitTestController.php index d3700b6985833..2b098f6545e6b 100644 --- a/apps/testing/lib/Controller/RateLimitTestController.php +++ b/apps/testing/lib/Controller/RateLimitTestController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Controller; use OCP\AppFramework\Controller; diff --git a/apps/testing/lib/Controller/RoutesController.php b/apps/testing/lib/Controller/RoutesController.php index 4bb6b67dd5307..7e9fbc64c87d9 100644 --- a/apps/testing/lib/Controller/RoutesController.php +++ b/apps/testing/lib/Controller/RoutesController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Controller; use OCP\App\AppPathNotFoundException; diff --git a/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php b/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php index 145e58a5617e1..a3418c805989e 100644 --- a/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php +++ b/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Listener; use OCP\EventDispatcher\Event; diff --git a/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php b/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php index dc08335bcb550..396fa70780318 100644 --- a/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php +++ b/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Listener; use OCP\EventDispatcher\Event; diff --git a/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php b/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php index 554bda6f43638..b41c219fcdc91 100644 --- a/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php +++ b/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Listener; use OCP\EventDispatcher\Event; diff --git a/apps/testing/lib/Locking/FakeDBLockingProvider.php b/apps/testing/lib/Locking/FakeDBLockingProvider.php index 6792c6543c3ce..62de8b48e47ea 100644 --- a/apps/testing/lib/Locking/FakeDBLockingProvider.php +++ b/apps/testing/lib/Locking/FakeDBLockingProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\Testing\Locking; use OC\Lock\DBLockingProvider; diff --git a/apps/testing/lib/Provider/FakeTextProcessingProvider.php b/apps/testing/lib/Provider/FakeTextProcessingProvider.php index 08529bd0803b0..37b21167264da 100644 --- a/apps/testing/lib/Provider/FakeTextProcessingProvider.php +++ b/apps/testing/lib/Provider/FakeTextProcessingProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Provider; use OCP\TextProcessing\FreePromptTaskType; diff --git a/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php b/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php index 0585a15bc45c4..b331c15c60003 100644 --- a/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php +++ b/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Provider; use OCP\TextProcessing\FreePromptTaskType; diff --git a/apps/testing/lib/Provider/FakeTranslationProvider.php b/apps/testing/lib/Provider/FakeTranslationProvider.php index 6455710fc6d88..89faac69f1f62 100644 --- a/apps/testing/lib/Provider/FakeTranslationProvider.php +++ b/apps/testing/lib/Provider/FakeTranslationProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Provider; use OCP\Translation\ITranslationProvider; diff --git a/apps/testing/lib/Settings/DeclarativeSettingsForm.php b/apps/testing/lib/Settings/DeclarativeSettingsForm.php index 9a5a094d4566c..4fd9275ba87c4 100644 --- a/apps/testing/lib/Settings/DeclarativeSettingsForm.php +++ b/apps/testing/lib/Settings/DeclarativeSettingsForm.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Testing\Settings; use OCP\Settings\DeclarativeSettingsTypes; diff --git a/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php b/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php index 359c84580e623..fe257f648bf04 100644 --- a/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php +++ b/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php @@ -6,7 +6,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Testing\TaskProcessing; use OCA\Testing\AppInfo\Application; diff --git a/apps/theming/lib/AppInfo/Application.php b/apps/theming/lib/AppInfo/Application.php index f7d792e099b23..df74503e2bc02 100644 --- a/apps/theming/lib/AppInfo/Application.php +++ b/apps/theming/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\AppInfo; use OCA\Theming\Capabilities; diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index c99b4ff87caf0..9d4847f58b0ef 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Command/UpdateConfig.php b/apps/theming/lib/Command/UpdateConfig.php index efdb738988db0..14f8e1d5f04bd 100644 --- a/apps/theming/lib/Command/UpdateConfig.php +++ b/apps/theming/lib/Command/UpdateConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Command; use OCA\Theming\ImageManager; @@ -54,7 +55,6 @@ protected function configure() { ); } - #[\Override] protected function execute(InputInterface $input, OutputInterface $output): int { $key = $input->getArgument('key'); diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php index df312133ebf3e..63a2d37383c95 100644 --- a/apps/theming/lib/Controller/IconController.php +++ b/apps/theming/lib/Controller/IconController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Controller; use OC\IntegrityCheck\Helpers\FileAccessHelper; diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index bbd598a2c288a..abe9b7f48873a 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Controller; use InvalidArgumentException; diff --git a/apps/theming/lib/Controller/UserThemeController.php b/apps/theming/lib/Controller/UserThemeController.php index 770f2ca922f59..fa3dc4219b1da 100644 --- a/apps/theming/lib/Controller/UserThemeController.php +++ b/apps/theming/lib/Controller/UserThemeController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Controller; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php index 775731799d82d..92018456a21a9 100644 --- a/apps/theming/lib/IconBuilder.php +++ b/apps/theming/lib/IconBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming; use Imagick; diff --git a/apps/theming/lib/ImageManager.php b/apps/theming/lib/ImageManager.php index ad3903f148e9b..3b99402d57738 100644 --- a/apps/theming/lib/ImageManager.php +++ b/apps/theming/lib/ImageManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Listener/BeforePreferenceListener.php b/apps/theming/lib/Listener/BeforePreferenceListener.php index 8beebda0a6ddb..d823df1ab33c2 100644 --- a/apps/theming/lib/Listener/BeforePreferenceListener.php +++ b/apps/theming/lib/Listener/BeforePreferenceListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Listener; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php b/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php index 1a0f857130e12..3a62d8ebdf32b 100644 --- a/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php +++ b/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Listener; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Service/BackgroundService.php b/apps/theming/lib/Service/BackgroundService.php index d13ad171ddef5..aeeea7cb06515 100644 --- a/apps/theming/lib/Service/BackgroundService.php +++ b/apps/theming/lib/Service/BackgroundService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Service; use InvalidArgumentException; diff --git a/apps/theming/lib/Service/JSDataService.php b/apps/theming/lib/Service/JSDataService.php index 12cb5b4ef7e75..a2cddd02e962f 100644 --- a/apps/theming/lib/Service/JSDataService.php +++ b/apps/theming/lib/Service/JSDataService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Service; use OCA\Theming\ThemingDefaults; diff --git a/apps/theming/lib/Service/ThemeInjectionService.php b/apps/theming/lib/Service/ThemeInjectionService.php index 873d388081c0b..b1c975baf0736 100644 --- a/apps/theming/lib/Service/ThemeInjectionService.php +++ b/apps/theming/lib/Service/ThemeInjectionService.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Service; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php index 589cb41c0eefa..3380b33d0c957 100644 --- a/apps/theming/lib/Service/ThemesService.php +++ b/apps/theming/lib/Service/ThemesService.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Service; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Settings/Admin.php b/apps/theming/lib/Settings/Admin.php index 80184b988e106..6a05beae10ef0 100644 --- a/apps/theming/lib/Settings/Admin.php +++ b/apps/theming/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Settings; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Settings/AdminSection.php b/apps/theming/lib/Settings/AdminSection.php index 6a60fcd88166a..c26cf6d725edb 100644 --- a/apps/theming/lib/Settings/AdminSection.php +++ b/apps/theming/lib/Settings/AdminSection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Settings; use OCP\IL10N; diff --git a/apps/theming/lib/Settings/Personal.php b/apps/theming/lib/Settings/Personal.php index 875d2ed7ea64a..5e1779d937a5e 100644 --- a/apps/theming/lib/Settings/Personal.php +++ b/apps/theming/lib/Settings/Personal.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Settings; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Settings/PersonalSection.php b/apps/theming/lib/Settings/PersonalSection.php index 4a24420dfc8b3..9aaf1365cadc6 100644 --- a/apps/theming/lib/Settings/PersonalSection.php +++ b/apps/theming/lib/Settings/PersonalSection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Settings; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/SetupChecks/PhpImagickModule.php b/apps/theming/lib/SetupChecks/PhpImagickModule.php index 31f5a033e2d9d..266e728d4c08d 100644 --- a/apps/theming/lib/SetupChecks/PhpImagickModule.php +++ b/apps/theming/lib/SetupChecks/PhpImagickModule.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\SetupChecks; use OCP\IL10N; diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php index 45bedcc3bf2ae..9dfdbe2a101eb 100644 --- a/apps/theming/lib/Themes/CommonThemeTrait.php +++ b/apps/theming/lib/Themes/CommonThemeTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php index 70801936f387e..699723a3086bd 100644 --- a/apps/theming/lib/Themes/DarkHighContrastTheme.php +++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php index 1c2d746dabd86..8d5083fbdc037 100644 --- a/apps/theming/lib/Themes/DarkTheme.php +++ b/apps/theming/lib/Themes/DarkTheme.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 9b37b08871424..fa8ef65094456 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OC\AppFramework\Http\Request; diff --git a/apps/theming/lib/Themes/DyslexiaFont.php b/apps/theming/lib/Themes/DyslexiaFont.php index 0900a62511d74..68e6bb3835f52 100644 --- a/apps/theming/lib/Themes/DyslexiaFont.php +++ b/apps/theming/lib/Themes/DyslexiaFont.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php index ed60a9e6519a7..8a2f9212dea60 100644 --- a/apps/theming/lib/Themes/HighContrastTheme.php +++ b/apps/theming/lib/Themes/HighContrastTheme.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/Themes/LightTheme.php b/apps/theming/lib/Themes/LightTheme.php index 484668fa0fd20..f467412f24556 100644 --- a/apps/theming/lib/Themes/LightTheme.php +++ b/apps/theming/lib/Themes/LightTheme.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 2cf5ddc9dc966..2007bf29411aa 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index a3a9c3240a8a9..b7f1ad86a1cca 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming; use Mexitek\PHPColors\Color; @@ -201,7 +202,6 @@ public function generateRadioButton($color) { return base64_encode($radioButtonIcon); } - /** * @param string $app app name * @return string|ISimpleFile path to app icon / file of logo diff --git a/apps/theming/tests/CapabilitiesTest.php b/apps/theming/tests/CapabilitiesTest.php index a3ae8191efaf5..6101a833f36af 100644 --- a/apps/theming/tests/CapabilitiesTest.php +++ b/apps/theming/tests/CapabilitiesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OCA\Theming\Capabilities; diff --git a/apps/theming/tests/Controller/IconControllerTest.php b/apps/theming/tests/Controller/IconControllerTest.php index ebc392fc0bbda..ef26eb0cc32e1 100644 --- a/apps/theming/tests/Controller/IconControllerTest.php +++ b/apps/theming/tests/Controller/IconControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Controller; use OC\Files\SimpleFS\SimpleFile; diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php index b452b0e85811e..8d1380f215cd8 100644 --- a/apps/theming/tests/Controller/ThemingControllerTest.php +++ b/apps/theming/tests/Controller/ThemingControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Controller; use OC\L10N\L10N; @@ -633,8 +634,6 @@ public function testUndoDelete(string $value, string $filename): void { $this->assertEquals($expected, $this->themingController->undo($value)); } - - public function testGetLogoNotExistent(): void { $this->imageManager->method('getImage') ->with($this->equalTo('logo')) @@ -668,7 +667,6 @@ public function testGetLogo(): void { @$this->assertEquals($expected, $this->themingController->getImage('logo', true)); } - public function testGetLogoOriginalFile(): void { $file = $this->createMock(ISimpleFile::class); $file->method('getName')->willReturn('logo'); diff --git a/apps/theming/tests/Controller/UserThemeControllerTest.php b/apps/theming/tests/Controller/UserThemeControllerTest.php index ccdd0420dc44c..aa6e4d54649ad 100644 --- a/apps/theming/tests/Controller/UserThemeControllerTest.php +++ b/apps/theming/tests/Controller/UserThemeControllerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Controller; use OCA\Theming\AppInfo\Application; @@ -37,7 +38,6 @@ class UserThemeControllerTest extends TestCase { private BackgroundService&MockObject $backgroundService; private UserThemeController $userThemeController; - /** @var ITheme[] */ private array $themes; diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php index 3bfa4ee050c5c..3ffaf7248e5a9 100644 --- a/apps/theming/tests/IconBuilderTest.php +++ b/apps/theming/tests/IconBuilderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OC\Files\AppData\AppData; diff --git a/apps/theming/tests/ImageManagerTest.php b/apps/theming/tests/ImageManagerTest.php index d4f54b24257f5..907e928632a01 100644 --- a/apps/theming/tests/ImageManagerTest.php +++ b/apps/theming/tests/ImageManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OCA\Theming\ImageManager; @@ -210,7 +211,6 @@ public function testGetImageSvgToPng(): void { $this->assertEquals($pngFile, $this->imageManager->getImage('logo', false)); } - public function testGetImageUnset(): void { $this->expectException(NotFoundException::class); @@ -265,7 +265,6 @@ public function testGetCachedImage(): void { $this->assertEquals($expected, $this->imageManager->getCachedImage('filename')); } - public function testGetCachedImageNotFound(): void { $this->expectException(NotFoundException::class); @@ -352,7 +351,6 @@ public function testCleanup(): void { $this->imageManager->cleanup(); } - public static function dataUpdateImage(): array { return [ ['background', __DIR__ . '/../../../tests/data/testimage.png', true, false], diff --git a/apps/theming/tests/Service/ThemesServiceTest.php b/apps/theming/tests/Service/ThemesServiceTest.php index c14d8f4f48ca0..9d3dc9c3e8937 100644 --- a/apps/theming/tests/Service/ThemesServiceTest.php +++ b/apps/theming/tests/Service/ThemesServiceTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Service; use OCA\Theming\AppInfo\Application; @@ -148,7 +149,6 @@ public function testEnableTheme(string $toEnable, array $enabledThemes, array $e $this->assertEquals($expectedEnabled, $this->themesService->enableTheme($this->themes[$toEnable])); } - public static function dataTestDisableTheme(): array { return [ ['dark', ['default'], ['default']], @@ -178,11 +178,9 @@ public function testDisableTheme(string $toDisable, array $enabledThemes, array ->with('user', Application::APP_ID, 'enabled-themes', '["default"]') ->willReturn(json_encode($enabledThemes)); - $this->assertEquals($expectedEnabled, $this->themesService->disableTheme($this->themes[$toDisable])); } - public static function dataTestIsEnabled(): array { return [ ['dark', [], false], @@ -210,7 +208,6 @@ public function testIsEnabled(string $themeId, array $enabledThemes, bool $expec ->with('user', Application::APP_ID, 'enabled-themes', '["default"]') ->willReturn(json_encode($enabledThemes)); - $this->assertEquals($expected, $this->themesService->isEnabled($this->themes[$themeId])); } @@ -223,7 +220,6 @@ public function testGetEnabledThemes(): void { ->method('getUID') ->willReturn('user'); - $this->config->expects($this->once()) ->method('getUserValue') ->with('user', Application::APP_ID, 'enabled-themes', '["default"]') @@ -245,7 +241,6 @@ public function testGetEnabledThemesEnforced(): void { ->method('getUID') ->willReturn('user'); - $this->config->expects($this->once()) ->method('getUserValue') ->with('user', Application::APP_ID, 'enabled-themes', '["default"]') @@ -258,7 +253,6 @@ public function testGetEnabledThemesEnforced(): void { $this->assertEquals(['light'], $this->themesService->getEnabledThemes()); } - public static function dataTestSetEnabledThemes(): array { return [ [[], []], diff --git a/apps/theming/tests/ServicesTest.php b/apps/theming/tests/ServicesTest.php index 20883bd04ef10..908ecc5e4dd93 100644 --- a/apps/theming/tests/ServicesTest.php +++ b/apps/theming/tests/ServicesTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OCA\Theming\Capabilities; diff --git a/apps/theming/tests/Settings/AdminSectionTest.php b/apps/theming/tests/Settings/AdminSectionTest.php index ecb889f264b00..30bed40c747cf 100644 --- a/apps/theming/tests/Settings/AdminSectionTest.php +++ b/apps/theming/tests/Settings/AdminSectionTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Settings; use OCA\Theming\AppInfo\Application; diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php index 5a26657574e35..1d88bcc9a7523 100644 --- a/apps/theming/tests/Settings/AdminTest.php +++ b/apps/theming/tests/Settings/AdminTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Settings; use OCA\Theming\ImageManager; diff --git a/apps/theming/tests/Settings/PersonalTest.php b/apps/theming/tests/Settings/PersonalTest.php index 4ac9d97e4ae1e..5d1ebd193ab11 100644 --- a/apps/theming/tests/Settings/PersonalTest.php +++ b/apps/theming/tests/Settings/PersonalTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Settings; use OCA\Theming\ImageManager; diff --git a/apps/theming/tests/Themes/AccessibleThemeTestCase.php b/apps/theming/tests/Themes/AccessibleThemeTestCase.php index e1cdb795b1b27..14ba1d49ef5b7 100644 --- a/apps/theming/tests/Themes/AccessibleThemeTestCase.php +++ b/apps/theming/tests/Themes/AccessibleThemeTestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Themes; use OCA\Theming\ITheme; diff --git a/apps/theming/tests/Themes/DarkHighContrastThemeTest.php b/apps/theming/tests/Themes/DarkHighContrastThemeTest.php index d03e8b133003f..20d30c227815b 100644 --- a/apps/theming/tests/Themes/DarkHighContrastThemeTest.php +++ b/apps/theming/tests/Themes/DarkHighContrastThemeTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Themes; use OCA\Theming\AppInfo\Application; @@ -103,7 +104,6 @@ protected function setUp(): void { parent::setUp(); } - public function testGetId(): void { $this->assertEquals('dark-highcontrast', $this->theme->getId()); } diff --git a/apps/theming/tests/Themes/DarkThemeTest.php b/apps/theming/tests/Themes/DarkThemeTest.php index 656779b5b2449..5098b9a427a26 100644 --- a/apps/theming/tests/Themes/DarkThemeTest.php +++ b/apps/theming/tests/Themes/DarkThemeTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Themes; use OCA\Theming\AppInfo\Application; @@ -101,7 +102,6 @@ protected function setUp(): void { parent::setUp(); } - public function testGetId(): void { $this->assertEquals('dark', $this->theme->getId()); } diff --git a/apps/theming/tests/Themes/DefaultThemeTest.php b/apps/theming/tests/Themes/DefaultThemeTest.php index d2606ffc2755d..415600a979fd4 100644 --- a/apps/theming/tests/Themes/DefaultThemeTest.php +++ b/apps/theming/tests/Themes/DefaultThemeTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Themes; use OCA\Theming\AppInfo\Application; @@ -105,7 +106,6 @@ protected function setUp(): void { parent::setUp(); } - public function testGetId(): void { $this->assertEquals('default', $this->theme->getId()); } diff --git a/apps/theming/tests/Themes/DyslexiaFontTest.php b/apps/theming/tests/Themes/DyslexiaFontTest.php index 997f3f685d52d..30bcaa1b8e903 100644 --- a/apps/theming/tests/Themes/DyslexiaFontTest.php +++ b/apps/theming/tests/Themes/DyslexiaFontTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Service; use OC\Route\Router; @@ -107,7 +108,6 @@ protected function setUp(): void { parent::setUp(); } - public function testGetId(): void { $this->assertEquals('opendyslexic', $this->dyslexiaFont->getId()); } diff --git a/apps/theming/tests/Themes/HighContrastThemeTest.php b/apps/theming/tests/Themes/HighContrastThemeTest.php index 94f87d7433ba9..897cb915fca7e 100644 --- a/apps/theming/tests/Themes/HighContrastThemeTest.php +++ b/apps/theming/tests/Themes/HighContrastThemeTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests\Themes; use OCA\Theming\AppInfo\Application; @@ -104,7 +105,6 @@ protected function setUp(): void { parent::setUp(); } - public function testGetId(): void { $this->assertEquals('light-highcontrast', $this->theme->getId()); } diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 0338752f2a687..4646c0ced80a4 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OCA\Theming\ConfigLexicon; @@ -137,7 +138,6 @@ public function testGetTitleWithCustom(): void { $this->assertEquals('MyCustomCloud', $this->template->getTitle()); } - public function testGetEntityWithDefault(): void { $this->appConfig ->expects($this->once()) diff --git a/apps/theming/tests/UtilTest.php b/apps/theming/tests/UtilTest.php index 301d8ddd1e782..e9b4fac5ba241 100644 --- a/apps/theming/tests/UtilTest.php +++ b/apps/theming/tests/UtilTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Theming\Tests; use OCA\Theming\ImageManager; diff --git a/apps/twofactor_backupcodes/lib/Activity/Provider.php b/apps/twofactor_backupcodes/lib/Activity/Provider.php index 5d9899cb602b3..eaa0eee7b5305 100644 --- a/apps/twofactor_backupcodes/lib/Activity/Provider.php +++ b/apps/twofactor_backupcodes/lib/Activity/Provider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/apps/twofactor_backupcodes/lib/AppInfo/Application.php b/apps/twofactor_backupcodes/lib/AppInfo/Application.php index 4898f89f1d72e..5b1a4bd525141 100644 --- a/apps/twofactor_backupcodes/lib/AppInfo/Application.php +++ b/apps/twofactor_backupcodes/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\AppInfo; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; @@ -43,7 +44,6 @@ public function register(IRegistrationContext $context): void { $context->registerEventListener(TwoFactorProviderForUserUnregistered::class, ProviderDisabled::class); $context->registerEventListener(UserDeletedEvent::class, UserDeleted::class); - $context->registerTwoFactorProvider(BackupCodesProvider::class); } diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php index 871fa16098d4d..64c4f37b7415c 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\BackgroundJob; use OC\Authentication\TwoFactorAuth\Manager; diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php index ea7dec2878bcd..22111bfdb2fe3 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php index effc058e05c77..fbe8fe5dc3eac 100644 --- a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php +++ b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Controller; use OCA\TwoFactorBackupCodes\Service\BackupCodeStorage; diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCode.php b/apps/twofactor_backupcodes/lib/Db/BackupCode.php index 252b9b77faa7c..07ce5cdca1162 100644 --- a/apps/twofactor_backupcodes/lib/Db/BackupCode.php +++ b/apps/twofactor_backupcodes/lib/Db/BackupCode.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php index 39cc37af686a9..d5d9001d86ac6 100644 --- a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php +++ b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Db; use OCP\AppFramework\Db\QBMapper; diff --git a/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php b/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php index 90dc6206f710c..e69e0fcabd4af 100644 --- a/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php +++ b/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Event; use OCP\EventDispatcher\Event; diff --git a/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php b/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php index 1bbef159651ad..26ae2a9c8aa12 100644 --- a/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php +++ b/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use BadMethodCallException; diff --git a/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php b/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php index 5b666dd83faca..653276dd63e88 100644 --- a/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php +++ b/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php index 6c221130129bf..984ea471cbb44 100644 --- a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php +++ b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use OCA\TwoFactorBackupCodes\BackgroundJob\RememberBackupCodesJob; diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php index cc1780a987b3e..aa931f8d3bbca 100644 --- a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php +++ b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use OCA\TwoFactorBackupCodes\BackgroundJob\RememberBackupCodesJob; diff --git a/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php b/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php index 1cdc8cb9f1066..41ffe61a8b936 100644 --- a/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php +++ b/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php b/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php index 1b5c3bbb99539..020718fb75654 100644 --- a/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php +++ b/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Listener; use OCA\TwoFactorBackupCodes\Db\BackupCodeMapper; diff --git a/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php index ca0fca2ac6313..f8abe65d9a9d7 100644 --- a/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php +++ b/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use OCP\BackgroundJob\IJobList; diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php index da6c560419db3..661e97d157ca9 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use Doctrine\DBAL\Types\Types; diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php index df53f32b8d78c..3a0411c6f1039 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php index befe9061af467..c96263360f6df 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use Doctrine\DBAL\Types\Type; diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php index 96baef3adc891..069bcd49d5df2 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use OCP\Migration\BigIntMigration; diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php index 5934b1521ccaa..2abe65a0f4e3b 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Migration; use Closure; diff --git a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php index 5b99c77b60b47..f512e691ff089 100644 --- a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php +++ b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Notifications; use OCP\IURLGenerator; @@ -67,7 +68,6 @@ public function prepare(INotification $notification, string $languageCode): INot $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/password.svg'))); return $notification; - default: // Unknown subject => Unknown notification => throw throw new UnknownNotificationException(); diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php index 385b4927e7822..f5a3479fb4bd4 100644 --- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php +++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Provider; use OC\App\AppManager; diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php index 24621ba2ee202..0cac675c1390e 100644 --- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php +++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Service; use OCA\TwoFactorBackupCodes\Db\BackupCode; diff --git a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php index 0da2e96c69d38..5df3af9ba993a 100644 --- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php +++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Db; use OCA\TwoFactorBackupCodes\Db\BackupCode; diff --git a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php index dd86e96137caf..886373fc3d4ff 100644 --- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Service; use OCA\TwoFactorBackupCodes\Service\BackupCodeStorage; diff --git a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php index 99e695a103505..a3301be9c855a 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Test\Unit\Activity; use OCA\TwoFactorBackupCodes\Activity\Provider; diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php index 87bc65e4309a7..fbb0abefc8ed1 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\BackgroundJob; use OC\Authentication\TwoFactorAuth\Manager; diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php index 6b16289425815..6349e07316ad7 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\BackgroundJob; use OCA\TwoFactorBackupCodes\BackgroundJob\RememberBackupCodesJob; diff --git a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php index 02c42b65148ca..e24315eed2f16 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Controller; use OCA\TwoFactorBackupCodes\Controller\SettingsController; diff --git a/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php b/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php index 3f619e387e988..7186ca584ddae 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Event; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php index bd944dc2396e2..74d7afe01dde0 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Listener; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php index 01decdaa59e5f..13623203cbd94 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Listener; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php index fb606e45efdd4..ff568daa92b49 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Listener; use OCA\TwoFactorBackupCodes\BackgroundJob\RememberBackupCodesJob; diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php index 926bd34dc50db..34a65069ccc06 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Listener; use OCA\TwoFactorBackupCodes\BackgroundJob\RememberBackupCodesJob; diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php index 1749bb49ae967..9534d4ad89f41 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Listener; use OCA\TwoFactorBackupCodes\Event\CodesGenerated; diff --git a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php index 8c1080754fb42..e45277097350a 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Migration; use OCA\TwoFactorBackupCodes\Migration\CheckBackupCodes; diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index b091d57dbd26a..e4335c57dc702 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Notification; use OCA\TwoFactorBackupCodes\Notifications\Notifier; @@ -43,7 +44,6 @@ protected function setUp(): void { ); } - public function testPrepareWrongApp(): void { $this->expectException(\InvalidArgumentException::class); @@ -58,7 +58,6 @@ public function testPrepareWrongApp(): void { $this->notifier->prepare($notification, 'en'); } - public function testPrepareWrongSubject(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php index 512374fca8c08..37c73a3cb3380 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Provider; use OC\App\AppManager; diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index ef7e6674afaa3..60c6adaa65187 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TwoFactorBackupCodes\Tests\Unit\Service; use OCA\TwoFactorBackupCodes\Db\BackupCode; diff --git a/apps/updatenotification/lib/AppInfo/Application.php b/apps/updatenotification/lib/AppInfo/Application.php index e8b9476884d69..4cee6296a23fe 100644 --- a/apps/updatenotification/lib/AppInfo/Application.php +++ b/apps/updatenotification/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UpdateNotification\AppInfo; use OCA\UpdateNotification\Listener\AppUpdateEventListener; diff --git a/apps/updatenotification/lib/BackgroundJob/ResetToken.php b/apps/updatenotification/lib/BackgroundJob/ResetToken.php index c3d401a707598..92b3929921fbb 100644 --- a/apps/updatenotification/lib/BackgroundJob/ResetToken.php +++ b/apps/updatenotification/lib/BackgroundJob/ResetToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php b/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php index ab114e8971e63..938646b8200ae 100644 --- a/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php +++ b/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\BackgroundJob; use OC\Installer; diff --git a/apps/updatenotification/lib/Command/Check.php b/apps/updatenotification/lib/Command/Check.php index 61fdc8c48d4c6..4c2b56de5368d 100644 --- a/apps/updatenotification/lib/Command/Check.php +++ b/apps/updatenotification/lib/Command/Check.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UpdateNotification\Command; use OC\App\AppManager; @@ -44,7 +45,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $updatesAvailableCount += 1; } - // Apps $apps = $this->appManager->getEnabledApps(); foreach ($apps as $app) { diff --git a/apps/updatenotification/lib/Controller/APIController.php b/apps/updatenotification/lib/Controller/APIController.php index 04d5840d67a15..0bd77e0a799ee 100644 --- a/apps/updatenotification/lib/Controller/APIController.php +++ b/apps/updatenotification/lib/Controller/APIController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UpdateNotification\Controller; use OC\App\AppStore\Fetcher\AppFetcher; diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php index 3402410536b41..484846eab682b 100644 --- a/apps/updatenotification/lib/Controller/AdminController.php +++ b/apps/updatenotification/lib/Controller/AdminController.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Controller; use OCA\UpdateNotification\BackgroundJob\ResetToken; diff --git a/apps/updatenotification/lib/Controller/ChangelogController.php b/apps/updatenotification/lib/Controller/ChangelogController.php index a274ed3d2b275..6e3409420cd94 100644 --- a/apps/updatenotification/lib/Controller/ChangelogController.php +++ b/apps/updatenotification/lib/Controller/ChangelogController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UpdateNotification\Controller; use OCA\UpdateNotification\Manager; diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php index d27dcea024f3d..ef24823eefb04 100644 --- a/apps/updatenotification/lib/Notification/Notifier.php +++ b/apps/updatenotification/lib/Notification/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Notification; use OCA\UpdateNotification\AppInfo\Application; diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php index c2fceababc055..5dc662bd48d3e 100644 --- a/apps/updatenotification/lib/Settings/Admin.php +++ b/apps/updatenotification/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Settings; use OCA\UpdateNotification\AppInfo\Application; diff --git a/apps/updatenotification/lib/UpdateChecker.php b/apps/updatenotification/lib/UpdateChecker.php index 198793b8864f0..eef7b8cdd1941 100644 --- a/apps/updatenotification/lib/UpdateChecker.php +++ b/apps/updatenotification/lib/UpdateChecker.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification; use OC\Updater\VersionCheck; diff --git a/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php b/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php index 3845ee05be7bd..4bd73d69e87b5 100644 --- a/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php +++ b/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests; use OCA\UpdateNotification\BackgroundJob\ResetToken as BackgroundJobResetToken; diff --git a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php index 9bdf633ca781e..a223e1e9b9f68 100644 --- a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php +++ b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests\BackgroundJob; use OC\Installer; @@ -249,7 +250,6 @@ public function testCheckAppUpdates(array $apps, array $isUpdateAvailable, array $i++; }); - self::invokePrivate($job, 'checkAppUpdates'); } diff --git a/apps/updatenotification/tests/Controller/APIControllerTest.php b/apps/updatenotification/tests/Controller/APIControllerTest.php index fb7ef8ba761ce..d12411ffdc861 100644 --- a/apps/updatenotification/tests/Controller/APIControllerTest.php +++ b/apps/updatenotification/tests/Controller/APIControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UpdateNotification\Tests\Controller; use OC\App\AppStore\Fetcher\AppFetcher; diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index a27b409490bbf..1a46bd6ee3688 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests\Controller; use OCA\UpdateNotification\BackgroundJob\ResetToken; diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index 689dde8b55496..03b2af1f3ef64 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests\Notification; use OCA\UpdateNotification\Notification\Notifier; diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index 38eb602a0e819..d86c7d2121fbf 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests\Settings; use OCA\UpdateNotification\AppInfo\Application; @@ -368,7 +369,6 @@ public function testGetFormWithUpdateAndCustomersUpdateServer(): void { $this->assertEquals($expected, $this->admin->getForm()); } - public function testGetSection(): void { $this->config ->expects(self::atLeastOnce()) diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index b8693acd0efa6..caacf14d8dab1 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\UpdateNotification\Tests; use OC\Updater\VersionCheck; diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 09fd099b7506a..b693c693c9273 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use DomainException; diff --git a/apps/user_ldap/lib/AccessFactory.php b/apps/user_ldap/lib/AccessFactory.php index 739a19f46ef39..8a2e7cb6cd597 100644 --- a/apps/user_ldap/lib/AccessFactory.php +++ b/apps/user_ldap/lib/AccessFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; use OCA\User_LDAP\User\Manager; diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php index f1bf6a6ccbab5..573110fd7042f 100644 --- a/apps/user_ldap/lib/AppInfo/Application.php +++ b/apps/user_ldap/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\AppInfo; use Closure; diff --git a/apps/user_ldap/lib/BackendUtility.php b/apps/user_ldap/lib/BackendUtility.php index 65512fc2cf807..7058ec35e73ce 100644 --- a/apps/user_ldap/lib/BackendUtility.php +++ b/apps/user_ldap/lib/BackendUtility.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; abstract class BackendUtility { diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php index 0c482c191879f..363518673e76c 100644 --- a/apps/user_ldap/lib/Command/CheckUser.php +++ b/apps/user_ldap/lib/Command/CheckUser.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Helper; diff --git a/apps/user_ldap/lib/Command/CreateEmptyConfig.php b/apps/user_ldap/lib/Command/CreateEmptyConfig.php index f51e1f9f89178..ed8615a417af9 100644 --- a/apps/user_ldap/lib/Command/CreateEmptyConfig.php +++ b/apps/user_ldap/lib/Command/CreateEmptyConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Configuration; diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php index 08c8fa3f0fed0..d0ff203f74bda 100644 --- a/apps/user_ldap/lib/Command/DeleteConfig.php +++ b/apps/user_ldap/lib/Command/DeleteConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Helper; diff --git a/apps/user_ldap/lib/Command/PromoteGroup.php b/apps/user_ldap/lib/Command/PromoteGroup.php index f6ba058e03dc5..9a9fce9e1510b 100644 --- a/apps/user_ldap/lib/Command/PromoteGroup.php +++ b/apps/user_ldap/lib/Command/PromoteGroup.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Group_Proxy; diff --git a/apps/user_ldap/lib/Command/ResetGroup.php b/apps/user_ldap/lib/Command/ResetGroup.php index 2021832417903..e26caad7c84d3 100644 --- a/apps/user_ldap/lib/Command/ResetGroup.php +++ b/apps/user_ldap/lib/Command/ResetGroup.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Group_Proxy; diff --git a/apps/user_ldap/lib/Command/ResetUser.php b/apps/user_ldap/lib/Command/ResetUser.php index 1c46af5b029ce..4f42c5f86d11b 100644 --- a/apps/user_ldap/lib/Command/ResetUser.php +++ b/apps/user_ldap/lib/Command/ResetUser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\User\DeletedUsersIndex; diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php index 4aab25025621a..001a23d26b8b1 100644 --- a/apps/user_ldap/lib/Command/Search.php +++ b/apps/user_ldap/lib/Command/Search.php @@ -5,12 +5,12 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Group_Proxy; use OCA\User_LDAP\User_Proxy; use OCP\IConfig; - use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php index 1fa298087d0ad..3b223775bb8e4 100644 --- a/apps/user_ldap/lib/Command/SetConfig.php +++ b/apps/user_ldap/lib/Command/SetConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Configuration; diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php index 9084d24f7bb9a..36a8349287cc0 100644 --- a/apps/user_ldap/lib/Command/ShowConfig.php +++ b/apps/user_ldap/lib/Command/ShowConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OC\Core\Command\Base; diff --git a/apps/user_ldap/lib/Command/ShowRemnants.php b/apps/user_ldap/lib/Command/ShowRemnants.php index 381e346cc4035..f27b8d77cbd64 100644 --- a/apps/user_ldap/lib/Command/ShowRemnants.php +++ b/apps/user_ldap/lib/Command/ShowRemnants.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\User\DeletedUsersIndex; @@ -12,7 +13,6 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/apps/user_ldap/lib/Command/TestConfig.php b/apps/user_ldap/lib/Command/TestConfig.php index ee6417982b4cc..a67371423b33f 100644 --- a/apps/user_ldap/lib/Command/TestConfig.php +++ b/apps/user_ldap/lib/Command/TestConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\AccessFactory; diff --git a/apps/user_ldap/lib/Command/TestUserSettings.php b/apps/user_ldap/lib/Command/TestUserSettings.php index 98399125f04ec..2cd059455ca2b 100644 --- a/apps/user_ldap/lib/Command/TestUserSettings.php +++ b/apps/user_ldap/lib/Command/TestUserSettings.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Command; use OCA\User_LDAP\Group_Proxy; @@ -241,7 +242,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('Members: ' . json_encode($members) . ''); return self::SUCCESS; - } catch (\Exception $e) { $output->writeln('' . $e->getMessage() . ''); return self::FAILURE; diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index f09970ea75ac9..22b244e4a7ec1 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OCP\IConfig; diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 367c79d7e5d95..208ff438d73c7 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OC\ServerNotAvailableException; @@ -347,7 +348,6 @@ public function setConfiguration(array $config, ?array &$setParameters = null, b $this->configured = $this->validateConfiguration($throw); } - return $this->configured; } @@ -580,7 +580,6 @@ private function validateConfiguration(bool $throw = false): bool { } } - /** * Connects and Binds to LDAP * diff --git a/apps/user_ldap/lib/ConnectionFactory.php b/apps/user_ldap/lib/ConnectionFactory.php index dd0ad31920a25..35c4cc7cee6b8 100644 --- a/apps/user_ldap/lib/ConnectionFactory.php +++ b/apps/user_ldap/lib/ConnectionFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; class ConnectionFactory { diff --git a/apps/user_ldap/lib/Controller/ConfigAPIController.php b/apps/user_ldap/lib/Controller/ConfigAPIController.php index 9ef20a0ffc94f..e1faacac902f5 100644 --- a/apps/user_ldap/lib/Controller/ConfigAPIController.php +++ b/apps/user_ldap/lib/Controller/ConfigAPIController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Controller; use OCA\User_LDAP\Configuration; diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index 13bef6845ccb1..f441d5c2b5f50 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Controller; use OCA\User_LDAP\AppInfo\Application; diff --git a/apps/user_ldap/lib/Controller/WizardController.php b/apps/user_ldap/lib/Controller/WizardController.php index 25e5a68b50490..a325659ce7c17 100644 --- a/apps/user_ldap/lib/Controller/WizardController.php +++ b/apps/user_ldap/lib/Controller/WizardController.php @@ -88,7 +88,6 @@ public function action( throw new OCSException($e->getMessage()); } throw new OCSException(); - case 'testLoginName': try { if ($loginName === null || $loginName === '') { @@ -102,7 +101,6 @@ public function action( throw new OCSException($e->getMessage()); } throw new OCSException(); - default: throw new OCSException('Action ' . $wizardAction . 'does not exist'); break; diff --git a/apps/user_ldap/lib/Events/GroupBackendRegistered.php b/apps/user_ldap/lib/Events/GroupBackendRegistered.php index a94c239c1b33a..29d845c2567ed 100644 --- a/apps/user_ldap/lib/Events/GroupBackendRegistered.php +++ b/apps/user_ldap/lib/Events/GroupBackendRegistered.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Events; use OCA\User_LDAP\GroupPluginManager; diff --git a/apps/user_ldap/lib/Events/UserBackendRegistered.php b/apps/user_ldap/lib/Events/UserBackendRegistered.php index a26e23f8f8374..ad15a14a845e7 100644 --- a/apps/user_ldap/lib/Events/UserBackendRegistered.php +++ b/apps/user_ldap/lib/Events/UserBackendRegistered.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Events; use OCA\User_LDAP\IUserLDAP; diff --git a/apps/user_ldap/lib/Exceptions/AttributeNotSet.php b/apps/user_ldap/lib/Exceptions/AttributeNotSet.php index 73465c1daad25..a0c2dde3c010a 100644 --- a/apps/user_ldap/lib/Exceptions/AttributeNotSet.php +++ b/apps/user_ldap/lib/Exceptions/AttributeNotSet.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Exceptions; class AttributeNotSet extends \RuntimeException { diff --git a/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php b/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php index 22ce85da354cb..3c676b6438bd6 100644 --- a/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php +++ b/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Exceptions; class ConstraintViolationException extends \Exception { diff --git a/apps/user_ldap/lib/Exceptions/NoMoreResults.php b/apps/user_ldap/lib/Exceptions/NoMoreResults.php index b5621d86eb68c..4979a803c5fb3 100644 --- a/apps/user_ldap/lib/Exceptions/NoMoreResults.php +++ b/apps/user_ldap/lib/Exceptions/NoMoreResults.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Exceptions; class NoMoreResults extends \Exception { diff --git a/apps/user_ldap/lib/Exceptions/NotOnLDAP.php b/apps/user_ldap/lib/Exceptions/NotOnLDAP.php index 4c4301130f231..62f7c4c79ef86 100644 --- a/apps/user_ldap/lib/Exceptions/NotOnLDAP.php +++ b/apps/user_ldap/lib/Exceptions/NotOnLDAP.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Exceptions; class NotOnLDAP extends \Exception { diff --git a/apps/user_ldap/lib/GroupPluginManager.php b/apps/user_ldap/lib/GroupPluginManager.php index 9e8ae6805a402..8ec7c1bf7af11 100644 --- a/apps/user_ldap/lib/GroupPluginManager.php +++ b/apps/user_ldap/lib/GroupPluginManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; use OCP\GroupInterface; diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 3ca3089030680..e6b68c3686e89 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use Exception; diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php index 5449930e84688..507d90182601d 100644 --- a/apps/user_ldap/lib/Group_Proxy.php +++ b/apps/user_ldap/lib/Group_Proxy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OC\ServerNotAvailableException; @@ -33,7 +34,6 @@ public function __construct( parent::__construct($helper, $ldap, $accessFactory); } - #[\Override] protected function newInstance(string $configPrefix): Group_LDAP { return new Group_LDAP($this->getAccess($configPrefix), $this->groupPluginManager, $this->userConfig, $this->ncUserManager); diff --git a/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php b/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php index a91f76fbd0f40..6ca2b7712005a 100644 --- a/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php +++ b/apps/user_ldap/lib/Handler/ExtStorageConfigHandler.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Handler; use OCA\Files_External\Config\IConfigHandler; diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php index 0fb318d57b6f9..6fea8035e491a 100644 --- a/apps/user_ldap/lib/Helper.php +++ b/apps/user_ldap/lib/Helper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OCP\Cache\CappedMemoryCache; diff --git a/apps/user_ldap/lib/IGroupLDAP.php b/apps/user_ldap/lib/IGroupLDAP.php index e10e4fe10b435..f36aeff60237e 100644 --- a/apps/user_ldap/lib/IGroupLDAP.php +++ b/apps/user_ldap/lib/IGroupLDAP.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; interface IGroupLDAP { diff --git a/apps/user_ldap/lib/ILDAPGroupPlugin.php b/apps/user_ldap/lib/ILDAPGroupPlugin.php index bb9a5a6066e89..c6241699147c5 100644 --- a/apps/user_ldap/lib/ILDAPGroupPlugin.php +++ b/apps/user_ldap/lib/ILDAPGroupPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; interface ILDAPGroupPlugin { diff --git a/apps/user_ldap/lib/ILDAPUserPlugin.php b/apps/user_ldap/lib/ILDAPUserPlugin.php index 1490378410221..4077950b86c18 100644 --- a/apps/user_ldap/lib/ILDAPUserPlugin.php +++ b/apps/user_ldap/lib/ILDAPUserPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; interface ILDAPUserPlugin { diff --git a/apps/user_ldap/lib/ILDAPWrapper.php b/apps/user_ldap/lib/ILDAPWrapper.php index c8b388575eb3d..05afdb34075b4 100644 --- a/apps/user_ldap/lib/ILDAPWrapper.php +++ b/apps/user_ldap/lib/ILDAPWrapper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; interface ILDAPWrapper { diff --git a/apps/user_ldap/lib/IUserLDAP.php b/apps/user_ldap/lib/IUserLDAP.php index 7d8e0fd5f53a4..260576cdaa665 100644 --- a/apps/user_ldap/lib/IUserLDAP.php +++ b/apps/user_ldap/lib/IUserLDAP.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; use OCP\LDAP\Exceptions\MultipleUsersReturnedException; diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php index f3bdb19f3d3a6..2a2df47033c30 100644 --- a/apps/user_ldap/lib/Jobs/CleanUp.php +++ b/apps/user_ldap/lib/Jobs/CleanUp.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Jobs; use OCA\User_LDAP\Helper; diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php index ab58205b73567..d1f3661191cae 100644 --- a/apps/user_ldap/lib/Jobs/UpdateGroups.php +++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Jobs; use OCA\User_LDAP\Service\UpdateGroupsService; diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 6ed24c03eaf6f..b9951cf505451 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OC\ServerNotAvailableException; diff --git a/apps/user_ldap/lib/LDAPUtility.php b/apps/user_ldap/lib/LDAPUtility.php index b9cbc70a82dd6..967dd25234f17 100644 --- a/apps/user_ldap/lib/LDAPUtility.php +++ b/apps/user_ldap/lib/LDAPUtility.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; abstract class LDAPUtility { diff --git a/apps/user_ldap/lib/LoginListener.php b/apps/user_ldap/lib/LoginListener.php index eb8a29d3ee651..e995d16731bb2 100644 --- a/apps/user_ldap/lib/LoginListener.php +++ b/apps/user_ldap/lib/LoginListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; use OCA\User_LDAP\Db\GroupMembership; diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php index 7b1993fa7cf5a..236d337ae8285 100644 --- a/apps/user_ldap/lib/Mapping/AbstractMapping.php +++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Mapping; use Doctrine\DBAL\Exception; diff --git a/apps/user_ldap/lib/Mapping/GroupMapping.php b/apps/user_ldap/lib/Mapping/GroupMapping.php index ab474c3fe04c2..6db0eef918877 100644 --- a/apps/user_ldap/lib/Mapping/GroupMapping.php +++ b/apps/user_ldap/lib/Mapping/GroupMapping.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Mapping; /** diff --git a/apps/user_ldap/lib/Migration/GroupMappingMigration.php b/apps/user_ldap/lib/Migration/GroupMappingMigration.php index 8bafff2f80db3..ba589cbd68ead 100644 --- a/apps/user_ldap/lib/Migration/GroupMappingMigration.php +++ b/apps/user_ldap/lib/Migration/GroupMappingMigration.php @@ -33,7 +33,6 @@ protected function copyGroupMappingData(string $sourceTable, string $destination $query->select('*') ->from($sourceTable); - $result = $query->executeQuery(); while ($row = $result->fetchAssociative()) { $insert diff --git a/apps/user_ldap/lib/Migration/RemoveRefreshTime.php b/apps/user_ldap/lib/Migration/RemoveRefreshTime.php index cb41ed59f716c..9bcae9ec91ff6 100644 --- a/apps/user_ldap/lib/Migration/RemoveRefreshTime.php +++ b/apps/user_ldap/lib/Migration/RemoveRefreshTime.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCP\IConfig; diff --git a/apps/user_ldap/lib/Migration/SetDefaultProvider.php b/apps/user_ldap/lib/Migration/SetDefaultProvider.php index 3fa476ddeca87..cf1ae4a5fc2fb 100644 --- a/apps/user_ldap/lib/Migration/SetDefaultProvider.php +++ b/apps/user_ldap/lib/Migration/SetDefaultProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\Helper; diff --git a/apps/user_ldap/lib/Migration/UUIDFix.php b/apps/user_ldap/lib/Migration/UUIDFix.php index dff3c5f5c7ed2..cc4f2b5d0455b 100644 --- a/apps/user_ldap/lib/Migration/UUIDFix.php +++ b/apps/user_ldap/lib/Migration/UUIDFix.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\Mapping\AbstractMapping; diff --git a/apps/user_ldap/lib/Migration/UUIDFixGroup.php b/apps/user_ldap/lib/Migration/UUIDFixGroup.php index 58e157eccbcec..eec3f52de3921 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php +++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\Group_Proxy; diff --git a/apps/user_ldap/lib/Migration/UUIDFixInsert.php b/apps/user_ldap/lib/Migration/UUIDFixInsert.php index b88d8f41a9754..2e871d7d24464 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixInsert.php +++ b/apps/user_ldap/lib/Migration/UUIDFixInsert.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\Mapping\GroupMapping; diff --git a/apps/user_ldap/lib/Migration/UUIDFixUser.php b/apps/user_ldap/lib/Migration/UUIDFixUser.php index 9ca028d1f8ac0..607b142db885f 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixUser.php +++ b/apps/user_ldap/lib/Migration/UUIDFixUser.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php b/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php index 0947f266ab72b..138cb2b4fa2d6 100644 --- a/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php +++ b/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use OCA\User_LDAP\LDAPProviderFactory; diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php index ef85fa66ba322..b9d1300efee2d 100644 --- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php +++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Migration; use Closure; diff --git a/apps/user_ldap/lib/Notification/Notifier.php b/apps/user_ldap/lib/Notification/Notifier.php index b4cafc1c73245..c01510c540a9d 100644 --- a/apps/user_ldap/lib/Notification/Notifier.php +++ b/apps/user_ldap/lib/Notification/Notifier.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Notification; use OCP\L10N\IFactory; @@ -76,7 +77,6 @@ public function prepare(INotification $notification, string $languageCode): INot )); } return $notification; - default: // Unknown subject => Unknown notification => throw throw new UnknownNotificationException(); diff --git a/apps/user_ldap/lib/PagedResults/TLinkId.php b/apps/user_ldap/lib/PagedResults/TLinkId.php index 46d392995e015..1d8973bb9668f 100644 --- a/apps/user_ldap/lib/PagedResults/TLinkId.php +++ b/apps/user_ldap/lib/PagedResults/TLinkId.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\PagedResults; trait TLinkId { diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php index 22b2c6617afb6..0c0ec57bc4fa7 100644 --- a/apps/user_ldap/lib/Proxy.php +++ b/apps/user_ldap/lib/Proxy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OCA\User_LDAP\Mapping\GroupMapping; diff --git a/apps/user_ldap/lib/Service/BirthdateParserService.php b/apps/user_ldap/lib/Service/BirthdateParserService.php index 189b440843d76..579627c743214 100644 --- a/apps/user_ldap/lib/Service/BirthdateParserService.php +++ b/apps/user_ldap/lib/Service/BirthdateParserService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Service; use DateTimeImmutable; diff --git a/apps/user_ldap/lib/Settings/Admin.php b/apps/user_ldap/lib/Settings/Admin.php index 485117b3483d8..55cb865b90621 100644 --- a/apps/user_ldap/lib/Settings/Admin.php +++ b/apps/user_ldap/lib/Settings/Admin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Settings; use OCA\User_LDAP\AppInfo\Application; diff --git a/apps/user_ldap/lib/Settings/Section.php b/apps/user_ldap/lib/Settings/Section.php index 068637b5443d7..85ad8daaa708c 100644 --- a/apps/user_ldap/lib/Settings/Section.php +++ b/apps/user_ldap/lib/Settings/Section.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Settings; use OCP\IL10N; diff --git a/apps/user_ldap/lib/User/DeletedUsersIndex.php b/apps/user_ldap/lib/User/DeletedUsersIndex.php index dd05af7f01a13..2fc1f6096cc06 100644 --- a/apps/user_ldap/lib/User/DeletedUsersIndex.php +++ b/apps/user_ldap/lib/User/DeletedUsersIndex.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\User; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php index 0d83c29b7b4d2..f9b3f669c3e02 100644 --- a/apps/user_ldap/lib/User/Manager.php +++ b/apps/user_ldap/lib/User/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\User; use OCA\User_LDAP\Access; diff --git a/apps/user_ldap/lib/User/OfflineUser.php b/apps/user_ldap/lib/User/OfflineUser.php index 5033623344b74..4a74e7b665f8b 100644 --- a/apps/user_ldap/lib/User/OfflineUser.php +++ b/apps/user_ldap/lib/User/OfflineUser.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\User; use OCA\User_LDAP\Mapping\AbstractMapping; diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index 325b7af0d1bf3..68f3fcbad466d 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\User; use InvalidArgumentException; @@ -675,7 +676,6 @@ private function setNextcloudAvatar(): bool { return false; } - //make sure it is a square and not bigger than 512x512 $size = min([$this->image->width(), $this->image->height(), 512]); if (!$this->image->centerCrop($size)) { diff --git a/apps/user_ldap/lib/UserPluginManager.php b/apps/user_ldap/lib/UserPluginManager.php index ed87fea6fdeb1..5f7a2881d3443 100644 --- a/apps/user_ldap/lib/UserPluginManager.php +++ b/apps/user_ldap/lib/UserPluginManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP; use OC\User\Backend; diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 6a4ba3bf6422f..9698882bdbd67 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OC\ServerNotAvailableException; diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 9fec6a989a211..080f828e0a22d 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP; use OCA\User_LDAP\User\DeletedUsersIndex; diff --git a/apps/user_ldap/lib/WizardResult.php b/apps/user_ldap/lib/WizardResult.php index b1fa715cc108d..a64c595ac5116 100644 --- a/apps/user_ldap/lib/WizardResult.php +++ b/apps/user_ldap/lib/WizardResult.php @@ -28,7 +28,6 @@ public function addChange(string $key, int|string|array $value): void { $this->changes[$key] = $value; } - public function markChange(): void { $this->markedChange = true; } diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 16feadf81496e..8450e787a873d 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OC\ServerNotAvailableException; @@ -433,7 +434,6 @@ public function testSanitizeDN(string $attribute): void { $this->assertSame($values[0], strtolower($dnFromServer)); } - public function testSetPasswordWithDisabledChanges(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('LDAP password changes are disabled'); @@ -464,7 +464,6 @@ public function testSetPasswordWithLdapNotAvailable(): void { $this->access->setPassword('CN=foo', 'MyPassword'); } - public function testSetPasswordWithRejectedChange(): void { $this->expectException(HintException::class); $this->expectExceptionMessage('Password change rejected.'); diff --git a/apps/user_ldap/tests/ConfigurationTest.php b/apps/user_ldap/tests/ConfigurationTest.php index c5173331f6de7..5d297aae32b98 100644 --- a/apps/user_ldap/tests/ConfigurationTest.php +++ b/apps/user_ldap/tests/ConfigurationTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\Configuration; diff --git a/apps/user_ldap/tests/ConnectionTest.php b/apps/user_ldap/tests/ConnectionTest.php index 681c9fbeeb769..bc3f7068d8245 100644 --- a/apps/user_ldap/tests/ConnectionTest.php +++ b/apps/user_ldap/tests/ConnectionTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OC\ServerNotAvailableException; diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php index 9f4cff64d6be0..c37bce95aa6a6 100644 --- a/apps/user_ldap/tests/GroupLDAPPluginTest.php +++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\GroupPluginManager; @@ -63,7 +64,6 @@ public function testCreateGroup(): void { $pluginManager->createGroup('group'); } - public function testCreateGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements createGroup in this LDAP Backend.'); @@ -93,7 +93,6 @@ public function testDeleteGroup(): void { $this->assertTrue($pluginManager->deleteGroup('group')); } - public function testDeleteGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements deleteGroup in this LDAP Backend.'); @@ -124,7 +123,6 @@ public function testAddToGroup(): void { $pluginManager->addToGroup('uid', 'gid'); } - public function testAddToGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements addToGroup in this LDAP Backend.'); @@ -155,7 +153,6 @@ public function testRemoveFromGroup(): void { $pluginManager->removeFromGroup('uid', 'gid'); } - public function testRemoveFromGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements removeFromGroup in this LDAP Backend.'); @@ -186,7 +183,6 @@ public function testCountUsersInGroup(): void { $pluginManager->countUsersInGroup('gid', 'search'); } - public function testCountUsersInGroupNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements countUsersInGroup in this LDAP Backend.'); @@ -216,7 +212,6 @@ public function testgetGroupDetails(): void { $pluginManager->getGroupDetails('gid'); } - public function testgetGroupDetailsNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getGroupDetails in this LDAP Backend.'); diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index 036b5fd2e7106..cf6bdea557b28 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\Access; @@ -1074,7 +1075,6 @@ public function testCreateGroupWithPlugin(): void { $this->assertTrue($this->groupBackend->createGroup('gid')); } - public function testCreateGroupFailing(): void { $this->expectException(\Exception::class); @@ -1119,7 +1119,6 @@ public function testDeleteGroupWithPlugin(): void { $this->assertTrue($this->groupBackend->deleteGroup('gid')); } - public function testDeleteGroupFailing(): void { $this->expectException(\Exception::class); @@ -1155,7 +1154,6 @@ public function testAddToGroupWithPlugin(): void { $this->assertEquals('result', $this->groupBackend->addToGroup('uid', 'gid')); } - public function testAddToGroupFailing(): void { $this->expectException(\Exception::class); @@ -1191,7 +1189,6 @@ public function testRemoveFromGroupWithPlugin(): void { $this->assertEquals('result', $this->groupBackend->removeFromGroup('uid', 'gid')); } - public function testRemoveFromGroupFailing(): void { $this->expectException(\Exception::class); diff --git a/apps/user_ldap/tests/HelperTest.php b/apps/user_ldap/tests/HelperTest.php index 97661243b911e..b95eb6c53b064 100644 --- a/apps/user_ldap/tests/HelperTest.php +++ b/apps/user_ldap/tests/HelperTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\Helper; diff --git a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php index 00f8be185860c..bf4587fc9a64e 100644 --- a/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php +++ b/apps/user_ldap/tests/Integration/AbstractIntegrationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration; use OCA\User_LDAP\Access; diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 3eec3df675ac9..d07a4ae67fc0d 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration; use OC\ServerNotAvailableException; diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php index e152938423970..d262bef419b99 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestAttributeDetection.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Integration\Lib; use OCA\User_LDAP\Group_LDAP; diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php index 8a1093e430424..ec19a503544e8 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestCountUsersByLoginName.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib; use OCA\User_LDAP\Tests\Integration\AbstractIntegrationTest; diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php index 1c2d7145ddfc7..275a1bd583848 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestFetchUsersByLoginName.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php index 3e21d22fca3fe..9cbfd456ae216 100644 --- a/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php +++ b/apps/user_ldap/tests/Integration/Lib/IntegrationTestPaging.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php index a2e8bbb4212c4..040bab095a1fa 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserAvatar.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib\User; use OC\ServerNotAvailableException; diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php index 9b05298a151fb..f657db2eedda7 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserCleanUp.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib\User; use OCA\User_LDAP\Jobs\CleanUp; diff --git a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php index 6fbfd9ba51baf..2a73ffe1bfd20 100644 --- a/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php +++ b/apps/user_ldap/tests/Integration/Lib/User/IntegrationTestUserDisplayName.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Integration\Lib\User; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php index 5a1e563a1e8ec..d161bda83f038 100644 --- a/apps/user_ldap/tests/Jobs/CleanUpTest.php +++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Jobs; use Exception; diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index 3ff34172cfa54..de60b0cf3f125 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Jobs; use OCA\User_LDAP\Access; diff --git a/apps/user_ldap/tests/LDAPGroupPluginDummy.php b/apps/user_ldap/tests/LDAPGroupPluginDummy.php index 5ea1a491f1462..a106772c66ad2 100644 --- a/apps/user_ldap/tests/LDAPGroupPluginDummy.php +++ b/apps/user_ldap/tests/LDAPGroupPluginDummy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\ILDAPGroupPlugin; diff --git a/apps/user_ldap/tests/LDAPProviderTest.php b/apps/user_ldap/tests/LDAPProviderTest.php index 3055ff40dceda..582cdde2325d2 100644 --- a/apps/user_ldap/tests/LDAPProviderTest.php +++ b/apps/user_ldap/tests/LDAPProviderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OC\User\Manager; @@ -77,7 +78,6 @@ private function getLDAPProvider(IUserLDAP $userBackend, IGroupLDAP $groupBacken ); } - public function testGetUserDNUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -92,7 +92,6 @@ public function testGetUserDNUserIDNotFound(): void { $ldapProvider->getUserDN('nonexisting_user'); } - public function testGetUserDN(): void { $userAccess = $this->getMockBuilder(Access::class) ->onlyMethods(['username2dn']) @@ -117,7 +116,6 @@ public function testGetUserDN(): void { $ldapProvider->getUserDN('existing_user')); } - public function testGetGroupDNGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -194,7 +192,6 @@ public function testSanitizeDN(): void { $ldapProvider->sanitizeDN('cn=existing_user,ou=Are Sufficient To,ou=Test,dc=example,dc=org')); } - public function testGetLDAPConnectionUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -223,7 +220,6 @@ public function testGetLDAPConnection(): void { $this->assertEquals($ldapConnection, $ldapProvider->getLDAPConnection('existing_user')); } - public function testGetGroupLDAPConnectionGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -260,7 +256,6 @@ public function testGetGroupLDAPConnection(): void { $this->assertEquals($ldapConnection, $ldapProvider->getGroupLDAPConnection('existing_group')); } - public function testGetLDAPBaseUsersUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -321,7 +316,6 @@ public function testGetLDAPBaseUsers(): void { $this->assertEquals($bases[1], $ldapProvider->getLDAPBaseUsers('existing_user')); } - public function testGetLDAPBaseGroupsUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -375,7 +369,6 @@ public function testGetLDAPBaseGroups(): void { $this->assertEquals($bases[0], $ldapProvider->getLDAPBaseGroups('existing_user')); } - public function testClearCacheUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -416,7 +409,6 @@ public function testClearCache(): void { $this->addToAssertionCount(1); } - public function testClearGroupCacheGroupIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); @@ -490,7 +482,6 @@ public function testUnflagRecord(): void { $this->addToAssertionCount(1); } - public function testGetLDAPDisplayNameFieldUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -530,7 +521,6 @@ public function testGetLDAPDisplayNameField(): void { $this->assertEquals('displayName', $ldapProvider->getLDAPDisplayNameField('existing_user')); } - public function testGetLDAPEmailFieldUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('User id not found in LDAP'); @@ -570,7 +560,6 @@ public function testGetLDAPEmailField(): void { $this->assertEquals('mail', $ldapProvider->getLDAPEmailField('existing_user')); } - public function testGetLDAPGroupMemberAssocUserIDNotFound(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group id not found in LDAP'); diff --git a/apps/user_ldap/tests/LDAPTest.php b/apps/user_ldap/tests/LDAPTest.php index a453a174355dd..69a856515f4d7 100644 --- a/apps/user_ldap/tests/LDAPTest.php +++ b/apps/user_ldap/tests/LDAPTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\LDAP; diff --git a/apps/user_ldap/tests/LDAPUserPluginDummy.php b/apps/user_ldap/tests/LDAPUserPluginDummy.php index 8d4870406ae2a..1be19d31ab19c 100644 --- a/apps/user_ldap/tests/LDAPUserPluginDummy.php +++ b/apps/user_ldap/tests/LDAPUserPluginDummy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\ILDAPUserPlugin; diff --git a/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php b/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php index 8188e39cd84f7..ee5cfc36edc07 100644 --- a/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php +++ b/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Mapping; use OCA\User_LDAP\Mapping\AbstractMapping; diff --git a/apps/user_ldap/tests/Mapping/GroupMappingTest.php b/apps/user_ldap/tests/Mapping/GroupMappingTest.php index 3384f1eecc314..2d9fc6d1de3e3 100644 --- a/apps/user_ldap/tests/Mapping/GroupMappingTest.php +++ b/apps/user_ldap/tests/Mapping/GroupMappingTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Mapping; use OCA\User_LDAP\Mapping\GroupMapping; diff --git a/apps/user_ldap/tests/Mapping/UserMappingTest.php b/apps/user_ldap/tests/Mapping/UserMappingTest.php index cf20430fd104b..0bdd71a155b50 100644 --- a/apps/user_ldap/tests/Mapping/UserMappingTest.php +++ b/apps/user_ldap/tests/Mapping/UserMappingTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\Mapping; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php b/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php index fa52491cdca5c..d098f08d76c42 100644 --- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php +++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Migration; use OCA\User_LDAP\Access; diff --git a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php index 30a2731521b1a..d200688f08edd 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Migration; use OCA\User_LDAP\Group_Proxy; diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php index 35c19d5403247..e3378f2b3929a 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Migration; use OCA\User_LDAP\Mapping\GroupMapping; diff --git a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php index b9a11191d565b..45ea77e1c7d89 100644 --- a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php +++ b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Migration; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php b/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php index 601aee86602b3..ec56b6b6264cc 100644 --- a/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php +++ b/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Service; use OCA\User_LDAP\Db\GroupMembership; diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php index a05d08b3cf4d6..37771463c4eef 100644 --- a/apps/user_ldap/tests/Settings/AdminTest.php +++ b/apps/user_ldap/tests/Settings/AdminTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Settings; use OCA\User_LDAP\Configuration; diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php index 3f9ae1e56d41e..e2c82adae6b69 100644 --- a/apps/user_ldap/tests/Settings/SectionTest.php +++ b/apps/user_ldap/tests/Settings/SectionTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\Settings; use OCA\User_LDAP\Settings\Section; diff --git a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php index 5ae78655bed0a..a6d499e5d03d2 100644 --- a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php +++ b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\User; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/User/ManagerTest.php b/apps/user_ldap/tests/User/ManagerTest.php index 6f59c36702a11..b6cb9bc1bbc27 100644 --- a/apps/user_ldap/tests/User/ManagerTest.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\User; use OCA\User_LDAP\Access; diff --git a/apps/user_ldap/tests/User/OfflineUserTest.php b/apps/user_ldap/tests/User/OfflineUserTest.php index 4599414005e1b..ddf287bd7aa60 100644 --- a/apps/user_ldap/tests/User/OfflineUserTest.php +++ b/apps/user_ldap/tests/User/OfflineUserTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests\User; use OCA\User_LDAP\Mapping\UserMapping; diff --git a/apps/user_ldap/tests/User/UserTest.php b/apps/user_ldap/tests/User/UserTest.php index 3e9b90fe0e6ac..60f9233f3b675 100644 --- a/apps/user_ldap/tests/User/UserTest.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests\User; use OCA\User_LDAP\Access; @@ -984,7 +985,6 @@ public function testGetHomePathConfiguredNotAvailableAllowed(): void { $this->assertFalse($this->user->getHomePath()); } - public function testGetHomePathConfiguredNotAvailableNotAllowed(): void { $this->expectException(\Exception::class); diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php index 8a065374e61c4..80eff8b1d5039 100644 --- a/apps/user_ldap/tests/UserLDAPPluginTest.php +++ b/apps/user_ldap/tests/UserLDAPPluginTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OC\User\Backend; @@ -64,7 +65,6 @@ public function testCreateUser(): void { $pluginManager->createUser('user', 'password'); } - public function testCreateUserNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements createUser in this LDAP Backend.'); @@ -95,7 +95,6 @@ public function testSetPassword(): void { $pluginManager->setPassword('user', 'password'); } - public function testSetPasswordNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements setPassword in this LDAP Backend.'); @@ -125,7 +124,6 @@ public function testGetHome(): void { $pluginManager->getHome('uid'); } - public function testGetHomeNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getHome in this LDAP Backend.'); @@ -155,7 +153,6 @@ public function testGetDisplayName(): void { $pluginManager->getDisplayName('uid'); } - public function testGetDisplayNameNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements getDisplayName in this LDAP Backend.'); @@ -186,7 +183,6 @@ public function testSetDisplayName(): void { $pluginManager->setDisplayName('user', 'password'); } - public function testSetDisplayNameNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements setDisplayName in this LDAP Backend.'); @@ -216,7 +212,6 @@ public function testCanChangeAvatar(): void { $pluginManager->canChangeAvatar('uid'); } - public function testCanChangeAvatarNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements canChangeAvatar in this LDAP Backend.'); @@ -243,7 +238,6 @@ public function testCountUsers(): void { $pluginManager->countUsers(); } - public function testCountUsersNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements countUsers in this LDAP Backend.'); @@ -279,7 +273,6 @@ public function testDeleteUser(): void { $pluginManager->deleteUser('uid'); } - public function testDeleteUserNotRegistered(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('No plugin implements deleteUser in this LDAP Backend.'); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 4720b0a570935..3ba73087119f4 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OC\User\Backend; @@ -698,7 +699,6 @@ public function testGetHomeRelative(): void { $this->assertEquals($dataDir . '/susannah/', $result); } - public function testGetHomeNoPath(): void { $this->expectException(\Exception::class); @@ -1228,7 +1228,6 @@ private function prepareAccessForSetPassword($enablePasswordChange = true) { }); } - public function testSetPasswordInvalid(): void { $this->expectException(HintException::class); $this->expectExceptionMessage('Password fails quality checking policy'); @@ -1272,7 +1271,6 @@ public function testSetPasswordValidDisabled(): void { $this->assertFalse(\OC_User::setPassword('roland', 'dt12234$')); } - public function testSetPasswordWithInvalidUser(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('LDAP setPassword: Could not get user object for uid NotExistingUser. Maybe the LDAP entry has no set display name attribute?'); @@ -1373,7 +1371,6 @@ public function testSetDisplayNameWithPlugin(): void { $this->assertEquals($newDisplayName, $this->backend->setDisplayName('uid', $newDisplayName)); } - public function testSetDisplayNameErrorWithPlugin(): void { $this->expectException(HintException::class); diff --git a/apps/user_ldap/tests/User_ProxyTest.php b/apps/user_ldap/tests/User_ProxyTest.php index 38f94af33a70a..7a71ca1a7d276 100644 --- a/apps/user_ldap/tests/User_ProxyTest.php +++ b/apps/user_ldap/tests/User_ProxyTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\AccessFactory; diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index 0209a676502e2..5f5af7e258fdd 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCA\User_LDAP\Tests; use OCA\User_LDAP\Access; diff --git a/apps/user_status/lib/AppInfo/Application.php b/apps/user_status/lib/AppInfo/Application.php index 01e4b5317d4ed..b508bb3a69bf2 100644 --- a/apps/user_status/lib/AppInfo/Application.php +++ b/apps/user_status/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\AppInfo; use OCA\UserStatus\Capabilities; diff --git a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php index 0e8ee825f6d7c..2bce800c069ae 100644 --- a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php +++ b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\BackgroundJob; use OCA\UserStatus\Db\UserStatusMapper; diff --git a/apps/user_status/lib/Capabilities.php b/apps/user_status/lib/Capabilities.php index e6084c21a73f2..34d4e04729e8b 100644 --- a/apps/user_status/lib/Capabilities.php +++ b/apps/user_status/lib/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus; use OCP\Capabilities\ICapability; diff --git a/apps/user_status/lib/Connector/UserStatus.php b/apps/user_status/lib/Connector/UserStatus.php index 562be84041261..07d53778835a0 100644 --- a/apps/user_status/lib/Connector/UserStatus.php +++ b/apps/user_status/lib/Connector/UserStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Connector; use DateTimeImmutable; diff --git a/apps/user_status/lib/Connector/UserStatusProvider.php b/apps/user_status/lib/Connector/UserStatusProvider.php index 56215911b43ac..d0f3147cabf46 100644 --- a/apps/user_status/lib/Connector/UserStatusProvider.php +++ b/apps/user_status/lib/Connector/UserStatusProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Connector; use OC\UserStatus\ISettableProvider; diff --git a/apps/user_status/lib/Controller/HeartbeatController.php b/apps/user_status/lib/Controller/HeartbeatController.php index 30f4af6572a7f..28ceb8f9bba71 100644 --- a/apps/user_status/lib/Controller/HeartbeatController.php +++ b/apps/user_status/lib/Controller/HeartbeatController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Controller; use OCA\UserStatus\Db\UserStatus; diff --git a/apps/user_status/lib/Controller/PredefinedStatusController.php b/apps/user_status/lib/Controller/PredefinedStatusController.php index 70262d1108ad7..60d285e4d97ea 100644 --- a/apps/user_status/lib/Controller/PredefinedStatusController.php +++ b/apps/user_status/lib/Controller/PredefinedStatusController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Controller; use OCA\UserStatus\ResponseDefinitions; diff --git a/apps/user_status/lib/Controller/StatusesController.php b/apps/user_status/lib/Controller/StatusesController.php index 44688c390232b..b1d55774a1177 100644 --- a/apps/user_status/lib/Controller/StatusesController.php +++ b/apps/user_status/lib/Controller/StatusesController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Controller; use OCA\UserStatus\Db\UserStatus; diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php index 9b3807ce86eed..6c16e0aa8a0a7 100644 --- a/apps/user_status/lib/Controller/UserStatusController.php +++ b/apps/user_status/lib/Controller/UserStatusController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Controller; use OCA\DAV\CalDAV\Status\StatusService as CalendarStatusService; diff --git a/apps/user_status/lib/Dashboard/UserStatusWidget.php b/apps/user_status/lib/Dashboard/UserStatusWidget.php index 49c618a2826f6..03131e0da28aa 100644 --- a/apps/user_status/lib/Dashboard/UserStatusWidget.php +++ b/apps/user_status/lib/Dashboard/UserStatusWidget.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Dashboard; use OCA\UserStatus\AppInfo\Application; diff --git a/apps/user_status/lib/Db/UserStatus.php b/apps/user_status/lib/Db/UserStatus.php index b2da4a9e07a91..a2df466fcb6e8 100644 --- a/apps/user_status/lib/Db/UserStatus.php +++ b/apps/user_status/lib/Db/UserStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Db; use OCP\AppFramework\Db\Entity; diff --git a/apps/user_status/lib/Db/UserStatusMapper.php b/apps/user_status/lib/Db/UserStatusMapper.php index 15982d44fd8b9..1fcbaff29c59f 100644 --- a/apps/user_status/lib/Db/UserStatusMapper.php +++ b/apps/user_status/lib/Db/UserStatusMapper.php @@ -144,7 +144,6 @@ public function clearOlderThanClearAt(int $timestamp): void { $qb->executeStatement(); } - /** * Deletes a user status so we can restore the backup * diff --git a/apps/user_status/lib/Exception/InvalidClearAtException.php b/apps/user_status/lib/Exception/InvalidClearAtException.php index a3bd4dfa0d0a9..0a52e1eeb648b 100644 --- a/apps/user_status/lib/Exception/InvalidClearAtException.php +++ b/apps/user_status/lib/Exception/InvalidClearAtException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Exception; class InvalidClearAtException extends \Exception { diff --git a/apps/user_status/lib/Exception/InvalidMessageIdException.php b/apps/user_status/lib/Exception/InvalidMessageIdException.php index 1feb36a916abe..2bc9845404bd4 100644 --- a/apps/user_status/lib/Exception/InvalidMessageIdException.php +++ b/apps/user_status/lib/Exception/InvalidMessageIdException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Exception; class InvalidMessageIdException extends \Exception { diff --git a/apps/user_status/lib/Exception/InvalidStatusIconException.php b/apps/user_status/lib/Exception/InvalidStatusIconException.php index 80dff2a7666b9..33ccc5d39835f 100644 --- a/apps/user_status/lib/Exception/InvalidStatusIconException.php +++ b/apps/user_status/lib/Exception/InvalidStatusIconException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Exception; class InvalidStatusIconException extends \Exception { diff --git a/apps/user_status/lib/Exception/InvalidStatusTypeException.php b/apps/user_status/lib/Exception/InvalidStatusTypeException.php index a09284be40e78..fc01e5f5c1b7c 100644 --- a/apps/user_status/lib/Exception/InvalidStatusTypeException.php +++ b/apps/user_status/lib/Exception/InvalidStatusTypeException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Exception; class InvalidStatusTypeException extends \Exception { diff --git a/apps/user_status/lib/Exception/StatusMessageTooLongException.php b/apps/user_status/lib/Exception/StatusMessageTooLongException.php index 03d578abf4696..817105428fa85 100644 --- a/apps/user_status/lib/Exception/StatusMessageTooLongException.php +++ b/apps/user_status/lib/Exception/StatusMessageTooLongException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Exception; class StatusMessageTooLongException extends \Exception { diff --git a/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php b/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php index c9bc233e84d79..c8be9467fff8d 100644 --- a/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php +++ b/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Listener; use OCA\DAV\BackgroundJob\UserStatusAutomation; diff --git a/apps/user_status/lib/Listener/UserDeletedListener.php b/apps/user_status/lib/Listener/UserDeletedListener.php index 0828b1b44e04a..80f80a9a3181d 100644 --- a/apps/user_status/lib/Listener/UserDeletedListener.php +++ b/apps/user_status/lib/Listener/UserDeletedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Listener; use OCA\UserStatus\Service\StatusService; @@ -31,7 +32,6 @@ public function __construct( ) { } - /** * @inheritDoc */ diff --git a/apps/user_status/lib/Listener/UserLiveStatusListener.php b/apps/user_status/lib/Listener/UserLiveStatusListener.php index c65386b3e2225..0204d101ec3dd 100644 --- a/apps/user_status/lib/Listener/UserLiveStatusListener.php +++ b/apps/user_status/lib/Listener/UserLiveStatusListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Listener; use OCA\DAV\CalDAV\Status\StatusService as CalendarStatusService; diff --git a/apps/user_status/lib/Migration/Version0001Date20200602134824.php b/apps/user_status/lib/Migration/Version0001Date20200602134824.php index 2302befdfa69c..6324137ae7a23 100644 --- a/apps/user_status/lib/Migration/Version0001Date20200602134824.php +++ b/apps/user_status/lib/Migration/Version0001Date20200602134824.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/user_status/lib/Migration/Version0002Date20200902144824.php b/apps/user_status/lib/Migration/Version0002Date20200902144824.php index ba372b439a4ee..1a8c3af0f6e74 100644 --- a/apps/user_status/lib/Migration/Version0002Date20200902144824.php +++ b/apps/user_status/lib/Migration/Version0002Date20200902144824.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/user_status/lib/Migration/Version1000Date20201111130204.php b/apps/user_status/lib/Migration/Version1000Date20201111130204.php index 12b75f576c265..5e964c74d1a72 100644 --- a/apps/user_status/lib/Migration/Version1000Date20201111130204.php +++ b/apps/user_status/lib/Migration/Version1000Date20201111130204.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Migration; use Closure; diff --git a/apps/user_status/lib/Migration/Version1003Date20210809144824.php b/apps/user_status/lib/Migration/Version1003Date20210809144824.php index fe8395f701a3e..d1330d743162c 100644 --- a/apps/user_status/lib/Migration/Version1003Date20210809144824.php +++ b/apps/user_status/lib/Migration/Version1003Date20210809144824.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Migration; use OCP\DB\ISchemaWrapper; diff --git a/apps/user_status/lib/Service/JSDataService.php b/apps/user_status/lib/Service/JSDataService.php index 0bf7a4fceb577..a2e17dea2aad6 100644 --- a/apps/user_status/lib/Service/JSDataService.php +++ b/apps/user_status/lib/Service/JSDataService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Service; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/apps/user_status/lib/Service/PredefinedStatusService.php b/apps/user_status/lib/Service/PredefinedStatusService.php index 599d5b8b52fa8..3e9c196dbe2d4 100644 --- a/apps/user_status/lib/Service/PredefinedStatusService.php +++ b/apps/user_status/lib/Service/PredefinedStatusService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Service; use OCP\IL10N; @@ -137,28 +138,20 @@ public function getIconForId(string $id): ?string { switch ($id) { case self::MEETING: return '📅'; - case self::COMMUTING: return '🚌'; - case self::SICK_LEAVE: return '🤒'; - case self::VACATIONING: return '🌴'; - case self::OUT_OF_OFFICE: return '🛑'; - case self::REMOTE_WORK: return '🏡'; - case self::BE_RIGHT_BACK: return '⏳'; - case self::CALL: return '💬'; - default: return null; } @@ -173,28 +166,20 @@ public function getTranslatedStatusForId(string $id): ?string { switch ($id) { case self::MEETING: return $this->l10n->t('In a meeting'); - case self::COMMUTING: return $this->l10n->t('Commuting'); - case self::SICK_LEAVE: return $this->l10n->t('Out sick'); - case self::VACATIONING: return $this->l10n->t('Vacationing'); - case self::OUT_OF_OFFICE: return $this->l10n->t('Out of office'); - case self::REMOTE_WORK: return $this->l10n->t('Working remotely'); - case self::CALL: return $this->l10n->t('In a call'); - case self::BE_RIGHT_BACK: return $this->l10n->t('Be right back'); - default: return null; } diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php index 188eb26d1d7a9..6ee7ae667633d 100644 --- a/apps/user_status/lib/Service/StatusService.php +++ b/apps/user_status/lib/Service/StatusService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Service; use OCA\UserStatus\Db\UserStatus; diff --git a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php index 66142082343f1..6d19d19e2702a 100644 --- a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php +++ b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\BackgroundJob; use OCA\UserStatus\BackgroundJob\ClearOldStatusesBackgroundJob; diff --git a/apps/user_status/tests/Unit/CapabilitiesTest.php b/apps/user_status/tests/Unit/CapabilitiesTest.php index 514999acc1215..aef3ddcd439cf 100644 --- a/apps/user_status/tests/Unit/CapabilitiesTest.php +++ b/apps/user_status/tests/Unit/CapabilitiesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests; use OCA\UserStatus\Capabilities; diff --git a/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php b/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php index df6c55488d51f..89e74f36fceea 100644 --- a/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php +++ b/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Connector; use OCA\UserStatus\Connector\UserStatusProvider; diff --git a/apps/user_status/tests/Unit/Connector/UserStatusTest.php b/apps/user_status/tests/Unit/Connector/UserStatusTest.php index fee9b4e4b8991..e76534a6fde57 100644 --- a/apps/user_status/tests/Unit/Connector/UserStatusTest.php +++ b/apps/user_status/tests/Unit/Connector/UserStatusTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Connector; use OCA\UserStatus\Connector\UserStatus; diff --git a/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php b/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php index 0f96f41a5246b..afcea6084c5a7 100644 --- a/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php +++ b/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Controller; use OCA\UserStatus\Controller\PredefinedStatusController; diff --git a/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php b/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php index 76d337879c366..e623486c82d93 100644 --- a/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php +++ b/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Controller; use OCA\UserStatus\Controller\StatusesController; diff --git a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php index 90b18c5b5253f..4791a1dac7712 100644 --- a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php +++ b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Controller; use OCA\DAV\CalDAV\Status\StatusService as CalendarStatusService; diff --git a/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php b/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php index 8773b04c95f4f..61f29f5f7300a 100644 --- a/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php +++ b/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Dashboard; use OCA\UserStatus\Dashboard\UserStatusWidget; diff --git a/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php b/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php index 3cbd4e6d93045..f6f924b91fdf3 100644 --- a/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php +++ b/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Db; use OCA\UserStatus\Db\UserStatus; diff --git a/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php b/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php index 5a2d52fea0a2c..1ced2f8fcc4b1 100644 --- a/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php +++ b/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Listener; use OCA\UserStatus\Listener\UserDeletedListener; diff --git a/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php b/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php index d7db72f60a4de..07c1b29939d00 100644 --- a/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php +++ b/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Listener; use OCA\DAV\CalDAV\Status\StatusService as CalendarStatusService; diff --git a/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php b/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php index bf337a3c152d1..390952d8ebd1b 100644 --- a/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php +++ b/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Service; use OCA\UserStatus\Service\PredefinedStatusService; diff --git a/apps/user_status/tests/Unit/Service/StatusServiceTest.php b/apps/user_status/tests/Unit/Service/StatusServiceTest.php index 88c32d477d41d..69128033631e0 100644 --- a/apps/user_status/tests/Unit/Service/StatusServiceTest.php +++ b/apps/user_status/tests/Unit/Service/StatusServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\UserStatus\Tests\Service; use OCA\UserStatus\Db\UserStatus; diff --git a/apps/weather_status/lib/AppInfo/Application.php b/apps/weather_status/lib/AppInfo/Application.php index 1227f391c1261..56ff148a186cf 100644 --- a/apps/weather_status/lib/AppInfo/Application.php +++ b/apps/weather_status/lib/AppInfo/Application.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WeatherStatus\AppInfo; use OCA\WeatherStatus\Capabilities; diff --git a/apps/weather_status/lib/Capabilities.php b/apps/weather_status/lib/Capabilities.php index ac6cd6986cd30..e8631aac8ff7e 100644 --- a/apps/weather_status/lib/Capabilities.php +++ b/apps/weather_status/lib/Capabilities.php @@ -6,10 +6,10 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WeatherStatus; use OCA\WeatherStatus\AppInfo\Application; - use OCP\Capabilities\ICapability; /** diff --git a/apps/weather_status/lib/Controller/WeatherStatusController.php b/apps/weather_status/lib/Controller/WeatherStatusController.php index c56ea3b97b37e..ca3313de6be41 100644 --- a/apps/weather_status/lib/Controller/WeatherStatusController.php +++ b/apps/weather_status/lib/Controller/WeatherStatusController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WeatherStatus\Controller; use OCA\WeatherStatus\ResponseDefinitions; diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index c2856ab611e7b..a7496726ec43d 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WeatherStatus\Service; use OCA\WeatherStatus\AppInfo\Application; diff --git a/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php b/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php index d9c355190c77f..37e3385892ec6 100644 --- a/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php +++ b/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php @@ -64,7 +64,6 @@ public function getAll(): array { return $this->findEntities($qb); } - /** * @param int $olderThan * @return EphemeralToken[] @@ -106,7 +105,6 @@ public function invalidateOldTokens(int $token_lifetime = self::TOKEN_LIFETIME) return; } - $this->logger->debug('Invalidating ephemeral webhook tokens older than ' . date('c', $olderThan), ['app' => 'webhook_listeners']); foreach ($tokensToDelete as $token) { try { diff --git a/apps/webhook_listeners/lib/Db/WebhookListener.php b/apps/webhook_listeners/lib/Db/WebhookListener.php index da24ab4d2c5d7..1fabf14d5cea1 100644 --- a/apps/webhook_listeners/lib/Db/WebhookListener.php +++ b/apps/webhook_listeners/lib/Db/WebhookListener.php @@ -93,7 +93,6 @@ class WebhookListener extends Entity implements \JsonSerializable { private ICrypto $crypto; - public function __construct( ?ICrypto $crypto = null, ) { diff --git a/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php b/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php index 5bb6d99f04ed7..d77f5298dc503 100644 --- a/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php +++ b/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php @@ -231,7 +231,6 @@ public function getByEvent(string $event, ?string $userId = null): array { ->from($this->getTableName()) ->where($qb->expr()->eq('event', $qb->createNamedParameter($event, IQueryBuilder::PARAM_STR))); - if ($userId === '' || $userId === null) { $qb->andWhere($qb->expr()->emptyString('user_id_filter')); } else { diff --git a/apps/webhook_listeners/lib/Service/PHPMongoQuery.php b/apps/webhook_listeners/lib/Service/PHPMongoQuery.php index ecb8e819780a8..0c49e89058355 100644 --- a/apps/webhook_listeners/lib/Service/PHPMongoQuery.php +++ b/apps/webhook_listeners/lib/Service/PHPMongoQuery.php @@ -287,7 +287,6 @@ private static function _executeOperatorOnElement(string $operator, $operatorVal return count(array_intersect($v, $operatorValue)) === 0; } return !in_array($v, $operatorValue); - case '$exists': return ($operatorValue && $exists) || (!$operatorValue && !$exists); case '$mod': if (!$exists) { @@ -300,7 +299,6 @@ private static function _executeOperatorOnElement(string $operator, $operatorVal throw new Exception('$mod requires two parameters in array: divisor and remainder'); } return $v % $operatorValue[0] === $operatorValue[1]; - default: if (empty($options['unknownOperatorCallback']) || !is_callable($options['unknownOperatorCallback'])) { throw new Exception('Operator ' . $operator . ' is unknown'); diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php index 5080055bf2aea..548bc149a03de 100644 --- a/apps/workflowengine/lib/AppInfo/Application.php +++ b/apps/workflowengine/lib/AppInfo/Application.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\AppInfo; use Closure; diff --git a/apps/workflowengine/lib/BackgroundJobs/Rotate.php b/apps/workflowengine/lib/BackgroundJobs/Rotate.php index 0921ddff19986..511e56c607d85 100644 --- a/apps/workflowengine/lib/BackgroundJobs/Rotate.php +++ b/apps/workflowengine/lib/BackgroundJobs/Rotate.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\BackgroundJobs; use OCA\WorkflowEngine\AppInfo\Application; diff --git a/apps/workflowengine/lib/Check/AbstractStringCheck.php b/apps/workflowengine/lib/Check/AbstractStringCheck.php index 8e083ba3c26ac..a8a964d0df3ef 100644 --- a/apps/workflowengine/lib/Check/AbstractStringCheck.php +++ b/apps/workflowengine/lib/Check/AbstractStringCheck.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\IL10N; diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php index ee156db984bb7..262db44dd831e 100644 --- a/apps/workflowengine/lib/Check/FileMimeType.php +++ b/apps/workflowengine/lib/Check/FileMimeType.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OC\Files\Storage\Local; diff --git a/apps/workflowengine/lib/Check/FileName.php b/apps/workflowengine/lib/Check/FileName.php index 61dd23079d765..d69e4c3a49bac 100644 --- a/apps/workflowengine/lib/Check/FileName.php +++ b/apps/workflowengine/lib/Check/FileName.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OC\Files\Storage\Local; diff --git a/apps/workflowengine/lib/Check/FileSize.php b/apps/workflowengine/lib/Check/FileSize.php index f0998cb4dcf45..6e312ca9ad3ae 100644 --- a/apps/workflowengine/lib/Check/FileSize.php +++ b/apps/workflowengine/lib/Check/FileSize.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCA\WorkflowEngine\Entity\File; diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php index c9886fecd02f8..dfd4f282c1c49 100644 --- a/apps/workflowengine/lib/Check/FileSystemTags.php +++ b/apps/workflowengine/lib/Check/FileSystemTags.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OC\Files\Storage\Wrapper\Jail; diff --git a/apps/workflowengine/lib/Check/RequestRemoteAddress.php b/apps/workflowengine/lib/Check/RequestRemoteAddress.php index c3f50f9967aa0..afb2c57febdce 100644 --- a/apps/workflowengine/lib/Check/RequestRemoteAddress.php +++ b/apps/workflowengine/lib/Check/RequestRemoteAddress.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\IL10N; diff --git a/apps/workflowengine/lib/Check/RequestTime.php b/apps/workflowengine/lib/Check/RequestTime.php index 87b99c841d4cf..71afcf0f05701 100644 --- a/apps/workflowengine/lib/Check/RequestTime.php +++ b/apps/workflowengine/lib/Check/RequestTime.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/apps/workflowengine/lib/Check/RequestURL.php b/apps/workflowengine/lib/Check/RequestURL.php index 9f64517dff47b..00b4cd22bdcac 100644 --- a/apps/workflowengine/lib/Check/RequestURL.php +++ b/apps/workflowengine/lib/Check/RequestURL.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\IL10N; diff --git a/apps/workflowengine/lib/Check/RequestUserAgent.php b/apps/workflowengine/lib/Check/RequestUserAgent.php index f7eb9be0db71b..9b61768d37e5b 100644 --- a/apps/workflowengine/lib/Check/RequestUserAgent.php +++ b/apps/workflowengine/lib/Check/RequestUserAgent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\IL10N; diff --git a/apps/workflowengine/lib/Check/TFileCheck.php b/apps/workflowengine/lib/Check/TFileCheck.php index 336542026dafa..7f99f5c0939b7 100644 --- a/apps/workflowengine/lib/Check/TFileCheck.php +++ b/apps/workflowengine/lib/Check/TFileCheck.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCA\WorkflowEngine\Entity\File; diff --git a/apps/workflowengine/lib/Check/UserGroupMembership.php b/apps/workflowengine/lib/Check/UserGroupMembership.php index 3e65d6062f8d8..2a029dde402a4 100644 --- a/apps/workflowengine/lib/Check/UserGroupMembership.php +++ b/apps/workflowengine/lib/Check/UserGroupMembership.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Check; use OCP\IGroupManager; @@ -50,7 +51,6 @@ public function executeCheck($operator, $value) { } } - /** * @param string $operator * @param string $value diff --git a/apps/workflowengine/lib/Command/Runtime.php b/apps/workflowengine/lib/Command/Runtime.php index 261c137b08ec4..b1fc3b39af2ca 100644 --- a/apps/workflowengine/lib/Command/Runtime.php +++ b/apps/workflowengine/lib/Command/Runtime.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Command; use OC\Core\Command\Base; diff --git a/apps/workflowengine/lib/Controller/AWorkflowOCSController.php b/apps/workflowengine/lib/Controller/AWorkflowOCSController.php index 394075bde0b5d..f2d88a42115fb 100644 --- a/apps/workflowengine/lib/Controller/AWorkflowOCSController.php +++ b/apps/workflowengine/lib/Controller/AWorkflowOCSController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Controller; use Doctrine\DBAL\Exception; diff --git a/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php b/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php index 7c4dcbf0634d7..1a0e185e247d5 100644 --- a/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php +++ b/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Controller; use OCA\WorkflowEngine\Helper\ScopeContext; diff --git a/apps/workflowengine/lib/Controller/RequestTimeController.php b/apps/workflowengine/lib/Controller/RequestTimeController.php index 2437253c8b7e8..b961be01c9854 100644 --- a/apps/workflowengine/lib/Controller/RequestTimeController.php +++ b/apps/workflowengine/lib/Controller/RequestTimeController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Controller; use OCP\AppFramework\Controller; diff --git a/apps/workflowengine/lib/Controller/UserWorkflowsController.php b/apps/workflowengine/lib/Controller/UserWorkflowsController.php index a359e8decf262..dce6554867c87 100644 --- a/apps/workflowengine/lib/Controller/UserWorkflowsController.php +++ b/apps/workflowengine/lib/Controller/UserWorkflowsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Controller; use OCA\WorkflowEngine\Helper\ScopeContext; diff --git a/apps/workflowengine/lib/Entity/File.php b/apps/workflowengine/lib/Entity/File.php index 5c04bf2bbba56..2eb000c44f52b 100644 --- a/apps/workflowengine/lib/Entity/File.php +++ b/apps/workflowengine/lib/Entity/File.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Entity; use OC\Files\Config\UserMountCache; diff --git a/apps/workflowengine/lib/Helper/LogContext.php b/apps/workflowengine/lib/Helper/LogContext.php index 929e9efd664f0..346e9409ef42d 100644 --- a/apps/workflowengine/lib/Helper/LogContext.php +++ b/apps/workflowengine/lib/Helper/LogContext.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Helper; use OCP\WorkflowEngine\IEntity; diff --git a/apps/workflowengine/lib/Helper/ScopeContext.php b/apps/workflowengine/lib/Helper/ScopeContext.php index 3a82001233d25..26430843caa21 100644 --- a/apps/workflowengine/lib/Helper/ScopeContext.php +++ b/apps/workflowengine/lib/Helper/ScopeContext.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Helper; use OCP\WorkflowEngine\IManager; diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index ea5d5f5ce04c5..22e2af94cd182 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine; use NCU\WorkflowEngine\Events\RegisterRuntimeOperationsEvent; @@ -808,7 +809,6 @@ protected function addScope(int $operationId, ScopeContext $scope): void { $insertQuery->executeStatement(); } - /** * @param array{class: class-string<\OCP\WorkflowEngine\IOperation>, entity: class-string<\OCP\WorkflowEngine\IEntity>, checks: string, events: string, id: int, name: string, operation: string} $operation * @return WorkflowEngineRule diff --git a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php index 95c7dd22d3c6f..93a28af91b0fa 100644 --- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php +++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Migration; use OCP\DB\IResult; diff --git a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php index c2d8e47aa594d..1d6c0ae85687b 100644 --- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php +++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Migration; use Closure; diff --git a/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php b/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php index e0d21d6d79952..480aecf30401a 100644 --- a/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php +++ b/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Migration; use Closure; diff --git a/apps/workflowengine/lib/Service/Logger.php b/apps/workflowengine/lib/Service/Logger.php index 5e85b7ba272f0..dacd15e9c77bc 100644 --- a/apps/workflowengine/lib/Service/Logger.php +++ b/apps/workflowengine/lib/Service/Logger.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Service; use OCA\WorkflowEngine\AppInfo\Application; diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index 89c61ed4cb7dd..e4e2c0961ec65 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Service; use NCU\WorkflowEngine\RuntimeOperation; diff --git a/apps/workflowengine/lib/Settings/ASettings.php b/apps/workflowengine/lib/Settings/ASettings.php index 065559aaf929f..fca82b1bacd69 100644 --- a/apps/workflowengine/lib/Settings/ASettings.php +++ b/apps/workflowengine/lib/Settings/ASettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Settings; use OCA\WorkflowEngine\AppInfo\Application; diff --git a/apps/workflowengine/lib/Settings/Admin.php b/apps/workflowengine/lib/Settings/Admin.php index 95c1be66a9a0a..adca18002654e 100644 --- a/apps/workflowengine/lib/Settings/Admin.php +++ b/apps/workflowengine/lib/Settings/Admin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Settings; use OCP\WorkflowEngine\IManager; diff --git a/apps/workflowengine/lib/Settings/Personal.php b/apps/workflowengine/lib/Settings/Personal.php index 47442487527bf..2584749e1fa86 100644 --- a/apps/workflowengine/lib/Settings/Personal.php +++ b/apps/workflowengine/lib/Settings/Personal.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Settings; use OCP\WorkflowEngine\IManager; diff --git a/apps/workflowengine/lib/Settings/Section.php b/apps/workflowengine/lib/Settings/Section.php index 6bd26c3060975..ff2c335510626 100644 --- a/apps/workflowengine/lib/Settings/Section.php +++ b/apps/workflowengine/lib/Settings/Section.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Settings; use OCA\WorkflowEngine\AppInfo\Application; diff --git a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php index 86e7c5cca4dcf..af2c95f3b52ac 100644 --- a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php +++ b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Tests\Check; use OCA\WorkflowEngine\Check\AbstractStringCheck; diff --git a/apps/workflowengine/tests/Check/FileMimeTypeTest.php b/apps/workflowengine/tests/Check/FileMimeTypeTest.php index 60e9087d223e7..4ba2ea84f0849 100644 --- a/apps/workflowengine/tests/Check/FileMimeTypeTest.php +++ b/apps/workflowengine/tests/Check/FileMimeTypeTest.php @@ -75,7 +75,6 @@ public function testUseCachedMimetype(): void { $storage->file_put_contents('foo/bar.txt', 'asd'); $storage->getScanner()->scan(''); - $check = new FileMimeType($this->l10n, $this->request, $this->mimeDetector); $check->setFileInfo($storage, 'foo/bar.txt'); diff --git a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php index 666a97ffecfcf..2c7663c24e026 100644 --- a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php +++ b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Tests\Check; use OCA\WorkflowEngine\Check\RequestRemoteAddress; diff --git a/apps/workflowengine/tests/Check/RequestTimeTest.php b/apps/workflowengine/tests/Check/RequestTimeTest.php index ff1490d92b75e..d0292f7995930 100644 --- a/apps/workflowengine/tests/Check/RequestTimeTest.php +++ b/apps/workflowengine/tests/Check/RequestTimeTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Tests\Check; use OCA\WorkflowEngine\Check\RequestTime; diff --git a/apps/workflowengine/tests/Check/RequestUserAgentTest.php b/apps/workflowengine/tests/Check/RequestUserAgentTest.php index 2fbb632a43eda..bb299a7db75fa 100644 --- a/apps/workflowengine/tests/Check/RequestUserAgentTest.php +++ b/apps/workflowengine/tests/Check/RequestUserAgentTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Tests\Check; use OCA\WorkflowEngine\Check\AbstractStringCheck; diff --git a/apps/workflowengine/tests/ManagerTest.php b/apps/workflowengine/tests/ManagerTest.php index 74c5663adfc84..c06b702764f4a 100644 --- a/apps/workflowengine/tests/ManagerTest.php +++ b/apps/workflowengine/tests/ManagerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\WorkflowEngine\Tests; use OC\Files\Config\UserMountCache; diff --git a/build/integration/features/bootstrap/Auth.php b/build/integration/features/bootstrap/Auth.php index 13be6fa9cc323..fad36a7418293 100644 --- a/build/integration/features/bootstrap/Auth.php +++ b/build/integration/features/bootstrap/Auth.php @@ -239,7 +239,6 @@ public function aNewRememberedBrowserSessionIsStarted() { $this->aNewBrowserSessionIsStarted(true); } - /** * @Given the cookie jar is reset */ diff --git a/build/integration/features/bootstrap/CardDavContext.php b/build/integration/features/bootstrap/CardDavContext.php index e7556bbd834a8..030bf86509e03 100644 --- a/build/integration/features/bootstrap/CardDavContext.php +++ b/build/integration/features/bootstrap/CardDavContext.php @@ -35,7 +35,6 @@ public function setUpScenario() { $this->responseXml = ''; } - /** @AfterScenario */ public function afterScenario() { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/admin/MyAddressbook'; diff --git a/build/integration/features/bootstrap/ChecksumsContext.php b/build/integration/features/bootstrap/ChecksumsContext.php index 86d52f8dba4c2..6f07c32b09d6d 100644 --- a/build/integration/features/bootstrap/ChecksumsContext.php +++ b/build/integration/features/bootstrap/ChecksumsContext.php @@ -35,7 +35,6 @@ public function setUpScenario() { public function tearDownScenario() { } - /** * @param string $userName * @return string diff --git a/build/integration/features/bootstrap/CommentsContext.php b/build/integration/features/bootstrap/CommentsContext.php index 594d5617efe79..a3da58a705529 100644 --- a/build/integration/features/bootstrap/CommentsContext.php +++ b/build/integration/features/bootstrap/CommentsContext.php @@ -139,7 +139,6 @@ public function postsACommentWithContentOnTheFileNamedItShouldReturn($user, $con } } - /** * @Then As :user load all the comments of the file named :fileName it should return :statusCode * @param string $user diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php index 6725b922d16c2..4f3ce8c44f029 100644 --- a/build/integration/features/bootstrap/FederationContext.php +++ b/build/integration/features/bootstrap/FederationContext.php @@ -73,7 +73,6 @@ public function federateSharing(string $sharerUser, string $sharerServer, string $this->usingServer($previous); } - /** * @Given /^User "([^"]*)" from server "(LOCAL|REMOTE)" shares "([^"]*)" with group "([^"]*)" from server "(LOCAL|REMOTE)"$/ * diff --git a/build/integration/features/bootstrap/FilesDropContext.php b/build/integration/features/bootstrap/FilesDropContext.php index 4ccb58f08646f..3f32948bd5b3e 100644 --- a/build/integration/features/bootstrap/FilesDropContext.php +++ b/build/integration/features/bootstrap/FilesDropContext.php @@ -45,7 +45,6 @@ public function droppingFileWith($path, $content, $nickname = null) { } } - /** * @When Dropping file :path with :content as :nickName */ @@ -53,7 +52,6 @@ public function droppingFileWithAs($path, $content, $nickname) { $this->droppingFileWith($path, $content, $nickname); } - /** * @When Creating folder :folder in drop */ @@ -84,7 +82,6 @@ public function creatingFolderInDrop($folder, $nickname = null) { } } - /** * @When Creating folder :folder in drop as :nickName */ diff --git a/build/integration/features/bootstrap/FilesRemindersContext.php b/build/integration/features/bootstrap/FilesRemindersContext.php index ba2ea5784d336..0889042c9af20 100644 --- a/build/integration/features/bootstrap/FilesRemindersContext.php +++ b/build/integration/features/bootstrap/FilesRemindersContext.php @@ -9,7 +9,6 @@ require __DIR__ . '/autoload.php'; - /** * Files reminders context. */ diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php index c539e4e9b53d5..80322978741db 100644 --- a/build/integration/features/bootstrap/Provisioning.php +++ b/build/integration/features/bootstrap/Provisioning.php @@ -239,7 +239,6 @@ public function groupHasSetting($group, $settings) { } } - /** * @Then /^user "([^"]*)" has editable fields$/ * @@ -556,7 +555,6 @@ public function addingUserToGroup($user, $group) { $this->response = $client->post($fullUrl, $options); } - public function groupExists($group) { $fullUrl = $this->baseUrl . "v2.php/cloud/groups/$group"; $client = new Client(); diff --git a/build/integration/features/bootstrap/SetupContext.php b/build/integration/features/bootstrap/SetupContext.php index 35688c26492fb..f0aa09d935502 100644 --- a/build/integration/features/bootstrap/SetupContext.php +++ b/build/integration/features/bootstrap/SetupContext.php @@ -10,7 +10,6 @@ require __DIR__ . '/autoload.php'; - /** * Setup context. */ diff --git a/build/integration/features/bootstrap/ShareesContext.php b/build/integration/features/bootstrap/ShareesContext.php index a70897c2743e2..3539bf34598a9 100644 --- a/build/integration/features/bootstrap/ShareesContext.php +++ b/build/integration/features/bootstrap/ShareesContext.php @@ -12,7 +12,6 @@ require __DIR__ . '/autoload.php'; - /** * Features context. */ diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index 4d5b78dd05ee9..c0a41208d5a75 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -13,7 +13,6 @@ require __DIR__ . '/autoload.php'; - trait Sharing { use Provisioning; diff --git a/build/integration/features/bootstrap/SharingContext.php b/build/integration/features/bootstrap/SharingContext.php index 3d13c0ae3f565..de8cf286bd62b 100644 --- a/build/integration/features/bootstrap/SharingContext.php +++ b/build/integration/features/bootstrap/SharingContext.php @@ -11,7 +11,6 @@ require __DIR__ . '/autoload.php'; - /** * Features context. */ diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index fb2e441d93791..8682472847a8e 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -14,7 +14,6 @@ require __DIR__ . '/autoload.php'; - trait WebDav { use Sharing; @@ -859,7 +858,6 @@ public function userMovesNewChunkFileWithIdToMychunkedfileWithSize($user, $id, $ } } - /** * @Given user :user creates a new chunking v2 upload with id :id and destination :targetDestination */ @@ -1088,7 +1086,6 @@ public function userDeletesEverythingInFolder($user, $folder) { } } - /** * @param string $user * @param string $path diff --git a/config/config.sample.php b/config/config.sample.php index b645121a59a4f..953a47fd19850 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -27,8 +27,6 @@ */ $CONFIG = [ - - /** * Default Parameters * @@ -36,7 +34,6 @@ * for your Nextcloud server to operate. */ - /** * This is a unique identifier for your Nextcloud installation, created * automatically by the installer. This example is for documentation only, @@ -197,7 +194,6 @@ */ 'installed' => false, - /** * User Experience * @@ -904,7 +900,6 @@ */ 'trashbin_retention_obligation' => 'auto', - /** * File versions * @@ -1304,7 +1299,6 @@ */ 'profiling.path' => '/tmp', - /** * Alternate Code Locations * @@ -1844,7 +1838,6 @@ ] ], - /** * Server details for one or more Memcached servers to use for memory caching. */ @@ -1881,7 +1874,6 @@ //\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_IGBINARY, ], - /** * Location of the cache folder, defaults to ``data/$user/cache`` where * ``$user`` is the current user. When specified, the format will change to @@ -2035,7 +2027,6 @@ */ 'objectstore.multibucket.preview-distribution' => false, - /** * Sharing * diff --git a/core/AppInfo/Application.php b/core/AppInfo/Application.php index cd655ac386f98..acfb1c130d891 100644 --- a/core/AppInfo/Application.php +++ b/core/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\AppInfo; use OC\Authentication\Events\RemoteWipeFinished; diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php index 868c517a34ccd..7853d11630bd0 100644 --- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php +++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\BackgroundJobs; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/core/BackgroundJobs/CheckForUserCertificates.php b/core/BackgroundJobs/CheckForUserCertificates.php index aec853252ad66..439a591e89f20 100644 --- a/core/BackgroundJobs/CheckForUserCertificates.php +++ b/core/BackgroundJobs/CheckForUserCertificates.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\BackgroundJobs; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/core/BackgroundJobs/CleanupLoginFlowV2.php b/core/BackgroundJobs/CleanupLoginFlowV2.php index c7e7ba3dd4310..11ef1ccb75428 100644 --- a/core/BackgroundJobs/CleanupLoginFlowV2.php +++ b/core/BackgroundJobs/CleanupLoginFlowV2.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\BackgroundJobs; use OC\Core\Db\LoginFlowV2Mapper; diff --git a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php index 472f4235717ee..e3d306ac823b7 100644 --- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php +++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\BackgroundJobs; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php index b61585f80a3f2..e611a5f2149ce 100644 --- a/core/Command/App/Disable.php +++ b/core/Command/App/Disable.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\App; use OCP\App\IAppManager; diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index d7b81bc4b5b6d..aa75159d97b9f 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\App; use OC\Installer; diff --git a/core/Command/App/GetPath.php b/core/Command/App/GetPath.php index 222bbd278f49d..2d313bb82c9b9 100644 --- a/core/Command/App/GetPath.php +++ b/core/Command/App/GetPath.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\App; use OC\Core\Command\Base; diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index bc426e8d8be47..4169d0c594384 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\App; use OC\Installer; diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php index b51bc3149d457..fd70288dbea36 100644 --- a/core/Command/App/ListApps.php +++ b/core/Command/App/ListApps.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\App; use OC\Core\Command\Base; diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index c078488f45b93..bb69c3fc79228 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\App; use OC\Installer; diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php index 0061b4d6e7637..baec5458b5e51 100644 --- a/core/Command/App/Update.php +++ b/core/Command/App/Update.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\App; use OC\Installer; diff --git a/core/Command/Background/JobBase.php b/core/Command/Background/JobBase.php index 4ed59231a5cda..558ccccf29dc8 100644 --- a/core/Command/Background/JobBase.php +++ b/core/Command/Background/JobBase.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Core\Command\Background; use OC\Core\Command\Base; diff --git a/core/Command/Background/Mode.php b/core/Command/Background/Mode.php index 302f04288182c..a4d1f6c5b3bd5 100644 --- a/core/Command/Background/Mode.php +++ b/core/Command/Background/Mode.php @@ -6,10 +6,10 @@ * SPDX-FileCopyrightText: 2015 Christian Kampka * SPDX-License-Identifier: MIT */ + namespace OC\Core\Command\Background; use OCP\IAppConfig; - use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/core/Command/Base.php b/core/Command/Base.php index ff95eccf02a5c..14ec07113fd41 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; use OC\Core\Command\User\ListCommand; @@ -146,7 +147,6 @@ public function chunkIterator(\Iterator $iterator, int $count): \Iterator { } } - /** * @param mixed $item */ diff --git a/core/Command/Broadcast/Test.php b/core/Command/Broadcast/Test.php index 5419c3d8b00ee..c9c9da0205942 100644 --- a/core/Command/Broadcast/Test.php +++ b/core/Command/Broadcast/Test.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Broadcast; use OCP\EventDispatcher\ABroadcastedEvent; diff --git a/core/Command/Check.php b/core/Command/Check.php index 51499b16f8e0e..e0d83c4f36c62 100644 --- a/core/Command/Check.php +++ b/core/Command/Check.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; use OC\SystemConfig; diff --git a/core/Command/Config/App/Base.php b/core/Command/Config/App/Base.php index 5844b112c19f8..ccbb1d701d93a 100644 --- a/core/Command/Config/App/Base.php +++ b/core/Command/Config/App/Base.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Config\App; use OC\Config\ConfigManager; diff --git a/core/Command/Config/App/DeleteConfig.php b/core/Command/Config/App/DeleteConfig.php index 64b00275ad72f..fb6590a19e257 100644 --- a/core/Command/Config/App/DeleteConfig.php +++ b/core/Command/Config/App/DeleteConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\App; use Symfony\Component\Console\Input\InputArgument; diff --git a/core/Command/Config/App/GetConfig.php b/core/Command/Config/App/GetConfig.php index f118dd01f8b79..21e209d53cad2 100644 --- a/core/Command/Config/App/GetConfig.php +++ b/core/Command/Config/App/GetConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\App; use OCP\Exceptions\AppConfigUnknownKeyException; diff --git a/core/Command/Config/App/SetConfig.php b/core/Command/Config/App/SetConfig.php index 8dd910706331f..e33f1ea63bf00 100644 --- a/core/Command/Config/App/SetConfig.php +++ b/core/Command/Config/App/SetConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\App; use OC\AppConfig; diff --git a/core/Command/Config/Import.php b/core/Command/Config/Import.php index 95989e7c44f2e..8bdcc6d32b741 100644 --- a/core/Command/Config/Import.php +++ b/core/Command/Config/Import.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config; use OCP\IConfig; diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php index 3ce18f91ef9ca..9e56e47660f72 100644 --- a/core/Command/Config/ListConfigs.php +++ b/core/Command/Config/ListConfigs.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config; use OC\Config\ConfigManager; diff --git a/core/Command/Config/Preset.php b/core/Command/Config/Preset.php index 8e5d0d6b5677e..e0b7c4841da0b 100644 --- a/core/Command/Config/Preset.php +++ b/core/Command/Config/Preset.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Config; use OC\Config\PresetManager; diff --git a/core/Command/Config/System/Base.php b/core/Command/Config/System/Base.php index bf722e96427b2..7727b14682437 100644 --- a/core/Command/Config/System/Base.php +++ b/core/Command/Config/System/Base.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Config\System; use OC\SystemConfig; diff --git a/core/Command/Config/System/DeleteConfig.php b/core/Command/Config/System/DeleteConfig.php index c588b37e70592..2f214875bba1c 100644 --- a/core/Command/Config/System/DeleteConfig.php +++ b/core/Command/Config/System/DeleteConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\System; use OC\SystemConfig; diff --git a/core/Command/Config/System/GetConfig.php b/core/Command/Config/System/GetConfig.php index 3b9571b1290bc..bf89567bd57e7 100644 --- a/core/Command/Config/System/GetConfig.php +++ b/core/Command/Config/System/GetConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\System; use OC\SystemConfig; diff --git a/core/Command/Config/System/SetConfig.php b/core/Command/Config/System/SetConfig.php index 40227f3becad1..bdec496b58b75 100644 --- a/core/Command/Config/System/SetConfig.php +++ b/core/Command/Config/System/SetConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Config\System; use OC\SystemConfig; diff --git a/core/Command/Db/AddMissingColumns.php b/core/Command/Db/AddMissingColumns.php index 1380c708d4ba1..51da5bc9a93b3 100644 --- a/core/Command/Db/AddMissingColumns.php +++ b/core/Command/Db/AddMissingColumns.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db; use OC\DB\Connection; diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index 31a28ea65882e..1b9bc36d781be 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db; use OC\DB\Connection; diff --git a/core/Command/Db/AddMissingPrimaryKeys.php b/core/Command/Db/AddMissingPrimaryKeys.php index 475715a94e6ed..84da22b6bbc70 100644 --- a/core/Command/Db/AddMissingPrimaryKeys.php +++ b/core/Command/Db/AddMissingPrimaryKeys.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db; use OC\DB\Connection; diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index 04b58595a3901..5d55cdb314ea8 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db; use Doctrine\DBAL\Types\Type; diff --git a/core/Command/Db/ConvertMysqlToMB4.php b/core/Command/Db/ConvertMysqlToMB4.php index b83da3c7c064b..4cda18afc3a6a 100644 --- a/core/Command/Db/ConvertMysqlToMB4.php +++ b/core/Command/Db/ConvertMysqlToMB4.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db; use OC\DB\MySqlTools; diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index f6f2df92ae2c3..f91949fe92afb 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db; use Doctrine\DBAL\Exception; diff --git a/core/Command/Db/Migrations/ExecuteCommand.php b/core/Command/Db/Migrations/ExecuteCommand.php index 0d5655095109c..50345d64bca00 100644 --- a/core/Command/Db/Migrations/ExecuteCommand.php +++ b/core/Command/Db/Migrations/ExecuteCommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db\Migrations; use OC\DB\Connection; @@ -60,7 +61,6 @@ public function execute(InputInterface $input, OutputInterface $output): int { } } - $ms->executeStep($version); return 0; } diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php index 4c2be062634bc..14adc62fa6fed 100644 --- a/core/Command/Db/Migrations/GenerateCommand.php +++ b/core/Command/Db/Migrations/GenerateCommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db\Migrations; use OC\DB\Connection; @@ -189,7 +190,6 @@ protected function generateMigration(MigrationService $ms, $className, $schemaBo $schemaBody = "\t\t" . 'return null;'; } - $placeHolders = [ '{{namespace}}', '{{classname}}', diff --git a/core/Command/Db/Migrations/GenerateMetadataCommand.php b/core/Command/Db/Migrations/GenerateMetadataCommand.php index 438ef11268967..d37ddddfa8d4e 100644 --- a/core/Command/Db/Migrations/GenerateMetadataCommand.php +++ b/core/Command/Db/Migrations/GenerateMetadataCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db\Migrations; use OC\Migration\MetadataManager; diff --git a/core/Command/Db/Migrations/MigrateCommand.php b/core/Command/Db/Migrations/MigrateCommand.php index 0949334a90f60..2815dda31b359 100644 --- a/core/Command/Db/Migrations/MigrateCommand.php +++ b/core/Command/Db/Migrations/MigrateCommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db\Migrations; use OC\DB\Connection; diff --git a/core/Command/Db/Migrations/PreviewCommand.php b/core/Command/Db/Migrations/PreviewCommand.php index 2177f22a3df41..c723d692eb35d 100644 --- a/core/Command/Db/Migrations/PreviewCommand.php +++ b/core/Command/Db/Migrations/PreviewCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Db\Migrations; use OC\Migration\MetadataManager; diff --git a/core/Command/Db/Migrations/StatusCommand.php b/core/Command/Db/Migrations/StatusCommand.php index f7de52bab4c3c..6fc8c213cd679 100644 --- a/core/Command/Db/Migrations/StatusCommand.php +++ b/core/Command/Db/Migrations/StatusCommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Db\Migrations; use OC\DB\Connection; diff --git a/core/Command/Encryption/ChangeKeyStorageRoot.php b/core/Command/Encryption/ChangeKeyStorageRoot.php index ee914f73f0b78..b75b728b2f330 100644 --- a/core/Command/Encryption/ChangeKeyStorageRoot.php +++ b/core/Command/Encryption/ChangeKeyStorageRoot.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OC\Encryption\Keys\Storage; @@ -116,7 +117,6 @@ protected function prepareNewRoot($newRoot) { } } - /** * move system key folder * @@ -132,7 +132,6 @@ protected function moveSystemKeys($oldRoot, $newRoot) { } } - /** * setup file system for the given user * @@ -143,7 +142,6 @@ protected function setupUserFS($uid) { \OC_Util::setupFS($uid); } - /** * iterate over each user and move the keys to the new storage * @@ -155,7 +153,6 @@ protected function moveUserKeys($oldRoot, $newRoot, OutputInterface $output) { $progress = new ProgressBar($output); $progress->start(); - foreach ($this->userManager->getBackends() as $backend) { $limit = 500; $offset = 0; diff --git a/core/Command/Encryption/Disable.php b/core/Command/Encryption/Disable.php index fe280daa111b4..a8adfd6222a26 100644 --- a/core/Command/Encryption/Disable.php +++ b/core/Command/Encryption/Disable.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OCP\IConfig; diff --git a/core/Command/Encryption/Enable.php b/core/Command/Encryption/Enable.php index 02c610250011c..659538036eedf 100644 --- a/core/Command/Encryption/Enable.php +++ b/core/Command/Encryption/Enable.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OCP\Encryption\IManager; diff --git a/core/Command/Encryption/EncryptAll.php b/core/Command/Encryption/EncryptAll.php index dfdf9c98a2e2e..0ffc6fdbda76e 100644 --- a/core/Command/Encryption/EncryptAll.php +++ b/core/Command/Encryption/EncryptAll.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OCP\App\IAppManager; diff --git a/core/Command/Encryption/ListModules.php b/core/Command/Encryption/ListModules.php index 3c5af72c701f5..1d0ea51e37da8 100644 --- a/core/Command/Encryption/ListModules.php +++ b/core/Command/Encryption/ListModules.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OC\Core\Command\Base; diff --git a/core/Command/Encryption/MigrateKeyStorage.php b/core/Command/Encryption/MigrateKeyStorage.php index 0b61572fdc025..2867f7343290e 100644 --- a/core/Command/Encryption/MigrateKeyStorage.php +++ b/core/Command/Encryption/MigrateKeyStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Encryption; use OC\Encryption\Keys\Storage; @@ -160,7 +161,6 @@ private function traverseFileKeys(string $folder, OutputInterface $output): void } } - /** * setup file system for the given user */ @@ -169,7 +169,6 @@ protected function setupUserFS(string $uid): void { \OC_Util::setupFS($uid); } - /** * iterate over each user and move the keys to the new storage */ diff --git a/core/Command/Encryption/SetDefaultModule.php b/core/Command/Encryption/SetDefaultModule.php index 5324cd8cdee68..65d54850c8e1c 100644 --- a/core/Command/Encryption/SetDefaultModule.php +++ b/core/Command/Encryption/SetDefaultModule.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OCP\Encryption\IManager; diff --git a/core/Command/Encryption/ShowKeyStorageRoot.php b/core/Command/Encryption/ShowKeyStorageRoot.php index e717983bf25d9..21811a4793556 100644 --- a/core/Command/Encryption/ShowKeyStorageRoot.php +++ b/core/Command/Encryption/ShowKeyStorageRoot.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OC\Encryption\Util; diff --git a/core/Command/Encryption/Status.php b/core/Command/Encryption/Status.php index f8602236ffd24..946eb332e48fd 100644 --- a/core/Command/Encryption/Status.php +++ b/core/Command/Encryption/Status.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Encryption; use OC\Core\Command\Base; diff --git a/core/Command/Group/Add.php b/core/Command/Group/Add.php index a6d40178be6bf..bad6455c79163 100644 --- a/core/Command/Group/Add.php +++ b/core/Command/Group/Add.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Group/AddUser.php b/core/Command/Group/AddUser.php index 0fbd98ebce628..6179546270842 100644 --- a/core/Command/Group/AddUser.php +++ b/core/Command/Group/AddUser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Group/Delete.php b/core/Command/Group/Delete.php index 4c548e83b185d..ec5bdda2d9867 100644 --- a/core/Command/Group/Delete.php +++ b/core/Command/Group/Delete.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Group/Info.php b/core/Command/Group/Info.php index 71492507086d9..a2ef4cc02eadc 100644 --- a/core/Command/Group/Info.php +++ b/core/Command/Group/Info.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Group/ListCommand.php b/core/Command/Group/ListCommand.php index c80dc52f4ac45..c56c440aeda55 100644 --- a/core/Command/Group/ListCommand.php +++ b/core/Command/Group/ListCommand.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Group/RemoveUser.php b/core/Command/Group/RemoveUser.php index 04be18e4c7730..4b7dc164f8798 100644 --- a/core/Command/Group/RemoveUser.php +++ b/core/Command/Group/RemoveUser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Group; use OC\Core\Command\Base; diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php index 4f5a04e521d34..8c08b73d102c0 100644 --- a/core/Command/Info/File.php +++ b/core/Command/Info/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Info; use OC\Files\ObjectStore\ObjectStoreStorage; diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php index 750da22286cee..3104eef99e32f 100644 --- a/core/Command/Integrity/CheckCore.php +++ b/core/Command/Integrity/CheckCore.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Integrity; use OC\Core\Command\Base; diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php index a9c1cbb7be138..e4d61e8cc5b08 100644 --- a/core/Command/Integrity/SignApp.php +++ b/core/Command/Integrity/SignApp.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Integrity; use OC\IntegrityCheck\Checker; diff --git a/core/Command/Integrity/SignCore.php b/core/Command/Integrity/SignCore.php index bd46e0e4f51bb..73b7e76b4ba18 100644 --- a/core/Command/Integrity/SignCore.php +++ b/core/Command/Integrity/SignCore.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Integrity; use OC\IntegrityCheck\Checker; diff --git a/core/Command/InterruptedException.php b/core/Command/InterruptedException.php index c71942e0f6eef..84b957c1e31a9 100644 --- a/core/Command/InterruptedException.php +++ b/core/Command/InterruptedException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; /** diff --git a/core/Command/L10n/CreateJs.php b/core/Command/L10n/CreateJs.php index d4eee220e5fba..e02cdfed2339e 100644 --- a/core/Command/L10n/CreateJs.php +++ b/core/Command/L10n/CreateJs.php @@ -7,10 +7,10 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\L10n; use DirectoryIterator; - use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface; diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php index aa87ea59305af..cd46740ed84f6 100644 --- a/core/Command/Log/File.php +++ b/core/Command/Log/File.php @@ -5,11 +5,11 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Log; use OCP\IConfig; use OCP\Util; - use Stecman\Component\Symfony\Console\BashCompletion\Completion; use Stecman\Component\Symfony\Console\BashCompletion\Completion\ShellPathCompletion; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php index c04ddf837a0b8..db1188debb965 100644 --- a/core/Command/Log/Manage.php +++ b/core/Command/Log/Manage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Log; use OCP\IConfig; diff --git a/core/Command/Maintenance/DataFingerprint.php b/core/Command/Maintenance/DataFingerprint.php index 99be354f09dd2..fa74d30ca8a7c 100644 --- a/core/Command/Maintenance/DataFingerprint.php +++ b/core/Command/Maintenance/DataFingerprint.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index c91f500aa7256..8dc551b97b102 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index f8f19a6199318..32efcdc26d0d1 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Maintenance\Mimetype; class GenerateMimetypeFileBuilder { diff --git a/core/Command/Maintenance/Mimetype/UpdateDB.php b/core/Command/Maintenance/Mimetype/UpdateDB.php index 3636e7d96ecfd..cb393f772146f 100644 --- a/core/Command/Maintenance/Mimetype/UpdateDB.php +++ b/core/Command/Maintenance/Mimetype/UpdateDB.php @@ -5,13 +5,13 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance\Mimetype; use OCP\Files\IMimeTypeDetector; use OCP\Files\IMimeTypeLoader; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; diff --git a/core/Command/Maintenance/Mimetype/UpdateJS.php b/core/Command/Maintenance/Mimetype/UpdateJS.php index a9e7e79db199a..dc8e5f85992eb 100644 --- a/core/Command/Maintenance/Mimetype/UpdateJS.php +++ b/core/Command/Maintenance/Mimetype/UpdateJS.php @@ -5,12 +5,12 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance\Mimetype; use OCP\Files\IMimeTypeDetector; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Output\OutputInterface; class UpdateJS extends Command { diff --git a/core/Command/Maintenance/Mode.php b/core/Command/Maintenance/Mode.php index 7f8cfe4e012eb..d73f911984e91 100644 --- a/core/Command/Maintenance/Mode.php +++ b/core/Command/Maintenance/Mode.php @@ -7,10 +7,10 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance; use OCP\IConfig; - use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index a79d296e520fd..a3fb254572336 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance; use Exception; diff --git a/core/Command/Maintenance/UpdateHtaccess.php b/core/Command/Maintenance/UpdateHtaccess.php index 881b5187ba3fb..8ff10e800cdcc 100644 --- a/core/Command/Maintenance/UpdateHtaccess.php +++ b/core/Command/Maintenance/UpdateHtaccess.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Maintenance; use OC\Setup; diff --git a/core/Command/Maintenance/UpdateTheme.php b/core/Command/Maintenance/UpdateTheme.php index d077032935b1a..d41fe1ca9bccf 100644 --- a/core/Command/Maintenance/UpdateTheme.php +++ b/core/Command/Maintenance/UpdateTheme.php @@ -6,13 +6,13 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Maintenance; use OC\Core\Command\Maintenance\Mimetype\UpdateJS; use OCP\Files\IMimeTypeDetector; use OCP\ICacheFactory; use Symfony\Component\Console\Input\InputInterface; - use Symfony\Component\Console\Output\OutputInterface; class UpdateTheme extends UpdateJS { diff --git a/core/Command/OCM/ActivateKey.php b/core/Command/OCM/ActivateKey.php index 582763880a7e4..20d8f7305edf9 100644 --- a/core/Command/OCM/ActivateKey.php +++ b/core/Command/OCM/ActivateKey.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\OCM; use OC\Core\Command\Base; diff --git a/core/Command/OCM/ListKeys.php b/core/Command/OCM/ListKeys.php index b4eb4715fe948..bd5a981cdef21 100644 --- a/core/Command/OCM/ListKeys.php +++ b/core/Command/OCM/ListKeys.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\OCM; use OC\Core\Command\Base; diff --git a/core/Command/OCM/RetireKey.php b/core/Command/OCM/RetireKey.php index 6c26014e5a115..e35da99ed3717 100644 --- a/core/Command/OCM/RetireKey.php +++ b/core/Command/OCM/RetireKey.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\OCM; use OC\Core\Command\Base; diff --git a/core/Command/OCM/StageKey.php b/core/Command/OCM/StageKey.php index 69f2167ba432a..13e5b194e8e36 100644 --- a/core/Command/OCM/StageKey.php +++ b/core/Command/OCM/StageKey.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\OCM; use OC\Core\Command\Base; diff --git a/core/Command/Preview/ResetRenderedTexts.php b/core/Command/Preview/ResetRenderedTexts.php index 978128a609fd6..77984582286b4 100644 --- a/core/Command/Preview/ResetRenderedTexts.php +++ b/core/Command/Preview/ResetRenderedTexts.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Preview; use OC\Preview\Db\Preview; diff --git a/core/Command/Security/BruteforceAttempts.php b/core/Command/Security/BruteforceAttempts.php index 10bd5809d28cb..32f68773ac687 100644 --- a/core/Command/Security/BruteforceAttempts.php +++ b/core/Command/Security/BruteforceAttempts.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Security; use OC\Core\Command\Base; diff --git a/core/Command/Security/BruteforceResetAttempts.php b/core/Command/Security/BruteforceResetAttempts.php index f882f1d026314..e756499cd5e89 100644 --- a/core/Command/Security/BruteforceResetAttempts.php +++ b/core/Command/Security/BruteforceResetAttempts.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\Security; use OC\Core\Command\Base; diff --git a/core/Command/Security/ImportCertificate.php b/core/Command/Security/ImportCertificate.php index b2fdabd3237b8..3a7fe6e888d36 100644 --- a/core/Command/Security/ImportCertificate.php +++ b/core/Command/Security/ImportCertificate.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Security; use OC\Core\Command\Base; diff --git a/core/Command/Security/ListCertificates.php b/core/Command/Security/ListCertificates.php index 0692d8204fb72..455d00523bee6 100644 --- a/core/Command/Security/ListCertificates.php +++ b/core/Command/Security/ListCertificates.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Security; use OC\Core\Command\Base; diff --git a/core/Command/Security/RemoveCertificate.php b/core/Command/Security/RemoveCertificate.php index 4c37eb0670b2d..4db386c879ffb 100644 --- a/core/Command/Security/RemoveCertificate.php +++ b/core/Command/Security/RemoveCertificate.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\Security; use OC\Core\Command\Base; diff --git a/core/Command/SnowflakeDecodeId.php b/core/Command/SnowflakeDecodeId.php index 4c75488ab1a74..eb8ea640ec85e 100644 --- a/core/Command/SnowflakeDecodeId.php +++ b/core/Command/SnowflakeDecodeId.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; use OCP\Snowflake\ISnowflakeDecoder; diff --git a/core/Command/Status.php b/core/Command/Status.php index 77aaa5374195b..a98c4970e44de 100644 --- a/core/Command/Status.php +++ b/core/Command/Status.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; use OCP\Defaults; diff --git a/core/Command/SystemTag/Add.php b/core/Command/SystemTag/Add.php index 7e2006d6affa1..c19dd527ca639 100644 --- a/core/Command/SystemTag/Add.php +++ b/core/Command/SystemTag/Add.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\SystemTag; use OC\Core\Command\Base; diff --git a/core/Command/SystemTag/Delete.php b/core/Command/SystemTag/Delete.php index 93a2d015bfc58..69037bc8e4f87 100644 --- a/core/Command/SystemTag/Delete.php +++ b/core/Command/SystemTag/Delete.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\SystemTag; use OC\Core\Command\Base; diff --git a/core/Command/SystemTag/Edit.php b/core/Command/SystemTag/Edit.php index 6e6295c486d0a..e07f707fdcc2b 100644 --- a/core/Command/SystemTag/Edit.php +++ b/core/Command/SystemTag/Edit.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\SystemTag; use OC\Core\Command\Base; diff --git a/core/Command/SystemTag/ListCommand.php b/core/Command/SystemTag/ListCommand.php index c96e6af405fc2..501338b4849cc 100644 --- a/core/Command/SystemTag/ListCommand.php +++ b/core/Command/SystemTag/ListCommand.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\SystemTag; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/Cleanup.php b/core/Command/TaskProcessing/Cleanup.php index 63a5cee393e53..1f8856c87921f 100644 --- a/core/Command/TaskProcessing/Cleanup.php +++ b/core/Command/TaskProcessing/Cleanup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/EnabledCommand.php b/core/Command/TaskProcessing/EnabledCommand.php index c013639810453..198699d58d80b 100644 --- a/core/Command/TaskProcessing/EnabledCommand.php +++ b/core/Command/TaskProcessing/EnabledCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/GetCommand.php b/core/Command/TaskProcessing/GetCommand.php index f7cfe3c8750b0..47e8a176d9e81 100644 --- a/core/Command/TaskProcessing/GetCommand.php +++ b/core/Command/TaskProcessing/GetCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/ListCommand.php b/core/Command/TaskProcessing/ListCommand.php index 0fb208ad72ac2..e6b3a5c75de58 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/Statistics.php b/core/Command/TaskProcessing/Statistics.php index 4a8622efefb01..fe11211cf6914 100644 --- a/core/Command/TaskProcessing/Statistics.php +++ b/core/Command/TaskProcessing/Statistics.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TaskProcessing/WorkerCommand.php b/core/Command/TaskProcessing/WorkerCommand.php index 0a2ed99e4258e..1f6d473f4e849 100644 --- a/core/Command/TaskProcessing/WorkerCommand.php +++ b/core/Command/TaskProcessing/WorkerCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TaskProcessing; use OC\Core\Command\Base; diff --git a/core/Command/TwoFactorAuth/Base.php b/core/Command/TwoFactorAuth/Base.php index 8d417eb440011..275c095d78d30 100644 --- a/core/Command/TwoFactorAuth/Base.php +++ b/core/Command/TwoFactorAuth/Base.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TwoFactorAuth; use OCP\IUser; diff --git a/core/Command/TwoFactorAuth/Cleanup.php b/core/Command/TwoFactorAuth/Cleanup.php index 02fa86251d68b..43b80557ffcfa 100644 --- a/core/Command/TwoFactorAuth/Cleanup.php +++ b/core/Command/TwoFactorAuth/Cleanup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TwoFactorAuth; use OCP\Authentication\TwoFactorAuth\IRegistry; diff --git a/core/Command/TwoFactorAuth/Disable.php b/core/Command/TwoFactorAuth/Disable.php index 201dd9c19916d..aead150da87b8 100644 --- a/core/Command/TwoFactorAuth/Disable.php +++ b/core/Command/TwoFactorAuth/Disable.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\ProviderManager; diff --git a/core/Command/TwoFactorAuth/Enable.php b/core/Command/TwoFactorAuth/Enable.php index 7158a4695fd45..8cd90c6e62875 100644 --- a/core/Command/TwoFactorAuth/Enable.php +++ b/core/Command/TwoFactorAuth/Enable.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\ProviderManager; diff --git a/core/Command/TwoFactorAuth/Enforce.php b/core/Command/TwoFactorAuth/Enforce.php index dfa6ce362e108..0f27e55eb6225 100644 --- a/core/Command/TwoFactorAuth/Enforce.php +++ b/core/Command/TwoFactorAuth/Enforce.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\EnforcementState; diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index dc718cb0c8b70..07cd42f370203 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\TwoFactorAuth; use OCP\Authentication\TwoFactorAuth\IRegistry; diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 20c2ec0d5effd..f60bfc31a6847 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command; use OC\Console\TimestampFormatter; @@ -134,7 +135,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $dispatcher->addListener(RepairWarningEvent::class, $repairListener); $dispatcher->addListener(RepairErrorEvent::class, $repairListener); - $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($output): void { $output->writeln('Turned on maintenance mode'); }); diff --git a/core/Command/User/Add.php b/core/Command/User/Add.php index 35a4dca5cc10e..abc9c0bf4694a 100644 --- a/core/Command/User/Add.php +++ b/core/Command/User/Add.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Files\Filesystem; diff --git a/core/Command/User/AuthTokens/Add.php b/core/Command/User/AuthTokens/Add.php index bbfd7f38ceaf2..db2842223cdf4 100644 --- a/core/Command/User/AuthTokens/Add.php +++ b/core/Command/User/AuthTokens/Add.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\User\AuthTokens; use OC\Authentication\Events\AppPasswordCreatedEvent; diff --git a/core/Command/User/AuthTokens/Delete.php b/core/Command/User/AuthTokens/Delete.php index 803bcf6a0b9b9..041c9584ec5dd 100644 --- a/core/Command/User/AuthTokens/Delete.php +++ b/core/Command/User/AuthTokens/Delete.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\User\AuthTokens; use DateTimeImmutable; diff --git a/core/Command/User/AuthTokens/ListCommand.php b/core/Command/User/AuthTokens/ListCommand.php index 7b26090735fc5..73a07b34f51ec 100644 --- a/core/Command/User/AuthTokens/ListCommand.php +++ b/core/Command/User/AuthTokens/ListCommand.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\User\AuthTokens; use OC\Authentication\Token\IProvider; diff --git a/core/Command/User/ClearGeneratedAvatarCacheCommand.php b/core/Command/User/ClearGeneratedAvatarCacheCommand.php index ff9073dcf4bc6..5d8634bdc0e63 100644 --- a/core/Command/User/ClearGeneratedAvatarCacheCommand.php +++ b/core/Command/User/ClearGeneratedAvatarCacheCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\User; use OC\Avatar\AvatarManager; diff --git a/core/Command/User/Delete.php b/core/Command/User/Delete.php index c8cc5beb98a8d..625f58526f99c 100644 --- a/core/Command/User/Delete.php +++ b/core/Command/User/Delete.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/Disable.php b/core/Command/User/Disable.php index c13cbb4a4e5c9..23a65e266ba16 100644 --- a/core/Command/User/Disable.php +++ b/core/Command/User/Disable.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/Enable.php b/core/Command/User/Enable.php index be6888ac65bb6..4f9f08359dd11 100644 --- a/core/Command/User/Enable.php +++ b/core/Command/User/Enable.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/Info.php b/core/Command/User/Info.php index f9c7600800f41..ce9bad0a2d38f 100644 --- a/core/Command/User/Info.php +++ b/core/Command/User/Info.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/LastSeen.php b/core/Command/User/LastSeen.php index fdbbe13915ea9..15735c46270ad 100644 --- a/core/Command/User/LastSeen.php +++ b/core/Command/User/LastSeen.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/ListCommand.php b/core/Command/User/ListCommand.php index bbd835e0f3c30..6dfcef6eb5f83 100644 --- a/core/Command/User/ListCommand.php +++ b/core/Command/User/ListCommand.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/Profile.php b/core/Command/User/Profile.php index e4ec87c5f0299..1b3b6ac7797d4 100644 --- a/core/Command/User/Profile.php +++ b/core/Command/User/Profile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php index c8d6b5bcb5063..63ab3946f4d2e 100644 --- a/core/Command/User/Report.php +++ b/core/Command/User/Report.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Files\View; diff --git a/core/Command/User/ResetPassword.php b/core/Command/User/ResetPassword.php index 59b4b40c0f9b9..813c38fe1d539 100644 --- a/core/Command/User/ResetPassword.php +++ b/core/Command/User/ResetPassword.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; @@ -116,7 +117,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 1; } - try { $success = $user->setPassword($password); } catch (\Exception $e) { diff --git a/core/Command/User/Setting.php b/core/Command/User/Setting.php index 17b11fa083817..35df2db5add80 100644 --- a/core/Command/User/Setting.php +++ b/core/Command/User/Setting.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Command\User; use OC\Core\Command\Base; diff --git a/core/Command/User/SyncAccountDataCommand.php b/core/Command/User/SyncAccountDataCommand.php index 1cbbca7fc202d..aa975d2e8f933 100644 --- a/core/Command/User/SyncAccountDataCommand.php +++ b/core/Command/User/SyncAccountDataCommand.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\User; use OC\Core\Command\Base; diff --git a/core/Controller/AppPasswordController.php b/core/Controller/AppPasswordController.php index 9f2707e75c287..4b1758a7f4db4 100644 --- a/core/Controller/AppPasswordController.php +++ b/core/Controller/AppPasswordController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Authentication\Events\AppPasswordCreatedEvent; diff --git a/core/Controller/AutoCompleteController.php b/core/Controller/AutoCompleteController.php index 692fe1b7297cb..e73ea1a137760 100644 --- a/core/Controller/AutoCompleteController.php +++ b/core/Controller/AutoCompleteController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Core\ResponseDefinitions; diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index 3d6f79151e80c..c232dd140fc37 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use OC\AppFramework\Utility\TimeFactory; @@ -100,7 +101,6 @@ public function getAvatarDark(string $userId, int $size, bool $guestFallback = f return $response; } - /** * Get the avatar * diff --git a/core/Controller/CSRFTokenController.php b/core/Controller/CSRFTokenController.php index 85b187f42e6f9..c44b5f99ea95e 100644 --- a/core/Controller/CSRFTokenController.php +++ b/core/Controller/CSRFTokenController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Security\CSRF\CsrfTokenManager; diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 836bba6d8b734..060091621bc0a 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Authentication\Events\AppPasswordCreatedEvent; @@ -161,7 +162,6 @@ public function showAuthPickerPage(string $clientIdentifier = '', string $user = 'appTokenUrl' => $this->urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.apptokenRedirect'), ]); - Util::addScript('core', 'login_flow'); $response = new StandaloneTemplateResponse( $this->appName, diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php index 85b82b388f412..f53f247a03c4b 100644 --- a/core/Controller/ClientFlowLoginV2Controller.php +++ b/core/Controller/ClientFlowLoginV2Controller.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Core\Db\LoginFlowV2; @@ -134,7 +135,6 @@ public function showAuthPickerPage(string $user = '', int $direct = 0): Standalo 'appTokenUrl' => $this->urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.apptokenRedirect'), ]); - Util::addScript('core', 'login_flow'); return new StandaloneTemplateResponse( $this->appName, @@ -179,7 +179,6 @@ public function grantPage(?string $stateToken, int $direct = 0): StandaloneTempl 'direct' => $direct === 1, ]); - Util::addScript('core', 'login_flow'); return new StandaloneTemplateResponse( $this->appName, diff --git a/core/Controller/CssController.php b/core/Controller/CssController.php index b6b0777fe40ae..0ac608a3acd4d 100644 --- a/core/Controller/CssController.php +++ b/core/Controller/CssController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Files\AppData\Factory; diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php index 711158e0708bb..c78350cdf00d8 100644 --- a/core/Controller/GuestAvatarController.php +++ b/core/Controller/GuestAvatarController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OCP\AppFramework\Controller; diff --git a/core/Controller/HoverCardController.php b/core/Controller/HoverCardController.php index 236a81760ac0b..9ef33df64ea04 100644 --- a/core/Controller/HoverCardController.php +++ b/core/Controller/HoverCardController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Contacts\ContactsMenu\Manager; diff --git a/core/Controller/JsController.php b/core/Controller/JsController.php index f214d3043c214..3cbbe3fd3b3e6 100644 --- a/core/Controller/JsController.php +++ b/core/Controller/JsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Files\AppData\Factory; diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 1a10513078549..b7ffb00d18262 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use OC\AppFramework\Http\Request; diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index d956f3427f279..fba0413ddc45e 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use Exception; diff --git a/core/Controller/NavigationController.php b/core/Controller/NavigationController.php index 017061ef979bc..3b667137e7f15 100644 --- a/core/Controller/NavigationController.php +++ b/core/Controller/NavigationController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Core\ResponseDefinitions; diff --git a/core/Controller/OCJSController.php b/core/Controller/OCJSController.php index db42a3608b5c4..af8a9359ba44c 100644 --- a/core/Controller/OCJSController.php +++ b/core/Controller/OCJSController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php index e1e220a6439dc..144012ac35f86 100644 --- a/core/Controller/OCSController.php +++ b/core/Controller/OCSController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\CapabilitiesManager; diff --git a/core/Controller/OpenMetricsController.php b/core/Controller/OpenMetricsController.php index ab7383f93a433..d1889316c0cbd 100644 --- a/core/Controller/OpenMetricsController.php +++ b/core/Controller/OpenMetricsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\OpenMetrics\ExporterManager; diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index aac49c06d57c8..310d7f85f74a1 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OCP\AppFramework\Controller; diff --git a/core/Controller/RecommendedAppsController.php b/core/Controller/RecommendedAppsController.php index ba35bc8705e4a..3c7bd1c248fb5 100644 --- a/core/Controller/RecommendedAppsController.php +++ b/core/Controller/RecommendedAppsController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OCP\AppFramework\Controller; diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index 2f695aa57fcae..aa0ce4e1118eb 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use OC\IntegrityCheck\Checker; diff --git a/core/Controller/TaskProcessingApiController.php b/core/Controller/TaskProcessingApiController.php index fd22d485af380..ac81af45f0bc3 100644 --- a/core/Controller/TaskProcessingApiController.php +++ b/core/Controller/TaskProcessingApiController.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Core\Controller; use OC\Core\ResponseDefinitions; @@ -371,7 +370,6 @@ public function deleteTaskExAppEndpoint(int $id): DataResponse { return $this->handleDeleteTaskInternal($id); } - /** * Returns tasks for the current user filtered by the appId and optional customId * diff --git a/core/Controller/TextProcessingApiController.php b/core/Controller/TextProcessingApiController.php index 46d067557e381..e841b9c650628 100644 --- a/core/Controller/TextProcessingApiController.php +++ b/core/Controller/TextProcessingApiController.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Core\Controller; use InvalidArgumentException; @@ -188,7 +187,6 @@ public function deleteTask(int $id): DataResponse { } } - /** * This endpoint returns a list of tasks of a user that are related * with a specific appId and optionally with an identifier diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php index 1019114bee997..fbfc343bc6acf 100644 --- a/core/Controller/TextToImageApiController.php +++ b/core/Controller/TextToImageApiController.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Core\Controller; use OC\Core\ResponseDefinitions; @@ -213,7 +212,6 @@ public function deleteTask(int $id): DataResponse { } } - /** * This endpoint returns a list of tasks of a user that are related * with a specific appId and optionally with an identifier diff --git a/core/Controller/TranslationApiController.php b/core/Controller/TranslationApiController.php index 671c15711d855..e572753cc97f6 100644 --- a/core/Controller/TranslationApiController.php +++ b/core/Controller/TranslationApiController.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Core\Controller; use InvalidArgumentException; @@ -76,7 +75,6 @@ public function translate(string $text, ?string $fromLanguage, string $toLanguag return new DataResponse([ 'text' => $translation, 'from' => $fromLanguage, - ]); } catch (PreConditionNotMetException) { return new DataResponse(['message' => $this->l10n->t('No translation provider available')], Http::STATUS_PRECONDITION_FAILED); diff --git a/core/Controller/TwoFactorChallengeController.php b/core/Controller/TwoFactorChallengeController.php index b683c681c0dc8..0ea46ec167c65 100644 --- a/core/Controller/TwoFactorChallengeController.php +++ b/core/Controller/TwoFactorChallengeController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use OC\AppFramework\Http\Attributes\TwoFactorSetUpDoneRequired; diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 6888a9a26393d..d418d58b25ef0 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use InvalidArgumentException; diff --git a/core/Controller/UserController.php b/core/Controller/UserController.php index b6e464d9a95c9..7c6227014f283 100644 --- a/core/Controller/UserController.php +++ b/core/Controller/UserController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Controller; use OCP\AppFramework\Controller; diff --git a/core/Controller/WalledGardenController.php b/core/Controller/WalledGardenController.php index d0bc06655347a..d86e7843d9f0e 100644 --- a/core/Controller/WalledGardenController.php +++ b/core/Controller/WalledGardenController.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OCP\AppFramework\Controller; diff --git a/core/Controller/WebAuthnController.php b/core/Controller/WebAuthnController.php index d7255831e88de..2518ab274aac5 100644 --- a/core/Controller/WebAuthnController.php +++ b/core/Controller/WebAuthnController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Authentication\Login\LoginData; diff --git a/core/Controller/WellKnownController.php b/core/Controller/WellKnownController.php index 9ce83686355c3..10740b96d0bec 100644 --- a/core/Controller/WellKnownController.php +++ b/core/Controller/WellKnownController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Http\WellKnown\RequestManager; diff --git a/core/Controller/WipeController.php b/core/Controller/WipeController.php index 1b57be71aa09a..f495ba5a692a4 100644 --- a/core/Controller/WipeController.php +++ b/core/Controller/WipeController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Controller; use OC\Authentication\Token\RemoteWipe; @@ -58,7 +59,6 @@ public function checkWipe(string $token): JSONResponse { } } - /** * Finish the wipe * diff --git a/core/Data/LoginFlowV2Credentials.php b/core/Data/LoginFlowV2Credentials.php index 211d6a2369601..dafb71ef41269 100644 --- a/core/Data/LoginFlowV2Credentials.php +++ b/core/Data/LoginFlowV2Credentials.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Data; class LoginFlowV2Credentials implements \JsonSerializable { diff --git a/core/Data/LoginFlowV2Tokens.php b/core/Data/LoginFlowV2Tokens.php index 278c18f3b5644..4f8841766ab12 100644 --- a/core/Data/LoginFlowV2Tokens.php +++ b/core/Data/LoginFlowV2Tokens.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Data; class LoginFlowV2Tokens { diff --git a/core/Db/LoginFlowV2.php b/core/Db/LoginFlowV2.php index 1671e5990e04f..1a56ae3237d00 100644 --- a/core/Db/LoginFlowV2.php +++ b/core/Db/LoginFlowV2.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Db; use OCP\AppFramework\Db\Entity; diff --git a/core/Db/LoginFlowV2Mapper.php b/core/Db/LoginFlowV2Mapper.php index 32664917cb5f0..65a00e16def2f 100644 --- a/core/Db/LoginFlowV2Mapper.php +++ b/core/Db/LoginFlowV2Mapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Db; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/core/Events/BeforePasswordResetEvent.php b/core/Events/BeforePasswordResetEvent.php index 428ebfeefadc4..943df24473682 100644 --- a/core/Events/BeforePasswordResetEvent.php +++ b/core/Events/BeforePasswordResetEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Events; use OCP\EventDispatcher\Event; diff --git a/core/Events/PasswordResetEvent.php b/core/Events/PasswordResetEvent.php index 868899513212f..1e6205137751a 100644 --- a/core/Events/PasswordResetEvent.php +++ b/core/Events/PasswordResetEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Events; use OCP\EventDispatcher\Event; diff --git a/core/Exception/LoginFlowV2ClientForbiddenException.php b/core/Exception/LoginFlowV2ClientForbiddenException.php index e6ac6d9618ffe..001dc295b651d 100644 --- a/core/Exception/LoginFlowV2ClientForbiddenException.php +++ b/core/Exception/LoginFlowV2ClientForbiddenException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Exception; class LoginFlowV2ClientForbiddenException extends \Exception { diff --git a/core/Exception/LoginFlowV2NotFoundException.php b/core/Exception/LoginFlowV2NotFoundException.php index b637d50370b10..330a10bc5b6a2 100644 --- a/core/Exception/LoginFlowV2NotFoundException.php +++ b/core/Exception/LoginFlowV2NotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Exception; class LoginFlowV2NotFoundException extends \Exception { diff --git a/core/Exception/ResetPasswordException.php b/core/Exception/ResetPasswordException.php index 0572c1d052e3d..4f794b2bc6b9a 100644 --- a/core/Exception/ResetPasswordException.php +++ b/core/Exception/ResetPasswordException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Exception; class ResetPasswordException extends \Exception { diff --git a/core/Listener/AddMissingIndicesListener.php b/core/Listener/AddMissingIndicesListener.php index f91bad7998bbb..07d0c42678c66 100644 --- a/core/Listener/AddMissingIndicesListener.php +++ b/core/Listener/AddMissingIndicesListener.php @@ -157,7 +157,6 @@ public function handle(Event $event): void { ['propertyname', 'propertypath', 'userid'] ); - $event->addMissingIndex( 'jobs', 'job_lastcheck_reserved', diff --git a/core/Listener/BeforeTemplateRenderedListener.php b/core/Listener/BeforeTemplateRenderedListener.php index 949d58eea5549..9e55ce068e0f6 100644 --- a/core/Listener/BeforeTemplateRenderedListener.php +++ b/core/Listener/BeforeTemplateRenderedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Listener; use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent; diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php index e2ea5296a04cc..ec4fdb5219f4a 100644 --- a/core/Middleware/TwoFactorMiddleware.php +++ b/core/Middleware/TwoFactorMiddleware.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Middleware; use Exception; diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index effc0e7fc25ef..17b500abe056d 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 2de0c2b9ba015..79f4534518461 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; @@ -36,7 +37,6 @@ public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array } } - /** * @param IOutput $output * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/core/Migrations/Version13000Date20170814074715.php b/core/Migrations/Version13000Date20170814074715.php index beb492ac5573e..75dc9e3bff4b0 100644 --- a/core/Migrations/Version13000Date20170814074715.php +++ b/core/Migrations/Version13000Date20170814074715.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; @@ -33,7 +34,6 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - if (!$schema->hasTable('accounts')) { $table = $schema->createTable('accounts'); $table->addColumn('uid', 'string', [ diff --git a/core/Migrations/Version13000Date20170919121250.php b/core/Migrations/Version13000Date20170919121250.php index 104c3739c432b..64ce9c7e74012 100644 --- a/core/Migrations/Version13000Date20170919121250.php +++ b/core/Migrations/Version13000Date20170919121250.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version13000Date20170926101637.php b/core/Migrations/Version13000Date20170926101637.php index 4c14168c87a4b..25350c73fe499 100644 --- a/core/Migrations/Version13000Date20170926101637.php +++ b/core/Migrations/Version13000Date20170926101637.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\Migration\BigIntMigration; diff --git a/core/Migrations/Version14000Date20180129121024.php b/core/Migrations/Version14000Date20180129121024.php index cc9b19de5888a..ba56f76707f9c 100644 --- a/core/Migrations/Version14000Date20180129121024.php +++ b/core/Migrations/Version14000Date20180129121024.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version14000Date20180404140050.php b/core/Migrations/Version14000Date20180404140050.php index b512af080d983..40a2e17bec552 100644 --- a/core/Migrations/Version14000Date20180404140050.php +++ b/core/Migrations/Version14000Date20180404140050.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version14000Date20180516101403.php b/core/Migrations/Version14000Date20180516101403.php index d4ddf083f39f9..66f6c0fa39503 100644 --- a/core/Migrations/Version14000Date20180516101403.php +++ b/core/Migrations/Version14000Date20180516101403.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version14000Date20180518120534.php b/core/Migrations/Version14000Date20180518120534.php index b7d65cd3f257c..9e122b3d8c348 100644 --- a/core/Migrations/Version14000Date20180518120534.php +++ b/core/Migrations/Version14000Date20180518120534.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version14000Date20180522074438.php b/core/Migrations/Version14000Date20180522074438.php index 4e90d9fbc0db5..6c5c44d7eceeb 100644 --- a/core/Migrations/Version14000Date20180522074438.php +++ b/core/Migrations/Version14000Date20180522074438.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index 81fc3b61988e9..4efd261e5ee43 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version14000Date20180712153140.php b/core/Migrations/Version14000Date20180712153140.php index 89d50bdc33885..d54c1160c5591 100644 --- a/core/Migrations/Version14000Date20180712153140.php +++ b/core/Migrations/Version14000Date20180712153140.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\ISchemaWrapper; diff --git a/core/Migrations/Version15000Date20180926101451.php b/core/Migrations/Version15000Date20180926101451.php index be2cc70ad6cbc..d339342507884 100644 --- a/core/Migrations/Version15000Date20180926101451.php +++ b/core/Migrations/Version15000Date20180926101451.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version15000Date20181015062942.php b/core/Migrations/Version15000Date20181015062942.php index ddde2a2ca8444..c5be4ce349f97 100644 --- a/core/Migrations/Version15000Date20181015062942.php +++ b/core/Migrations/Version15000Date20181015062942.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version15000Date20181029084625.php b/core/Migrations/Version15000Date20181029084625.php index 65a45bb7bdbba..30c6ba7e096c3 100644 --- a/core/Migrations/Version15000Date20181029084625.php +++ b/core/Migrations/Version15000Date20181029084625.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 291eb56ecce6b..10b56a8beab58 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version16000Date20190212081545.php b/core/Migrations/Version16000Date20190212081545.php index f9c077e1470da..d26cfe7c48d22 100644 --- a/core/Migrations/Version16000Date20190212081545.php +++ b/core/Migrations/Version16000Date20190212081545.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version16000Date20190427105638.php b/core/Migrations/Version16000Date20190427105638.php index 9e98cee0d0710..457ca17701dd2 100644 --- a/core/Migrations/Version16000Date20190427105638.php +++ b/core/Migrations/Version16000Date20190427105638.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version16000Date20190428150708.php b/core/Migrations/Version16000Date20190428150708.php index 95c9bb0b69054..ca5e076048f19 100644 --- a/core/Migrations/Version16000Date20190428150708.php +++ b/core/Migrations/Version16000Date20190428150708.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index e15619e57f36b..0728d179a2883 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version18000Date20190920085628.php b/core/Migrations/Version18000Date20190920085628.php index e07ce3fbfb9ed..b05f7d6c8c6e6 100644 --- a/core/Migrations/Version18000Date20190920085628.php +++ b/core/Migrations/Version18000Date20190920085628.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index bdc28fa42610b..9a11494c7135b 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version18000Date20191204114856.php b/core/Migrations/Version18000Date20191204114856.php index aafaf95c15fc4..2b0e76eead6aa 100644 --- a/core/Migrations/Version18000Date20191204114856.php +++ b/core/Migrations/Version18000Date20191204114856.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version19000Date20200211083441.php b/core/Migrations/Version19000Date20200211083441.php index f4995e333f7a3..a1f6ace465f28 100644 --- a/core/Migrations/Version19000Date20200211083441.php +++ b/core/Migrations/Version19000Date20200211083441.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version20000Date20201109081915.php b/core/Migrations/Version20000Date20201109081915.php index 88948caea8980..add8769818495 100644 --- a/core/Migrations/Version20000Date20201109081915.php +++ b/core/Migrations/Version20000Date20201109081915.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version20000Date20201109081918.php b/core/Migrations/Version20000Date20201109081918.php index 1f5679f7741b7..c30d2d72ce8db 100644 --- a/core/Migrations/Version20000Date20201109081918.php +++ b/core/Migrations/Version20000Date20201109081918.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version20000Date20201109081919.php b/core/Migrations/Version20000Date20201109081919.php index c625c607905f2..fffa2f4b0fe30 100644 --- a/core/Migrations/Version20000Date20201109081919.php +++ b/core/Migrations/Version20000Date20201109081919.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version20000Date20201111081915.php b/core/Migrations/Version20000Date20201111081915.php index a879563cebcdb..14da98fbf6427 100644 --- a/core/Migrations/Version20000Date20201111081915.php +++ b/core/Migrations/Version20000Date20201111081915.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version21000Date20201120141228.php b/core/Migrations/Version21000Date20201120141228.php index 1bba2f769a2b4..e9404e997d18d 100644 --- a/core/Migrations/Version21000Date20201120141228.php +++ b/core/Migrations/Version21000Date20201120141228.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version21000Date20201202095923.php b/core/Migrations/Version21000Date20201202095923.php index eb3418031e2fc..2798f315f141b 100644 --- a/core/Migrations/Version21000Date20201202095923.php +++ b/core/Migrations/Version21000Date20201202095923.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version21000Date20210119195004.php b/core/Migrations/Version21000Date20210119195004.php index 951af95a7fca5..9c648fc8286a2 100644 --- a/core/Migrations/Version21000Date20210119195004.php +++ b/core/Migrations/Version21000Date20210119195004.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version21000Date20210309185126.php b/core/Migrations/Version21000Date20210309185126.php index 696b50514b7a3..90113c4dab6d9 100644 --- a/core/Migrations/Version21000Date20210309185126.php +++ b/core/Migrations/Version21000Date20210309185126.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version21000Date20210309185127.php b/core/Migrations/Version21000Date20210309185127.php index ea9bb493c0d9a..429c3d09c4bfa 100644 --- a/core/Migrations/Version21000Date20210309185127.php +++ b/core/Migrations/Version21000Date20210309185127.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version22000Date20210216080825.php b/core/Migrations/Version22000Date20210216080825.php index 353e0037e3c5b..b037563934101 100644 --- a/core/Migrations/Version22000Date20210216080825.php +++ b/core/Migrations/Version22000Date20210216080825.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version23000Date20210721100600.php b/core/Migrations/Version23000Date20210721100600.php index 853b36d77ecd9..15430d75e54cd 100644 --- a/core/Migrations/Version23000Date20210721100600.php +++ b/core/Migrations/Version23000Date20210721100600.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version23000Date20210906132259.php b/core/Migrations/Version23000Date20210906132259.php index a80331591d16c..6da2b1303893b 100644 --- a/core/Migrations/Version23000Date20210906132259.php +++ b/core/Migrations/Version23000Date20210906132259.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version24000Date20220202150027.php b/core/Migrations/Version24000Date20220202150027.php index 9983a55403ccd..cb96a9cf3d260 100644 --- a/core/Migrations/Version24000Date20220202150027.php +++ b/core/Migrations/Version24000Date20220202150027.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version24000Date20220404230027.php b/core/Migrations/Version24000Date20220404230027.php index d9111872da19a..d4d65ae7228e8 100644 --- a/core/Migrations/Version24000Date20220404230027.php +++ b/core/Migrations/Version24000Date20220404230027.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version27000Date20230309104325.php b/core/Migrations/Version27000Date20230309104325.php index af43916b65d01..540c858519bab 100644 --- a/core/Migrations/Version27000Date20230309104325.php +++ b/core/Migrations/Version27000Date20230309104325.php @@ -50,7 +50,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return null; } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/core/Migrations/Version28000Date20231126110901.php b/core/Migrations/Version28000Date20231126110901.php index 6a5f014a3fdee..47d758ad228c2 100644 --- a/core/Migrations/Version28000Date20231126110901.php +++ b/core/Migrations/Version28000Date20231126110901.php @@ -20,7 +20,6 @@ class Version28000Date20231126110901 extends SimpleMigrationStep { #[\Override] public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { return null; - /** * this migration was needed during Nextcloud 28 to prep the migration to 29 and a * new IAppConfig as its API require 'lazy' and 'type' database field. diff --git a/core/Migrations/Version29000Date20231126110901.php b/core/Migrations/Version29000Date20231126110901.php index 11afec44d2534..6aec37063f81e 100644 --- a/core/Migrations/Version29000Date20231126110901.php +++ b/core/Migrations/Version29000Date20231126110901.php @@ -38,7 +38,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt * @see Version29000Date20240124132202 for the new migration process */ return null; - // // type=2 means value is typed as MIXED // $table->addColumn('type', Types::INTEGER, ['notnull' => true, 'default' => 2]); // $table->addColumn('lazy', Types::BOOLEAN, ['notnull' => false, 'default' => false]); diff --git a/core/Migrations/Version29000Date20240131122720.php b/core/Migrations/Version29000Date20240131122720.php index 7be514ec094a0..45004f7e6a92e 100644 --- a/core/Migrations/Version29000Date20240131122720.php +++ b/core/Migrations/Version29000Date20240131122720.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version30000Date20240429122720.php b/core/Migrations/Version30000Date20240429122720.php index 8a2f4aa586b2d..7f256b929cbfb 100644 --- a/core/Migrations/Version30000Date20240429122720.php +++ b/core/Migrations/Version30000Date20240429122720.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version30000Date20240708160048.php b/core/Migrations/Version30000Date20240708160048.php index c1d9b84d11277..587cf451ff73e 100644 --- a/core/Migrations/Version30000Date20240708160048.php +++ b/core/Migrations/Version30000Date20240708160048.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version30000Date20240717111406.php b/core/Migrations/Version30000Date20240717111406.php index c57e9caa33097..8f06c003b0e04 100644 --- a/core/Migrations/Version30000Date20240717111406.php +++ b/core/Migrations/Version30000Date20240717111406.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version30000Date20240814180800.php b/core/Migrations/Version30000Date20240814180800.php index d81da3569652e..bb2b13a734c6a 100644 --- a/core/Migrations/Version30000Date20240814180800.php +++ b/core/Migrations/Version30000Date20240814180800.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version31000Date20240101084401.php b/core/Migrations/Version31000Date20240101084401.php index 223b78b60563b..67237538543e3 100644 --- a/core/Migrations/Version31000Date20240101084401.php +++ b/core/Migrations/Version31000Date20240101084401.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version31000Date20250213102442.php b/core/Migrations/Version31000Date20250213102442.php index f35ce498ddfef..d02466cba9219 100644 --- a/core/Migrations/Version31000Date20250213102442.php +++ b/core/Migrations/Version31000Date20250213102442.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version32000Date20250806110519.php b/core/Migrations/Version32000Date20250806110519.php index ca3b993c50752..d4a422a47249f 100644 --- a/core/Migrations/Version32000Date20250806110519.php +++ b/core/Migrations/Version32000Date20250806110519.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20250819110529.php b/core/Migrations/Version33000Date20250819110529.php index 570a2ee72d429..03ae05da9e5e7 100644 --- a/core/Migrations/Version33000Date20250819110529.php +++ b/core/Migrations/Version33000Date20250819110529.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20251013110519.php b/core/Migrations/Version33000Date20251013110519.php index 78ab693e2b993..bc85301b96ca9 100644 --- a/core/Migrations/Version33000Date20251013110519.php +++ b/core/Migrations/Version33000Date20251013110519.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20251023110529.php b/core/Migrations/Version33000Date20251023110529.php index 26204088a649f..7fc135d2a03b1 100644 --- a/core/Migrations/Version33000Date20251023110529.php +++ b/core/Migrations/Version33000Date20251023110529.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20251023120529.php b/core/Migrations/Version33000Date20251023120529.php index 1cecb65518130..f418fa7418ac9 100644 --- a/core/Migrations/Version33000Date20251023120529.php +++ b/core/Migrations/Version33000Date20251023120529.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20251106131209.php b/core/Migrations/Version33000Date20251106131209.php index 5d26abfedd22d..65fd869acead4 100644 --- a/core/Migrations/Version33000Date20251106131209.php +++ b/core/Migrations/Version33000Date20251106131209.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/core/Migrations/Version33000Date20251124110529.php b/core/Migrations/Version33000Date20251124110529.php index 043367b17d9d3..4fac2064c7ec2 100644 --- a/core/Migrations/Version33000Date20251124110529.php +++ b/core/Migrations/Version33000Date20251124110529.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Migrations/Version33000Date20251126152410.php b/core/Migrations/Version33000Date20251126152410.php index 2962bffc8ccfc..912d341b8f981 100644 --- a/core/Migrations/Version33000Date20251126152410.php +++ b/core/Migrations/Version33000Date20251126152410.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Migrations; use Closure; diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index c4ee339c766c9..06910b65fe45b 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Notification; use OCP\IConfig; diff --git a/core/Service/LoginFlowV2Service.php b/core/Service/LoginFlowV2Service.php index 13bd18e0ffa0d..5d6048230c638 100644 --- a/core/Service/LoginFlowV2Service.php +++ b/core/Service/LoginFlowV2Service.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Core\Service; use OC\Authentication\Exceptions\PasswordlessTokenException; diff --git a/cypress/fixtures/testapp/lib/AppInfo/Application.php b/cypress/fixtures/testapp/lib/AppInfo/Application.php index 8ca8f3ef52733..94f6e936a8790 100644 --- a/cypress/fixtures/testapp/lib/AppInfo/Application.php +++ b/cypress/fixtures/testapp/lib/AppInfo/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TestApp\AppInfo; use OCP\AppFramework\App; diff --git a/cypress/fixtures/testapp/lib/Controller/PageController.php b/cypress/fixtures/testapp/lib/Controller/PageController.php index e7812fa1046f1..1ee1c218985de 100644 --- a/cypress/fixtures/testapp/lib/Controller/PageController.php +++ b/cypress/fixtures/testapp/lib/Controller/PageController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\TestApp\Controller; use OCA\TestApp\AppInfo\Application; diff --git a/lib/base.php b/lib/base.php index b945ba3ee1d33..fc09cc6484907 100644 --- a/lib/base.php +++ b/lib/base.php @@ -674,7 +674,6 @@ public static function init(): void { self::$composerAutoloader = require_once OC::$SERVERROOT . '/lib/composer/autoload.php'; self::$composerAutoloader->setApcuPrefix(null); - try { self::initPaths(); // setup 3rdparty autoloader diff --git a/lib/private/Accounts/Account.php b/lib/private/Accounts/Account.php index e443f65870ac4..b894ac1b7c93f 100644 --- a/lib/private/Accounts/Account.php +++ b/lib/private/Accounts/Account.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Accounts; use Generator; diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index f3d2878b254bc..7dcc2c289b4de 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -53,7 +53,6 @@ */ class AccountManager implements IAccountManager { use TAccountsHelper; - use TProfileHelper; private string $table = 'accounts'; @@ -755,7 +754,6 @@ private function validateBlueSkyHandle(string $text): bool { return filter_var($text, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) !== false; } - private function sanitizePropertyBluesky(IAccountProperty $property): void { if ($property->getName() === self::PROPERTY_BLUESKY) { if (!$this->validateBlueSkyHandle($property->getValue())) { diff --git a/lib/private/Accounts/AccountProperty.php b/lib/private/Accounts/AccountProperty.php index 685fa013ed21f..3be9fcb85aaa1 100644 --- a/lib/private/Accounts/AccountProperty.php +++ b/lib/private/Accounts/AccountProperty.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Accounts; use InvalidArgumentException; diff --git a/lib/private/Accounts/AccountPropertyCollection.php b/lib/private/Accounts/AccountPropertyCollection.php index b163b7ac87d7f..02f0253f86138 100644 --- a/lib/private/Accounts/AccountPropertyCollection.php +++ b/lib/private/Accounts/AccountPropertyCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Accounts; use InvalidArgumentException; diff --git a/lib/private/Accounts/Hooks.php b/lib/private/Accounts/Hooks.php index eebc2300f49f9..97c0fb723f85b 100644 --- a/lib/private/Accounts/Hooks.php +++ b/lib/private/Accounts/Hooks.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Accounts; use OCP\Accounts\IAccountManager; diff --git a/lib/private/Accounts/TAccountsHelper.php b/lib/private/Accounts/TAccountsHelper.php index 69d25d9a93370..be241f4e542fa 100644 --- a/lib/private/Accounts/TAccountsHelper.php +++ b/lib/private/Accounts/TAccountsHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Accounts; use OCP\Accounts\IAccountManager; diff --git a/lib/private/Activity/ActivitySettingsAdapter.php b/lib/private/Activity/ActivitySettingsAdapter.php index a165d32dc9823..5bb16c88a67ff 100644 --- a/lib/private/Activity/ActivitySettingsAdapter.php +++ b/lib/private/Activity/ActivitySettingsAdapter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Activity; use OCP\Activity\ActivitySettings; diff --git a/lib/private/Activity/Event.php b/lib/private/Activity/Event.php index 1c3ea936d82bf..4875d76649f7f 100644 --- a/lib/private/Activity/Event.php +++ b/lib/private/Activity/Event.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Activity; use OCP\Activity\Exceptions\InvalidValueException; diff --git a/lib/private/Activity/EventMerger.php b/lib/private/Activity/EventMerger.php index 486874ddae9de..df2c8e138adf9 100644 --- a/lib/private/Activity/EventMerger.php +++ b/lib/private/Activity/EventMerger.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Activity; use OCP\Activity\IEvent; diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index 3981345c6987c..98453520a8ddb 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Activity; use OCP\Activity\ActivitySettings; @@ -152,7 +153,6 @@ public function bulkPublish(IEvent $event, array $affectedUserIds, ISetting $set } } - /** * In order to improve lazy loading a closure can be registered which will be called in case * activity consumers are actually requested @@ -307,7 +307,6 @@ public function getSettingById(string $id): ActivitySettings { throw new SettingNotFoundException($id); } - /** * @param string $type * @param int|numeric-string $id diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index 9779c91ae594e..78f16598af0c3 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Config\UserConfig; @@ -187,7 +188,6 @@ public function deleteAppValues($appName) { Server::get(AppConfig::class)->deleteApp($appName); } - /** * Set a user defined value * diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 93015d29d7fe7..a2b91f560aad9 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\App; use OC\AppConfig; diff --git a/lib/private/App/AppStore/Bundles/Bundle.php b/lib/private/App/AppStore/Bundles/Bundle.php index afff8693e08a6..9a80188bd5df0 100644 --- a/lib/private/App/AppStore/Bundles/Bundle.php +++ b/lib/private/App/AppStore/Bundles/Bundle.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; use OCP\IL10N; diff --git a/lib/private/App/AppStore/Bundles/BundleFetcher.php b/lib/private/App/AppStore/Bundles/BundleFetcher.php index 4ff53b0c70bea..798913784e1e8 100644 --- a/lib/private/App/AppStore/Bundles/BundleFetcher.php +++ b/lib/private/App/AppStore/Bundles/BundleFetcher.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; use OCP\IL10N; diff --git a/lib/private/App/AppStore/Bundles/EducationBundle.php b/lib/private/App/AppStore/Bundles/EducationBundle.php index e91fa3b49e219..e39e3d58aec81 100644 --- a/lib/private/App/AppStore/Bundles/EducationBundle.php +++ b/lib/private/App/AppStore/Bundles/EducationBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class EducationBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/EnterpriseBundle.php b/lib/private/App/AppStore/Bundles/EnterpriseBundle.php index d8845830cf776..c598b6396b557 100644 --- a/lib/private/App/AppStore/Bundles/EnterpriseBundle.php +++ b/lib/private/App/AppStore/Bundles/EnterpriseBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class EnterpriseBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/GroupwareBundle.php b/lib/private/App/AppStore/Bundles/GroupwareBundle.php index 6cc535329a2be..370fdb4e6dbca 100644 --- a/lib/private/App/AppStore/Bundles/GroupwareBundle.php +++ b/lib/private/App/AppStore/Bundles/GroupwareBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class GroupwareBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/HubBundle.php b/lib/private/App/AppStore/Bundles/HubBundle.php index 640e8a610a3b9..ecfec0b181ed4 100644 --- a/lib/private/App/AppStore/Bundles/HubBundle.php +++ b/lib/private/App/AppStore/Bundles/HubBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class HubBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/PublicSectorBundle.php b/lib/private/App/AppStore/Bundles/PublicSectorBundle.php index 759e0e551c2a6..32e08d895a4f3 100644 --- a/lib/private/App/AppStore/Bundles/PublicSectorBundle.php +++ b/lib/private/App/AppStore/Bundles/PublicSectorBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class PublicSectorBundle extends Bundle { diff --git a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php index 533fafb2d9249..065845b397aaf 100644 --- a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php +++ b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Bundles; class SocialSharingBundle extends Bundle { diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php index 83775bf3e9db8..a39bcfd2e3184 100644 --- a/lib/private/App/AppStore/Fetcher/AppFetcher.php +++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Fetcher; use OC\App\AppStore\Version\VersionParser; diff --git a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php index a2abc70ba1205..be614f81928d3 100644 --- a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php +++ b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Fetcher; use OC\Files\AppData\Factory; diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php index d4675f7c547d4..7aec5f3251efd 100644 --- a/lib/private/App/AppStore/Fetcher/Fetcher.php +++ b/lib/private/App/AppStore/Fetcher/Fetcher.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Fetcher; use GuzzleHttp\Exception\ClientException; diff --git a/lib/private/App/AppStore/Version/Version.php b/lib/private/App/AppStore/Version/Version.php index 5add30e84b5fe..33bf180525902 100644 --- a/lib/private/App/AppStore/Version/Version.php +++ b/lib/private/App/AppStore/Version/Version.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Version; class Version { diff --git a/lib/private/App/AppStore/Version/VersionParser.php b/lib/private/App/AppStore/Version/VersionParser.php index 8976f28837fc7..387792148e702 100644 --- a/lib/private/App/AppStore/Version/VersionParser.php +++ b/lib/private/App/AppStore/Version/VersionParser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App\AppStore\Version; /** diff --git a/lib/private/App/CompareVersion.php b/lib/private/App/CompareVersion.php index 7edc3e565b14c..4b5bae9d75c2f 100644 --- a/lib/private/App/CompareVersion.php +++ b/lib/private/App/CompareVersion.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\App; use InvalidArgumentException; diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index 1441f01125ba3..94e8951fd372e 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\App; use OCP\ICache; diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php index 38b0bd58b98f3..358337fa6225c 100644 --- a/lib/private/App/Platform.php +++ b/lib/private/App/Platform.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\App; use OCP\IBinaryFinder; diff --git a/lib/private/App/PlatformRepository.php b/lib/private/App/PlatformRepository.php index 504b9a00fe1c9..47dc227bab727 100644 --- a/lib/private/App/PlatformRepository.php +++ b/lib/private/App/PlatformRepository.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\App; /** diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index ec4858405353d..01015aa944019 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -240,7 +240,6 @@ public function isLazy(string $app, string $key): bool { throw new AppConfigUnknownKeyException('unknown config key'); } - /** * @inheritDoc * @@ -319,7 +318,6 @@ public function searchValues(string $key, bool $lazy = false, ?int $typedAs = nu return $values; } - /** * Get the config value as string. * If the value does not exist the given default will be returned. @@ -605,7 +603,6 @@ public function getValueType(string $app, string $key, ?bool $lazy = null): int return $type; } - /** * Store a config key and its value in database as VALUE_MIXED * @@ -644,7 +641,6 @@ public function setValueMixed( ); } - /** * @inheritDoc * @@ -1003,7 +999,6 @@ public function updateType(string $app, string $key, int $type = self::VALUE_MIX return true; } - /** * @inheritDoc * @@ -1305,7 +1300,6 @@ public function clearCache(bool $reload = false): void { $this->loadConfig(lazy: true); } - /** * For debug purpose. * Returns the cached data. @@ -1504,7 +1498,6 @@ public function setValue($app, $key, $value) { return $this->setTypedValue($app, $key, (string)$value, false, self::VALUE_MIXED); } - /** * get multiple values, either the app or key can be used as wildcard by setting it to false * @@ -1541,7 +1534,6 @@ public function getFilteredValues($app) { return $this->getAllValues($app, filtered: true); } - /** * **Warning:** avoid default NULL value for $lazy as this will * load all lazy values from the database diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index ac078d8ba98f7..1d9c2157f9316 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework; use OC\AppFramework\DependencyInjection\DIContainer; diff --git a/lib/private/AppFramework/Bootstrap/ARegistration.php b/lib/private/AppFramework/Bootstrap/ARegistration.php index d90e87ae4493b..48ce3798bba42 100644 --- a/lib/private/AppFramework/Bootstrap/ARegistration.php +++ b/lib/private/AppFramework/Bootstrap/ARegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/BootContext.php b/lib/private/AppFramework/Bootstrap/BootContext.php index 60b30c9c79983..1e05ac840a0ad 100644 --- a/lib/private/AppFramework/Bootstrap/BootContext.php +++ b/lib/private/AppFramework/Bootstrap/BootContext.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; use OCP\AppFramework\Bootstrap\IBootContext; diff --git a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php index 0ceafcaa20a73..d63dd96e9d55b 100644 --- a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php +++ b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; use OCP\EventDispatcher\IEventListener; diff --git a/lib/private/AppFramework/Bootstrap/FunctionInjector.php b/lib/private/AppFramework/Bootstrap/FunctionInjector.php index 6177bf0aa063c..a80010b7afae6 100644 --- a/lib/private/AppFramework/Bootstrap/FunctionInjector.php +++ b/lib/private/AppFramework/Bootstrap/FunctionInjector.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; use Closure; diff --git a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php index 7398628e62ff2..b7073a1b09893 100644 --- a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php index 27a1b74759095..8a361f359ef98 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php index 1b1c986b66733..010a489612afa 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; use OC\AppFramework\Utility\SimpleContainer; diff --git a/lib/private/AppFramework/Bootstrap/ServiceRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceRegistration.php index 42825816a7e21..ffef8bf951a1b 100644 --- a/lib/private/AppFramework/Bootstrap/ServiceRegistration.php +++ b/lib/private/AppFramework/Bootstrap/ServiceRegistration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Bootstrap; /** diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php index 6f5b3b96b71c8..0245aa95a7f37 100644 --- a/lib/private/AppFramework/Http.php +++ b/lib/private/AppFramework/Http.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework; use OCP\AppFramework\Http as BaseHttp; @@ -85,7 +86,6 @@ public function __construct( ]; } - /** * Gets the correct header * @param int Http::CONSTANT $status the constant from the Http class diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php index 1f95459fb3726..f905296f95d38 100644 --- a/lib/private/AppFramework/Http/Dispatcher.php +++ b/lib/private/AppFramework/Http/Dispatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Http; use OC\AppFramework\Http; @@ -47,7 +48,6 @@ public function __construct( ) { } - /** * Handles a request and calls the dispatcher on the controller * @param Controller $controller the controller which will be called @@ -127,7 +127,6 @@ public function dispatch(Controller $controller, string $methodName): array { ]; } - /** * Uses the reflected parameters, types and request parameters to execute * the controller diff --git a/lib/private/AppFramework/Http/Output.php b/lib/private/AppFramework/Http/Output.php index aee009b4654d1..83b6ee6e45089 100644 --- a/lib/private/AppFramework/Http/Output.php +++ b/lib/private/AppFramework/Http/Output.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Http; use OCP\AppFramework\Http\IOutput; diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index f3d4d221fa075..e02f20ca308c5 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Http; use OC\Security\CSRF\CsrfToken; @@ -435,7 +436,6 @@ public function throwDecodingExceptionIfAny(): void { } } - /** * Checks if the CSRF check was correct * @return bool true if CSRF check passed @@ -551,7 +551,6 @@ public function passesLaxCookieCheck(): bool { return false; } - /** * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging * If `mod_unique_id` is installed this value will be taken. @@ -846,7 +845,6 @@ public function getInsecureServerHost(): string { return $host; } - /** * Returns the server host from the headers, or the first configured * trusted domain if the host isn't in the trusted list diff --git a/lib/private/AppFramework/Http/RequestId.php b/lib/private/AppFramework/Http/RequestId.php index 45dd2246be6cd..ba4982895906d 100644 --- a/lib/private/AppFramework/Http/RequestId.php +++ b/lib/private/AppFramework/Http/RequestId.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Http; use OCP\IRequestId; diff --git a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php index 281e52a159d21..ea252ac410964 100644 --- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php +++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware; use OC\Core\Controller\LoginController; diff --git a/lib/private/AppFramework/Middleware/CompressionMiddleware.php b/lib/private/AppFramework/Middleware/CompressionMiddleware.php index a6e4f65035fb3..796c998c66ffc 100644 --- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php +++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware; use OC\AppFramework\OCS\BaseResponse; diff --git a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php index 56f5babcc6fc8..c4db6733822ee 100644 --- a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php +++ b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php index c9b51f26f3446..dc2de2ebd30be 100644 --- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php +++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware; use OCP\AppFramework\Controller; @@ -27,7 +28,6 @@ class MiddlewareDispatcher { */ private int $middlewareCounter; - /** * Constructor */ @@ -36,7 +36,6 @@ public function __construct() { $this->middlewareCounter = 0; } - /** * Adds a new middleware * @param Middleware $middleWare the middleware which will be added @@ -45,7 +44,6 @@ public function registerMiddleware(Middleware $middleWare): void { $this->middlewares[] = $middleWare; } - /** * returns an array with all middleware elements * @return Middleware[] the middlewares @@ -54,7 +52,6 @@ public function getMiddlewares(): array { return $this->middlewares; } - /** * This is being run in normal order before the controller is being * called which allows several modifications and checks @@ -74,7 +71,6 @@ public function beforeController(Controller $controller, string $methodName): vo } } - /** * This is being run when either the beforeController method or the * controller method itself is throwing an exception. The middleware is asked @@ -102,7 +98,6 @@ public function afterException(Controller $controller, string $methodName, \Exce throw $exception; } - /** * This is being run after a successful controllermethod call and allows * the manipulation of a Response object. The middleware is run in reverse order @@ -121,7 +116,6 @@ public function afterController(Controller $controller, string $methodName, Resp return $response; } - /** * This is being run after the response object has been rendered and * allows the manipulation of the output. The middleware is run in reverse order diff --git a/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php b/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php index 07a7ed0addf8d..5278bae128d53 100644 --- a/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php +++ b/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php index dc2bf5cb4e1c5..042990e3c12d0 100644 --- a/lib/private/AppFramework/Middleware/OCSMiddleware.php +++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware; use OC\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php b/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php index 002364aa9a22f..547b97a0586c3 100644 --- a/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php +++ b/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\PublicShare\Exceptions; class NeedAuthenticationException extends \Exception { diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php index a8aacc63724f9..5d52217e30054 100644 --- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php +++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\PublicShare; use OC\AppFramework\Middleware\PublicShare\Exceptions\NeedAuthenticationException; diff --git a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php index 2630e7821f8d7..401490bf13b49 100644 --- a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php index 2d87f616a9df1..a894fe9a4a1e3 100644 --- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\MiddlewareUtils; diff --git a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php index 3cc4fe1a10194..94f56e08b432b 100644 --- a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\Security\CSP\ContentSecurityPolicyManager; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php index 36eb8f18928dc..f654bea356f2b 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php index f59e4ab49686a..3741c2e8c7bdf 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php index a29e3961bfef8..d47816628c5d5 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php index f0d79ef593afb..89ceaefd3dae9 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php index c446d6a220bdd..8115861e7292b 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php index 6252c914ac110..638b2f17d0af8 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php index 854189f1b6b7f..fcc22bf9bbb7b 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php index d2c5253442007..dfb8abe3c50f6 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php index d12ee96292e28..50be558e0e7ea 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security\Exceptions; class ReloadExecutionException extends SecurityException { diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php index c8d70ad4f2bbc..71e3b091ab9f5 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security\Exceptions; /** diff --git a/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php b/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php index 8ae20ab4e7020..47ed1b6a0905b 100644 --- a/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php +++ b/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php index d1d9bfbe5b4dc..396115a82f9a6 100644 --- a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\Security\FeaturePolicy\FeaturePolicy; diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php index 94fc329d5c71f..d6caaa4f308f1 100644 --- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\NotConfirmedException; diff --git a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php index bec5a3c3db38c..9d4fdfb6b740f 100644 --- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php b/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php index 488093149adae..56f9a00f7bf6a 100644 --- a/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\Security\Exceptions\ReloadExecutionException; diff --git a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php index 99263d125cf29..f25d49f8996b0 100644 --- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php index c589d1f0dc547..3b3028c0a20d7 100644 --- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware\Security; use OC\AppFramework\Middleware\MiddlewareUtils; diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php index 2f10b24ec60d3..c0bb256777046 100644 --- a/lib/private/AppFramework/Middleware/SessionMiddleware.php +++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Middleware; use OC\AppFramework\Utility\ControllerMethodReflector; diff --git a/lib/private/AppFramework/OCS/BaseResponse.php b/lib/private/AppFramework/OCS/BaseResponse.php index 067b484494dec..34b0dcb4abeda 100644 --- a/lib/private/AppFramework/OCS/BaseResponse.php +++ b/lib/private/AppFramework/OCS/BaseResponse.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/OCS/V1Response.php b/lib/private/AppFramework/OCS/V1Response.php index 11d674b57f521..271e19827ef11 100644 --- a/lib/private/AppFramework/OCS/V1Response.php +++ b/lib/private/AppFramework/OCS/V1Response.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/OCS/V2Response.php b/lib/private/AppFramework/OCS/V2Response.php index 1c6c2cd076e2b..83d7b1812b66d 100644 --- a/lib/private/AppFramework/OCS/V2Response.php +++ b/lib/private/AppFramework/OCS/V2Response.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\OCS; use OCP\AppFramework\Http; diff --git a/lib/private/AppFramework/Routing/RouteActionHandler.php b/lib/private/AppFramework/Routing/RouteActionHandler.php index bbccda74d0b2f..dd6798480e322 100644 --- a/lib/private/AppFramework/Routing/RouteActionHandler.php +++ b/lib/private/AppFramework/Routing/RouteActionHandler.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Routing; use OC\AppFramework\App; diff --git a/lib/private/AppFramework/Routing/RouteParser.php b/lib/private/AppFramework/Routing/RouteParser.php index 7c4faeee5eb2d..483e0c16d28ce 100644 --- a/lib/private/AppFramework/Routing/RouteParser.php +++ b/lib/private/AppFramework/Routing/RouteParser.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Routing; use OC\Route\Route; diff --git a/lib/private/AppFramework/ScopedPsrLogger.php b/lib/private/AppFramework/ScopedPsrLogger.php index 4a14a9d0b03bb..f00200e64d226 100644 --- a/lib/private/AppFramework/ScopedPsrLogger.php +++ b/lib/private/AppFramework/ScopedPsrLogger.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework; use Psr\Log\LoggerInterface; diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php index 04178d042c458..a16717132c5a4 100644 --- a/lib/private/AppFramework/Services/AppConfig.php +++ b/lib/private/AppFramework/Services/AppConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Services; use InvalidArgumentException; diff --git a/lib/private/AppFramework/Services/InitialState.php b/lib/private/AppFramework/Services/InitialState.php index d2caca47f7e4f..dfced82d6922e 100644 --- a/lib/private/AppFramework/Services/InitialState.php +++ b/lib/private/AppFramework/Services/InitialState.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\AppFramework\Services; use OCP\AppFramework\Services\IInitialState; diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index 8d76d6a1028ff..b064dfc2bb38b 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Utility; use OCP\AppFramework\Utility\IControllerMethodReflector; diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 9afdfbef71895..e827dc42fc427 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Utility; use ArrayAccess; diff --git a/lib/private/AppFramework/Utility/TimeFactory.php b/lib/private/AppFramework/Utility/TimeFactory.php index 5aba31577b2f9..deaf61558b623 100644 --- a/lib/private/AppFramework/Utility/TimeFactory.php +++ b/lib/private/AppFramework/Utility/TimeFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\AppFramework\Utility; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php index 2887a341bbf1f..bb5fd90165cde 100644 --- a/lib/private/Archive/Archive.php +++ b/lib/private/Archive/Archive.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Archive; abstract class Archive { diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php index 1376e42806089..b5cfd43304afa 100644 --- a/lib/private/Archive/TAR.php +++ b/lib/private/Archive/TAR.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Archive; use Icewind\Streams\CallbackWrapper; diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php index e3d20ccfd665c..e67632e145294 100644 --- a/lib/private/Archive/ZIP.php +++ b/lib/private/Archive/ZIP.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Archive; use Icewind\Streams\CallbackWrapper; diff --git a/lib/private/Authentication/Events/ARemoteWipeEvent.php b/lib/private/Authentication/Events/ARemoteWipeEvent.php index 438fcd2615dbc..ee88eababb8dc 100644 --- a/lib/private/Authentication/Events/ARemoteWipeEvent.php +++ b/lib/private/Authentication/Events/ARemoteWipeEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Events; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Events/AppPasswordCreatedEvent.php b/lib/private/Authentication/Events/AppPasswordCreatedEvent.php index bf502ade0cc07..b6c6c887d8986 100644 --- a/lib/private/Authentication/Events/AppPasswordCreatedEvent.php +++ b/lib/private/Authentication/Events/AppPasswordCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Events; use OCP\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Events/LoginFailed.php b/lib/private/Authentication/Events/LoginFailed.php index b946afc2afd46..22f1676c1ab9a 100644 --- a/lib/private/Authentication/Events/LoginFailed.php +++ b/lib/private/Authentication/Events/LoginFailed.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Authentication/Events/RemoteWipeFinished.php b/lib/private/Authentication/Events/RemoteWipeFinished.php index 9704ebff3f58f..897f9ee4e6a2b 100644 --- a/lib/private/Authentication/Events/RemoteWipeFinished.php +++ b/lib/private/Authentication/Events/RemoteWipeFinished.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Events; class RemoteWipeFinished extends ARemoteWipeEvent { diff --git a/lib/private/Authentication/Events/RemoteWipeStarted.php b/lib/private/Authentication/Events/RemoteWipeStarted.php index ad0f72f0e0943..bc6a27671fea0 100644 --- a/lib/private/Authentication/Events/RemoteWipeStarted.php +++ b/lib/private/Authentication/Events/RemoteWipeStarted.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Events; class RemoteWipeStarted extends ARemoteWipeEvent { diff --git a/lib/private/Authentication/Exceptions/ExpiredTokenException.php b/lib/private/Authentication/Exceptions/ExpiredTokenException.php index 58ee79dd41c9a..3e48cc52c52c0 100644 --- a/lib/private/Authentication/Exceptions/ExpiredTokenException.php +++ b/lib/private/Authentication/Exceptions/ExpiredTokenException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Exceptions; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Exceptions/InvalidProviderException.php b/lib/private/Authentication/Exceptions/InvalidProviderException.php index 9dbf3a7782ab7..bca4c42fc3eba 100644 --- a/lib/private/Authentication/Exceptions/InvalidProviderException.php +++ b/lib/private/Authentication/Exceptions/InvalidProviderException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/InvalidTokenException.php b/lib/private/Authentication/Exceptions/InvalidTokenException.php index d23f767e69b95..1878ff3f06d8f 100644 --- a/lib/private/Authentication/Exceptions/InvalidTokenException.php +++ b/lib/private/Authentication/Exceptions/InvalidTokenException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; /** diff --git a/lib/private/Authentication/Exceptions/LoginRequiredException.php b/lib/private/Authentication/Exceptions/LoginRequiredException.php index 53aa7e0a2ed2d..4c3c0bdd452d2 100644 --- a/lib/private/Authentication/Exceptions/LoginRequiredException.php +++ b/lib/private/Authentication/Exceptions/LoginRequiredException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php index 0326eede983c8..f8f5210215041 100644 --- a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php +++ b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php index a8d8181b5ae44..146738f2b38ab 100644 --- a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php +++ b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php index aa331f31fd010..aa557532a2ae3 100644 --- a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php +++ b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Exceptions; class TokenPasswordExpiredException extends ExpiredTokenException { diff --git a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php index d8366f3bb657b..ab57c8ffd5b6d 100644 --- a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php +++ b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php index f8cec3d44a585..21c189a61c03a 100644 --- a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php +++ b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Exceptions; use Exception; diff --git a/lib/private/Authentication/Exceptions/WipeTokenException.php b/lib/private/Authentication/Exceptions/WipeTokenException.php index 00b28e8e2a1ef..57e010fa7e8cf 100644 --- a/lib/private/Authentication/Exceptions/WipeTokenException.php +++ b/lib/private/Authentication/Exceptions/WipeTokenException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Exceptions; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Listeners/LoginFailedListener.php b/lib/private/Authentication/Listeners/LoginFailedListener.php index c8747d53b5524..530a6d4efc61d 100644 --- a/lib/private/Authentication/Listeners/LoginFailedListener.php +++ b/lib/private/Authentication/Listeners/LoginFailedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Authentication\Events\LoginFailed; diff --git a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php index a7c605569f44c..cad23007732da 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use BadMethodCallException; diff --git a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php index 943df1e44e19b..aae2449c83ab9 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use Exception; diff --git a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php index b3fafa44c9860..5229aff150b21 100644 --- a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php +++ b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Authentication\Events\ARemoteWipeEvent; diff --git a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php index 45de836482de0..19b5e99a4b8eb 100644 --- a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php +++ b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Files\Cache\Cache; diff --git a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php index a3933116bd202..609e2bd057ec4 100644 --- a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php +++ b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Authentication\TwoFactorAuth\Registry; diff --git a/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php index bc67ef0feec03..872ead6732c00 100644 --- a/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php +++ b/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Authentication\Token\Manager; diff --git a/lib/private/Authentication/Listeners/UserLoggedInListener.php b/lib/private/Authentication/Listeners/UserLoggedInListener.php index 2eafc7e1c4ef4..ff66433b95caa 100644 --- a/lib/private/Authentication/Listeners/UserLoggedInListener.php +++ b/lib/private/Authentication/Listeners/UserLoggedInListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Listeners; use OC\Authentication\Token\Manager; diff --git a/lib/private/Authentication/Login/ALoginCommand.php b/lib/private/Authentication/Login/ALoginCommand.php index c60fef2019cf6..93e79d3e7d336 100644 --- a/lib/private/Authentication/Login/ALoginCommand.php +++ b/lib/private/Authentication/Login/ALoginCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; abstract class ALoginCommand { diff --git a/lib/private/Authentication/Login/Chain.php b/lib/private/Authentication/Login/Chain.php index fc90d9225a7cd..530112b516164 100644 --- a/lib/private/Authentication/Login/Chain.php +++ b/lib/private/Authentication/Login/Chain.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; class Chain { diff --git a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php index 0b6bb19da8069..4e2b8d28b7a54 100644 --- a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php +++ b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OCP\IConfig; diff --git a/lib/private/Authentication/Login/CompleteLoginCommand.php b/lib/private/Authentication/Login/CompleteLoginCommand.php index 3726de7cc3aa7..ecfc8e7101b06 100644 --- a/lib/private/Authentication/Login/CompleteLoginCommand.php +++ b/lib/private/Authentication/Login/CompleteLoginCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\User\Session; diff --git a/lib/private/Authentication/Login/CreateSessionTokenCommand.php b/lib/private/Authentication/Login/CreateSessionTokenCommand.php index 8ad098cebe11e..63f906b52ba45 100644 --- a/lib/private/Authentication/Login/CreateSessionTokenCommand.php +++ b/lib/private/Authentication/Login/CreateSessionTokenCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Authentication\Token\IToken; diff --git a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php index e76ecd61407cc..544830e3bc98b 100644 --- a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php +++ b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\User\Session; diff --git a/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php b/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php index 40b78229306d1..6aaa57d0fd0f9 100644 --- a/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php +++ b/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Core\Controller\ClientFlowLoginV2Controller; diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php index 7b359c619aabf..b7156068ca413 100644 --- a/lib/private/Authentication/Login/LoggedInCheckCommand.php +++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Authentication\Events\LoginFailed; diff --git a/lib/private/Authentication/Login/LoginResult.php b/lib/private/Authentication/Login/LoginResult.php index 8a4b61db59e32..da58f77430141 100644 --- a/lib/private/Authentication/Login/LoginResult.php +++ b/lib/private/Authentication/Login/LoginResult.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Core\Controller\LoginController; diff --git a/lib/private/Authentication/Login/PreLoginHookCommand.php b/lib/private/Authentication/Login/PreLoginHookCommand.php index 71f545f79b7ad..8679c4f02a47f 100644 --- a/lib/private/Authentication/Login/PreLoginHookCommand.php +++ b/lib/private/Authentication/Login/PreLoginHookCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Authentication/Login/SetUserTimezoneCommand.php b/lib/private/Authentication/Login/SetUserTimezoneCommand.php index 182e696722711..732194a1ffce8 100644 --- a/lib/private/Authentication/Login/SetUserTimezoneCommand.php +++ b/lib/private/Authentication/Login/SetUserTimezoneCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Core\AppInfo\Application; diff --git a/lib/private/Authentication/Login/TwoFactorCommand.php b/lib/private/Authentication/Login/TwoFactorCommand.php index f770067824dca..f338edc512395 100644 --- a/lib/private/Authentication/Login/TwoFactorCommand.php +++ b/lib/private/Authentication/Login/TwoFactorCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Authentication\TwoFactorAuth\Manager; diff --git a/lib/private/Authentication/Login/UidLoginCommand.php b/lib/private/Authentication/Login/UidLoginCommand.php index 09c87ad3a8d5c..a4bf1424f6124 100644 --- a/lib/private/Authentication/Login/UidLoginCommand.php +++ b/lib/private/Authentication/Login/UidLoginCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\User\Manager; diff --git a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php index a03ccd5d2432d..340609752e884 100644 --- a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php +++ b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OCP\ISession; diff --git a/lib/private/Authentication/Login/UserDisabledCheckCommand.php b/lib/private/Authentication/Login/UserDisabledCheckCommand.php index d9c5fc3aa92dc..5ced7f3401208 100644 --- a/lib/private/Authentication/Login/UserDisabledCheckCommand.php +++ b/lib/private/Authentication/Login/UserDisabledCheckCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OC\Core\Controller\LoginController; diff --git a/lib/private/Authentication/Login/WebAuthnChain.php b/lib/private/Authentication/Login/WebAuthnChain.php index 6732a4339fa8c..87027d8a9566b 100644 --- a/lib/private/Authentication/Login/WebAuthnChain.php +++ b/lib/private/Authentication/Login/WebAuthnChain.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; class WebAuthnChain { diff --git a/lib/private/Authentication/Login/WebAuthnLoginCommand.php b/lib/private/Authentication/Login/WebAuthnLoginCommand.php index 3ceec3eeb6e97..0bd64666cecee 100644 --- a/lib/private/Authentication/Login/WebAuthnLoginCommand.php +++ b/lib/private/Authentication/Login/WebAuthnLoginCommand.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OCP\IUserManager; diff --git a/lib/private/Authentication/LoginCredentials/Credentials.php b/lib/private/Authentication/LoginCredentials/Credentials.php index 99e7827743e36..4d2dff0ad8c44 100644 --- a/lib/private/Authentication/LoginCredentials/Credentials.php +++ b/lib/private/Authentication/LoginCredentials/Credentials.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\LoginCredentials; use OCP\Authentication\LoginCredentials\ICredentials; diff --git a/lib/private/Authentication/LoginCredentials/Store.php b/lib/private/Authentication/LoginCredentials/Store.php index bab1d1cf9106e..c3c68774c13fe 100644 --- a/lib/private/Authentication/LoginCredentials/Store.php +++ b/lib/private/Authentication/LoginCredentials/Store.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\LoginCredentials; use Exception; diff --git a/lib/private/Authentication/Notifications/Notifier.php b/lib/private/Authentication/Notifications/Notifier.php index af92e476110fd..73d8505ce2e36 100644 --- a/lib/private/Authentication/Notifications/Notifier.php +++ b/lib/private/Authentication/Notifications/Notifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Notifications; use OCP\L10N\IFactory as IL10nFactory; diff --git a/lib/private/Authentication/Token/INamedToken.php b/lib/private/Authentication/Token/INamedToken.php index 9a90cfc7d76b2..f745503a11768 100644 --- a/lib/private/Authentication/Token/INamedToken.php +++ b/lib/private/Authentication/Token/INamedToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; interface INamedToken extends IToken { diff --git a/lib/private/Authentication/Token/IProvider.php b/lib/private/Authentication/Token/IProvider.php index d47427e79bf06..542aeb118a85d 100644 --- a/lib/private/Authentication/Token/IProvider.php +++ b/lib/private/Authentication/Token/IProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Token; use OC\Authentication\Exceptions\PasswordlessTokenException; diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php index 2028a0b328c08..5af528c487de7 100644 --- a/lib/private/Authentication/Token/IToken.php +++ b/lib/private/Authentication/Token/IToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Token; use OCP\Authentication\Token\IToken as OCPIToken; diff --git a/lib/private/Authentication/Token/IWipeableToken.php b/lib/private/Authentication/Token/IWipeableToken.php index fc1476785cde8..a4744a16eba69 100644 --- a/lib/private/Authentication/Token/IWipeableToken.php +++ b/lib/private/Authentication/Token/IWipeableToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; interface IWipeableToken extends IToken { diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php index 836484dbf7f06..4643837737639 100644 --- a/lib/private/Authentication/Token/Manager.php +++ b/lib/private/Authentication/Token/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; use OC\Authentication\Exceptions\InvalidTokenException as OcInvalidTokenException; @@ -238,7 +239,6 @@ private function getProvider(OCPIToken $token): IProvider { throw new OcInvalidTokenException(); } - #[\Override] public function markPasswordInvalid(OCPIToken $token, string $tokenId) { $this->getProvider($token)->markPasswordInvalid($token, $tokenId); diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php index 11739507851e1..e3d5e7001ff5b 100644 --- a/lib/private/Authentication/Token/PublicKeyToken.php +++ b/lib/private/Authentication/Token/PublicKeyToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php index 9aabd69e57a12..cdf9556e146bd 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php +++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index a43d4a7f88819..a079c5e38f1ab 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; use OC\Authentication\Exceptions\ExpiredTokenException; diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php index 2a023f43b6826..08dce6fa5a1fb 100644 --- a/lib/private/Authentication/Token/RemoteWipe.php +++ b/lib/private/Authentication/Token/RemoteWipe.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Token; use OC\Authentication\Events\RemoteWipeFinished; diff --git a/lib/private/Authentication/Token/TokenCleanupJob.php b/lib/private/Authentication/Token/TokenCleanupJob.php index 76998eea4c1dd..d69e7b3783682 100644 --- a/lib/private/Authentication/Token/TokenCleanupJob.php +++ b/lib/private/Authentication/Token/TokenCleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\Token; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php index 70a3827f301a1..bf9b08efcf1c4 100644 --- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php +++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth\Db; use OCP\IDBConnection; diff --git a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php index f7b4e85e3ab7e..affd37aed021b 100644 --- a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php +++ b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use JsonSerializable; diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index fe6aae0f99f31..0211ac7454198 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Authentication\TwoFactorAuth; use BadMethodCallException; diff --git a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php index bf4c187f1e939..b829666f3c0be 100644 --- a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php +++ b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use OCP\IConfig; diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php index d1bfc4f4085b0..66313b1b0a320 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use Exception; diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php index f82f666ac9db9..c69380d4685d7 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use OC\Authentication\Exceptions\InvalidProviderException; diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php index d417721268c17..6f08eec54b26e 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider; diff --git a/lib/private/Authentication/TwoFactorAuth/Registry.php b/lib/private/Authentication/TwoFactorAuth/Registry.php index 1224a6caaf05f..6001ce70b33bf 100644 --- a/lib/private/Authentication/TwoFactorAuth/Registry.php +++ b/lib/private/Authentication/TwoFactorAuth/Registry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\TwoFactorAuth; use OC\Authentication\TwoFactorAuth\Db\ProviderUserAssignmentDao; diff --git a/lib/private/Authentication/WebAuthn/CredentialRepository.php b/lib/private/Authentication/WebAuthn/CredentialRepository.php index bf24d2b0b778b..a58dfa6444c74 100644 --- a/lib/private/Authentication/WebAuthn/CredentialRepository.php +++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\WebAuthn; use OC\Authentication\WebAuthn\Db\PublicKeyCredentialEntity; diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php index abc9a74f5c8cd..b3a780cb8e4b0 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\WebAuthn\Db; use JsonSerializable; diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php index fa7304157c8b6..2463f7dd1b42d 100644 --- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php +++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\WebAuthn\Db; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php index c322c844c9c03..932631f2aeaae 100644 --- a/lib/private/Authentication/WebAuthn/Manager.php +++ b/lib/private/Authentication/WebAuthn/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\WebAuthn; use Cose\Algorithm\Signature\ECDSA\ES256; diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php index b92a7aafacd29..2c674de8b060e 100644 --- a/lib/private/Avatar/Avatar.php +++ b/lib/private/Avatar/Avatar.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Avatar; use Imagick; @@ -228,7 +229,6 @@ protected function imageTTFCenter( return [$x, $y]; } - /** * Convert a string to an integer evenly * @param string $hash the text to parse diff --git a/lib/private/Avatar/AvatarManager.php b/lib/private/Avatar/AvatarManager.php index d4ea69a9584ac..fc508d7d2cd26 100644 --- a/lib/private/Avatar/AvatarManager.php +++ b/lib/private/Avatar/AvatarManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Avatar; use OC\KnownUser\KnownUserService; diff --git a/lib/private/Avatar/GuestAvatar.php b/lib/private/Avatar/GuestAvatar.php index 11e9a47223fda..7bbc3efdc796a 100644 --- a/lib/private/Avatar/GuestAvatar.php +++ b/lib/private/Avatar/GuestAvatar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Avatar; use OCP\Color; @@ -98,7 +99,6 @@ public function isCustomAvatar(): bool { return false; } - /** * Different color than for authorized user with the same name * to make it harder to impersonate people. diff --git a/lib/private/Avatar/PlaceholderAvatar.php b/lib/private/Avatar/PlaceholderAvatar.php index 7e3c35cbddfb6..705cbb754d406 100644 --- a/lib/private/Avatar/PlaceholderAvatar.php +++ b/lib/private/Avatar/PlaceholderAvatar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Avatar; use OC\NotSquareException; diff --git a/lib/private/Avatar/UserAvatar.php b/lib/private/Avatar/UserAvatar.php index f2dd98bcced92..97226f4bb3fc3 100644 --- a/lib/private/Avatar/UserAvatar.php +++ b/lib/private/Avatar/UserAvatar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Avatar; use OC\NotSquareException; diff --git a/lib/private/BackgroundJob/JobClassesRegistry.php b/lib/private/BackgroundJob/JobClassesRegistry.php index bfc4902f2f961..283ceedc1fd3a 100644 --- a/lib/private/BackgroundJob/JobClassesRegistry.php +++ b/lib/private/BackgroundJob/JobClassesRegistry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\BackgroundJob; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php index 242b78ade850b..a6d7f76141916 100644 --- a/lib/private/BackgroundJob/JobList.php +++ b/lib/private/BackgroundJob/JobList.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/BackgroundJob/JobRuns.php b/lib/private/BackgroundJob/JobRuns.php index 06a1662591055..7a19bdf001a0e 100644 --- a/lib/private/BackgroundJob/JobRuns.php +++ b/lib/private/BackgroundJob/JobRuns.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\BackgroundJob; use Exception; diff --git a/lib/private/Broadcast/Events/BroadcastEvent.php b/lib/private/Broadcast/Events/BroadcastEvent.php index 6d834e0b58d81..549ba44700fbe 100644 --- a/lib/private/Broadcast/Events/BroadcastEvent.php +++ b/lib/private/Broadcast/Events/BroadcastEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Broadcast\Events; use JsonSerializable; diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php index 0d312bd97976b..addc9b0cd20d0 100644 --- a/lib/private/Cache/File.php +++ b/lib/private/Cache/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Cache; use OC\Files\Filesystem; diff --git a/lib/private/Calendar/CalendarQuery.php b/lib/private/Calendar/CalendarQuery.php index f45a0ba30d794..e8e129e9d636f 100644 --- a/lib/private/Calendar/CalendarQuery.php +++ b/lib/private/Calendar/CalendarQuery.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Calendar; use OCP\Calendar\ICalendarQuery; diff --git a/lib/private/Calendar/Manager.php b/lib/private/Calendar/Manager.php index 1ef694ac6c224..be7853aee37fe 100644 --- a/lib/private/Calendar/Manager.php +++ b/lib/private/Calendar/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Calendar; use DateTimeInterface; diff --git a/lib/private/Calendar/Resource/Manager.php b/lib/private/Calendar/Resource/Manager.php index ace6e5a219c98..cd00e20649d19 100644 --- a/lib/private/Calendar/Resource/Manager.php +++ b/lib/private/Calendar/Resource/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Calendar\Resource; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/Calendar/Room/Manager.php b/lib/private/Calendar/Room/Manager.php index a31127068a40a..76de5eb34a73c 100644 --- a/lib/private/Calendar/Room/Manager.php +++ b/lib/private/Calendar/Room/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Calendar\Room; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/CapabilitiesManager.php b/lib/private/CapabilitiesManager.php index 494504af3d80a..884b957dbdd8d 100644 --- a/lib/private/CapabilitiesManager.php +++ b/lib/private/CapabilitiesManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\AppFramework\QueryException; diff --git a/lib/private/Collaboration/AutoComplete/Manager.php b/lib/private/Collaboration/AutoComplete/Manager.php index d94e4c431bc15..26220d2f8e2a8 100644 --- a/lib/private/Collaboration/AutoComplete/Manager.php +++ b/lib/private/Collaboration/AutoComplete/Manager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\AutoComplete; use OCP\Collaboration\AutoComplete\IManager; diff --git a/lib/private/Collaboration/Collaborators/GroupPlugin.php b/lib/private/Collaboration/Collaborators/GroupPlugin.php index 36143b7479f50..5f70fca126bc0 100644 --- a/lib/private/Collaboration/Collaborators/GroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/GroupPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; diff --git a/lib/private/Collaboration/Collaborators/LookupPlugin.php b/lib/private/Collaboration/Collaborators/LookupPlugin.php index de1bfa9edb932..9c48670daaaa4 100644 --- a/lib/private/Collaboration/Collaborators/LookupPlugin.php +++ b/lib/private/Collaboration/Collaborators/LookupPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCA\Federation\TrustedServers; diff --git a/lib/private/Collaboration/Collaborators/MailByMailPlugin.php b/lib/private/Collaboration/Collaborators/MailByMailPlugin.php index 5c4156c6e1936..57fcdbf199196 100644 --- a/lib/private/Collaboration/Collaborators/MailByMailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailByMailPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OC\KnownUser\KnownUserService; diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php index 3149a4d14f964..1f36ff0eadd62 100644 --- a/lib/private/Collaboration/Collaborators/MailPlugin.php +++ b/lib/private/Collaboration/Collaborators/MailPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OC\KnownUser\KnownUserService; @@ -151,7 +152,6 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b 'shareWith' => $cloud->getUser(), ], 'shareWithDisplayNameUnique' => !empty($emailAddress) ? $emailAddress : $cloud->getUser() - ]]; $searchResult->addResultSet($userType, [], $singleResult); $searchResult->markExactIdMatch($emailType); diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php index 68d0a462f00c7..d6ea7e6cc5733 100644 --- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php index 5dd17c9527bf7..20556bfb27773 100644 --- a/lib/private/Collaboration/Collaborators/RemotePlugin.php +++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCA\Federation\TrustedServers; @@ -36,7 +37,6 @@ public function __construct( $this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes'; } - #[\Override] public function search($search, $limit, $offset, ISearchResult $searchResult): bool { $result = ['wide' => [], 'exact' => []]; diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php index 4eb3b275c67cb..1e7f38e1c8547 100644 --- a/lib/private/Collaboration/Collaborators/Search.php +++ b/lib/private/Collaboration/Collaborators/Search.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCP\AppFramework\QueryException; diff --git a/lib/private/Collaboration/Collaborators/SearchResult.php b/lib/private/Collaboration/Collaborators/SearchResult.php index 0b887aac5453f..1a2e4f3d5cab6 100644 --- a/lib/private/Collaboration/Collaborators/SearchResult.php +++ b/lib/private/Collaboration/Collaborators/SearchResult.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchResult; diff --git a/lib/private/Collaboration/Collaborators/UserByMailPlugin.php b/lib/private/Collaboration/Collaborators/UserByMailPlugin.php index 6c1367cdba841..3805593b085ad 100644 --- a/lib/private/Collaboration/Collaborators/UserByMailPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserByMailPlugin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Collaborators; use OC\KnownUser\KnownUserService; diff --git a/lib/private/Collaboration/Resources/Collection.php b/lib/private/Collaboration/Resources/Collection.php index 59d52b9434411..36be0b041db1a 100644 --- a/lib/private/Collaboration/Resources/Collection.php +++ b/lib/private/Collaboration/Resources/Collection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Resources; use Doctrine\DBAL\Exception\ConstraintViolationException; diff --git a/lib/private/Collaboration/Resources/Listener.php b/lib/private/Collaboration/Resources/Listener.php index 1ee792a0b55cf..8e95a9f815e77 100644 --- a/lib/private/Collaboration/Resources/Listener.php +++ b/lib/private/Collaboration/Resources/Listener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Resources; use OCP\Collaboration\Resources\IManager; diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index 3e6e7e5d5bc55..f4673bc6e941c 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Resources; use OCP\Collaboration\Resources\CollectionException; diff --git a/lib/private/Collaboration/Resources/ProviderManager.php b/lib/private/Collaboration/Resources/ProviderManager.php index 839aef847ed6b..a73a383ac302c 100644 --- a/lib/private/Collaboration/Resources/ProviderManager.php +++ b/lib/private/Collaboration/Resources/ProviderManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Resources; use OCP\AppFramework\QueryException; diff --git a/lib/private/Collaboration/Resources/Resource.php b/lib/private/Collaboration/Resources/Resource.php index 2af252da59817..c61bd4a1dcab6 100644 --- a/lib/private/Collaboration/Resources/Resource.php +++ b/lib/private/Collaboration/Resources/Resource.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Collaboration\Resources; use OCP\Collaboration\Resources\ICollection; diff --git a/lib/private/Color.php b/lib/private/Color.php index 7b8024891988b..cf14d82b90d05 100644 --- a/lib/private/Color.php +++ b/lib/private/Color.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC; class Color { diff --git a/lib/private/Command/AsyncBus.php b/lib/private/Command/AsyncBus.php index 0215b1312380c..0f65a63c405f1 100644 --- a/lib/private/Command/AsyncBus.php +++ b/lib/private/Command/AsyncBus.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Command; use OCP\Command\IBus; diff --git a/lib/private/Command/CommandJob.php b/lib/private/Command/CommandJob.php index b00e6159f91a4..b461e3c137010 100644 --- a/lib/private/Command/CommandJob.php +++ b/lib/private/Command/CommandJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Command; use OCA\Files_Trashbin\Command\Expire; diff --git a/lib/private/Command/CronBus.php b/lib/private/Command/CronBus.php index 0b059e2e5af50..07cc92d03200e 100644 --- a/lib/private/Command/CronBus.php +++ b/lib/private/Command/CronBus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Command; use OCP\BackgroundJob\IJobList; diff --git a/lib/private/Command/FileAccess.php b/lib/private/Command/FileAccess.php index 1af1591492d59..a8deeac359e83 100644 --- a/lib/private/Command/FileAccess.php +++ b/lib/private/Command/FileAccess.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Command; use OCP\IUser; diff --git a/lib/private/Command/QueueBus.php b/lib/private/Command/QueueBus.php index 9c3c246795960..de2d1e3f9c095 100644 --- a/lib/private/Command/QueueBus.php +++ b/lib/private/Command/QueueBus.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Command; use OCA\Files_Trashbin\Command\Expire; diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 2736d14ccaf13..b3b4da225e2bf 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Comments; use OCP\Comments\IComment; @@ -120,7 +121,6 @@ public function getTopmostParentId(): string { return $this->data['topmostParentId']; } - /** * Sets the topmost parent ID and returns itself * diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php index b4922f967e561..c6857162f2bee 100644 --- a/lib/private/Comments/Manager.php +++ b/lib/private/Comments/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Comments; use OCP\AppFramework\Utility\ITimeFactory; @@ -262,7 +263,6 @@ public function get($id): IComment { throw new NotFoundException(); } - $comment = $this->getCommentFromData($data); $this->cache($comment); return $comment; diff --git a/lib/private/Comments/ManagerFactory.php b/lib/private/Comments/ManagerFactory.php index cef07216a2725..043c7cf6d7302 100644 --- a/lib/private/Comments/ManagerFactory.php +++ b/lib/private/Comments/ManagerFactory.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Comments; use OCP\Comments\ICommentsManager; diff --git a/lib/private/Config.php b/lib/private/Config.php index 1a8337907f125..ecfb9fc316038 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\HintException; diff --git a/lib/private/Config/ConfigManager.php b/lib/private/Config/ConfigManager.php index 302b7b3b725b8..432fc344eb530 100644 --- a/lib/private/Config/ConfigManager.php +++ b/lib/private/Config/ConfigManager.php @@ -41,7 +41,6 @@ public function clearConfigCaches(): void { $this->userConfig->clearCacheAll(); } - /** * Use the rename values from the list of ConfigLexiconEntry defined in each app ConfigLexicon * to migrate config value to a new config key. @@ -190,7 +189,6 @@ private function migrateUserConfigKeys(string $appId): void { } } - /** * converting value from rename to the new key * @@ -202,19 +200,15 @@ private function migrateAppConfigValue(string $appId, Entry $entry): void { case ValueType::STRING: $this->appConfig->setValueString($appId, $entry->getKey(), $value); return; - case ValueType::INT: $this->appConfig->setValueInt($appId, $entry->getKey(), $this->convertToInt($value)); return; - case ValueType::FLOAT: $this->appConfig->setValueFloat($appId, $entry->getKey(), $this->convertToFloat($value)); return; - case ValueType::BOOL: $this->appConfig->setValueBool($appId, $entry->getKey(), $this->convertToBool($value, $entry)); return; - case ValueType::ARRAY: $this->appConfig->setValueArray($appId, $entry->getKey(), $this->convertToArray($value)); return; @@ -232,19 +226,15 @@ private function migrateUserConfigValue(string $userId, string $appId, Entry $en case ValueType::STRING: $this->userConfig->setValueString($userId, $appId, $entry->getKey(), $value); return; - case ValueType::INT: $this->userConfig->setValueInt($userId, $appId, $entry->getKey(), $this->convertToInt($value)); return; - case ValueType::FLOAT: $this->userConfig->setValueFloat($userId, $appId, $entry->getKey(), $this->convertToFloat($value)); return; - case ValueType::BOOL: $this->userConfig->setValueBool($userId, $appId, $entry->getKey(), $this->convertToBool($value, $entry)); return; - case ValueType::ARRAY: $this->userConfig->setValueArray($userId, $appId, $entry->getKey(), $this->convertToArray($value)); return; diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php index 4ee0dc4e04b4d..304980bce60fd 100644 --- a/lib/private/Config/UserConfig.php +++ b/lib/private/Config/UserConfig.php @@ -364,7 +364,6 @@ public function getValuesByApps(string $userId, string $key, bool $lazy = false, return $values; } - /** * @inheritDoc * @@ -928,7 +927,6 @@ public function setValueMixed( ); } - /** * @inheritDoc * @@ -1469,7 +1467,6 @@ public function updateIndexed(string $userId, string $app, string $key, bool $in return true; } - /** * @inheritDoc * @@ -1970,7 +1967,6 @@ private function convertTypedValue(string $value, ValueType $type): string|int|f return $value; } - /** * will change referenced $value with the decrypted value in case of encrypted (sensitive value) * diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 2e4783a11cf1e..2aaa6f21baf13 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Console; use ArgumentCountError; diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index 44de18263e659..adc4296e596e0 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Console; use OCP\IConfig; diff --git a/lib/private/Contacts/ContactsMenu/ActionFactory.php b/lib/private/Contacts/ContactsMenu/ActionFactory.php index ead893e5745c8..b703d7fb53ab6 100644 --- a/lib/private/Contacts/ContactsMenu/ActionFactory.php +++ b/lib/private/Contacts/ContactsMenu/ActionFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Contacts\ContactsMenu; use OC\Contacts\ContactsMenu\Actions\LinkAction; diff --git a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php index bee6dce567770..0482db2cae027 100644 --- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php +++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Contacts\ContactsMenu\Actions; use OCP\Contacts\ContactsMenu\ILinkAction; diff --git a/lib/private/Contacts/ContactsMenu/Manager.php b/lib/private/Contacts/ContactsMenu/Manager.php index f8def45421b1d..9b2fb6238bbe8 100644 --- a/lib/private/Contacts/ContactsMenu/Manager.php +++ b/lib/private/Contacts/ContactsMenu/Manager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Contacts\ContactsMenu; use Exception; diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php index 75eeb0f5e34a4..4f148a6d6b1f9 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Contacts\ContactsMenu\Providers; use OCP\Contacts\ContactsMenu\IActionFactory; diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php index e19efb243b8f3..847dd535fa9b7 100644 --- a/lib/private/ContactsManager.php +++ b/lib/private/ContactsManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\Constants; diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php index 6ebcfdc34f242..2b6ea3eeb97a5 100644 --- a/lib/private/DB/Adapter.php +++ b/lib/private/DB/Adapter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/AdapterMySQL.php b/lib/private/DB/AdapterMySQL.php index b50e676249da0..b038d8c28a062 100644 --- a/lib/private/DB/AdapterMySQL.php +++ b/lib/private/DB/AdapterMySQL.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class AdapterMySQL extends Adapter { diff --git a/lib/private/DB/AdapterOCI8.php b/lib/private/DB/AdapterOCI8.php index 70fe9290cc570..f27ff858d9b27 100644 --- a/lib/private/DB/AdapterOCI8.php +++ b/lib/private/DB/AdapterOCI8.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class AdapterOCI8 extends Adapter { diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index fe7181005df3b..b565846d495f0 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class AdapterPgSql extends Adapter { diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php index 00fff5620944f..0d8c4e3844b30 100644 --- a/lib/private/DB/AdapterSqlite.php +++ b/lib/private/DB/AdapterSqlite.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 27be1b327e2c6..c53cf5f3dd8f2 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\Common\EventManager; @@ -786,7 +787,6 @@ public function supports4ByteText() { return $this->getParams()['charset'] === 'utf8mb4'; } - /** * Create the schema of the connected database * diff --git a/lib/private/DB/ConnectionAdapter.php b/lib/private/DB/ConnectionAdapter.php index 0f275c3aae2e6..814b3fa5d4987 100644 --- a/lib/private/DB/ConnectionAdapter.php +++ b/lib/private/DB/ConnectionAdapter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php index 3d5de0d7c8483..51fb565859c23 100644 --- a/lib/private/DB/ConnectionFactory.php +++ b/lib/private/DB/ConnectionFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\Common\EventManager; diff --git a/lib/private/DB/Exceptions/DbalException.php b/lib/private/DB/Exceptions/DbalException.php index 483b3d8542ff7..2e9dfa8fa63bc 100644 --- a/lib/private/DB/Exceptions/DbalException.php +++ b/lib/private/DB/Exceptions/DbalException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\Exceptions; use Doctrine\DBAL\ConnectionException; diff --git a/lib/private/DB/Middleware/UtcTimezoneMiddleware.php b/lib/private/DB/Middleware/UtcTimezoneMiddleware.php index e7044bf73ea25..679391009c435 100644 --- a/lib/private/DB/Middleware/UtcTimezoneMiddleware.php +++ b/lib/private/DB/Middleware/UtcTimezoneMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\Middleware; use Doctrine\DBAL\Driver; diff --git a/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php b/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php index d8e91f5c39323..0ef4e8ad0c07b 100644 --- a/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php +++ b/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\Middleware; use Doctrine\DBAL\Driver\Middleware\AbstractDriverMiddleware; diff --git a/lib/private/DB/MigrationException.php b/lib/private/DB/MigrationException.php index d7e0d9528f094..4feaf2863f148 100644 --- a/lib/private/DB/MigrationException.php +++ b/lib/private/DB/MigrationException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class MigrationException extends \Exception { diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index e7f40f4ed0309..a0cb407a94d84 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Schema\Index; diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php index 0d2f73a9a1df7..737a6dbe3d3ff 100644 --- a/lib/private/DB/Migrator.php +++ b/lib/private/DB/Migrator.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Connection; diff --git a/lib/private/DB/MigratorExecuteSqlEvent.php b/lib/private/DB/MigratorExecuteSqlEvent.php index 8a5c43cf5e580..f58902a9282b6 100644 --- a/lib/private/DB/MigratorExecuteSqlEvent.php +++ b/lib/private/DB/MigratorExecuteSqlEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use OCP\EventDispatcher\Event; diff --git a/lib/private/DB/MissingColumnInformation.php b/lib/private/DB/MissingColumnInformation.php index 5e8402d394ebc..68d4e03dcbc82 100644 --- a/lib/private/DB/MissingColumnInformation.php +++ b/lib/private/DB/MissingColumnInformation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; class MissingColumnInformation { diff --git a/lib/private/DB/MissingIndexInformation.php b/lib/private/DB/MissingIndexInformation.php index 99a8178285844..be3135e775105 100644 --- a/lib/private/DB/MissingIndexInformation.php +++ b/lib/private/DB/MissingIndexInformation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; class MissingIndexInformation { diff --git a/lib/private/DB/MissingPrimaryKeyInformation.php b/lib/private/DB/MissingPrimaryKeyInformation.php index 355ce86423aa2..6885526c529d7 100644 --- a/lib/private/DB/MissingPrimaryKeyInformation.php +++ b/lib/private/DB/MissingPrimaryKeyInformation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; class MissingPrimaryKeyInformation { diff --git a/lib/private/DB/MySqlTools.php b/lib/private/DB/MySqlTools.php index 3413be43417b5..cd376e6381d08 100644 --- a/lib/private/DB/MySqlTools.php +++ b/lib/private/DB/MySqlTools.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use OCP\IDBConnection; diff --git a/lib/private/DB/OCSqlitePlatform.php b/lib/private/DB/OCSqlitePlatform.php index d46aa694665fd..d88dfbd1dac6a 100644 --- a/lib/private/DB/OCSqlitePlatform.php +++ b/lib/private/DB/OCSqlitePlatform.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class OCSqlitePlatform extends \Doctrine\DBAL\Platforms\SqlitePlatform { diff --git a/lib/private/DB/ObjectParameter.php b/lib/private/DB/ObjectParameter.php index 04159f818cfc7..e4dd4a85fb623 100644 --- a/lib/private/DB/ObjectParameter.php +++ b/lib/private/DB/ObjectParameter.php @@ -8,6 +8,7 @@ * SPDX-FileCopyrightText: 2022 Fabien Potencier * SPDX-License-Identifier: AGPL-3.0-or-later AND MIT */ + namespace OC\DB; final class ObjectParameter { diff --git a/lib/private/DB/OracleConnection.php b/lib/private/DB/OracleConnection.php index 6b4efa8ca5a2d..5cf6324dc5968 100644 --- a/lib/private/DB/OracleConnection.php +++ b/lib/private/DB/OracleConnection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; class OracleConnection extends Connection { diff --git a/lib/private/DB/OracleMigrator.php b/lib/private/DB/OracleMigrator.php index 30e44af6e954f..68eb6324226d9 100644 --- a/lib/private/DB/OracleMigrator.php +++ b/lib/private/DB/OracleMigrator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/PgSqlTools.php b/lib/private/DB/PgSqlTools.php index cc8812e202bec..e2482fb498523 100644 --- a/lib/private/DB/PgSqlTools.php +++ b/lib/private/DB/PgSqlTools.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Schema\AbstractAsset; diff --git a/lib/private/DB/PreparedStatement.php b/lib/private/DB/PreparedStatement.php index f88ad0edc6c2c..3ce7fdce5ccc5 100644 --- a/lib/private/DB/PreparedStatement.php +++ b/lib/private/DB/PreparedStatement.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/QueryBuilder/CompositeExpression.php b/lib/private/DB/QueryBuilder/CompositeExpression.php index 6a1d6c3f5139a..093fd9dee42d9 100644 --- a/lib/private/DB/QueryBuilder/CompositeExpression.php +++ b/lib/private/DB/QueryBuilder/CompositeExpression.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ICompositeExpression; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php index 3565e97efd1dd..8dea79417a4e7 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder\ExpressionBuilder; use Doctrine\DBAL\Query\Expression\ExpressionBuilder as DoctrineExpressionBuilder; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php index a604f6957a384..345921249bce7 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\ConnectionAdapter; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index f95cd98921fd0..16b8cde858298 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php index e3dd5841a1121..6b3a855afebbe 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php index f1ae4d06536ad..e10b299c7ddc2 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/SqliteExpressionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php index acdf19189a7f2..4653ee0c489fe 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php index 606d1e6b288fa..d0370f97a2d43 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\ConnectionAdapter; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php index c41f9ff1bfddd..7bc3433b4be6c 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php index b317d9f21b938..1813e21a86e5c 100644 --- a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php +++ b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder\FunctionBuilder; use OC\DB\QueryBuilder\QueryFunction; diff --git a/lib/private/DB/QueryBuilder/Literal.php b/lib/private/DB/QueryBuilder/Literal.php index 438883b077ffa..bf7960eec342a 100644 --- a/lib/private/DB/QueryBuilder/Literal.php +++ b/lib/private/DB/QueryBuilder/Literal.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ILiteral; diff --git a/lib/private/DB/QueryBuilder/Parameter.php b/lib/private/DB/QueryBuilder/Parameter.php index fa7b7dbd0a6c0..c3a5daec9ce62 100644 --- a/lib/private/DB/QueryBuilder/Parameter.php +++ b/lib/private/DB/QueryBuilder/Parameter.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\IParameter; diff --git a/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php b/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php index a08858d1d6bd6..28e4a4a8ebd01 100644 --- a/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php +++ b/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php @@ -120,7 +120,6 @@ private static function parseSubCondition($condition, string $join, string $alia throw new InvalidPartitionedQueryException("Can only join on $join with a single condition"); } - if (self::mentionsAlias($parts[0], $fromAlias)) { return new JoinCondition($parts[0], self::getAliasForPart($parts[0]), $parts[1], self::getAliasForPart($parts[1]), [], []); } elseif (self::mentionsAlias($parts[1], $fromAlias)) { diff --git a/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php b/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php index 3e66bab1f4d33..8c04cc7929219 100644 --- a/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php +++ b/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php @@ -179,7 +179,6 @@ private function applySelects(): void { $this->selects = []; } - public function addPartition(PartitionSplit $partition): void { $this->partitions[] = $partition; } @@ -375,7 +374,6 @@ public function andWhere(...$where) { return $this; } - private function getPartitionForPredicate(string $predicate): ?PartitionSplit { foreach ($this->partitions as $partition) { diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index 30e85675a75dc..f5252fcfaccc7 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use Doctrine\DBAL\Query\QueryException; @@ -283,7 +284,6 @@ public function executeStatement(?IDBConnection $connection = null): int { ); } - /** * Gets the complete SQL string formed by the current specifications of this QueryBuilder. * diff --git a/lib/private/DB/QueryBuilder/QueryFunction.php b/lib/private/DB/QueryBuilder/QueryFunction.php index fa456836a4095..4d008bd464c0a 100644 --- a/lib/private/DB/QueryBuilder/QueryFunction.php +++ b/lib/private/DB/QueryBuilder/QueryFunction.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\IQueryFunction; diff --git a/lib/private/DB/QueryBuilder/QuoteHelper.php b/lib/private/DB/QueryBuilder/QuoteHelper.php index 7ce4b359638d4..dfed901f7e70a 100644 --- a/lib/private/DB/QueryBuilder/QuoteHelper.php +++ b/lib/private/DB/QueryBuilder/QuoteHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ILiteral; diff --git a/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php b/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php index 034abd3ce2099..0c2bf2fa1db14 100644 --- a/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php +++ b/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php @@ -437,5 +437,4 @@ public function getLastInsertId(): int { } } - } diff --git a/lib/private/DB/QueryBuilder/TypedQueryBuilder.php b/lib/private/DB/QueryBuilder/TypedQueryBuilder.php index eb3a81a0c23d4..8f95b99f74d28 100644 --- a/lib/private/DB/QueryBuilder/TypedQueryBuilder.php +++ b/lib/private/DB/QueryBuilder/TypedQueryBuilder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB\QueryBuilder; use OCP\DB\QueryBuilder\ITypedQueryBuilder; diff --git a/lib/private/DB/ResultAdapter.php b/lib/private/DB/ResultAdapter.php index b403e78673eb2..45922f8e31004 100644 --- a/lib/private/DB/ResultAdapter.php +++ b/lib/private/DB/ResultAdapter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; use Doctrine\DBAL\Result; diff --git a/lib/private/DB/SQLiteMigrator.php b/lib/private/DB/SQLiteMigrator.php index 0d178506d08b0..a3704dda1007f 100644 --- a/lib/private/DB/SQLiteMigrator.php +++ b/lib/private/DB/SQLiteMigrator.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\DBAL\Schema\Schema; diff --git a/lib/private/DB/SQLiteSessionInit.php b/lib/private/DB/SQLiteSessionInit.php index e3c64924e63b4..26113a527809a 100644 --- a/lib/private/DB/SQLiteSessionInit.php +++ b/lib/private/DB/SQLiteSessionInit.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\DB; use Doctrine\Common\EventSubscriber; diff --git a/lib/private/DB/SchemaWrapper.php b/lib/private/DB/SchemaWrapper.php index 17c457ac53e6d..103bcb25cccaf 100644 --- a/lib/private/DB/SchemaWrapper.php +++ b/lib/private/DB/SchemaWrapper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; use Doctrine\DBAL\Exception; diff --git a/lib/private/DB/SetTransactionIsolationLevel.php b/lib/private/DB/SetTransactionIsolationLevel.php index 5e43a32c3bbe9..ca8254832fb26 100644 --- a/lib/private/DB/SetTransactionIsolationLevel.php +++ b/lib/private/DB/SetTransactionIsolationLevel.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DB; use Doctrine\Common\EventSubscriber; diff --git a/lib/private/Dashboard/Manager.php b/lib/private/Dashboard/Manager.php index 4619a4ee5c14a..2d4a8f1a0db7a 100644 --- a/lib/private/Dashboard/Manager.php +++ b/lib/private/Dashboard/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Dashboard; use InvalidArgumentException; diff --git a/lib/private/DatabaseException.php b/lib/private/DatabaseException.php index 70190d88bd216..f09bb1ee5c2d6 100644 --- a/lib/private/DatabaseException.php +++ b/lib/private/DatabaseException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class DatabaseException extends \Exception { diff --git a/lib/private/DatabaseSetupException.php b/lib/private/DatabaseSetupException.php index 03f769b3c74b6..afbd94d9ac995 100644 --- a/lib/private/DatabaseSetupException.php +++ b/lib/private/DatabaseSetupException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\HintException; diff --git a/lib/private/DateTimeFormatter.php b/lib/private/DateTimeFormatter.php index 91c84baee2733..05bfba084d7d7 100644 --- a/lib/private/DateTimeFormatter.php +++ b/lib/private/DateTimeFormatter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\IDateTimeFormatter; diff --git a/lib/private/DateTimeZone.php b/lib/private/DateTimeZone.php index 2c5e1dbab3ed6..d31a50823d02d 100644 --- a/lib/private/DateTimeZone.php +++ b/lib/private/DateTimeZone.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\IConfig; diff --git a/lib/private/Diagnostics/Event.php b/lib/private/Diagnostics/Event.php index c322f99e30691..e449ba5d269cc 100644 --- a/lib/private/Diagnostics/Event.php +++ b/lib/private/Diagnostics/Event.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Diagnostics; use OCP\Diagnostics\IEvent; diff --git a/lib/private/Diagnostics/EventLogger.php b/lib/private/Diagnostics/EventLogger.php index 996f7165f96b8..37b062df76d67 100644 --- a/lib/private/Diagnostics/EventLogger.php +++ b/lib/private/Diagnostics/EventLogger.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Diagnostics; use OC\Log; diff --git a/lib/private/Diagnostics/Query.php b/lib/private/Diagnostics/Query.php index 5b687de935fa0..22bd1a3928557 100644 --- a/lib/private/Diagnostics/Query.php +++ b/lib/private/Diagnostics/Query.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Diagnostics; use OCP\Diagnostics\IQuery; diff --git a/lib/private/Diagnostics/QueryLogger.php b/lib/private/Diagnostics/QueryLogger.php index ea378d15d1124..cd7cff6338a9b 100644 --- a/lib/private/Diagnostics/QueryLogger.php +++ b/lib/private/Diagnostics/QueryLogger.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Diagnostics; use OCP\Cache\CappedMemoryCache; @@ -23,7 +24,6 @@ public function __construct() { $this->queries = new CappedMemoryCache(1024); } - /** * @var bool - Module needs to be activated by some app */ diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php index f3a62fc201f4c..1189aaf1867e0 100644 --- a/lib/private/DirectEditing/Manager.php +++ b/lib/private/DirectEditing/Manager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DirectEditing; use Doctrine\DBAL\FetchMode; @@ -226,7 +227,6 @@ public function refreshToken(string $token): bool { return $result !== 0; } - public function invalidateToken(string $token): bool { $query = $this->connection->getQueryBuilder(); $query->delete(self::TABLE_TOKENS) diff --git a/lib/private/DirectEditing/Token.php b/lib/private/DirectEditing/Token.php index ece88c293aa97..7fbdb798546ef 100644 --- a/lib/private/DirectEditing/Token.php +++ b/lib/private/DirectEditing/Token.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\DirectEditing; use OCP\DirectEditing\IToken; diff --git a/lib/private/EmojiHelper.php b/lib/private/EmojiHelper.php index 7f1046d6f2d11..6ab57be751e95 100644 --- a/lib/private/EmojiHelper.php +++ b/lib/private/EmojiHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC; use OCP\IDBConnection; diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index af5b787385831..23a7af4486319 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption; use OC\Files\Filesystem; diff --git a/lib/private/Encryption/Exceptions/DecryptionFailedException.php b/lib/private/Encryption/Exceptions/DecryptionFailedException.php index 126aec1370961..8c4e87ef8b3b8 100644 --- a/lib/private/Encryption/Exceptions/DecryptionFailedException.php +++ b/lib/private/Encryption/Exceptions/DecryptionFailedException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php b/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php index 12d0b2ee04797..5e71397bf6192 100644 --- a/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php +++ b/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionFailedException.php b/lib/private/Encryption/Exceptions/EncryptionFailedException.php index fc95f70ea7d58..94167ae90324b 100644 --- a/lib/private/Encryption/Exceptions/EncryptionFailedException.php +++ b/lib/private/Encryption/Exceptions/EncryptionFailedException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php index c6136bc025598..d37f01424a6fe 100644 --- a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php +++ b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php b/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php index f31adb757e1e7..da6b24b08b99f 100644 --- a/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php +++ b/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php b/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php index 0d2350ca5dc42..e668ca724e8cf 100644 --- a/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php +++ b/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php b/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php index 6b4db0dbc7750..29a6f007c41cf 100644 --- a/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php +++ b/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/Exceptions/UnknownCipherException.php b/lib/private/Encryption/Exceptions/UnknownCipherException.php index b70f008b9f0df..5f5e604c7b6a3 100644 --- a/lib/private/Encryption/Exceptions/UnknownCipherException.php +++ b/lib/private/Encryption/Exceptions/UnknownCipherException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Exceptions; use OCP\Encryption\Exceptions\GenericEncryptionException; diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php index 6b4b7528bf39b..0a4423ce38e3c 100644 --- a/lib/private/Encryption/File.php +++ b/lib/private/Encryption/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption; use OCA\Files_External\Service\GlobalStoragesService; @@ -81,7 +82,6 @@ public function getAccessList($path) { $userIds = array_merge($userIds, $resultForParents['users']); $public = $resultForParents['public'] || $resultForParents['remote']; - // Find out who, if anyone, is sharing the file if ($file !== null) { $resultForFile = $this->shareManager->getAccessList($file, false); diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php index 48a5bc1bdc34f..7180d206d558c 100644 --- a/lib/private/Encryption/Keys/Storage.php +++ b/lib/private/Encryption/Keys/Storage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption\Keys; use OC\Encryption\Util; @@ -341,7 +342,6 @@ public function renameKeys($source, $target) { return false; } - /** * copy keys if a file was renamed * diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php index ac27f0911b8da..b7db4dced1790 100644 --- a/lib/private/Encryption/Manager.php +++ b/lib/private/Encryption/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption; use OC\Encryption\Exceptions\ModuleAlreadyExistsException; @@ -215,7 +216,6 @@ public function forceWrapStorage(IMountPoint $mountPoint, IStorage $storage) { return $encryptionWrapper->wrapStorage($mountPoint->getMountPoint(), $storage, $mountPoint, true); } - /** * check if key storage is ready * diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index 0fff34cb11192..8002131d83e58 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Encryption; use OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException; @@ -275,7 +276,6 @@ public function isExcluded($path) { return true; } - //detect system wide folders if (in_array($root[1], $this->excludedPaths)) { return true; diff --git a/lib/private/EventDispatcher/EventDispatcher.php b/lib/private/EventDispatcher/EventDispatcher.php index 5bba7747c8af8..9b44ac89f9873 100644 --- a/lib/private/EventDispatcher/EventDispatcher.php +++ b/lib/private/EventDispatcher/EventDispatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\EventDispatcher; use OC\Broadcast\Events\BroadcastEvent; diff --git a/lib/private/EventSource.php b/lib/private/EventSource.php index 0876a4404655a..c51b0cc27897f 100644 --- a/lib/private/EventSource.php +++ b/lib/private/EventSource.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\IEventSource; diff --git a/lib/private/Federation/CloudFederationFactory.php b/lib/private/Federation/CloudFederationFactory.php index f183fa3e87d77..ffe86305295b8 100644 --- a/lib/private/Federation/CloudFederationFactory.php +++ b/lib/private/Federation/CloudFederationFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OCP\Federation\ICloudFederationFactory; diff --git a/lib/private/Federation/CloudFederationNotification.php b/lib/private/Federation/CloudFederationNotification.php index b5ecd4688149c..cf4a8389a341b 100644 --- a/lib/private/Federation/CloudFederationNotification.php +++ b/lib/private/Federation/CloudFederationNotification.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OCP\Federation\ICloudFederationNotification; diff --git a/lib/private/Federation/CloudFederationProviderManager.php b/lib/private/Federation/CloudFederationProviderManager.php index 77d225a49b31a..a0bafa84c997f 100644 --- a/lib/private/Federation/CloudFederationProviderManager.php +++ b/lib/private/Federation/CloudFederationProviderManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OC\AppFramework\Http; @@ -52,7 +53,6 @@ public function __construct( ) { } - /** * Registers an callback function which must return an cloud federation provider * diff --git a/lib/private/Federation/CloudFederationShare.php b/lib/private/Federation/CloudFederationShare.php index 311a0ee7f5bc7..bcc9e7a87d3f5 100644 --- a/lib/private/Federation/CloudFederationShare.php +++ b/lib/private/Federation/CloudFederationShare.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OCP\Federation\ICloudFederationShare; diff --git a/lib/private/Federation/CloudId.php b/lib/private/Federation/CloudId.php index 9150d89d4d99b..6964bbe60b3fb 100644 --- a/lib/private/Federation/CloudId.php +++ b/lib/private/Federation/CloudId.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OCP\Federation\ICloudId; diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index 57217af524e86..c94fa7dac83e2 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Federation; use OCA\DAV\Events\CardUpdatedEvent; diff --git a/lib/private/Files/AppData/AppData.php b/lib/private/Files/AppData/AppData.php index b4e8d51d4385f..6790ca40474a5 100644 --- a/lib/private/Files/AppData/AppData.php +++ b/lib/private/Files/AppData/AppData.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\AppData; use OC\Files\SimpleFS\SimpleFolder; diff --git a/lib/private/Files/AppData/Factory.php b/lib/private/Files/AppData/Factory.php index cf436b54ea300..6cff491f0976d 100644 --- a/lib/private/Files/AppData/Factory.php +++ b/lib/private/Files/AppData/Factory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\AppData; use OC\SystemConfig; diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index b90d241ab4568..9a897ba68bc3c 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OC\DatabaseException; @@ -1020,7 +1021,6 @@ public function calculateFolderSize($path, $entry = null) { return $this->calculateFolderSizeInner($path, $entry); } - /** * inner function because we can't add new params to the public function without breaking any child classes * diff --git a/lib/private/Files/Cache/CacheDependencies.php b/lib/private/Files/Cache/CacheDependencies.php index a115dcfbdbade..a8c318223733c 100644 --- a/lib/private/Files/Cache/CacheDependencies.php +++ b/lib/private/Files/Cache/CacheDependencies.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OC\SystemConfig; diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index 74af7d0a59800..1dbdda4240b6b 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEntry; @@ -56,25 +57,21 @@ public function getStorageId() { return $this->data['storage']; } - #[\Override] public function getPath() { return (string)$this->data['path']; } - #[\Override] public function getName() { return $this->data['name']; } - #[\Override] public function getMimeType(): string { return $this->data['mimetype'] ?? 'application/octet-stream'; } - #[\Override] public function getMimePart() { return $this->data['mimepart']; diff --git a/lib/private/Files/Cache/CacheQueryBuilder.php b/lib/private/Files/Cache/CacheQueryBuilder.php index 3174974b6f5ee..b62dd6f21208e 100644 --- a/lib/private/Files/Cache/CacheQueryBuilder.php +++ b/lib/private/Files/Cache/CacheQueryBuilder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OC\DB\QueryBuilder\ExtendedQueryBuilder; diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php index 7db87accc328f..324ae352d12c2 100644 --- a/lib/private/Files/Cache/FailedCache.php +++ b/lib/private/Files/Cache/FailedCache.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OC\Files\Search\SearchComparison; diff --git a/lib/private/Files/Cache/FileAccess.php b/lib/private/Files/Cache/FileAccess.php index b7357dfe0bca2..016ff6de46ec7 100644 --- a/lib/private/Files/Cache/FileAccess.php +++ b/lib/private/Files/Cache/FileAccess.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OC\Files\Mount\LocalHomeMountProvider; diff --git a/lib/private/Files/Cache/HomeCache.php b/lib/private/Files/Cache/HomeCache.php index a0b4754ff970f..b34c1e4db088f 100644 --- a/lib/private/Files/Cache/HomeCache.php +++ b/lib/private/Files/Cache/HomeCache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/private/Files/Cache/HomePropagator.php b/lib/private/Files/Cache/HomePropagator.php index f42e1d880ad44..eceae6eb11d43 100644 --- a/lib/private/Files/Cache/HomePropagator.php +++ b/lib/private/Files/Cache/HomePropagator.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OCP\Files\Storage\IStorage; diff --git a/lib/private/Files/Cache/LocalRootScanner.php b/lib/private/Files/Cache/LocalRootScanner.php index be9f74daf8a1f..0f72147d5a6ca 100644 --- a/lib/private/Files/Cache/LocalRootScanner.php +++ b/lib/private/Files/Cache/LocalRootScanner.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OC\Files\Storage\Storage; diff --git a/lib/private/Files/Cache/MoveFromCacheTrait.php b/lib/private/Files/Cache/MoveFromCacheTrait.php index a13e0d7d00e89..f4fd07bb4ba79 100644 --- a/lib/private/Files/Cache/MoveFromCacheTrait.php +++ b/lib/private/Files/Cache/MoveFromCacheTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OCP\Files\Cache\ICache; diff --git a/lib/private/Files/Cache/NullWatcher.php b/lib/private/Files/Cache/NullWatcher.php index e6973e8d26651..a422a9410dbb7 100644 --- a/lib/private/Files/Cache/NullWatcher.php +++ b/lib/private/Files/Cache/NullWatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; class NullWatcher extends Watcher { diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php index 38d8ccee6410b..722866dd1b349 100644 --- a/lib/private/Files/Cache/Propagator.php +++ b/lib/private/Files/Cache/Propagator.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OC\DB\Exceptions\DbalException; diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php index 91a35cb63daea..8cbc4591d750b 100644 --- a/lib/private/Files/Cache/QuerySearchHelper.php +++ b/lib/private/Files/Cache/QuerySearchHelper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OC\Files\Cache\Wrapper\CacheJail; @@ -79,7 +80,6 @@ protected function applySearchConstraints( } } - /** * @return list */ @@ -118,7 +118,6 @@ protected function equipQueryForDavTags(CacheQueryBuilder $query, IUser $user): )); } - protected function equipQueryForShares(CacheQueryBuilder $query): void { $query->join('file', 'share', 's', $query->expr()->eq('file.fileid', 's.file_source')); } diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 36c8c02a8bfca..58f15755277d4 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use Doctrine\DBAL\Exception; diff --git a/lib/private/Files/Cache/SearchBuilder.php b/lib/private/Files/Cache/SearchBuilder.php index 53a6c6f6596fe..009a1d068e18e 100644 --- a/lib/private/Files/Cache/SearchBuilder.php +++ b/lib/private/Files/Cache/SearchBuilder.php @@ -286,7 +286,6 @@ private function validateComparison(ISearchComparison $operator) { } } - private function getExtraOperatorField(ISearchComparison $operator, IMetadataQuery $metadataQuery): array { $field = $operator->getField(); $value = $operator->getValue(); diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php index 8eea54b58409d..7b16eabb0bd89 100644 --- a/lib/private/Files/Cache/Storage.php +++ b/lib/private/Files/Cache/Storage.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OC\DB\Exceptions\DbalException; diff --git a/lib/private/Files/Cache/StorageGlobal.php b/lib/private/Files/Cache/StorageGlobal.php index 53a40c034cede..6efefc149adb4 100644 --- a/lib/private/Files/Cache/StorageGlobal.php +++ b/lib/private/Files/Cache/StorageGlobal.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 5c55bbe34e4a0..62d43be5f592f 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use Doctrine\DBAL\Exception\DeadlockException; diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php index 48c5e323514ae..14769772509cd 100644 --- a/lib/private/Files/Cache/Watcher.php +++ b/lib/private/Files/Cache/Watcher.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache; use OC\Files\Storage\Storage; diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 477d85c69337d..53140f29217c2 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Cache; diff --git a/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php b/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php index 56e661b3c02f7..5ad88ce12e843 100644 --- a/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php +++ b/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache\Wrapper; use OCP\Files\Cache\ICache; diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index c08a703a08a5d..1139e900cc272 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Cache; diff --git a/lib/private/Files/Cache/Wrapper/JailPropagator.php b/lib/private/Files/Cache/Wrapper/JailPropagator.php index 2b5b5a2d6a1e3..59950f925793d 100644 --- a/lib/private/Files/Cache/Wrapper/JailPropagator.php +++ b/lib/private/Files/Cache/Wrapper/JailPropagator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Propagator; diff --git a/lib/private/Files/Cache/Wrapper/JailWatcher.php b/lib/private/Files/Cache/Wrapper/JailWatcher.php index d066d069d1579..7facd3eeae708 100644 --- a/lib/private/Files/Cache/Wrapper/JailWatcher.php +++ b/lib/private/Files/Cache/Wrapper/JailWatcher.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Cache\Wrapper; use OC\Files\Cache\Watcher; @@ -38,7 +39,6 @@ public function getPolicy() { return $this->watcher->getPolicy(); } - #[\Override] public function checkUpdate($path, $cachedEntry = null) { return $this->watcher->checkUpdate($this->getSourcePath($path), $cachedEntry); diff --git a/lib/private/Files/Config/CachedMountFileInfo.php b/lib/private/Files/Config/CachedMountFileInfo.php index 29636e5c665c3..4bc1093f2614e 100644 --- a/lib/private/Files/Config/CachedMountFileInfo.php +++ b/lib/private/Files/Config/CachedMountFileInfo.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Config; use OCP\Files\Config\ICachedMountFileInfo; diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php index ffe06c25b1685..c46e5f9fb660d 100644 --- a/lib/private/Files/Config/CachedMountInfo.php +++ b/lib/private/Files/Config/CachedMountInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Config; use OC\Files\Filesystem; diff --git a/lib/private/Files/Config/LazyPathCachedMountInfo.php b/lib/private/Files/Config/LazyPathCachedMountInfo.php index 699f3e4bd5567..c0f5c28fcefac 100644 --- a/lib/private/Files/Config/LazyPathCachedMountInfo.php +++ b/lib/private/Files/Config/LazyPathCachedMountInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Config; use OCP\IUser; diff --git a/lib/private/Files/Config/LazyStorageMountInfo.php b/lib/private/Files/Config/LazyStorageMountInfo.php index 8c992f7a16244..1b1e1c119fe3b 100644 --- a/lib/private/Files/Config/LazyStorageMountInfo.php +++ b/lib/private/Files/Config/LazyStorageMountInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Config; use OCP\Files\Mount\IMountPoint; diff --git a/lib/private/Files/Config/MountProviderCollection.php b/lib/private/Files/Config/MountProviderCollection.php index d6a33e675b392..0040dbe1f7168 100644 --- a/lib/private/Files/Config/MountProviderCollection.php +++ b/lib/private/Files/Config/MountProviderCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Config; use OC\Hooks\Emitter; diff --git a/lib/private/Files/Config/UserMountCacheListener.php b/lib/private/Files/Config/UserMountCacheListener.php index 6df2d08de77f2..319cc3113634d 100644 --- a/lib/private/Files/Config/UserMountCacheListener.php +++ b/lib/private/Files/Config/UserMountCacheListener.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Config; use OC\User\Manager; diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 65280b0f31580..d78c67fd9bec1 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files; use OC\Files\Cache\CacheEntry; diff --git a/lib/private/Files/FilenameValidator.php b/lib/private/Files/FilenameValidator.php index 1610b09da22ac..095dabdd486b9 100644 --- a/lib/private/Files/FilenameValidator.php +++ b/lib/private/Files/FilenameValidator.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files; use OCP\Constants; @@ -284,7 +285,6 @@ protected function checkForbiddenName(string $filename): void { } } - /** * Check if a filename contains any of the forbidden characters * @param string $filename diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index fcefbac5e24fa..8dffd9bd1b388 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files; use OC\Files\Mount\MountPoint; diff --git a/lib/private/Files/Lock/LockManager.php b/lib/private/Files/Lock/LockManager.php index ae2613fc9dd75..d8a67db86c97c 100644 --- a/lib/private/Files/Lock/LockManager.php +++ b/lib/private/Files/Lock/LockManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Lock; use OCP\Files\Lock\ILock; diff --git a/lib/private/Files/Mount/CacheMountProvider.php b/lib/private/Files/Mount/CacheMountProvider.php index b05f2aaee31d5..c1fdae8f03b31 100644 --- a/lib/private/Files/Mount/CacheMountProvider.php +++ b/lib/private/Files/Mount/CacheMountProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Mount; use OCP\Files\Config\IMountProvider; diff --git a/lib/private/Files/Mount/LocalHomeMountProvider.php b/lib/private/Files/Mount/LocalHomeMountProvider.php index 0b867436300a6..5c5db6d2bed43 100644 --- a/lib/private/Files/Mount/LocalHomeMountProvider.php +++ b/lib/private/Files/Mount/LocalHomeMountProvider.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Mount; use OCP\Files\Config\IHomeMountProvider; diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php index 3ec0fa5d12554..6923eb7aa6664 100644 --- a/lib/private/Files/Mount/Manager.php +++ b/lib/private/Files/Mount/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Mount; use OC\Files\Filesystem; diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php index f927c4f7d98a9..22a36fd583472 100644 --- a/lib/private/Files/Mount/MountPoint.php +++ b/lib/private/Files/Mount/MountPoint.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Mount; use OC\Files\Filesystem; diff --git a/lib/private/Files/Mount/ObjectHomeMountProvider.php b/lib/private/Files/Mount/ObjectHomeMountProvider.php index 574a5594f8714..b48fc8bdcc576 100644 --- a/lib/private/Files/Mount/ObjectHomeMountProvider.php +++ b/lib/private/Files/Mount/ObjectHomeMountProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Mount; use OC\Files\ObjectStore\HomeObjectStoreStorage; diff --git a/lib/private/Files/Node/File.php b/lib/private/Files/Node/File.php index de22ccc9f758d..7c4b2745dc3a7 100644 --- a/lib/private/Files/Node/File.php +++ b/lib/private/Files/Node/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OCP\Constants; diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 37de7abfbe5cc..b6774987193c8 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OC\Files\Cache\QuerySearchHelper; diff --git a/lib/private/Files/Node/HookConnector.php b/lib/private/Files/Node/HookConnector.php index 1149951174cbf..a318d182fe644 100644 --- a/lib/private/Files/Node/HookConnector.php +++ b/lib/private/Files/Node/HookConnector.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OC\Files\Filesystem; diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php index cd67de7c33a97..96b4cecd3d233 100644 --- a/lib/private/Files/Node/LazyFolder.php +++ b/lib/private/Files/Node/LazyFolder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Node; use OC\Files\Filesystem; diff --git a/lib/private/Files/Node/LazyRoot.php b/lib/private/Files/Node/LazyRoot.php index cf1cd90245baa..f69d1ab5e4ee4 100644 --- a/lib/private/Files/Node/LazyRoot.php +++ b/lib/private/Files/Node/LazyRoot.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/private/Files/Node/LazyUserFolder.php b/lib/private/Files/Node/LazyUserFolder.php index 496d2be81a7b7..1989372c67c0c 100644 --- a/lib/private/Files/Node/LazyUserFolder.php +++ b/lib/private/Files/Node/LazyUserFolder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Node; use OCP\Constants; diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php index 63e275d1f476d..a599833567fbf 100644 --- a/lib/private/Files/Node/Node.php +++ b/lib/private/Files/Node/Node.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OC\Files\Filesystem; diff --git a/lib/private/Files/Node/NonExistingFile.php b/lib/private/Files/Node/NonExistingFile.php index 356ba5e47857c..d2d57a47f08b5 100644 --- a/lib/private/Files/Node/NonExistingFile.php +++ b/lib/private/Files/Node/NonExistingFile.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OCP\Files\NotFoundException; diff --git a/lib/private/Files/Node/NonExistingFolder.php b/lib/private/Files/Node/NonExistingFolder.php index 487170c98fade..e4481ceecc2f5 100644 --- a/lib/private/Files/Node/NonExistingFolder.php +++ b/lib/private/Files/Node/NonExistingFolder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Node; use OCP\Files\Node; diff --git a/lib/private/Files/Notify/Change.php b/lib/private/Files/Notify/Change.php index 422b39356e0d5..0d9dd05f65d70 100644 --- a/lib/private/Files/Notify/Change.php +++ b/lib/private/Files/Notify/Change.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Notify; use OCP\Files\Notify\IChange; diff --git a/lib/private/Files/Notify/RenameChange.php b/lib/private/Files/Notify/RenameChange.php index d7dfde9311861..0510a720f52d5 100644 --- a/lib/private/Files/Notify/RenameChange.php +++ b/lib/private/Files/Notify/RenameChange.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Notify; use OCP\Files\Notify\IChange; diff --git a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php index 090c81cfe6235..4d73efc988f3e 100644 --- a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; class AppdataPreviewObjectStoreStorage extends ObjectStoreStorage { diff --git a/lib/private/Files/ObjectStore/Azure.php b/lib/private/Files/ObjectStore/Azure.php index 75add59f4ee1c..c63ee3afc4d07 100644 --- a/lib/private/Files/ObjectStore/Azure.php +++ b/lib/private/Files/ObjectStore/Azure.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use MicrosoftAzure\Storage\Blob\BlobRestProxy; diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index d157f86f5ae3e..44f0cfc25e86e 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\ObjectStore; use Exception; diff --git a/lib/private/Files/ObjectStore/Mapper.php b/lib/private/Files/ObjectStore/Mapper.php index a8f0a58e4e084..686f36993ca04 100644 --- a/lib/private/Files/ObjectStore/Mapper.php +++ b/lib/private/Files/ObjectStore/Mapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\ObjectStore; use OCP\IUser; diff --git a/lib/private/Files/ObjectStore/ObjectStoreScanner.php b/lib/private/Files/ObjectStore/ObjectStoreScanner.php index 19ac35de3ce5b..e39c906997d55 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreScanner.php +++ b/lib/private/Files/ObjectStore/ObjectStoreScanner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\ObjectStore; use OC\Files\Cache\Scanner; diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index bd69fa7926ebd..edc082f929005 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\ObjectStore; use Aws\S3\Exception\S3Exception; diff --git a/lib/private/Files/ObjectStore/S3ConfigTrait.php b/lib/private/Files/ObjectStore/S3ConfigTrait.php index 661d95c4f822d..1c6eaf437ae2f 100644 --- a/lib/private/Files/ObjectStore/S3ConfigTrait.php +++ b/lib/private/Files/ObjectStore/S3ConfigTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; /** diff --git a/lib/private/Files/ObjectStore/S3ConnectionTrait.php b/lib/private/Files/ObjectStore/S3ConnectionTrait.php index f3a88d421855c..3837f0b869f8b 100644 --- a/lib/private/Files/ObjectStore/S3ConnectionTrait.php +++ b/lib/private/Files/ObjectStore/S3ConnectionTrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use Aws\ClientResolver; diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php index f632c15a3ee97..d2f43ca65f737 100644 --- a/lib/private/Files/ObjectStore/S3ObjectTrait.php +++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use Aws\Command; @@ -125,7 +126,6 @@ protected function writeSingle(string $urn, StreamInterface $stream, array $meta $this->getConnection()->putObject($args); } - /** * Multipart upload helper that tries to avoid orphaned fragments in S3 * @@ -217,7 +217,6 @@ public function writeObjectWithMetaData(string $urn, $stream, array $metaData): 'size' => $metaData['size'] ?? null, ]); - $size = $psrStream->getSize(); if ($size === null || !$canSeek) { // The s3 single-part upload requires the size to be known for the stream. diff --git a/lib/private/Files/ObjectStore/S3Signature.php b/lib/private/Files/ObjectStore/S3Signature.php index 47b3cf8e7f57e..33e459453c680 100644 --- a/lib/private/Files/ObjectStore/S3Signature.php +++ b/lib/private/Files/ObjectStore/S3Signature.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use Aws\Credentials\CredentialsInterface; diff --git a/lib/private/Files/ObjectStore/StorageObjectStore.php b/lib/private/Files/ObjectStore/StorageObjectStore.php index 0e8b54a684368..a851d61c4bba3 100644 --- a/lib/private/Files/ObjectStore/StorageObjectStore.php +++ b/lib/private/Files/ObjectStore/StorageObjectStore.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use OCP\Files\ObjectStore\IObjectStore; diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php index 288af35bbaf68..fec626078a0db 100644 --- a/lib/private/Files/ObjectStore/Swift.php +++ b/lib/private/Files/ObjectStore/Swift.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\ObjectStore; use GuzzleHttp\Client; diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index aef25b0c421ce..0dc49472f7aaa 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use GuzzleHttp\Client; @@ -199,7 +200,6 @@ private function auth(IdentityV2Service|IdentityV3Service $authService, string $ } } - $client = new OpenStack($this->params); return $client; diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php index 7ffd728a92230..1a3f0e70046e1 100644 --- a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php +++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\ObjectStore; use OpenStack\Common\Auth\Token; diff --git a/lib/private/Files/Search/QueryOptimizer/FlattenNestedBool.php b/lib/private/Files/Search/QueryOptimizer/FlattenNestedBool.php index b4f3258709fdd..be109c03cc79f 100644 --- a/lib/private/Files/Search/QueryOptimizer/FlattenNestedBool.php +++ b/lib/private/Files/Search/QueryOptimizer/FlattenNestedBool.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchBinaryOperator; diff --git a/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php b/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php index 6c2e443f232b0..f64c85b68bcc9 100644 --- a/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php +++ b/lib/private/Files/Search/QueryOptimizer/FlattenSingleArgumentBinaryOperation.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OCP\Files\Search\ISearchBinaryOperator; diff --git a/lib/private/Files/Search/QueryOptimizer/MergeDistributiveOperations.php b/lib/private/Files/Search/QueryOptimizer/MergeDistributiveOperations.php index 74ce9fea93a09..b620cdb5006c0 100644 --- a/lib/private/Files/Search/QueryOptimizer/MergeDistributiveOperations.php +++ b/lib/private/Files/Search/QueryOptimizer/MergeDistributiveOperations.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchBinaryOperator; diff --git a/lib/private/Files/Search/QueryOptimizer/OrEqualsToIn.php b/lib/private/Files/Search/QueryOptimizer/OrEqualsToIn.php index 6fbada1d5a190..9d71ffb5f9459 100644 --- a/lib/private/Files/Search/QueryOptimizer/OrEqualsToIn.php +++ b/lib/private/Files/Search/QueryOptimizer/OrEqualsToIn.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchBinaryOperator; diff --git a/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php b/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php index 84022c2f71a21..392518f1db609 100644 --- a/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php +++ b/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchComparison; diff --git a/lib/private/Files/Search/QueryOptimizer/ReplacingOptimizerStep.php b/lib/private/Files/Search/QueryOptimizer/ReplacingOptimizerStep.php index 562ed4aa9156e..d7a1ff4f64b6f 100644 --- a/lib/private/Files/Search/QueryOptimizer/ReplacingOptimizerStep.php +++ b/lib/private/Files/Search/QueryOptimizer/ReplacingOptimizerStep.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchBinaryOperator; diff --git a/lib/private/Files/Search/QueryOptimizer/SplitLargeIn.php b/lib/private/Files/Search/QueryOptimizer/SplitLargeIn.php index 660138f9d83c3..b4c51643c2f08 100644 --- a/lib/private/Files/Search/QueryOptimizer/SplitLargeIn.php +++ b/lib/private/Files/Search/QueryOptimizer/SplitLargeIn.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search\QueryOptimizer; use OC\Files\Search\SearchBinaryOperator; diff --git a/lib/private/Files/Search/SearchBinaryOperator.php b/lib/private/Files/Search/SearchBinaryOperator.php index 95d222474d7d7..9bb230e76b359 100644 --- a/lib/private/Files/Search/SearchBinaryOperator.php +++ b/lib/private/Files/Search/SearchBinaryOperator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search; use OCP\Files\Search\ISearchBinaryOperator; diff --git a/lib/private/Files/Search/SearchComparison.php b/lib/private/Files/Search/SearchComparison.php index f3ebfa64858fb..ca50f93fe420a 100644 --- a/lib/private/Files/Search/SearchComparison.php +++ b/lib/private/Files/Search/SearchComparison.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search; use OCP\Files\Search\ISearchComparison; diff --git a/lib/private/Files/Search/SearchOrder.php b/lib/private/Files/Search/SearchOrder.php index 3c79e64151299..11361cf8d17ca 100644 --- a/lib/private/Files/Search/SearchOrder.php +++ b/lib/private/Files/Search/SearchOrder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search; use OCP\Files\FileInfo; diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php index ecefe02205ad5..5823e81f59a20 100644 --- a/lib/private/Files/Search/SearchQuery.php +++ b/lib/private/Files/Search/SearchQuery.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Search; use OCP\Files\Search\ISearchOperator; diff --git a/lib/private/Files/SimpleFS/NewSimpleFile.php b/lib/private/Files/SimpleFS/NewSimpleFile.php index 5f331e648d9ff..b269a4fbddcd6 100644 --- a/lib/private/Files/SimpleFS/NewSimpleFile.php +++ b/lib/private/Files/SimpleFS/NewSimpleFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\SimpleFS; use Icewind\Streams\CallbackWrapper; @@ -141,7 +142,6 @@ private function checkFile(): void { } } - /** * Delete the file * diff --git a/lib/private/Files/SimpleFS/SimpleFile.php b/lib/private/Files/SimpleFS/SimpleFile.php index b28a415f57e28..3ce653530d5ab 100644 --- a/lib/private/Files/SimpleFS/SimpleFile.php +++ b/lib/private/Files/SimpleFS/SimpleFile.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\SimpleFS; use OCP\Files\File; @@ -116,7 +117,6 @@ private function checkFile(): void { } } - /** * Delete the file * diff --git a/lib/private/Files/SimpleFS/SimpleFolder.php b/lib/private/Files/SimpleFS/SimpleFolder.php index 2124302823c18..91339a7f6bcd6 100644 --- a/lib/private/Files/SimpleFS/SimpleFolder.php +++ b/lib/private/Files/SimpleFS/SimpleFolder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\SimpleFS; use OCP\Files\File; diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index dbb98eda9b7e8..02983ac178cbc 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OC\Files\Cache\Cache; diff --git a/lib/private/Files/Storage/CommonTest.php b/lib/private/Files/Storage/CommonTest.php index bcd73ad7cfcaf..f4f158c4fe76d 100644 --- a/lib/private/Files/Storage/CommonTest.php +++ b/lib/private/Files/Storage/CommonTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; class CommonTest extends Common { diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 0c74abdfee1a2..60b9b1504f79a 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use Exception; @@ -666,7 +667,6 @@ private function getMetaFromPropfind(string $path, array $response): array { public function stat(string $path): array|false { $meta = $this->getMetaData($path); return $meta ?: false; - } #[\Override] diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php index e85982cb6ecda..e6e3b8f8f4c88 100644 --- a/lib/private/Files/Storage/FailedStorage.php +++ b/lib/private/Files/Storage/FailedStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OC\Files\Cache\FailedCache; diff --git a/lib/private/Files/Storage/Home.php b/lib/private/Files/Storage/Home.php index ab3a8c8806a07..7ed391fa37263 100644 --- a/lib/private/Files/Storage/Home.php +++ b/lib/private/Files/Storage/Home.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OC\Files\Cache\HomeCache; @@ -66,7 +67,6 @@ public function getPropagator(?IStorage $storage = null): IPropagator { return $this->propagator; } - #[\Override] public function getUser(): IUser { return $this->user; diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index e5806f855bc06..e38485f755482 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OC\Files\Filesystem; diff --git a/lib/private/Files/Storage/LocalRootStorage.php b/lib/private/Files/Storage/LocalRootStorage.php index 4086b481051c6..f9cb250e92fb3 100644 --- a/lib/private/Files/Storage/LocalRootStorage.php +++ b/lib/private/Files/Storage/LocalRootStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Storage; use OC\Files\Cache\LocalRootScanner; diff --git a/lib/private/Files/Storage/LocalTempFileTrait.php b/lib/private/Files/Storage/LocalTempFileTrait.php index 805a67084ccaa..ea1d6c65c8d64 100644 --- a/lib/private/Files/Storage/LocalTempFileTrait.php +++ b/lib/private/Files/Storage/LocalTempFileTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OCP\ITempManager; diff --git a/lib/private/Files/Storage/PolyFill/CopyDirectory.php b/lib/private/Files/Storage/PolyFill/CopyDirectory.php index afb7334afd493..56265516dae44 100644 --- a/lib/private/Files/Storage/PolyFill/CopyDirectory.php +++ b/lib/private/Files/Storage/PolyFill/CopyDirectory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\PolyFill; use OC\Files\Filesystem; diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index 883833501528b..d53b1140cbcc0 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OCP\Files\Cache\ICache; diff --git a/lib/private/Files/Storage/StorageFactory.php b/lib/private/Files/Storage/StorageFactory.php index e590c44ed5514..bddfaeb0da8aa 100644 --- a/lib/private/Files/Storage/StorageFactory.php +++ b/lib/private/Files/Storage/StorageFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OCP\Files\Mount\IMountPoint; diff --git a/lib/private/Files/Storage/Temporary.php b/lib/private/Files/Storage/Temporary.php index bb46d7100a14b..2bbe232f7efc5 100644 --- a/lib/private/Files/Storage/Temporary.php +++ b/lib/private/Files/Storage/Temporary.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage; use OCP\Files; diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php index 924567e1afeb1..0f040fe703b07 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OCP\Files\Storage\IStorage; @@ -308,8 +309,6 @@ protected function setUnavailable(?StorageNotAvailableException $e): void { } } - - #[\Override] public function getDirectoryContent(string $directory): \Traversable { $this->checkAvailability(); diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php index e8c01f0a018f4..bf080cd47f255 100644 --- a/lib/private/Files/Storage/Wrapper/Encoding.php +++ b/lib/private/Files/Storage/Wrapper/Encoding.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Files\Filesystem; diff --git a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php index 3f07d690a504b..a0f706bf6967e 100644 --- a/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php +++ b/lib/private/Files/Storage/Wrapper/EncodingDirectoryWrapper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use Icewind\Streams\DirectoryWrapper; diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 8edf25e9a5111..0683afddc7017 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Encryption\Exceptions\ModuleDoesNotExistsException; @@ -383,7 +384,6 @@ public function fopen(string $path, string $mode) { return $this->getWrapperStorage()->fopen($path, $mode); } - /** * perform some plausibility checks if the unencrypted size is correct. * If not, we calculate the correct unencrypted size and return it diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index 7d1a5814e9338..c17bd1f750ded 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Files\Cache\Wrapper\CacheJail; @@ -62,7 +63,6 @@ public function getUnjailedStorage(): IStorage { return $this->storage; } - public function getJailedPath(string $path): ?string { $root = rtrim($this->rootPath, '/') . '/'; diff --git a/lib/private/Files/Storage/Wrapper/KnownMtime.php b/lib/private/Files/Storage/Wrapper/KnownMtime.php index da10e940753f1..881c2aad1d2f2 100644 --- a/lib/private/Files/Storage/Wrapper/KnownMtime.php +++ b/lib/private/Files/Storage/Wrapper/KnownMtime.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Storage\Wrapper; use OCP\Cache\CappedMemoryCache; diff --git a/lib/private/Files/Storage/Wrapper/PermissionsMask.php b/lib/private/Files/Storage/Wrapper/PermissionsMask.php index 15061b7c02397..5dbedc76b8d18 100644 --- a/lib/private/Files/Storage/Wrapper/PermissionsMask.php +++ b/lib/private/Files/Storage/Wrapper/PermissionsMask.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Files\Cache\Wrapper\CachePermissionsMask; diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php index 11b992dbf9727..b0ff0117b960f 100644 --- a/lib/private/Files/Storage/Wrapper/Quota.php +++ b/lib/private/Files/Storage/Wrapper/Quota.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Files\Filesystem; diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index 97c0ea46187ec..64ef604920c15 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Storage\Wrapper; use OC\Files\Storage\FailedStorage; diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index 1c662aa023c6c..80ad76c072492 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Stream; use Icewind\Streams\Wrapper; @@ -67,7 +68,6 @@ public function __construct() { ]; } - /** * Wraps a stream with the provided callbacks * diff --git a/lib/private/Files/Stream/HashWrapper.php b/lib/private/Files/Stream/HashWrapper.php index 16206e56c4a58..b4e743b79cfab 100644 --- a/lib/private/Files/Stream/HashWrapper.php +++ b/lib/private/Files/Stream/HashWrapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Stream; use Icewind\Streams\Wrapper; diff --git a/lib/private/Files/Stream/Quota.php b/lib/private/Files/Stream/Quota.php index 755d9b428d6cc..09659997a6b8b 100644 --- a/lib/private/Files/Stream/Quota.php +++ b/lib/private/Files/Stream/Quota.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Stream; use Icewind\Streams\Wrapper; diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php index cefa8ced1db8e..9d6299204861f 100644 --- a/lib/private/Files/Stream/SeekableHttpStream.php +++ b/lib/private/Files/Stream/SeekableHttpStream.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Stream; use Icewind\Streams\File; diff --git a/lib/private/Files/Template/TemplateManager.php b/lib/private/Files/Template/TemplateManager.php index ff9c40029e769..a9754b95bbec4 100644 --- a/lib/private/Files/Template/TemplateManager.php +++ b/lib/private/Files/Template/TemplateManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Template; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 67a65cdf0e026..5cb69eb674a00 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Type; use OCP\Files\IMimeTypeDetector; diff --git a/lib/private/Files/Type/Loader.php b/lib/private/Files/Type/Loader.php index 48a62bc2858d6..3c502378822e1 100644 --- a/lib/private/Files/Type/Loader.php +++ b/lib/private/Files/Type/Loader.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Type; use OC\DB\Exceptions\DbalException; diff --git a/lib/private/Files/Utils/PathHelper.php b/lib/private/Files/Utils/PathHelper.php index c1a8d0d1a6653..ac29ff20e84f2 100644 --- a/lib/private/Files/Utils/PathHelper.php +++ b/lib/private/Files/Utils/PathHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Files\Utils; class PathHelper { diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php index cca0b6784a211..adf0d82c8ced4 100644 --- a/lib/private/Files/Utils/Scanner.php +++ b/lib/private/Files/Utils/Scanner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files\Utils; use OC\Files\Cache\Cache; diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index da3900bff4a66..468ad73acec52 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Files; use Icewind\Streams\CallbackWrapper; @@ -1136,7 +1137,6 @@ public function fromTmpFile($tmpFile, $path) { } } - /** * @param string $path * @return mixed diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php index 85774b8202746..b645166117f6e 100644 --- a/lib/private/FilesMetadata/Model/FilesMetadata.php +++ b/lib/private/FilesMetadata/Model/FilesMetadata.php @@ -165,7 +165,6 @@ public function setEditPermission(string $key, int $permission): void { $this->metadata[$key]->setEditPermission($permission); } - #[\Override] public function getEtag(string $key): string { if (!array_key_exists($key, $this->metadata)) { @@ -417,7 +416,6 @@ public function setFloat(string $key, float $value, bool $index = false): IFiles return $this; } - /** * @param string $key metadata key * @param bool $value metadata value @@ -446,7 +444,6 @@ public function setBool(string $key, bool $value, bool $index = false): IFilesMe return $this; } - /** * @param string $key metadata key * @param array $value metadata value diff --git a/lib/private/FilesMetadata/Model/MetadataValueWrapper.php b/lib/private/FilesMetadata/Model/MetadataValueWrapper.php index b6547c6ba2e45..a75a3e6103f2b 100644 --- a/lib/private/FilesMetadata/Model/MetadataValueWrapper.php +++ b/lib/private/FilesMetadata/Model/MetadataValueWrapper.php @@ -163,7 +163,6 @@ public function setValueBool(bool $value): self { $this->assertType(self::TYPE_BOOL); $this->value = $value; - return $this; } @@ -217,7 +216,6 @@ public function setValueIntList(array $value): self { return $this; } - /** * @inheritDoc * @return string set value diff --git a/lib/private/ForbiddenException.php b/lib/private/ForbiddenException.php index c03c27e59e8b1..3524bd593c7be 100644 --- a/lib/private/ForbiddenException.php +++ b/lib/private/ForbiddenException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; /** diff --git a/lib/private/FullTextSearch/FullTextSearchManager.php b/lib/private/FullTextSearch/FullTextSearchManager.php index 67f9b88b7e815..a3bdf36c00bc4 100644 --- a/lib/private/FullTextSearch/FullTextSearchManager.php +++ b/lib/private/FullTextSearch/FullTextSearchManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch; use OCP\FullTextSearch\Exceptions\FullTextSearchAppNotAvailableException; @@ -66,7 +67,6 @@ public function isAvailable(): bool { return true; } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -78,7 +78,6 @@ private function getProviderService(): IProviderService { return $this->providerService; } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -90,7 +89,6 @@ private function getIndexService(): IIndexService { return $this->indexService; } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -102,7 +100,6 @@ private function getSearchService(): ISearchService { return $this->searchService; } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -111,7 +108,6 @@ public function addJavascriptAPI(): void { $this->getProviderService()->addJavascriptAPI(); } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -120,7 +116,6 @@ public function isProviderIndexed(string $providerId): bool { return $this->getProviderService()->isProviderIndexed($providerId); } - /** * @throws FullTextSearchAppNotAvailableException */ @@ -144,7 +139,6 @@ public function createIndex( return $this->getIndexService()->createIndex($providerId, $documentId, $userId, $status); } - /** * @see IIndex for available value for $status. * @@ -175,7 +169,6 @@ public function updateIndexesStatus( $this->getIndexService()->updateIndexesStatus($providerId, $documentIds, $status, $reset); } - /** * @param IIndex[] $indexes * @@ -186,7 +179,6 @@ public function updateIndexes(array $indexes): void { $this->getIndexService()->updateIndexes($indexes); } - /** * @return ISearchResult[] * @throws FullTextSearchAppNotAvailableException diff --git a/lib/private/FullTextSearch/Model/DocumentAccess.php b/lib/private/FullTextSearch/Model/DocumentAccess.php index 10adb4bb5a0cd..288ec45ef9a81 100644 --- a/lib/private/FullTextSearch/Model/DocumentAccess.php +++ b/lib/private/FullTextSearch/Model/DocumentAccess.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -43,7 +44,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable { private array $links = []; - /** * Owner of the document can be set at the init of the object. * @@ -55,7 +55,6 @@ public function __construct(string $ownerId = '') { $this->setOwnerId($ownerId); } - /** * Set the Owner of the document. * @@ -78,7 +77,6 @@ public function getOwnerId(): string { return $this->ownerId; } - /** * Set the viewer of the document. * @@ -101,7 +99,6 @@ public function getViewerId(): string { return $this->viewerId; } - /** * Set the list of users that have read access to the document. * @@ -149,7 +146,6 @@ public function getUsers(): array { return $this->users; } - /** * Set the list of groups that have read access to the document. * @@ -197,7 +193,6 @@ public function getGroups(): array { return $this->groups; } - /** * Set the list of circles that have read access to the document. * @@ -245,7 +240,6 @@ public function getCircles(): array { return $this->circles; } - /** * Set the list of links that have read access to the document. * @@ -268,7 +262,6 @@ public function getLinks(): array { return $this->links; } - /** * @since 16.0.0 */ diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php index ec6f2f0ee1ea5..55d47e7a5afb3 100644 --- a/lib/private/FullTextSearch/Model/IndexDocument.php +++ b/lib/private/FullTextSearch/Model/IndexDocument.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -64,7 +65,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable { protected int $contentEncoded = 0; - /** * IIndexDocument constructor. * @@ -79,7 +79,6 @@ public function __construct( ) { } - /** * Returns the Id of the original document. * @@ -90,7 +89,6 @@ final public function getId(): string { return $this->id; } - /** * Returns the Id of the provider. * @@ -101,7 +99,6 @@ final public function getProviderId(): string { return $this->providerId; } - /** * Set the Index related to the IIndexDocument. * @@ -173,7 +170,6 @@ final public function isOlderThan(int $time): bool { return ($this->modifiedTime < $time); } - /** * Set the read rights of the original document using a IDocumentAccess. * @@ -198,7 +194,6 @@ final public function getAccess(): IDocumentAccess { return $this->access; } - /** * Add a tag to the list. * @@ -233,7 +228,6 @@ final public function getTags(): array { return $this->tags; } - /** * Add a meta tag to the list. * @@ -268,7 +262,6 @@ final public function getMetaTags(): array { return $this->metaTags; } - /** * Add a sub tag to the list. * @@ -285,7 +278,6 @@ final public function addSubTag(string $sub, string $tag): IIndexDocument { return $this; } - /** * Set the list of sub tags assigned to the original document. * @@ -323,7 +315,6 @@ final public function getSubTags(bool $formatted = false): array { return $subTags; } - /** * Set the source of the original document. * @@ -346,7 +337,6 @@ final public function getSource(): string { return $this->source; } - /** * Set the title of the original document. * @@ -369,7 +359,6 @@ final public function getTitle(): string { return $this->title; } - /** * Set the content of the document. * $encoded can be NOT_ENCODED or ENCODED_BASE64 if the content is raw or @@ -415,7 +404,6 @@ final public function getContentSize(): int { return strlen($this->getContent()); } - /** * Generate a hash, based on the content of the original document. * @@ -454,7 +442,6 @@ final public function getHash(): string { return $this->hash; } - /** * Add a part, identified by a string, and its content. * @@ -492,7 +479,6 @@ final public function getParts(): array { return $this->parts; } - /** * Add a link, usable by the frontend. * @@ -515,7 +501,6 @@ final public function getLink(): string { return $this->link; } - /** * Set more information that couldn't be set using other method. * @@ -538,7 +523,6 @@ final public function getMore(): array { return $this->more; } - /** * Add some excerpt of the content of the original document, usually based * on the search request. @@ -556,7 +540,6 @@ final public function addExcerpt(string $source, string $excerpt): IIndexDocumen return $this; } - /** * Set all excerpts of the content of the original document. * @@ -603,7 +586,6 @@ private function cleanExcerpt(string $excerpt): string { return $excerpt; } - /** * Set the score to the result assigned to this document during a search * request. @@ -627,7 +609,6 @@ final public function getScore(): string { return $this->score; } - /** * Set some information about the original document that will be available * to the front-end when displaying search result. (as string) @@ -767,7 +748,6 @@ final public function getInfoAll(): array { return $info; } - /** * @since 15.0.0 * diff --git a/lib/private/FullTextSearch/Model/SearchOption.php b/lib/private/FullTextSearch/Model/SearchOption.php index 5329b78421fa3..726d0b1ca08ba 100644 --- a/lib/private/FullTextSearch/Model/SearchOption.php +++ b/lib/private/FullTextSearch/Model/SearchOption.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -83,7 +84,6 @@ public function __construct( ) { } - /** * Set the name/key of the option. * The string should only contain alphanumerical chars and underscore. @@ -110,7 +110,6 @@ public function getName(): string { return $this->name; } - /** * Set the title/display name of the option. * @@ -133,7 +132,6 @@ public function getTitle(): string { return $this->title; } - /** * Set the type of the option. * $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT @@ -157,7 +155,6 @@ public function getType(): string { return $this->type; } - /** * In case of Type is INPUT, set the size of the input field. * Value can be ISearchOption::INPUT_SMALL or not defined. diff --git a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php index 2ab47c04eb2b4..fc61b78932b00 100644 --- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php +++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -20,7 +21,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonSerializable { private array $values = []; - /** * SearchRequestQuery constructor. * @@ -32,7 +32,6 @@ public function __construct( ) { } - /** * Get the compare type of the query * @@ -43,7 +42,6 @@ public function getType(): int { return $this->type; } - /** * Get the field to apply query * @@ -66,7 +64,6 @@ public function setField(string $field): ISearchRequestSimpleQuery { return $this; } - /** * Get the value to compare (string) * @@ -77,7 +74,6 @@ public function getValues(): array { return $this->values; } - /** * Add value to compare (string) * @@ -126,7 +122,6 @@ public function addValueBool(bool $value): ISearchRequestSimpleQuery { return $this; } - /** * @since 17.0.0 */ diff --git a/lib/private/FullTextSearch/Model/SearchTemplate.php b/lib/private/FullTextSearch/Model/SearchTemplate.php index e54c3c88da7cd..dea907a8dbdec 100644 --- a/lib/private/FullTextSearch/Model/SearchTemplate.php +++ b/lib/private/FullTextSearch/Model/SearchTemplate.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\FullTextSearch\Model; use JsonSerializable; @@ -61,7 +62,6 @@ public function __construct( ) { } - /** * Set the class of the icon to be displayed in the left panel of the * FullTextSearch navigation page, in front of the related Content Provider. @@ -83,7 +83,6 @@ public function getIcon(): string { return $this->icon; } - /** * Set the path of a CSS file that will be loaded when needed. * @@ -106,7 +105,6 @@ public function getCss(): string { return $this->css; } - /** * Set the path of the file of a template that the HTML will be displayed * below the Options. @@ -132,7 +130,6 @@ public function getTemplate(): string { return $this->template; } - /** * Add an option in the Panel that is displayed when the user start a search * within the app that generate the content. @@ -160,7 +157,6 @@ public function getPanelOptions(): array { return $this->panelOptions; } - /** * Add an option in the left panel of the FullTextSearch navigation page. * @@ -185,7 +181,6 @@ public function getNavigationOptions(): array { return $this->navigationOptions; } - /** * @since 15.0.0 */ diff --git a/lib/private/GlobalScale/Config.php b/lib/private/GlobalScale/Config.php index 4319a2fbb4285..a2cc1429c9538 100644 --- a/lib/private/GlobalScale/Config.php +++ b/lib/private/GlobalScale/Config.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\GlobalScale; use OCP\IConfig; diff --git a/lib/private/Group/Backend.php b/lib/private/Group/Backend.php index b9c295c34ff18..4dd3e273133b4 100644 --- a/lib/private/Group/Backend.php +++ b/lib/private/Group/Backend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Group; use OCP\GroupInterface; diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index fff9cef31f7ca..fb83ea8df1954 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Group; use OC\User\LazyUser; @@ -412,7 +413,6 @@ public function searchInGroup(string $gid, string $search = '', int $limit = -1, ->orderBy('g.uid', 'ASC'); } - if ($limit !== -1) { $query->setMaxResults($limit); } diff --git a/lib/private/Group/DisplayNameCache.php b/lib/private/Group/DisplayNameCache.php index cfd3989701520..815f74dd9fb03 100644 --- a/lib/private/Group/DisplayNameCache.php +++ b/lib/private/Group/DisplayNameCache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Group; use OCP\Cache\CappedMemoryCache; diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php index 7b7ca00a88fd8..65aff5d225b4a 100644 --- a/lib/private/Group/Group.php +++ b/lib/private/Group/Group.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Group; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index 028dffd227391..cb3b0d3b12a0d 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Group; use OC\Hooks\PublicEmitter; @@ -119,7 +120,6 @@ public function getBackends() { return $this->backends; } - protected function clearCaches() { $this->cachedGroups = []; $this->cachedUserGroups = []; diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php index 77432eea5ff4f..3f91f3c388790 100644 --- a/lib/private/Group/MetaData.php +++ b/lib/private/Group/MetaData.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Group; use OC\Group\Manager as GroupManager; diff --git a/lib/private/Hooks/BasicEmitter.php b/lib/private/Hooks/BasicEmitter.php index 775a7d47a8cbc..adaac7e42a274 100644 --- a/lib/private/Hooks/BasicEmitter.php +++ b/lib/private/Hooks/BasicEmitter.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Hooks; /** diff --git a/lib/private/Hooks/Emitter.php b/lib/private/Hooks/Emitter.php index b8c00a211fee6..ea1dfe5c7f2e9 100644 --- a/lib/private/Hooks/Emitter.php +++ b/lib/private/Hooks/Emitter.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Hooks; /** diff --git a/lib/private/Hooks/EmitterTrait.php b/lib/private/Hooks/EmitterTrait.php index 8d1ebe4c0da42..1dddca3f35774 100644 --- a/lib/private/Hooks/EmitterTrait.php +++ b/lib/private/Hooks/EmitterTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Hooks; /** diff --git a/lib/private/Hooks/PublicEmitter.php b/lib/private/Hooks/PublicEmitter.php index e6cb97e93d7b1..f95349fec85eb 100644 --- a/lib/private/Hooks/PublicEmitter.php +++ b/lib/private/Hooks/PublicEmitter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Hooks; /** diff --git a/lib/private/Http/Client/Client.php b/lib/private/Http/Client/Client.php index 10f07f51e8ab9..97ef67d49f66d 100644 --- a/lib/private/Http/Client/Client.php +++ b/lib/private/Http/Client/Client.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Http\Client; use GuzzleHttp\Client as GuzzleClient; diff --git a/lib/private/Http/Client/ClientService.php b/lib/private/Http/Client/ClientService.php index 12d633a962be9..8df3d3ed193bc 100644 --- a/lib/private/Http/Client/ClientService.php +++ b/lib/private/Http/Client/ClientService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Http\Client; use GuzzleHttp\Client as GuzzleClient; diff --git a/lib/private/Http/Client/DnsPinMiddleware.php b/lib/private/Http/Client/DnsPinMiddleware.php index cb868aa7cb51f..bf38006916d87 100644 --- a/lib/private/Http/Client/DnsPinMiddleware.php +++ b/lib/private/Http/Client/DnsPinMiddleware.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Http\Client; use OC\Diagnostics\TLogSlowOperation; diff --git a/lib/private/Http/Client/NegativeDnsCache.php b/lib/private/Http/Client/NegativeDnsCache.php index ca8a477d6bef2..0fed156798989 100644 --- a/lib/private/Http/Client/NegativeDnsCache.php +++ b/lib/private/Http/Client/NegativeDnsCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Http\Client; use OCP\ICache; diff --git a/lib/private/Http/Client/Response.php b/lib/private/Http/Client/Response.php index f005347067cef..4d7037fb09e92 100644 --- a/lib/private/Http/Client/Response.php +++ b/lib/private/Http/Client/Response.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Http\Client; use OCP\Http\Client\IResponse; diff --git a/lib/private/Http/CookieHelper.php b/lib/private/Http/CookieHelper.php index 9d07ff4534ca8..10cfbdafa8a52 100644 --- a/lib/private/Http/CookieHelper.php +++ b/lib/private/Http/CookieHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Http; class CookieHelper { diff --git a/lib/private/Http/WellKnown/RequestManager.php b/lib/private/Http/WellKnown/RequestManager.php index 2f65471caa0f0..e4ff5c03b7360 100644 --- a/lib/private/Http/WellKnown/RequestManager.php +++ b/lib/private/Http/WellKnown/RequestManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Http\WellKnown; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/InitialStateService.php b/lib/private/InitialStateService.php index f7798f3cdaa22..e00f755502105 100644 --- a/lib/private/InitialStateService.php +++ b/lib/private/InitialStateService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC; use Closure; @@ -24,7 +25,6 @@ class InitialStateService implements IInitialStateService { /** @var Closure[][] */ private array $lazyStates = []; - public function __construct( private LoggerInterface $logger, private Coordinator $bootstrapCoordinator, diff --git a/lib/private/Installer.php b/lib/private/Installer.php index f853a7a1eedcf..5990e93277da3 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use Doctrine\DBAL\Exception\TableExistsException; diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php index fbb2c512ced20..8425a96bff30a 100644 --- a/lib/private/IntegrityCheck/Checker.php +++ b/lib/private/IntegrityCheck/Checker.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck; use OC\Core\Command\Maintenance\Mimetype\GenerateMimetypeFileBuilder; diff --git a/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php b/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php index 68038c2d0d243..da878d5cb5f4d 100644 --- a/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php +++ b/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck\Exceptions; /** diff --git a/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php b/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php index 583ae5e534fa4..d34d15b85648b 100644 --- a/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php +++ b/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck\Helpers; /** diff --git a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php index c6e57d5d93569..42caae2fd9de8 100644 --- a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php +++ b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck\Helpers; /** diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php index 7a63a08052907..6577beceb35ac 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck\Iterator; /** diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php index 52ccbec082c09..d1ea0f90c013f 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\IntegrityCheck\Iterator; use OCP\IConfig; diff --git a/lib/private/KnownUser/KnownUser.php b/lib/private/KnownUser/KnownUser.php index 808c0400c6e5c..443486a1a0894 100644 --- a/lib/private/KnownUser/KnownUser.php +++ b/lib/private/KnownUser/KnownUser.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\KnownUser; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/KnownUser/KnownUserMapper.php b/lib/private/KnownUser/KnownUserMapper.php index 4c3bbb0b436ae..1655476037183 100644 --- a/lib/private/KnownUser/KnownUserMapper.php +++ b/lib/private/KnownUser/KnownUserMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\KnownUser; use OCP\AppFramework\Db\QBMapper; diff --git a/lib/private/KnownUser/KnownUserService.php b/lib/private/KnownUser/KnownUserService.php index da8260d19875d..86e54393aefab 100644 --- a/lib/private/KnownUser/KnownUserService.php +++ b/lib/private/KnownUser/KnownUserService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\KnownUser; class KnownUserService { diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 635c5d65589b3..dbf18a05c36a0 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\L10N; use OCP\App\AppPathNotFoundException; diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php index 07a392d5226ae..25d3caab2e9ae 100644 --- a/lib/private/L10N/L10N.php +++ b/lib/private/L10N/L10N.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\L10N; use OCP\IL10N; diff --git a/lib/private/L10N/L10NString.php b/lib/private/L10N/L10NString.php index 88bdb125b794f..4eeab67daa127 100644 --- a/lib/private/L10N/L10NString.php +++ b/lib/private/L10N/L10NString.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\L10N; class L10NString implements \JsonSerializable { diff --git a/lib/private/L10N/LanguageIterator.php b/lib/private/L10N/LanguageIterator.php index 0055180f2a23f..0bbbfc836c8e5 100644 --- a/lib/private/L10N/LanguageIterator.php +++ b/lib/private/L10N/LanguageIterator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\L10N; use OCP\IConfig; diff --git a/lib/private/L10N/LanguageNotFoundException.php b/lib/private/L10N/LanguageNotFoundException.php index 42053e70831d8..dc03b8668a7b0 100644 --- a/lib/private/L10N/LanguageNotFoundException.php +++ b/lib/private/L10N/LanguageNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\L10N; class LanguageNotFoundException extends \Exception { diff --git a/lib/private/L10N/LazyL10N.php b/lib/private/L10N/LazyL10N.php index bb499045d3e8a..2bf1b7b768eb2 100644 --- a/lib/private/L10N/LazyL10N.php +++ b/lib/private/L10N/LazyL10N.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\L10N; use OCP\IL10N; diff --git a/lib/private/LDAP/NullLDAPProviderFactory.php b/lib/private/LDAP/NullLDAPProviderFactory.php index 5ae1b0b4b68c4..5a4cdc8b3abad 100644 --- a/lib/private/LDAP/NullLDAPProviderFactory.php +++ b/lib/private/LDAP/NullLDAPProviderFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\LDAP; use OCP\LDAP\ILDAPProviderFactory; diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index e5c367bac5e43..c0b2805137959 100644 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Lock/AbstractLockingProvider.php b/lib/private/Lock/AbstractLockingProvider.php index c8612ff3ba543..947a239fd578c 100644 --- a/lib/private/Lock/AbstractLockingProvider.php +++ b/lib/private/Lock/AbstractLockingProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Lock; use OCP\Lock\ILockingProvider; diff --git a/lib/private/Lock/DBLockingProvider.php b/lib/private/Lock/DBLockingProvider.php index 0ddc7ded15cab..8cefabc662f45 100644 --- a/lib/private/Lock/DBLockingProvider.php +++ b/lib/private/Lock/DBLockingProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Lock; use OC\DB\QueryBuilder\Literal; diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php index 77c61bcfe880b..51a3ca26ec764 100644 --- a/lib/private/Lock/MemcacheLockingProvider.php +++ b/lib/private/Lock/MemcacheLockingProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Lock; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Lock/NoopLockingProvider.php b/lib/private/Lock/NoopLockingProvider.php index f5cadbf045fd5..4ac7e6adc2bab 100644 --- a/lib/private/Lock/NoopLockingProvider.php +++ b/lib/private/Lock/NoopLockingProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Lock; use OCP\Lock\ILockingProvider; diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php index d5508ae877d1b..719926758d74a 100644 --- a/lib/private/Lockdown/Filesystem/NullCache.php +++ b/lib/private/Lockdown/Filesystem/NullCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Lockdown\Filesystem; use OC\Files\Cache\CacheEntry; diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php index 5cf32f125d43b..edc9fc98137fb 100644 --- a/lib/private/Lockdown/Filesystem/NullStorage.php +++ b/lib/private/Lockdown/Filesystem/NullStorage.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Lockdown\Filesystem; use Icewind\Streams\IteratorDirectory; diff --git a/lib/private/Lockdown/LockdownManager.php b/lib/private/Lockdown/LockdownManager.php index 9fa4892b54870..d5315c8963385 100644 --- a/lib/private/Lockdown/LockdownManager.php +++ b/lib/private/Lockdown/LockdownManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Lockdown; use OCP\Authentication\Token\IToken; @@ -28,7 +29,6 @@ public function __construct(callable $sessionCallback) { $this->sessionCallback = $sessionCallback; } - #[\Override] public function enable() { $this->enabled = true; diff --git a/lib/private/Log.php b/lib/private/Log.php index a7b1a5fba0bcc..b1ab40812a577 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use Exception; @@ -143,7 +144,6 @@ public function debug(string $message, array $context = []): void { $this->log(ILogger::DEBUG, $message, $context); } - /** * Logs with an arbitrary level. * diff --git a/lib/private/Log/ErrorHandler.php b/lib/private/Log/ErrorHandler.php index 6597274a86874..0be807c6f38b7 100644 --- a/lib/private/Log/ErrorHandler.php +++ b/lib/private/Log/ErrorHandler.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Log; use Error; diff --git a/lib/private/Log/Errorlog.php b/lib/private/Log/Errorlog.php index 0a0fa530cb32d..32e9d97fc4b5a 100644 --- a/lib/private/Log/Errorlog.php +++ b/lib/private/Log/Errorlog.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2014 Christian Kampka * SPDX-License-Identifier: MIT */ + namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index af7c9e4843512..c39f3e005f065 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Log; use OC\Core\Controller\SetupController; @@ -90,7 +91,6 @@ class ExceptionSerializer { 'updateSession', 'mention', 'loginSessionUser', - ]; public function __construct( diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index 014c0d0759a7b..57ef1d45cf958 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Log/LogFactory.php b/lib/private/Log/LogFactory.php index 2c995f46e5967..baf5f32d595c2 100644 --- a/lib/private/Log/LogFactory.php +++ b/lib/private/Log/LogFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Log; use OC\Log; diff --git a/lib/private/Log/PsrLoggerAdapter.php b/lib/private/Log/PsrLoggerAdapter.php index de5b4df5e15c9..4c6d0563b03b9 100644 --- a/lib/private/Log/PsrLoggerAdapter.php +++ b/lib/private/Log/PsrLoggerAdapter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Log; use OC\Log; diff --git a/lib/private/Log/Rotate.php b/lib/private/Log/Rotate.php index 1d2f37b1dba01..6a78852d4c774 100644 --- a/lib/private/Log/Rotate.php +++ b/lib/private/Log/Rotate.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Log; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Log/Syslog.php b/lib/private/Log/Syslog.php index 92305edc17d1e..495d8cc9847bb 100644 --- a/lib/private/Log/Syslog.php +++ b/lib/private/Log/Syslog.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Log/Systemdlog.php b/lib/private/Log/Systemdlog.php index 8e3a68e2ffbff..f783f78cdf4e5 100644 --- a/lib/private/Log/Systemdlog.php +++ b/lib/private/Log/Systemdlog.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Log; use OC\SystemConfig; diff --git a/lib/private/Mail/Attachment.php b/lib/private/Mail/Attachment.php index 54b0cc76d9ad0..5001c2c9a2c09 100644 --- a/lib/private/Mail/Attachment.php +++ b/lib/private/Mail/Attachment.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Mail; use OCP\Mail\IAttachment; diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 2e4d905cf449b..ad1d2071ff8a1 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Mail; use OCP\Defaults; diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 99d9cd99f3a68..da61abb7dd4d5 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Mail; use OCP\Defaults; diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php index d27f2e5797d1a..b19570c9cc075 100644 --- a/lib/private/Mail/Message.php +++ b/lib/private/Mail/Message.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Mail; use OCP\Mail\Headers\AutoSubmitted; diff --git a/lib/private/Mail/Provider/Manager.php b/lib/private/Mail/Provider/Manager.php index 99f7b21c621cd..706f944ace8ed 100644 --- a/lib/private/Mail/Provider/Manager.php +++ b/lib/private/Mail/Provider/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Mail\Provider; use OC\AppFramework\Bootstrap\Coordinator; @@ -39,7 +40,6 @@ public function has(): bool { // return true if collection has any providers return !empty($this->providers()); - } /** @@ -54,7 +54,6 @@ public function count(): int { // return count of providers in collection return count($this->providers()); - } /** @@ -75,7 +74,6 @@ public function types(): array { } // return types collection return $types; - } /** @@ -117,7 +115,6 @@ public function providers(): array { } // return mail provider collection return $this->providersCollection; - } /** @@ -142,7 +139,6 @@ public function findProviderById(string $providerId): ?IProvider { } // return null if provider was not found return null; - } /** @@ -170,7 +166,6 @@ public function services(string $userId): array { } // return collection return $services; - } /** @@ -214,7 +209,6 @@ public function findServiceById(string $userId, string $serviceId, ?string $prov // return null if no match was found return null; - } /** @@ -258,6 +252,5 @@ public function findServiceByAddress(string $userId, string $address, ?string $p } // return null if no match was found return null; - } } diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php index f7f4f65fa5ed8..6173922b8e3c5 100644 --- a/lib/private/Memcache/APCu.php +++ b/lib/private/Memcache/APCu.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Memcache/ArrayCache.php b/lib/private/Memcache/ArrayCache.php index b93211d91435b..6929028349cf2 100644 --- a/lib/private/Memcache/ArrayCache.php +++ b/lib/private/Memcache/ArrayCache.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/lib/private/Memcache/CADTrait.php b/lib/private/Memcache/CADTrait.php index d0f6611c4f37b..5f9ad74537662 100644 --- a/lib/private/Memcache/CADTrait.php +++ b/lib/private/Memcache/CADTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; trait CADTrait { diff --git a/lib/private/Memcache/CASTrait.php b/lib/private/Memcache/CASTrait.php index 8c2d2a46b191f..7524f42d4dbfb 100644 --- a/lib/private/Memcache/CASTrait.php +++ b/lib/private/Memcache/CASTrait.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; trait CASTrait { diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php index f1a8b0f811cab..e830a11b1a42b 100644 --- a/lib/private/Memcache/Cache.php +++ b/lib/private/Memcache/Cache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use OCP\ICache; diff --git a/lib/private/Memcache/Factory.php b/lib/private/Memcache/Factory.php index 6cefc3d2dbc4e..cb89b77b592fc 100644 --- a/lib/private/Memcache/Factory.php +++ b/lib/private/Memcache/Factory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use OC\SystemConfig; diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index d6e0e182acafb..a3d65d545ee47 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use OC\SystemConfig; diff --git a/lib/private/Memcache/NullCache.php b/lib/private/Memcache/NullCache.php index 683a71ba2bb76..adbe689519f90 100644 --- a/lib/private/Memcache/NullCache.php +++ b/lib/private/Memcache/NullCache.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use OCP\IMemcache; @@ -62,7 +63,6 @@ public function ncad(string $key, mixed $old): bool { return true; } - #[\Override] public function clear($prefix = '') { return true; diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php index 03da8e138e777..8195a6795a44f 100644 --- a/lib/private/Memcache/Redis.php +++ b/lib/private/Memcache/Redis.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Memcache; use OCP\IMemcacheTTL; diff --git a/lib/private/Memcache/WithLocalCache.php b/lib/private/Memcache/WithLocalCache.php index 339c097f3db20..36e7741b52ef9 100644 --- a/lib/private/Memcache/WithLocalCache.php +++ b/lib/private/Memcache/WithLocalCache.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Memcache; use OCP\Cache\CappedMemoryCache; diff --git a/lib/private/Migration/BackgroundRepair.php b/lib/private/Migration/BackgroundRepair.php index ca252962d4ee8..e499caaec2394 100644 --- a/lib/private/Migration/BackgroundRepair.php +++ b/lib/private/Migration/BackgroundRepair.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Migration; use OC\Repair; diff --git a/lib/private/Migration/ConsoleOutput.php b/lib/private/Migration/ConsoleOutput.php index a97ffe5cb93e4..d742bdc1c6c94 100644 --- a/lib/private/Migration/ConsoleOutput.php +++ b/lib/private/Migration/ConsoleOutput.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Migration; use OCP\Migration\IOutput; diff --git a/lib/private/Migration/Exceptions/AttributeException.php b/lib/private/Migration/Exceptions/AttributeException.php index 3daf99032ad5d..8a4e52ca08fdf 100644 --- a/lib/private/Migration/Exceptions/AttributeException.php +++ b/lib/private/Migration/Exceptions/AttributeException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Migration\Exceptions; use Exception; diff --git a/lib/private/Migration/MetadataManager.php b/lib/private/Migration/MetadataManager.php index f4cb95342b4b1..fa81d360a1a08 100644 --- a/lib/private/Migration/MetadataManager.php +++ b/lib/private/Migration/MetadataManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Migration; use OC\DB\Connection; diff --git a/lib/private/Migration/NullOutput.php b/lib/private/Migration/NullOutput.php index 86b92312534ee..8b529900b5e51 100644 --- a/lib/private/Migration/NullOutput.php +++ b/lib/private/Migration/NullOutput.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Migration; use OCP\Migration\IOutput; diff --git a/lib/private/Migration/SimpleOutput.php b/lib/private/Migration/SimpleOutput.php index 48df5e431413b..926dc96d10bdf 100644 --- a/lib/private/Migration/SimpleOutput.php +++ b/lib/private/Migration/SimpleOutput.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Migration; use OCP\Migration\IOutput; diff --git a/lib/private/NaturalSort.php b/lib/private/NaturalSort.php index c37f383b58b6c..3bbf053308b63 100644 --- a/lib/private/NaturalSort.php +++ b/lib/private/NaturalSort.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\Server; diff --git a/lib/private/NaturalSort_DefaultCollator.php b/lib/private/NaturalSort_DefaultCollator.php index d688a34133a6f..0e97b09440157 100644 --- a/lib/private/NaturalSort_DefaultCollator.php +++ b/lib/private/NaturalSort_DefaultCollator.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class NaturalSort_DefaultCollator { diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index f1047d17a537e..d0d5ee4581886 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use InvalidArgumentException; @@ -161,7 +162,6 @@ private function proceedNavigation(array $list, string $type): array { return $list; } - /** * removes all the entries */ diff --git a/lib/private/NeedsUpdateException.php b/lib/private/NeedsUpdateException.php index cae8dc0047a8e..56b025576e046 100644 --- a/lib/private/NeedsUpdateException.php +++ b/lib/private/NeedsUpdateException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class NeedsUpdateException extends ServiceUnavailableException { diff --git a/lib/private/NotSquareException.php b/lib/private/NotSquareException.php index 2fb5e3dc6cfcc..28de9a7dd171f 100644 --- a/lib/private/NotSquareException.php +++ b/lib/private/NotSquareException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class NotSquareException extends \Exception { diff --git a/lib/private/Notification/Action.php b/lib/private/Notification/Action.php index 45e99bf6264b4..e96fd127422a4 100644 --- a/lib/private/Notification/Action.php +++ b/lib/private/Notification/Action.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Notification; use OCP\Notification\IAction; diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index a1c15759d4f6f..8be739787605d 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Notification; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index b055b0f9c79c6..b30931c615e65 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Notification; use OCP\Notification\IAction; diff --git a/lib/private/OCM/Model/OCMProvider.php b/lib/private/OCM/Model/OCMProvider.php index 20d3fbf8360bd..6c1591013a7a3 100644 --- a/lib/private/OCM/Model/OCMProvider.php +++ b/lib/private/OCM/Model/OCMProvider.php @@ -276,7 +276,6 @@ public function import(array $data): static { return $this; } - /** * @return bool */ @@ -313,6 +312,5 @@ public function jsonSerialize(): array { $response['inviteAcceptDialog'] = $inviteAcceptDialog; } return $response; - } } diff --git a/lib/private/OCM/OCMDiscoveryService.php b/lib/private/OCM/OCMDiscoveryService.php index 7aca4ab3e48d1..fc9cba7369789 100644 --- a/lib/private/OCM/OCMDiscoveryService.php +++ b/lib/private/OCM/OCMDiscoveryService.php @@ -70,7 +70,6 @@ public function __construct( $this->cache = $cacheFactory->createDistributed('ocm-discovery'); } - /** * @inheritDoc * @@ -130,7 +129,6 @@ public function discover(string $remote, bool $skipCache = false): IOCMProvider $remote . '/ocm-provider', ]; - foreach ($urls as $url) { $exception = null; $body = null; diff --git a/lib/private/OCM/OCMSignatoryManager.php b/lib/private/OCM/OCMSignatoryManager.php index 1bde75e552bba..8320671456a12 100644 --- a/lib/private/OCM/OCMSignatoryManager.php +++ b/lib/private/OCM/OCMSignatoryManager.php @@ -139,7 +139,6 @@ public function getLocalSignatory(): Signatory { $signatory->setPublicKey($keyPair->getPublic()); $signatory->setPrivateKey($keyPair->getPrivate()); return $signatory; - } /** Active JWKS-published signing key (ECDSA P-256), lazily provisioned. */ diff --git a/lib/private/OCS/CoreCapabilities.php b/lib/private/OCS/CoreCapabilities.php index 4a697e72c2d36..2bab5d96677a5 100644 --- a/lib/private/OCS/CoreCapabilities.php +++ b/lib/private/OCS/CoreCapabilities.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\OCS; use OCP\Capabilities\ICapability; diff --git a/lib/private/OCS/DiscoveryService.php b/lib/private/OCS/DiscoveryService.php index 26d7abbd0a7ae..0c3d6d67981af 100644 --- a/lib/private/OCS/DiscoveryService.php +++ b/lib/private/OCS/DiscoveryService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\OCS; use OCP\AppFramework\Http; @@ -33,7 +34,6 @@ public function __construct(ICacheFactory $cacheFactory, $this->client = $clientService->newClient(); } - /** * Discover OCS end-points * diff --git a/lib/private/OCS/Provider.php b/lib/private/OCS/Provider.php index 3af70b7005722..b49c3474f70e9 100644 --- a/lib/private/OCS/Provider.php +++ b/lib/private/OCS/Provider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\OCS; use OCP\App\IAppManager; diff --git a/lib/private/Preview/BMP.php b/lib/private/Preview/BMP.php index 624bd051c44a6..587a5bf24cf9f 100644 --- a/lib/private/Preview/BMP.php +++ b/lib/private/Preview/BMP.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; class BMP extends Image { diff --git a/lib/private/Preview/BackgroundCleanupJob.php b/lib/private/Preview/BackgroundCleanupJob.php index b853e98114ff9..b301418aedd20 100644 --- a/lib/private/Preview/BackgroundCleanupJob.php +++ b/lib/private/Preview/BackgroundCleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OC\Preview\Db\Preview; diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php index a9f5004201bec..cbdd932159d60 100644 --- a/lib/private/Preview/Bitmap.php +++ b/lib/private/Preview/Bitmap.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use Imagick; diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php index 39070bd6848bb..7c9897b1d190e 100644 --- a/lib/private/Preview/Bundled.php +++ b/lib/private/Preview/Bundled.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OC\Archive\ZIP; diff --git a/lib/private/Preview/Db/PreviewMapper.php b/lib/private/Preview/Db/PreviewMapper.php index 0d9699a501502..9c50eddf7aad9 100644 --- a/lib/private/Preview/Db/PreviewMapper.php +++ b/lib/private/Preview/Db/PreviewMapper.php @@ -219,7 +219,6 @@ public function getPreviews(string $lastId, int $limit = self::MAX_CHUNK_SIZE, ? } return $this->yieldEntities($qb); - } /** diff --git a/lib/private/Preview/Font.php b/lib/private/Preview/Font.php index 312d5de2bb8b3..a0c813204b798 100644 --- a/lib/private/Preview/Font.php +++ b/lib/private/Preview/Font.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; // .otf, .ttf and .pfb diff --git a/lib/private/Preview/GIF.php b/lib/private/Preview/GIF.php index e1d632fb4ecd6..b93175edf622f 100644 --- a/lib/private/Preview/GIF.php +++ b/lib/private/Preview/GIF.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; class GIF extends Image { diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 422b18e346e05..403e76f6f0e09 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OC\Core\AppInfo\ConfigLexicon; @@ -90,7 +91,6 @@ public function getPreview( 'mimeType' => $mimeType, ]); - // since we only ask for one preview, and the generate method return the last one it created, it returns the one we want return $this->generatePreviews($file, [$specification], $mimeType, $cacheResult); } diff --git a/lib/private/Preview/GeneratorHelper.php b/lib/private/Preview/GeneratorHelper.php index 7849cb3ba38c7..5078124f26660 100644 --- a/lib/private/Preview/GeneratorHelper.php +++ b/lib/private/Preview/GeneratorHelper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php index 413a3ef9e1e0e..e56101e8e4019 100644 --- a/lib/private/Preview/HEIC.php +++ b/lib/private/Preview/HEIC.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2018 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/IMagickSupport.php b/lib/private/Preview/IMagickSupport.php index 8225b1e7644d7..08ad28371e461 100644 --- a/lib/private/Preview/IMagickSupport.php +++ b/lib/private/Preview/IMagickSupport.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OCP\ICache; diff --git a/lib/private/Preview/Illustrator.php b/lib/private/Preview/Illustrator.php index fdbe68542c726..2d4557a3e6d86 100644 --- a/lib/private/Preview/Illustrator.php +++ b/lib/private/Preview/Illustrator.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.ai diff --git a/lib/private/Preview/Image.php b/lib/private/Preview/Image.php index 8a299bd28489e..25f1c7db35ba6 100644 --- a/lib/private/Preview/Image.php +++ b/lib/private/Preview/Image.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/Imaginary.php b/lib/private/Preview/Imaginary.php index e029823a9cff2..b99a6ebe50fa2 100644 --- a/lib/private/Preview/Imaginary.php +++ b/lib/private/Preview/Imaginary.php @@ -13,7 +13,6 @@ use OCP\IConfig; use OCP\IImage; use OCP\Image; - use OCP\Server; use Psr\Log\LoggerInterface; diff --git a/lib/private/Preview/ImaginaryPDF.php b/lib/private/Preview/ImaginaryPDF.php index 0eb2cd970f27d..a13878b2de57d 100644 --- a/lib/private/Preview/ImaginaryPDF.php +++ b/lib/private/Preview/ImaginaryPDF.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; class ImaginaryPDF extends Imaginary { diff --git a/lib/private/Preview/JPEG.php b/lib/private/Preview/JPEG.php index 4121e664941fd..aae706388bd33 100644 --- a/lib/private/Preview/JPEG.php +++ b/lib/private/Preview/JPEG.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; class JPEG extends Image { diff --git a/lib/private/Preview/Krita.php b/lib/private/Preview/Krita.php index 736f317f6da6f..b8e7369ecf132 100644 --- a/lib/private/Preview/Krita.php +++ b/lib/private/Preview/Krita.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OCP\Files\File; @@ -20,7 +21,6 @@ public function getMimeType(): string { return '/application\/x-krita/'; } - /** * @inheritDoc */ diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php index ed2a904194af9..08ab422b5c13c 100644 --- a/lib/private/Preview/MP3.php +++ b/lib/private/Preview/MP3.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/MSOffice2003.php b/lib/private/Preview/MSOffice2003.php index 844ee3ead7166..0b6b552c02b17 100644 --- a/lib/private/Preview/MSOffice2003.php +++ b/lib/private/Preview/MSOffice2003.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m) diff --git a/lib/private/Preview/MSOffice2007.php b/lib/private/Preview/MSOffice2007.php index 6b979f1696289..00afcf814e0d4 100644 --- a/lib/private/Preview/MSOffice2007.php +++ b/lib/private/Preview/MSOffice2007.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.docx, .dotx, .xlsx, .xltx, .pptx, .potx, .ppsx diff --git a/lib/private/Preview/MSOfficeDoc.php b/lib/private/Preview/MSOfficeDoc.php index 807c07c5fc5f2..275779ed9821d 100644 --- a/lib/private/Preview/MSOfficeDoc.php +++ b/lib/private/Preview/MSOfficeDoc.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.doc, .dot diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php index 7dba88278d96a..8ea10be50bbea 100644 --- a/lib/private/Preview/MarkDown.php +++ b/lib/private/Preview/MarkDown.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/MimeIconProvider.php b/lib/private/Preview/MimeIconProvider.php index 4c6ed18ab8352..2cb966fd253dd 100644 --- a/lib/private/Preview/MimeIconProvider.php +++ b/lib/private/Preview/MimeIconProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OCA\Theming\ThemingDefaults; diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php index d1879a966220d..07d119674ca3b 100644 --- a/lib/private/Preview/Office.php +++ b/lib/private/Preview/Office.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/OpenDocument.php b/lib/private/Preview/OpenDocument.php index a574bb413115b..15121911e1ea6 100644 --- a/lib/private/Preview/OpenDocument.php +++ b/lib/private/Preview/OpenDocument.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.odt, .ott, .oth, .odm, .odg, .otg, .odp, .otp, .ods, .ots, .odc, .odf, .odb, .odi, .oxt @@ -22,7 +23,6 @@ public function getMimeType(): string { return '/application\/vnd.oasis.opendocument.*/'; } - /** * @inheritDoc */ diff --git a/lib/private/Preview/PDF.php b/lib/private/Preview/PDF.php index 2aab2385569df..98c9d17b8cebb 100644 --- a/lib/private/Preview/PDF.php +++ b/lib/private/Preview/PDF.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.pdf diff --git a/lib/private/Preview/PNG.php b/lib/private/Preview/PNG.php index 1569a4283fa1a..84736a76a6517 100644 --- a/lib/private/Preview/PNG.php +++ b/lib/private/Preview/PNG.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; class PNG extends Image { diff --git a/lib/private/Preview/Photoshop.php b/lib/private/Preview/Photoshop.php index fea1bcf9a0d0b..8c54e603edb1e 100644 --- a/lib/private/Preview/Photoshop.php +++ b/lib/private/Preview/Photoshop.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.psd diff --git a/lib/private/Preview/Postscript.php b/lib/private/Preview/Postscript.php index 49b3ff5af22b8..f35f4fc34bb80 100644 --- a/lib/private/Preview/Postscript.php +++ b/lib/private/Preview/Postscript.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.eps diff --git a/lib/private/Preview/SGI.php b/lib/private/Preview/SGI.php index b27a270034da1..ad2060ea667f2 100644 --- a/lib/private/Preview/SGI.php +++ b/lib/private/Preview/SGI.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; //.sgi diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php index c23553090d5ef..2cd85af839859 100644 --- a/lib/private/Preview/SVG.php +++ b/lib/private/Preview/SVG.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/StarOffice.php b/lib/private/Preview/StarOffice.php index 2306ea2fb5705..4b12e735de224 100644 --- a/lib/private/Preview/StarOffice.php +++ b/lib/private/Preview/StarOffice.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.sxw, .stw, .sxc, .stc, .sxd, .std, .sxi, .sti, .sxg, .sxm diff --git a/lib/private/Preview/TGA.php b/lib/private/Preview/TGA.php index 98ae85ad865a8..034eff0b3d939 100644 --- a/lib/private/Preview/TGA.php +++ b/lib/private/Preview/TGA.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; //.tga diff --git a/lib/private/Preview/TIFF.php b/lib/private/Preview/TIFF.php index f04f56c334354..bbf2eaaa25ff7 100644 --- a/lib/private/Preview/TIFF.php +++ b/lib/private/Preview/TIFF.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; //.tiff diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index 95977e3e5d7b7..6a718618bca05 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; use OCP\Files\File; diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index 9b95e87d2ed03..342ec20adf51a 100644 --- a/lib/private/Preview/Watcher.php +++ b/lib/private/Preview/Watcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OC\Preview\Db\PreviewMapper; diff --git a/lib/private/Preview/WatcherConnector.php b/lib/private/Preview/WatcherConnector.php index 1331cd670d05d..848409436173d 100644 --- a/lib/private/Preview/WatcherConnector.php +++ b/lib/private/Preview/WatcherConnector.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OC\SystemConfig; diff --git a/lib/private/Preview/WebP.php b/lib/private/Preview/WebP.php index 4edc21aa97f1e..27fbfeaae74ef 100644 --- a/lib/private/Preview/WebP.php +++ b/lib/private/Preview/WebP.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Preview; use OCP\Files\FileInfo; diff --git a/lib/private/Preview/XBitmap.php b/lib/private/Preview/XBitmap.php index 75a22402f6b4d..281d97864124d 100644 --- a/lib/private/Preview/XBitmap.php +++ b/lib/private/Preview/XBitmap.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Preview; class XBitmap extends Image { diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php index 578c256aac068..e99349ea22e32 100644 --- a/lib/private/PreviewManager.php +++ b/lib/private/PreviewManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use Closure; @@ -59,7 +60,6 @@ use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; use Psr\Log\LoggerInterface; - use function array_key_exists; /** @@ -365,7 +365,6 @@ protected function registerCoreProviders(): void { $movieBinary = $this->binaryFinder->findBinaryPath('ffmpeg'); } - if (is_string($movieBinary)) { $this->registerCoreProvider(Movie::class, '/video\/.*/', ['movieBinary' => $movieBinary]); } diff --git a/lib/private/PreviewNotAvailableException.php b/lib/private/PreviewNotAvailableException.php index 3cc4b17f4ac7c..1eabe84b2384c 100644 --- a/lib/private/PreviewNotAvailableException.php +++ b/lib/private/PreviewNotAvailableException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC; class PreviewNotAvailableException extends \Exception { diff --git a/lib/private/Profiler/BuiltInProfiler.php b/lib/private/Profiler/BuiltInProfiler.php index 55f261aed6874..e99f7c0680c3a 100644 --- a/lib/private/Profiler/BuiltInProfiler.php +++ b/lib/private/Profiler/BuiltInProfiler.php @@ -30,7 +30,6 @@ public function start(): void { $shouldProfileSingleRequest = $this->shouldProfileSingleRequest(); $shouldSample = $this->config->getSystemValueBool('profiling.sample') && !$shouldProfileSingleRequest; - if (!$shouldProfileSingleRequest && !$shouldSample) { return; } @@ -39,7 +38,6 @@ public function start(): void { $sampleRate = $this->config->getSystemValue('profiling.sample.rate', 1.0); $eventType = $this->config->getSystemValue('profiling.event_type', EXCIMER_REAL); - $this->excimer = new \ExcimerProfiler(); $this->excimer->setPeriod($shouldProfileSingleRequest ? $requestRate : $sampleRate); $this->excimer->setEventType($eventType); diff --git a/lib/private/RedisFactory.php b/lib/private/RedisFactory.php index 4c8160d81d1f1..d2c81947b5c21 100644 --- a/lib/private/RedisFactory.php +++ b/lib/private/RedisFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\Diagnostics\IEventLogger; @@ -98,7 +99,6 @@ private function create(): void { } } - // Auth if configured if ($auth !== null) { $this->instance->auth($auth); diff --git a/lib/private/Remote/Api/ApiBase.php b/lib/private/Remote/Api/ApiBase.php index 2801ece60f6e8..1b8f5395c3e04 100644 --- a/lib/private/Remote/Api/ApiBase.php +++ b/lib/private/Remote/Api/ApiBase.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/ApiCollection.php b/lib/private/Remote/Api/ApiCollection.php index 7f89a70ac1129..4513fb4d098de 100644 --- a/lib/private/Remote/Api/ApiCollection.php +++ b/lib/private/Remote/Api/ApiCollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/ApiFactory.php b/lib/private/Remote/Api/ApiFactory.php index 2ffa38991b4d0..4ad7ca737bda9 100644 --- a/lib/private/Remote/Api/ApiFactory.php +++ b/lib/private/Remote/Api/ApiFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote\Api; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/Api/NotFoundException.php b/lib/private/Remote/Api/NotFoundException.php index e4dc514c3668e..2f3953629fec2 100644 --- a/lib/private/Remote/Api/NotFoundException.php +++ b/lib/private/Remote/Api/NotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote\Api; class NotFoundException extends \Exception { diff --git a/lib/private/Remote/Api/OCS.php b/lib/private/Remote/Api/OCS.php index 458ed71806087..dc9ff432a0582 100644 --- a/lib/private/Remote/Api/OCS.php +++ b/lib/private/Remote/Api/OCS.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote\Api; use GuzzleHttp\Exception\ClientException; diff --git a/lib/private/Remote/Credentials.php b/lib/private/Remote/Credentials.php index 2bb7c86ee4dc7..5946555dacc02 100644 --- a/lib/private/Remote/Credentials.php +++ b/lib/private/Remote/Credentials.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote; use OCP\Remote\ICredentials; diff --git a/lib/private/Remote/Instance.php b/lib/private/Remote/Instance.php index 9807c6b5b1b0f..8aa395c7059b5 100644 --- a/lib/private/Remote/Instance.php +++ b/lib/private/Remote/Instance.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote; use OC\Remote\Api\NotFoundException; diff --git a/lib/private/Remote/InstanceFactory.php b/lib/private/Remote/InstanceFactory.php index 13a4e2c1e5682..42bec5abb50d0 100644 --- a/lib/private/Remote/InstanceFactory.php +++ b/lib/private/Remote/InstanceFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote; use OCP\Http\Client\IClientService; diff --git a/lib/private/Remote/User.php b/lib/private/Remote/User.php index a3d0f3815e8b6..e72255a56bd53 100644 --- a/lib/private/Remote/User.php +++ b/lib/private/Remote/User.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Remote; use OCP\Remote\IUser; @@ -28,7 +29,6 @@ public function __construct( ) { } - /** * @return string */ diff --git a/lib/private/Repair.php b/lib/private/Repair.php index 90e209cfe9085..d25a12ccd9d76 100644 --- a/lib/private/Repair.php +++ b/lib/private/Repair.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Repair\AddBruteForceCleanupJob; diff --git a/lib/private/Repair/AddBruteForceCleanupJob.php b/lib/private/Repair/AddBruteForceCleanupJob.php index 20c1191b00638..52a7ff8821b4e 100644 --- a/lib/private/Repair/AddBruteForceCleanupJob.php +++ b/lib/private/Repair/AddBruteForceCleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Security\Bruteforce\CleanupJob; diff --git a/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php b/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php index ac66d4f59d756..a59fb42490c8b 100644 --- a/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php +++ b/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\User\BackgroundJobs\CleanupDeletedUsers; diff --git a/lib/private/Repair/AddCleanupUpdaterBackupsJob.php b/lib/private/Repair/AddCleanupUpdaterBackupsJob.php index f0138133196c9..c0e139b1df8fa 100644 --- a/lib/private/Repair/AddCleanupUpdaterBackupsJob.php +++ b/lib/private/Repair/AddCleanupUpdaterBackupsJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Core\BackgroundJobs\BackgroundCleanupUpdaterBackupsJob; diff --git a/lib/private/Repair/AddMetadataGenerationJob.php b/lib/private/Repair/AddMetadataGenerationJob.php index 3ab619d6246fe..5d2450d165a1a 100644 --- a/lib/private/Repair/AddMetadataGenerationJob.php +++ b/lib/private/Repair/AddMetadataGenerationJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Core\BackgroundJobs\GenerateMetadataJob; diff --git a/lib/private/Repair/AddMovePreviewJob.php b/lib/private/Repair/AddMovePreviewJob.php index 37f8398e56fbb..bf89464583b87 100644 --- a/lib/private/Repair/AddMovePreviewJob.php +++ b/lib/private/Repair/AddMovePreviewJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Core\BackgroundJobs\PreviewMigrationJob; diff --git a/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php b/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php index 292a4e85a7b9b..16299f4bea8ba 100644 --- a/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php +++ b/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\TaskProcessing\RemoveOldTasksBackgroundJob; diff --git a/lib/private/Repair/CleanTags.php b/lib/private/Repair/CleanTags.php index 3ea09e8c97c15..2cc0670636799 100644 --- a/lib/private/Repair/CleanTags.php +++ b/lib/private/Repair/CleanTags.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/CleanUpAbandonedApps.php b/lib/private/Repair/CleanUpAbandonedApps.php index 4300bf18d8b30..be08b210e5691 100644 --- a/lib/private/Repair/CleanUpAbandonedApps.php +++ b/lib/private/Repair/CleanUpAbandonedApps.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCP\IConfig; diff --git a/lib/private/Repair/ClearFrontendCaches.php b/lib/private/Repair/ClearFrontendCaches.php index 4211f6c745f9b..3b97a272fd224 100644 --- a/lib/private/Repair/ClearFrontendCaches.php +++ b/lib/private/Repair/ClearFrontendCaches.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Template\JSCombiner; diff --git a/lib/private/Repair/ClearGeneratedAvatarCache.php b/lib/private/Repair/ClearGeneratedAvatarCache.php index 75b5d8fe85eb6..2edee5d3b8211 100644 --- a/lib/private/Repair/ClearGeneratedAvatarCache.php +++ b/lib/private/Repair/ClearGeneratedAvatarCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Avatar\AvatarManager; diff --git a/lib/private/Repair/ClearGeneratedAvatarCacheJob.php b/lib/private/Repair/ClearGeneratedAvatarCacheJob.php index 2cd0596f274b8..51c84e8699d1b 100644 --- a/lib/private/Repair/ClearGeneratedAvatarCacheJob.php +++ b/lib/private/Repair/ClearGeneratedAvatarCacheJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OC\Avatar\AvatarManager; diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php index 525378869611a..f149e9a9f65b5 100644 --- a/lib/private/Repair/Collation.php +++ b/lib/private/Repair/Collation.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair; use Doctrine\DBAL\Exception\DriverException; diff --git a/lib/private/Repair/Events/RepairAdvanceEvent.php b/lib/private/Repair/Events/RepairAdvanceEvent.php index eb5bdb018058a..d6ee4518932f6 100644 --- a/lib/private/Repair/Events/RepairAdvanceEvent.php +++ b/lib/private/Repair/Events/RepairAdvanceEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairErrorEvent.php b/lib/private/Repair/Events/RepairErrorEvent.php index 219a7cd97bb73..d4b19970e8d7c 100644 --- a/lib/private/Repair/Events/RepairErrorEvent.php +++ b/lib/private/Repair/Events/RepairErrorEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairFinishEvent.php b/lib/private/Repair/Events/RepairFinishEvent.php index 767a7506e6f03..f1e197b2a7b2a 100644 --- a/lib/private/Repair/Events/RepairFinishEvent.php +++ b/lib/private/Repair/Events/RepairFinishEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairInfoEvent.php b/lib/private/Repair/Events/RepairInfoEvent.php index 87b2056f8d3e3..fa0f37b0efb79 100644 --- a/lib/private/Repair/Events/RepairInfoEvent.php +++ b/lib/private/Repair/Events/RepairInfoEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairStartEvent.php b/lib/private/Repair/Events/RepairStartEvent.php index e8e97c5233b47..d74fc7cfa13e0 100644 --- a/lib/private/Repair/Events/RepairStartEvent.php +++ b/lib/private/Repair/Events/RepairStartEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairStepEvent.php b/lib/private/Repair/Events/RepairStepEvent.php index 5c68778f2602b..39fab37a788af 100644 --- a/lib/private/Repair/Events/RepairStepEvent.php +++ b/lib/private/Repair/Events/RepairStepEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/Events/RepairWarningEvent.php b/lib/private/Repair/Events/RepairWarningEvent.php index 118965739e82c..eed5e4e084f89 100644 --- a/lib/private/Repair/Events/RepairWarningEvent.php +++ b/lib/private/Repair/Events/RepairWarningEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair\Events; use OCP\EventDispatcher\Event; diff --git a/lib/private/Repair/MoveUpdaterStepFile.php b/lib/private/Repair/MoveUpdaterStepFile.php index 72ea92be0fb4a..3edc2d9cdde80 100644 --- a/lib/private/Repair/MoveUpdaterStepFile.php +++ b/lib/private/Repair/MoveUpdaterStepFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCP\Files; diff --git a/lib/private/Repair/NC13/AddLogRotateJob.php b/lib/private/Repair/NC13/AddLogRotateJob.php index 68e3693aac4af..c20bdb7b85daf 100644 --- a/lib/private/Repair/NC13/AddLogRotateJob.php +++ b/lib/private/Repair/NC13/AddLogRotateJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC13; use OC\Log\Rotate; diff --git a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php index dff83d7a6cb9a..a58126c592fc4 100644 --- a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php +++ b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC14; use OC\Preview\BackgroundCleanupJob; diff --git a/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php b/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php index 028cce593f9e4..e725a6005ebf7 100644 --- a/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php +++ b/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC16; use OC\Core\BackgroundJobs\CleanupLoginFlowV2; diff --git a/lib/private/Repair/NC16/ClearCollectionsAccessCache.php b/lib/private/Repair/NC16/ClearCollectionsAccessCache.php index 163f5794700d8..37f6b58f84f5e 100644 --- a/lib/private/Repair/NC16/ClearCollectionsAccessCache.php +++ b/lib/private/Repair/NC16/ClearCollectionsAccessCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC16; use OC\Collaboration\Resources\Manager; diff --git a/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php b/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php index 5de39b58a95e5..b8c655fc2e2aa 100644 --- a/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php +++ b/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC18; use OCP\IConfig; diff --git a/lib/private/Repair/NC20/EncryptionLegacyCipher.php b/lib/private/Repair/NC20/EncryptionLegacyCipher.php index 32f98a140d739..559940c41c113 100644 --- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php +++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC20; use OCP\Encryption\IManager; diff --git a/lib/private/Repair/NC20/EncryptionMigration.php b/lib/private/Repair/NC20/EncryptionMigration.php index d46752dbcfcf3..72de5d40752a6 100644 --- a/lib/private/Repair/NC20/EncryptionMigration.php +++ b/lib/private/Repair/NC20/EncryptionMigration.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC20; use OCP\Encryption\IManager; diff --git a/lib/private/Repair/NC20/ShippedDashboardEnable.php b/lib/private/Repair/NC20/ShippedDashboardEnable.php index 4ff1bae77e1a8..11635b0106b09 100644 --- a/lib/private/Repair/NC20/ShippedDashboardEnable.php +++ b/lib/private/Repair/NC20/ShippedDashboardEnable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC20; use OCP\IConfig; diff --git a/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php b/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php index e16a5862cd516..34dd195be8eba 100644 --- a/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php +++ b/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC21; use OC\Core\BackgroundJobs\CheckForUserCertificates; diff --git a/lib/private/Repair/NC22/LookupServerSendCheck.php b/lib/private/Repair/NC22/LookupServerSendCheck.php index 47d752cfcb7be..5e626f01f0ecb 100644 --- a/lib/private/Repair/NC22/LookupServerSendCheck.php +++ b/lib/private/Repair/NC22/LookupServerSendCheck.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC22; use OC\Core\BackgroundJobs\LookupServerSendCheckBackgroundJob; diff --git a/lib/private/Repair/NC24/AddTokenCleanupJob.php b/lib/private/Repair/NC24/AddTokenCleanupJob.php index 2fa9235c9f923..a663d46b69dcc 100644 --- a/lib/private/Repair/NC24/AddTokenCleanupJob.php +++ b/lib/private/Repair/NC24/AddTokenCleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC24; use OC\Authentication\Token\TokenCleanupJob; diff --git a/lib/private/Repair/NC25/AddMissingSecretJob.php b/lib/private/Repair/NC25/AddMissingSecretJob.php index d754862a1acfa..5dabe2577369a 100644 --- a/lib/private/Repair/NC25/AddMissingSecretJob.php +++ b/lib/private/Repair/NC25/AddMissingSecretJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC25; use OCP\HintException; diff --git a/lib/private/Repair/NC29/SanitizeAccountProperties.php b/lib/private/Repair/NC29/SanitizeAccountProperties.php index da51c67e268fb..fe20fa20821dd 100644 --- a/lib/private/Repair/NC29/SanitizeAccountProperties.php +++ b/lib/private/Repair/NC29/SanitizeAccountProperties.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC29; use OCP\BackgroundJob\IJobList; diff --git a/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php b/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php index fbce960d3027d..ee18cec81f0fb 100644 --- a/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php +++ b/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC29; use InvalidArgumentException; diff --git a/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php b/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php index 80b7da014f476..44002c3903efe 100644 --- a/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php +++ b/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC30; use OCP\IConfig; diff --git a/lib/private/Repair/OldGroupMembershipShares.php b/lib/private/Repair/OldGroupMembershipShares.php index 602cbcac47822..ec7db9643abfb 100644 --- a/lib/private/Repair/OldGroupMembershipShares.php +++ b/lib/private/Repair/OldGroupMembershipShares.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair; use OCP\IDBConnection; diff --git a/lib/private/Repair/Owncloud/CleanPreviews.php b/lib/private/Repair/Owncloud/CleanPreviews.php index 63bec39859b07..0432b19980941 100644 --- a/lib/private/Repair/Owncloud/CleanPreviews.php +++ b/lib/private/Repair/Owncloud/CleanPreviews.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\BackgroundJob\IJobList; diff --git a/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php b/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php index ff83de3b5bb4c..3b26a6e9b79d1 100644 --- a/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php +++ b/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Repair/Owncloud/DropAccountTermsTable.php b/lib/private/Repair/Owncloud/DropAccountTermsTable.php index a0b4b19433c77..43814df0d9f5b 100644 --- a/lib/private/Repair/Owncloud/DropAccountTermsTable.php +++ b/lib/private/Repair/Owncloud/DropAccountTermsTable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\IDBConnection; diff --git a/lib/private/Repair/Owncloud/MoveAvatars.php b/lib/private/Repair/Owncloud/MoveAvatars.php index 26c280fb840db..46a7e6b7bc9f8 100644 --- a/lib/private/Repair/Owncloud/MoveAvatars.php +++ b/lib/private/Repair/Owncloud/MoveAvatars.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\BackgroundJob\IJobList; diff --git a/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php b/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php index 6895cad0e1c59..c03d6c7cf2154 100644 --- a/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php +++ b/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Repair/Owncloud/SaveAccountsTableData.php b/lib/private/Repair/Owncloud/SaveAccountsTableData.php index d37c941b7e87a..3c6355e310d68 100644 --- a/lib/private/Repair/Owncloud/SaveAccountsTableData.php +++ b/lib/private/Repair/Owncloud/SaveAccountsTableData.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/Owncloud/UpdateLanguageCodes.php b/lib/private/Repair/Owncloud/UpdateLanguageCodes.php index 611e33602dd95..5cf14f79b5e2a 100644 --- a/lib/private/Repair/Owncloud/UpdateLanguageCodes.php +++ b/lib/private/Repair/Owncloud/UpdateLanguageCodes.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\Owncloud; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/RemoveBrokenProperties.php b/lib/private/Repair/RemoveBrokenProperties.php index b993ffaa5e824..0e2a7318f22c7 100644 --- a/lib/private/Repair/RemoveBrokenProperties.php +++ b/lib/private/Repair/RemoveBrokenProperties.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCP\DB\QueryBuilder\IQueryBuilder; diff --git a/lib/private/Repair/RemoveLinkShares.php b/lib/private/Repair/RemoveLinkShares.php index 25255f9d3f829..37b5293f20a5d 100644 --- a/lib/private/Repair/RemoveLinkShares.php +++ b/lib/private/Repair/RemoveLinkShares.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Repair/RepairDavShares.php b/lib/private/Repair/RepairDavShares.php index 1321fd7913c4c..3c375777f891f 100644 --- a/lib/private/Repair/RepairDavShares.php +++ b/lib/private/Repair/RepairDavShares.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCP\DB\Exception; diff --git a/lib/private/Repair/RepairInvalidShares.php b/lib/private/Repair/RepairInvalidShares.php index 1793ef55f30e9..487a7ce652ee0 100644 --- a/lib/private/Repair/RepairInvalidShares.php +++ b/lib/private/Repair/RepairInvalidShares.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair; use OCP\Constants; diff --git a/lib/private/Repair/RepairLogoDimension.php b/lib/private/Repair/RepairLogoDimension.php index 7d01bbea69642..58299d95fd5fd 100644 --- a/lib/private/Repair/RepairLogoDimension.php +++ b/lib/private/Repair/RepairLogoDimension.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair; use OCA\Theming\ImageManager; diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 0fa3ebc51fe1c..785b6a0f6077f 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Repair; use OC\Migration\NullOutput; @@ -322,7 +323,6 @@ private function introduceExcalidrawType(): IResult|int|null { return $this->updateMimetypes($updatedMimetypes); } - /** * @throws Exception * @since 31.0.0 diff --git a/lib/private/RepairException.php b/lib/private/RepairException.php index 9f57c2fabebc3..d4f08a2c987e7 100644 --- a/lib/private/RepairException.php +++ b/lib/private/RepairException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; /** diff --git a/lib/private/RichObjectStrings/Validator.php b/lib/private/RichObjectStrings/Validator.php index 14a034d0980e8..6cb6065221a00 100644 --- a/lib/private/RichObjectStrings/Validator.php +++ b/lib/private/RichObjectStrings/Validator.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\RichObjectStrings; use OCP\RichObjectStrings\Definitions; diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php index bbc20ac7b776b..fca6d4b1c51d6 100644 --- a/lib/private/Route/CachingRouter.php +++ b/lib/private/Route/CachingRouter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Route; use OCP\App\IAppManager; diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php index 2d9becc86e388..3589429769b54 100644 --- a/lib/private/Route/Route.php +++ b/lib/private/Route/Route.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Route; use OCP\Route\IRoute; diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index 3a9c82ae05af3..b75c3e6982694 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Route; use DirectoryIterator; @@ -223,7 +224,6 @@ public function getCurrentCollection() { return $this->collectionName; } - /** * Create a \OC\Route\Route. * @@ -527,7 +527,6 @@ protected function requireRouteFile(string $file, string $appName): void { $this->setupRoutes(include $file, $appName); } - /** * If a routes.php file returns an array, try to set up the application and * register the routes for the app. The application class will be chosen by diff --git a/lib/private/Search/FilterCollection.php b/lib/private/Search/FilterCollection.php index dfd02e7ef2ea0..6baea027b4484 100644 --- a/lib/private/Search/FilterCollection.php +++ b/lib/private/Search/FilterCollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Search; use Generator; diff --git a/lib/private/Search/FilterFactory.php b/lib/private/Search/FilterFactory.php index 7a9baf10b4c35..791f54c7ebd32 100644 --- a/lib/private/Search/FilterFactory.php +++ b/lib/private/Search/FilterFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Search; use OC\Search\Filter\BooleanFilter; diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php index c017d1ec9a338..6f5307d53a78e 100644 --- a/lib/private/Search/SearchComposer.php +++ b/lib/private/Search/SearchComposer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Search; use InvalidArgumentException; diff --git a/lib/private/Search/SearchQuery.php b/lib/private/Search/SearchQuery.php index 4ed81bdebff2f..1833cba0ea66b 100644 --- a/lib/private/Search/SearchQuery.php +++ b/lib/private/Search/SearchQuery.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Search; use OCP\Search\IFilter; diff --git a/lib/private/Search/UnsupportedFilter.php b/lib/private/Search/UnsupportedFilter.php index ea520e6b872eb..d4f3df1f6a304 100644 --- a/lib/private/Search/UnsupportedFilter.php +++ b/lib/private/Search/UnsupportedFilter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Search; use Exception; diff --git a/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php b/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php index 49570685851b1..d4055fdb51a97 100644 --- a/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php +++ b/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce\Backend; use OCP\IDBConnection; diff --git a/lib/private/Security/Bruteforce/Backend/IBackend.php b/lib/private/Security/Bruteforce/Backend/IBackend.php index 7118123cbb53c..7e8a771caad3a 100644 --- a/lib/private/Security/Bruteforce/Backend/IBackend.php +++ b/lib/private/Security/Bruteforce/Backend/IBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce\Backend; /** diff --git a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php index 633f75d4e9dae..53724d78fe032 100644 --- a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php +++ b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce\Backend; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/Bruteforce/Capabilities.php b/lib/private/Security/Bruteforce/Capabilities.php index d2ddc0bf05b03..6cf4082501238 100644 --- a/lib/private/Security/Bruteforce/Capabilities.php +++ b/lib/private/Security/Bruteforce/Capabilities.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce; use OCP\Capabilities\IInitialStateExcludedCapability; diff --git a/lib/private/Security/Bruteforce/CleanupJob.php b/lib/private/Security/Bruteforce/CleanupJob.php index 9033d4b775e3f..2e6c5da972aac 100644 --- a/lib/private/Security/Bruteforce/CleanupJob.php +++ b/lib/private/Security/Bruteforce/CleanupJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php index 6c5ebdce08455..6d6384fe99310 100644 --- a/lib/private/Security/Bruteforce/Throttler.php +++ b/lib/private/Security/Bruteforce/Throttler.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Bruteforce; use OC\Security\Bruteforce\Backend\IBackend; diff --git a/lib/private/Security/CSP/ContentSecurityPolicy.php b/lib/private/Security/CSP/ContentSecurityPolicy.php index 8dd87cf499933..2440f16d2ea9d 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicy.php +++ b/lib/private/Security/CSP/ContentSecurityPolicy.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSP; /** @@ -131,7 +132,6 @@ public function setAllowedFormActionDomains(array $allowedFormActionDomains): vo $this->allowedFormActionDomains = $allowedFormActionDomains; } - public function getReportTo(): array { return $this->reportTo; } diff --git a/lib/private/Security/CSP/ContentSecurityPolicyManager.php b/lib/private/Security/CSP/ContentSecurityPolicyManager.php index 7804bca77410a..e960dd7fd13ec 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyManager.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSP; use OCP\AppFramework\Http\ContentSecurityPolicy; diff --git a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php index 993f74ae0e4e1..44abc87983eca 100644 --- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php +++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\CSP; use OC\AppFramework\Http\Request; diff --git a/lib/private/Security/CSRF/CsrfToken.php b/lib/private/Security/CSRF/CsrfToken.php index 6aad0cd594439..007703ad64e13 100644 --- a/lib/private/Security/CSRF/CsrfToken.php +++ b/lib/private/Security/CSRF/CsrfToken.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSRF; /** diff --git a/lib/private/Security/CSRF/CsrfTokenGenerator.php b/lib/private/Security/CSRF/CsrfTokenGenerator.php index 9e3f15c63d26d..b0d081c5da51f 100644 --- a/lib/private/Security/CSRF/CsrfTokenGenerator.php +++ b/lib/private/Security/CSRF/CsrfTokenGenerator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSRF; use OCP\Security\ISecureRandom; diff --git a/lib/private/Security/CSRF/CsrfTokenManager.php b/lib/private/Security/CSRF/CsrfTokenManager.php index a9b3afcc40721..9fd9ab18eeba7 100644 --- a/lib/private/Security/CSRF/CsrfTokenManager.php +++ b/lib/private/Security/CSRF/CsrfTokenManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSRF; use OC\Security\CSRF\TokenStorage\SessionStorage; diff --git a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php index 1f0f8bcaa0ae2..94681e5e177ac 100644 --- a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php +++ b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security\CSRF\TokenStorage; use OCP\ISession; diff --git a/lib/private/Security/Certificate.php b/lib/private/Security/Certificate.php index 31015a1d6bd13..8997d9b006244 100644 --- a/lib/private/Security/Certificate.php +++ b/lib/private/Security/Certificate.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OCP\ICertificate; @@ -15,7 +16,6 @@ class Certificate implements ICertificate { protected ?string $organization; - protected \DateTime $issueDate; protected \DateTime $expireDate; diff --git a/lib/private/Security/CertificateManager.php b/lib/private/Security/CertificateManager.php index ee9332e550fac..076e32d048f00 100644 --- a/lib/private/Security/CertificateManager.php +++ b/lib/private/Security/CertificateManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OC\Files\View; diff --git a/lib/private/Security/CredentialsManager.php b/lib/private/Security/CredentialsManager.php index 202cde523971b..ca5fd05823fe1 100644 --- a/lib/private/Security/CredentialsManager.php +++ b/lib/private/Security/CredentialsManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OCP\IDBConnection; diff --git a/lib/private/Security/Crypto.php b/lib/private/Security/Crypto.php index 594b769e8f316..26b8332a1e242 100644 --- a/lib/private/Security/Crypto.php +++ b/lib/private/Security/Crypto.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use Exception; diff --git a/lib/private/Security/FeaturePolicy/FeaturePolicy.php b/lib/private/Security/FeaturePolicy/FeaturePolicy.php index 9b513b8081372..b4541a9903685 100644 --- a/lib/private/Security/FeaturePolicy/FeaturePolicy.php +++ b/lib/private/Security/FeaturePolicy/FeaturePolicy.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\FeaturePolicy; class FeaturePolicy extends \OCP\AppFramework\Http\FeaturePolicy { diff --git a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php index e50aaac0fafea..e3083ac694011 100644 --- a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php +++ b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\FeaturePolicy; use OCP\AppFramework\Http\EmptyFeaturePolicy; diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php index daaecf396d74f..418c8b88a58b8 100644 --- a/lib/private/Security/Hasher.php +++ b/lib/private/Security/Hasher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OCP\IConfig; diff --git a/lib/private/Security/IdentityProof/Key.php b/lib/private/Security/IdentityProof/Key.php index 0bfcd6bf9ed4d..c1b435f730add 100644 --- a/lib/private/Security/IdentityProof/Key.php +++ b/lib/private/Security/IdentityProof/Key.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\IdentityProof; class Key { diff --git a/lib/private/Security/IdentityProof/Manager.php b/lib/private/Security/IdentityProof/Manager.php index 298c1d459b313..36f0c21dfc26e 100644 --- a/lib/private/Security/IdentityProof/Manager.php +++ b/lib/private/Security/IdentityProof/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\IdentityProof; use OC\Files\AppData\Factory; diff --git a/lib/private/Security/IdentityProof/Signer.php b/lib/private/Security/IdentityProof/Signer.php index 6083cbb5c9bf4..b2e8c6d0c4660 100644 --- a/lib/private/Security/IdentityProof/Signer.php +++ b/lib/private/Security/IdentityProof/Signer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\IdentityProof; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/Ip/BruteforceAllowList.php b/lib/private/Security/Ip/BruteforceAllowList.php index fb837690a7bec..e1fdabba34f90 100644 --- a/lib/private/Security/Ip/BruteforceAllowList.php +++ b/lib/private/Security/Ip/BruteforceAllowList.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Ip; use OCP\IAppConfig; diff --git a/lib/private/Security/Normalizer/IpAddress.php b/lib/private/Security/Normalizer/IpAddress.php index 70884e6f769a7..25dfc5542ccd0 100644 --- a/lib/private/Security/Normalizer/IpAddress.php +++ b/lib/private/Security/Normalizer/IpAddress.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Normalizer; use OCP\IConfig; diff --git a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php index 16b51ae264a32..385ea2030fd40 100644 --- a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php +++ b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\RateLimiting\Backend; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/RateLimiting/Backend/IBackend.php b/lib/private/Security/RateLimiting/Backend/IBackend.php index 43eff5dcf02ee..222602ce5ee69 100644 --- a/lib/private/Security/RateLimiting/Backend/IBackend.php +++ b/lib/private/Security/RateLimiting/Backend/IBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\RateLimiting\Backend; /** diff --git a/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php index 466c7efde0593..87d8e84d16272 100644 --- a/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php +++ b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\RateLimiting\Backend; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php b/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php index 19defc2d89632..a5f278e1be57d 100644 --- a/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php +++ b/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\RateLimiting\Exception; use OC\AppFramework\Middleware\Security\Exceptions\SecurityException; diff --git a/lib/private/Security/RateLimiting/Limiter.php b/lib/private/Security/RateLimiting/Limiter.php index e14def1455073..262b2bb83efdc 100644 --- a/lib/private/Security/RateLimiting/Limiter.php +++ b/lib/private/Security/RateLimiting/Limiter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\RateLimiting; use OC\Security\Normalizer\IpAddress; diff --git a/lib/private/Security/SecureRandom.php b/lib/private/Security/SecureRandom.php index ddb6b16655d3f..efaa74a9e1a4b 100644 --- a/lib/private/Security/SecureRandom.php +++ b/lib/private/Security/SecureRandom.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OCP\Security\ISecureRandom; diff --git a/lib/private/Security/Signature/Model/IncomingSignedRequest.php b/lib/private/Security/Signature/Model/IncomingSignedRequest.php index c5b5584475c2f..5a8adbde89265 100644 --- a/lib/private/Security/Signature/Model/IncomingSignedRequest.php +++ b/lib/private/Security/Signature/Model/IncomingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Signature\Model; use JsonSerializable; diff --git a/lib/private/Security/Signature/Model/OutgoingSignedRequest.php b/lib/private/Security/Signature/Model/OutgoingSignedRequest.php index 0a87aa708956d..e64f80a5c45f0 100644 --- a/lib/private/Security/Signature/Model/OutgoingSignedRequest.php +++ b/lib/private/Security/Signature/Model/OutgoingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Signature\Model; use JsonSerializable; diff --git a/lib/private/Security/Signature/Model/SignedRequest.php b/lib/private/Security/Signature/Model/SignedRequest.php index 137c64dffda6a..825b6ea214ca1 100644 --- a/lib/private/Security/Signature/Model/SignedRequest.php +++ b/lib/private/Security/Signature/Model/SignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\Signature\Model; use JsonSerializable; diff --git a/lib/private/Security/Signature/SignatureManager.php b/lib/private/Security/Signature/SignatureManager.php index f094ac5148a37..555ff28e1a337 100644 --- a/lib/private/Security/Signature/SignatureManager.php +++ b/lib/private/Security/Signature/SignatureManager.php @@ -309,7 +309,6 @@ public function getSignatory(string $host, string $account = ''): Signatory { return $this->mapper->getByHost($host, $account); } - /** * @inheritDoc * @@ -432,7 +431,6 @@ private function updateKnownSignatory(Signatory $signatory): void { $this->deleteSignatory($knownSignatory->getKeyId()); $this->insertSignatory($signatory); return; - case SignatoryType::REFRESHABLE: $this->updateSignatoryPublicKey($signatory); $this->updateSignatoryMetadata($signatory); @@ -441,7 +439,6 @@ private function updateKnownSignatory(Signatory $signatory): void { case SignatoryType::TRUSTED: // TODO: send notice to admin throw new SignatoryConflictException(); - case SignatoryType::STATIC: // TODO: send warning to admin throw new SignatoryConflictException(); @@ -461,11 +458,9 @@ private function manageDeprecatedSignatory(?Signatory $knownSignatory): void { case null: // unknown in local database case SignatoryType::FORGIVABLE: // who cares ? throw new SignatoryNotFoundException(); // meaning we just return the correct exception - case SignatoryType::REFRESHABLE: // TODO: send notice to admin throw new SignatoryConflictException(); // while it can be refreshed, it must exist - case SignatoryType::TRUSTED: case SignatoryType::STATIC: // TODO: send warning to admin @@ -473,7 +468,6 @@ private function manageDeprecatedSignatory(?Signatory $knownSignatory): void { } } - private function updateSignatoryPublicKey(Signatory $signatory): void { $this->mapper->updatePublicKey($signatory); } diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index 526c20be26f8b..a830c2a62fe5f 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Security; use OC\AppFramework\Http\Request; diff --git a/lib/private/Security/VerificationToken/CleanUpJob.php b/lib/private/Security/VerificationToken/CleanUpJob.php index 5b951da139894..b2992c783da1e 100644 --- a/lib/private/Security/VerificationToken/CleanUpJob.php +++ b/lib/private/Security/VerificationToken/CleanUpJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\VerificationToken; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Security/VerificationToken/VerificationToken.php b/lib/private/Security/VerificationToken/VerificationToken.php index 602b06390aafc..13eec2b95bfbf 100644 --- a/lib/private/Security/VerificationToken/VerificationToken.php +++ b/lib/private/Security/VerificationToken/VerificationToken.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Security\VerificationToken; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Server.php b/lib/private/Server.php index 7ce89644664f9..5259e4cd42a86 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index a98814d247946..94e2ce13f16a0 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\AppFramework\App; diff --git a/lib/private/ServerNotAvailableException.php b/lib/private/ServerNotAvailableException.php index 979032938aafe..97c0ff6b6528a 100644 --- a/lib/private/ServerNotAvailableException.php +++ b/lib/private/ServerNotAvailableException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class ServerNotAvailableException extends \Exception { diff --git a/lib/private/ServiceUnavailableException.php b/lib/private/ServiceUnavailableException.php index f73f8bbc80a48..f1afc0f216ef1 100644 --- a/lib/private/ServiceUnavailableException.php +++ b/lib/private/ServiceUnavailableException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; class ServiceUnavailableException extends \Exception { diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php index bd9d35c18f737..2e6675f3c1c58 100644 --- a/lib/private/Session/CryptoSessionData.php +++ b/lib/private/Session/CryptoSessionData.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Session; use OCP\ISession; diff --git a/lib/private/Session/Internal.php b/lib/private/Session/Internal.php index 953544e374ca5..d10091011573c 100644 --- a/lib/private/Session/Internal.php +++ b/lib/private/Session/Internal.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Session; use OC\Authentication\Token\IProvider; diff --git a/lib/private/Session/Memory.php b/lib/private/Session/Memory.php index e73a8c3fa312c..81bec82ed275c 100644 --- a/lib/private/Session/Memory.php +++ b/lib/private/Session/Memory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Session; use OCP\Session\Exceptions\SessionNotAvailableException; diff --git a/lib/private/Session/Session.php b/lib/private/Session/Session.php index 08465ba3b0851..f68bc6380a818 100644 --- a/lib/private/Session/Session.php +++ b/lib/private/Session/Session.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Session; use OCP\ISession; diff --git a/lib/private/Settings/AuthorizedGroup.php b/lib/private/Settings/AuthorizedGroup.php index 284c3ae42ced5..6676b67b07a06 100644 --- a/lib/private/Settings/AuthorizedGroup.php +++ b/lib/private/Settings/AuthorizedGroup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Settings; use JsonSerializable; diff --git a/lib/private/Settings/AuthorizedGroupMapper.php b/lib/private/Settings/AuthorizedGroupMapper.php index e057ab94c9d1f..87cc06fe59338 100644 --- a/lib/private/Settings/AuthorizedGroupMapper.php +++ b/lib/private/Settings/AuthorizedGroupMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Settings; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Settings/DeclarativeManager.php b/lib/private/Settings/DeclarativeManager.php index 10419913a169d..a3d7e62b15abb 100644 --- a/lib/private/Settings/DeclarativeManager.php +++ b/lib/private/Settings/DeclarativeManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Settings; use Exception; diff --git a/lib/private/Settings/Section.php b/lib/private/Settings/Section.php index 8fb30165bcf62..25ad93a9c9508 100644 --- a/lib/private/Settings/Section.php +++ b/lib/private/Settings/Section.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Settings; use OCP\Settings\IIconSection; diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 1d63cffb86ec4..ad1e59135d162 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index a2369085e6f60..88ea7c2a43f04 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Setup; use OC\DB\Connection; diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index e2923578d3d2e..492d83d3cd271 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Setup; use Doctrine\DBAL\Platforms\MySQL80Platform; diff --git a/lib/private/Setup/OCI.php b/lib/private/Setup/OCI.php index 5e343b754f1c9..13174f791e363 100644 --- a/lib/private/Setup/OCI.php +++ b/lib/private/Setup/OCI.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Setup; use OC\DatabaseSetupException; diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 687d9b2c7d7a1..cdb46010e6847 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Setup; use OC\DatabaseException; diff --git a/lib/private/Setup/Sqlite.php b/lib/private/Setup/Sqlite.php index cbbcf18d25903..96eb60a1bf01f 100644 --- a/lib/private/Setup/Sqlite.php +++ b/lib/private/Setup/Sqlite.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Setup; use OC\DB\ConnectionFactory; diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php index 1f7f66343c065..56c66909b2823 100644 --- a/lib/private/Share/Constants.php +++ b/lib/private/Share/Constants.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share; class Constants { diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 1e064ec821ec8..dd2b863f8154e 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -308,7 +308,6 @@ public function update(IShare $share) { $this->propagateNote($share); } - return $share; } @@ -1059,7 +1058,6 @@ private function _getSharedWith( throw new BackendError('Invalid backend'); } - return $shares; } @@ -1714,7 +1712,6 @@ private function sendNote(array $recipients, IShare $share) { $link ); - // The "From" contains the sharers name $instanceName = $this->defaults->getName(); $senderName = $l->t( diff --git a/lib/private/Share20/Exception/BackendError.php b/lib/private/Share20/Exception/BackendError.php index 056629ee677d5..bcf02e89bbbd1 100644 --- a/lib/private/Share20/Exception/BackendError.php +++ b/lib/private/Share20/Exception/BackendError.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20\Exception; class BackendError extends \Exception { diff --git a/lib/private/Share20/Exception/InvalidShare.php b/lib/private/Share20/Exception/InvalidShare.php index eba781fa934f5..a4b5a2c3b1bd4 100644 --- a/lib/private/Share20/Exception/InvalidShare.php +++ b/lib/private/Share20/Exception/InvalidShare.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20\Exception; class InvalidShare extends \Exception { diff --git a/lib/private/Share20/Exception/ProviderException.php b/lib/private/Share20/Exception/ProviderException.php index 1c2dcae89aa5e..611008f2fc4ea 100644 --- a/lib/private/Share20/Exception/ProviderException.php +++ b/lib/private/Share20/Exception/ProviderException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20\Exception; class ProviderException extends \Exception { diff --git a/lib/private/Share20/GroupDeletedListener.php b/lib/private/Share20/GroupDeletedListener.php index e6370cd958fbf..77689f6e6a16c 100644 --- a/lib/private/Share20/GroupDeletedListener.php +++ b/lib/private/Share20/GroupDeletedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\EventDispatcher\Event; diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php index 5c79ad9b5d0f8..63f4c1d4bb2a8 100644 --- a/lib/private/Share20/LegacyHooks.php +++ b/lib/private/Share20/LegacyHooks.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\EventDispatcher\IEventDispatcher; diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 9d68aa23653c5..1bf284fcf1784 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20; use ArrayIterator; @@ -980,7 +981,6 @@ private function setSharePasswordExpirationTime(IShare $share): void { $share->setPasswordExpirationTime($expirationTime); } - /** * Delete all the children of this share * @@ -1434,7 +1434,6 @@ public function getShareByToken(string $token): IShare { } catch (ProviderException|ShareNotFound) { } - // If it is not a link share try to fetch a federated share by token if ($share === null) { try { @@ -1634,7 +1633,6 @@ public function getAccessList(Node $path, $recursive = true, $currentAccess = fa /** @var Node[] $nodes */ $nodes = []; - if ($currentAccess) { $ownerPath = $path->getPath(); $ownerPath = explode('/', $ownerPath, 4); diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php index 769dc7426c780..eb9b9f7530e7d 100644 --- a/lib/private/Share20/ProviderFactory.php +++ b/lib/private/Share20/ProviderFactory.php @@ -194,7 +194,6 @@ public function getProviderForType($shareType) { $provider = $this->getProvider('deck'); } - if ($provider === null) { throw new ProviderException('No share provider for share type ' . $shareType); } @@ -232,8 +231,6 @@ public function getAllProviders() { $shares[] = $this->shareProviders[$instance->identifier()]; } - - return $shares; } } diff --git a/lib/private/Share20/PublicShareTemplateFactory.php b/lib/private/Share20/PublicShareTemplateFactory.php index 164a0b79a645b..858b6559a132e 100644 --- a/lib/private/Share20/PublicShareTemplateFactory.php +++ b/lib/private/Share20/PublicShareTemplateFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use Exception; diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 2ededbc7c361a..40a5054eed147 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20; use OCP\Constants; diff --git a/lib/private/Share20/ShareAttributes.php b/lib/private/Share20/ShareAttributes.php index 617322d549920..867d5e17803a5 100644 --- a/lib/private/Share20/ShareAttributes.php +++ b/lib/private/Share20/ShareAttributes.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019-2022 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Share20; use OCP\Share\IAttributes; diff --git a/lib/private/Share20/ShareDisableChecker.php b/lib/private/Share20/ShareDisableChecker.php index 286be7a10368e..1a549989d350d 100644 --- a/lib/private/Share20/ShareDisableChecker.php +++ b/lib/private/Share20/ShareDisableChecker.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\Cache\CappedMemoryCache; diff --git a/lib/private/Share20/ShareHelper.php b/lib/private/Share20/ShareHelper.php index 4b4e57ecb0bb6..d45325d58690a 100644 --- a/lib/private/Share20/ShareHelper.php +++ b/lib/private/Share20/ShareHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\Files\InvalidPathException; diff --git a/lib/private/Share20/UserDeletedListener.php b/lib/private/Share20/UserDeletedListener.php index 426b3857c9158..0f6871322efd8 100644 --- a/lib/private/Share20/UserDeletedListener.php +++ b/lib/private/Share20/UserDeletedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\EventDispatcher\Event; diff --git a/lib/private/Share20/UserRemovedListener.php b/lib/private/Share20/UserRemovedListener.php index e0da6e050f040..5db753d6371bc 100644 --- a/lib/private/Share20/UserRemovedListener.php +++ b/lib/private/Share20/UserRemovedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Share20; use OCP\EventDispatcher\Event; diff --git a/lib/private/SpeechToText/SpeechToTextManager.php b/lib/private/SpeechToText/SpeechToTextManager.php index 5126d756e2558..8d0f6a3bc06f5 100644 --- a/lib/private/SpeechToText/SpeechToTextManager.php +++ b/lib/private/SpeechToText/SpeechToTextManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\SpeechToText; use InvalidArgumentException; diff --git a/lib/private/SpeechToText/TranscriptionJob.php b/lib/private/SpeechToText/TranscriptionJob.php index 11ef970ab0b7c..59fe75963625c 100644 --- a/lib/private/SpeechToText/TranscriptionJob.php +++ b/lib/private/SpeechToText/TranscriptionJob.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\SpeechToText; use OC\User\NoUserException; @@ -36,7 +35,6 @@ public function __construct( $this->setAllowParallelRuns(false); } - /** * @inheritDoc */ diff --git a/lib/private/StreamImage.php b/lib/private/StreamImage.php index f4c444a2f0d3f..89a2a13607cf5 100644 --- a/lib/private/StreamImage.php +++ b/lib/private/StreamImage.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC; use OCP\IImage; diff --git a/lib/private/Streamer.php b/lib/private/Streamer.php index eba7f4e98e98e..887b082a621cc 100644 --- a/lib/private/Streamer.php +++ b/lib/private/Streamer.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Files\Filesystem; diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php index 18c5d81d2f7dc..a1bea2bfb08cf 100644 --- a/lib/private/SubAdmin.php +++ b/lib/private/SubAdmin.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Hooks\PublicEmitter; diff --git a/lib/private/Support/Subscription/Assertion.php b/lib/private/Support/Subscription/Assertion.php index a05df9d759485..0b5e2a5ba9ae1 100644 --- a/lib/private/Support/Subscription/Assertion.php +++ b/lib/private/Support/Subscription/Assertion.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Support\Subscription; use OCP\HintException; diff --git a/lib/private/Support/Subscription/Registry.php b/lib/private/Support/Subscription/Registry.php index 7cf5b4b9583fe..25a1a9cc010e4 100644 --- a/lib/private/Support/Subscription/Registry.php +++ b/lib/private/Support/Subscription/Registry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Support\Subscription; use OCP\IConfig; @@ -70,7 +71,6 @@ public function registerService(string $subscriptionService): void { $this->subscriptionService = $subscriptionService; } - /** * Fetches the list of app IDs that are supported by the subscription * @@ -115,7 +115,6 @@ public function delegateHasExtendedSupport(): bool { return false; } - /** * Indicates if a hard user limit is reached and no new users should be created * diff --git a/lib/private/SystemConfig.php b/lib/private/SystemConfig.php index 4c6f9d19f83f7..126ea7efbf8c1 100644 --- a/lib/private/SystemConfig.php +++ b/lib/private/SystemConfig.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OCP\IConfig; diff --git a/lib/private/SystemTag/ManagerFactory.php b/lib/private/SystemTag/ManagerFactory.php index 4bc5c2ea34d86..fe220d881b9bc 100644 --- a/lib/private/SystemTag/ManagerFactory.php +++ b/lib/private/SystemTag/ManagerFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\SystemTag; use OCP\EventDispatcher\IEventDispatcher; diff --git a/lib/private/SystemTag/SystemTag.php b/lib/private/SystemTag/SystemTag.php index 52f303896b896..026ce7403a352 100644 --- a/lib/private/SystemTag/SystemTag.php +++ b/lib/private/SystemTag/SystemTag.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\SystemTag; use OCP\SystemTag\ISystemTag; diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php index 97d3708be8edb..45da673a60745 100644 --- a/lib/private/SystemTag/SystemTagManager.php +++ b/lib/private/SystemTag/SystemTagManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\SystemTag; use OCP\DB\Exception; diff --git a/lib/private/SystemTag/SystemTagObjectMapper.php b/lib/private/SystemTag/SystemTagObjectMapper.php index 59fafe3200b64..2cc192e4f6858 100644 --- a/lib/private/SystemTag/SystemTagObjectMapper.php +++ b/lib/private/SystemTag/SystemTagObjectMapper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\SystemTag; use OCP\DB\Exception; diff --git a/lib/private/SystemTag/SystemTagsInFilesDetector.php b/lib/private/SystemTag/SystemTagsInFilesDetector.php index 9268b7ab09843..9db114dcb2837 100644 --- a/lib/private/SystemTag/SystemTagsInFilesDetector.php +++ b/lib/private/SystemTag/SystemTagsInFilesDetector.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\SystemTag; use OC\Files\Cache\QuerySearchHelper; diff --git a/lib/private/TagManager.php b/lib/private/TagManager.php index 90b8d558d8877..f7895c516526b 100644 --- a/lib/private/TagManager.php +++ b/lib/private/TagManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Tagging\TagMapper; diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php index 7ddcd97e6ac7c..11af0539cfacf 100644 --- a/lib/private/Tagging/Tag.php +++ b/lib/private/Tagging/Tag.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Tagging; use OCP\AppFramework\Db\Entity; diff --git a/lib/private/Tagging/TagMapper.php b/lib/private/Tagging/TagMapper.php index efac45a2e3a3e..f829df9a4b624 100644 --- a/lib/private/Tagging/TagMapper.php +++ b/lib/private/Tagging/TagMapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Tagging; use OCP\AppFramework\Db\DoesNotExistException; diff --git a/lib/private/Tags.php b/lib/private/Tags.php index ec06259db70ce..4d3a3e798a4a1 100644 --- a/lib/private/Tags.php +++ b/lib/private/Tags.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Tagging\Tag; diff --git a/lib/private/TaskProcessing/Db/Task.php b/lib/private/TaskProcessing/Db/Task.php index 3ac4facf97eab..4a874b7fdb7ad 100644 --- a/lib/private/TaskProcessing/Db/Task.php +++ b/lib/private/TaskProcessing/Db/Task.php @@ -83,7 +83,6 @@ class Task extends Entity { */ public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'customId', 'completionExpectedAt', 'errorMessage', 'progress', 'webhookUri', 'webhookMethod', 'scheduledAt', 'startedAt', 'endedAt', 'allowCleanup', 'userFacingErrorMessage', 'includeWatermark']; - public function __construct() { // add types in constructor $this->addType('id', 'integer'); diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index 6821aee65a002..4d0acc2022cd5 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -161,7 +161,6 @@ public function __construct( $this->distributedCache = $cacheFactory->createDistributed('task_processing::'); } - /** * This is almost a copy of textProcessingManager->getProviders * to avoid a dependency cycle between TextProcessingManager and TaskProcessingManager @@ -987,7 +986,6 @@ public function getAvailableTaskTypes(bool $showDisabled = false, ?string $userI $this->distributedCache->set($cacheKey, serialize($this->availableTaskTypes), 60); } - return $this->availableTaskTypes; } #[\Override] @@ -1029,7 +1027,6 @@ public function getAvailableTaskTypeIds(bool $showDisabled = false, ?string $use $this->distributedCache->set(self::TASK_TYPE_IDS_CACHE_KEY, $this->availableTaskTypeIds, 60); } - return $this->availableTaskTypeIds; } diff --git a/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php b/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php index 1d10450e7bcf1..c26fd897047ae 100644 --- a/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php +++ b/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\TaskProcessing; use OC\TaskProcessing\Db\TaskMapper; diff --git a/lib/private/TaskProcessing/SynchronousBackgroundJob.php b/lib/private/TaskProcessing/SynchronousBackgroundJob.php index ec221635992c3..31a15e01a7886 100644 --- a/lib/private/TaskProcessing/SynchronousBackgroundJob.php +++ b/lib/private/TaskProcessing/SynchronousBackgroundJob.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\TaskProcessing; use OCP\AppFramework\Utility\ITimeFactory; @@ -26,7 +27,6 @@ public function __construct( parent::__construct($timeFactory); } - /** * @inheritDoc */ diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php index c45912f03bb9f..f5801e5ab9896 100644 --- a/lib/private/TempManager.php +++ b/lib/private/TempManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Template/JSCombiner.php b/lib/private/Template/JSCombiner.php index 4b963aa5e4a19..504537a7b0086 100644 --- a/lib/private/Template/JSCombiner.php +++ b/lib/private/Template/JSCombiner.php @@ -180,7 +180,6 @@ public function getContent(string $root, string $file): array { return $result; } - /** * Clear cache with combined javascript files * diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index 4907274f7304e..0035e52be8c92 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Template; use bantu\IniGetWrapper\IniGetWrapper; diff --git a/lib/private/Template/Template.php b/lib/private/Template/Template.php index 5be76eac7d2a8..c59eeee3b91de 100644 --- a/lib/private/Template/Template.php +++ b/lib/private/Template/Template.php @@ -61,7 +61,6 @@ public function __construct( ); } - /** * find the template with the given name * diff --git a/lib/private/TextProcessing/Db/Task.php b/lib/private/TextProcessing/Db/Task.php index d4ebc19e74a7e..b7df44ae838c1 100644 --- a/lib/private/TextProcessing/Db/Task.php +++ b/lib/private/TextProcessing/Db/Task.php @@ -53,7 +53,6 @@ class Task extends Entity { */ public static array $fields = ['id', 'lastUpdated', 'type', 'input', 'output', 'status', 'userId', 'appId', 'identifier', 'completionExpectedAt']; - public function __construct() { // add types in constructor $this->addType('id', 'integer'); diff --git a/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php b/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php index 2c120d8aac533..1070f86034cf7 100644 --- a/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php +++ b/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\TextProcessing; use OC\TextProcessing\Db\TaskMapper; diff --git a/lib/private/TextProcessing/TaskBackgroundJob.php b/lib/private/TextProcessing/TaskBackgroundJob.php index e44adf8b17913..7b75b023042e2 100644 --- a/lib/private/TextProcessing/TaskBackgroundJob.php +++ b/lib/private/TextProcessing/TaskBackgroundJob.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\TextProcessing; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/TextToImage/Db/Task.php b/lib/private/TextToImage/Db/Task.php index 48a8bcc6c407d..3ae8a72392af0 100644 --- a/lib/private/TextToImage/Db/Task.php +++ b/lib/private/TextToImage/Db/Task.php @@ -56,7 +56,6 @@ class Task extends Entity { */ public static array $fields = ['id', 'lastUpdated', 'input', 'status', 'userId', 'appId', 'identifier', 'numberOfImages', 'completionExpectedAt']; - public function __construct() { // add types in constructor $this->addType('id', 'integer'); diff --git a/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php b/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php index 7a38b8479480a..51f2c90a14992 100644 --- a/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php +++ b/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\TextToImage; use OC\TextToImage\Db\TaskMapper; diff --git a/lib/private/TextToImage/TaskBackgroundJob.php b/lib/private/TextToImage/TaskBackgroundJob.php index 8127addca50c5..f9c12fcedcf3c 100644 --- a/lib/private/TextToImage/TaskBackgroundJob.php +++ b/lib/private/TextToImage/TaskBackgroundJob.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\TextToImage; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/private/Translation/TranslationManager.php b/lib/private/Translation/TranslationManager.php index 5aecb1b8e0612..f440a7dfb1464 100644 --- a/lib/private/Translation/TranslationManager.php +++ b/lib/private/Translation/TranslationManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OC\Translation; use InvalidArgumentException; diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index e083886aae92c..968978ac8432e 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\Route\Router; @@ -241,7 +242,6 @@ public function imagePath(string $appName, string $file): string { throw new RuntimeException('image not found: image:' . $file . ' webroot:' . \OC::$WEBROOT . ' serverroot:' . \OC::$SERVERROOT); } - /** * Makes an URL absolute * @param string $url the url in the Nextcloud host diff --git a/lib/private/Updater.php b/lib/private/Updater.php index ab154041ce053..b33dfcf8b855d 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC; use OC\App\AppManager; @@ -461,7 +462,6 @@ function (MigratorExecuteSqlEvent $event) use ($log): void { $dispatcher->addListener(RepairWarningEvent::class, $repairListener); $dispatcher->addListener(RepairErrorEvent::class, $repairListener); - $this->listen('\OC\Updater', 'maintenanceEnabled', function () use ($log): void { $log->info('\OC\Updater::maintenanceEnabled: Turned on maintenance mode', ['app' => 'updater']); }); diff --git a/lib/private/Updater/Exceptions/ReleaseMetadataException.php b/lib/private/Updater/Exceptions/ReleaseMetadataException.php index bc82e4e03df7a..23d7072f1aa42 100644 --- a/lib/private/Updater/Exceptions/ReleaseMetadataException.php +++ b/lib/private/Updater/Exceptions/ReleaseMetadataException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Updater\Exceptions; use Exception; diff --git a/lib/private/Updater/ReleaseMetadata.php b/lib/private/Updater/ReleaseMetadata.php index 665847037e78c..5bfb1cbfa3be7 100644 --- a/lib/private/Updater/ReleaseMetadata.php +++ b/lib/private/Updater/ReleaseMetadata.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Updater; use Exception; diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php index 4766ccd20bb5c..bfac5d06a5df2 100644 --- a/lib/private/Updater/VersionCheck.php +++ b/lib/private/Updater/VersionCheck.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\Updater; use OCP\AppFramework\Utility\ITimeFactory; @@ -30,7 +31,6 @@ public function __construct( ) { } - /** * Check if a new version is available * diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php index 878a7ae8c7ec4..e18afa0102bea 100644 --- a/lib/private/User/Backend.php +++ b/lib/private/User/Backend.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; use OCP\UserInterface; diff --git a/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php b/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php index 983ff73be6587..eae08736085e4 100644 --- a/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php +++ b/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User\BackgroundJobs; use OC\User\Manager; diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index d65ef769c5205..10dee5c2eac77 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; use InvalidArgumentException; diff --git a/lib/private/User/DisabledUserException.php b/lib/private/User/DisabledUserException.php index a126fee40d37f..c29ce7cdeef88 100644 --- a/lib/private/User/DisabledUserException.php +++ b/lib/private/User/DisabledUserException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; class DisabledUserException extends LoginException { diff --git a/lib/private/User/DisplayNameCache.php b/lib/private/User/DisplayNameCache.php index 186fef236024d..674c3d14cebc9 100644 --- a/lib/private/User/DisplayNameCache.php +++ b/lib/private/User/DisplayNameCache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User; use OCP\EventDispatcher\Event; diff --git a/lib/private/User/Listeners/BeforeUserDeletedListener.php b/lib/private/User/Listeners/BeforeUserDeletedListener.php index 322b4e9f94ac2..163ec2bb2cdc6 100644 --- a/lib/private/User/Listeners/BeforeUserDeletedListener.php +++ b/lib/private/User/Listeners/BeforeUserDeletedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User\Listeners; use OCP\EventDispatcher\Event; diff --git a/lib/private/User/Listeners/UserChangedListener.php b/lib/private/User/Listeners/UserChangedListener.php index 7ce6f8126f1a6..e2c14ba6c3c1e 100644 --- a/lib/private/User/Listeners/UserChangedListener.php +++ b/lib/private/User/Listeners/UserChangedListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User\Listeners; use OCP\EventDispatcher\Event; diff --git a/lib/private/User/LoginException.php b/lib/private/User/LoginException.php index e94b3b79b0e86..632321e7e2cf2 100644 --- a/lib/private/User/LoginException.php +++ b/lib/private/User/LoginException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; class LoginException extends \Exception { diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 4e7664420d499..98a90879b4bbd 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; use OC\Hooks\PublicEmitter; @@ -598,7 +599,6 @@ public function countDisabledUsers(): int { ->andWhere($queryBuilder->expr()->eq('configkey', $queryBuilder->createNamedParameter('enabled'))) ->andWhere($queryBuilder->expr()->eq('configvalue', $queryBuilder->createNamedParameter('false'), IQueryBuilder::PARAM_STR)); - $result = $queryBuilder->executeQuery(); $count = $result->fetchOne(); $result->closeCursor(); @@ -868,7 +868,6 @@ public function getExistingUser(string $userId, ?string $displayName = null): IU return new LazyUser($userId, $this, $displayName); } - #[\Override] public function getAvatarUrlLight(string $userId, int $size): string { $url = ($this->urlGenerator ??= Server::get(IURLGenerator::class))->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $userId, 'size' => $size]); diff --git a/lib/private/User/NoUserException.php b/lib/private/User/NoUserException.php index 3df468211845f..8bd6de5e45e32 100644 --- a/lib/private/User/NoUserException.php +++ b/lib/private/User/NoUserException.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; class NoUserException extends \Exception { diff --git a/lib/private/User/PartiallyDeletedUsersBackend.php b/lib/private/User/PartiallyDeletedUsersBackend.php index 4a49261768f91..d525dcf2988bc 100644 --- a/lib/private/User/PartiallyDeletedUsersBackend.php +++ b/lib/private/User/PartiallyDeletedUsersBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\User; use OCP\IConfig; diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index 8154178e455dd..2f3e94c198bac 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; use OC; diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 636c109c3082e..d22b8ae89a478 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OC\User; use InvalidArgumentException; @@ -44,7 +45,6 @@ use OCP\UserInterface; use OCP\Util; use Psr\Log\LoggerInterface; - use function json_decode; use function json_encode; diff --git a/lib/private/UserStatus/ISettableProvider.php b/lib/private/UserStatus/ISettableProvider.php index 1a2e7cfe7cf70..a31d3a5a84b4f 100644 --- a/lib/private/UserStatus/ISettableProvider.php +++ b/lib/private/UserStatus/ISettableProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\UserStatus; use OCP\UserStatus\IProvider; diff --git a/lib/private/UserStatus/Manager.php b/lib/private/UserStatus/Manager.php index abd5440e7381c..b5da986dfd7e7 100644 --- a/lib/private/UserStatus/Manager.php +++ b/lib/private/UserStatus/Manager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\UserStatus; use OCP\UserStatus\IManager; diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index f8355f1d0175a..910253490b7fc 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -247,7 +247,6 @@ public static function handleApacheAuth(): ?bool { return null; } - /** * Sets user id for session and triggers emit */ @@ -309,7 +308,6 @@ public static function isAdminUser(string $uid): bool { return $isAdmin && self::$incognitoMode === false; } - /** * get the user id of the user currently logged in. * diff --git a/lib/public/Accounts/IAccount.php b/lib/public/Accounts/IAccount.php index f9218f5fdf69d..47d20fe221cc7 100644 --- a/lib/public/Accounts/IAccount.php +++ b/lib/public/Accounts/IAccount.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Accounts; use Generator; diff --git a/lib/public/Accounts/IAccountManager.php b/lib/public/Accounts/IAccountManager.php index ae5535ef13b70..cd361e22fdc9e 100644 --- a/lib/public/Accounts/IAccountManager.php +++ b/lib/public/Accounts/IAccountManager.php @@ -170,7 +170,6 @@ interface IAccountManager { self::PROPERTY_WEBSITE, ]; - /** * @since 22.0.0 */ diff --git a/lib/public/Accounts/IAccountProperty.php b/lib/public/Accounts/IAccountProperty.php index c9d05bfb6cab3..542d909359260 100644 --- a/lib/public/Accounts/IAccountProperty.php +++ b/lib/public/Accounts/IAccountProperty.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Accounts; use InvalidArgumentException; diff --git a/lib/public/Accounts/IAccountPropertyCollection.php b/lib/public/Accounts/IAccountPropertyCollection.php index 8fde9781d1f64..3a21a047f3d67 100644 --- a/lib/public/Accounts/IAccountPropertyCollection.php +++ b/lib/public/Accounts/IAccountPropertyCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Accounts; use InvalidArgumentException; diff --git a/lib/public/Accounts/PropertyDoesNotExistException.php b/lib/public/Accounts/PropertyDoesNotExistException.php index 1d27ef1df30d2..59dda2fb6ce48 100644 --- a/lib/public/Accounts/PropertyDoesNotExistException.php +++ b/lib/public/Accounts/PropertyDoesNotExistException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Accounts; /** diff --git a/lib/public/Accounts/UserUpdatedEvent.php b/lib/public/Accounts/UserUpdatedEvent.php index fe9ea62a302ca..37302dfdb8436 100644 --- a/lib/public/Accounts/UserUpdatedEvent.php +++ b/lib/public/Accounts/UserUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Accounts; use OCP\EventDispatcher\Event; diff --git a/lib/public/Activity/ActivitySettings.php b/lib/public/Activity/ActivitySettings.php index 132be7501f1ce..9f7facb50aec9 100644 --- a/lib/public/Activity/ActivitySettings.php +++ b/lib/public/Activity/ActivitySettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Activity; /** diff --git a/lib/public/Activity/IEventMerger.php b/lib/public/Activity/IEventMerger.php index 5d0f691f2d4b3..3f06db825e0c4 100644 --- a/lib/public/Activity/IEventMerger.php +++ b/lib/public/Activity/IEventMerger.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Activity; /** diff --git a/lib/public/Activity/IExtension.php b/lib/public/Activity/IExtension.php index c85d8ce5ed90a..5804333a2607b 100644 --- a/lib/public/Activity/IExtension.php +++ b/lib/public/Activity/IExtension.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Activity; /** diff --git a/lib/public/Activity/IFilter.php b/lib/public/Activity/IFilter.php index 008de6f5bcacf..ef76c73e5180b 100644 --- a/lib/public/Activity/IFilter.php +++ b/lib/public/Activity/IFilter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Activity; /** diff --git a/lib/public/Activity/IManager.php b/lib/public/Activity/IManager.php index a76f17fa30e69..a4d0070a99712 100644 --- a/lib/public/Activity/IManager.php +++ b/lib/public/Activity/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Activity; use OCP\Activity\Exceptions\FilterNotFoundException; diff --git a/lib/public/Activity/IProvider.php b/lib/public/Activity/IProvider.php index dec4e7ade6428..94b4f33ec3109 100644 --- a/lib/public/Activity/IProvider.php +++ b/lib/public/Activity/IProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Activity; use OCP\Activity\Exceptions\UnknownActivityException; diff --git a/lib/public/Activity/ISetting.php b/lib/public/Activity/ISetting.php index 1304ab8c658d1..3a4d2f7253426 100644 --- a/lib/public/Activity/ISetting.php +++ b/lib/public/Activity/ISetting.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Activity; /** diff --git a/lib/public/App/AppInfoDefinition.php b/lib/public/App/AppInfoDefinition.php index b4547faf69fe8..261057b2f770d 100644 --- a/lib/public/App/AppInfoDefinition.php +++ b/lib/public/App/AppInfoDefinition.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\App; /** diff --git a/lib/public/App/AppPathNotFoundException.php b/lib/public/App/AppPathNotFoundException.php index 56d6571ea689a..3cd3a92d7d06c 100644 --- a/lib/public/App/AppPathNotFoundException.php +++ b/lib/public/App/AppPathNotFoundException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\App; /** diff --git a/lib/public/App/Events/AppDisableEvent.php b/lib/public/App/Events/AppDisableEvent.php index 5d16d42785ed7..05050e14d7ac5 100644 --- a/lib/public/App/Events/AppDisableEvent.php +++ b/lib/public/App/Events/AppDisableEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\App\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/App/Events/AppEnableEvent.php b/lib/public/App/Events/AppEnableEvent.php index fe1523d6a834f..87e585ac77fa6 100644 --- a/lib/public/App/Events/AppEnableEvent.php +++ b/lib/public/App/Events/AppEnableEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\App\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/App/Events/AppUpdateEvent.php b/lib/public/App/Events/AppUpdateEvent.php index 2cf59ff7949b9..67b643d9c7ae6 100644 --- a/lib/public/App/Events/AppUpdateEvent.php +++ b/lib/public/App/Events/AppUpdateEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\App\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index e9fd994c675da..94d6e15d803b8 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\App; use OCP\IGroup; diff --git a/lib/public/App/ManagerEvent.php b/lib/public/App/ManagerEvent.php index e02a82195e2d5..71ed561625187 100644 --- a/lib/public/App/ManagerEvent.php +++ b/lib/public/App/ManagerEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\App; use OCP\EventDispatcher\Event; diff --git a/lib/public/AppFramework/ApiController.php b/lib/public/AppFramework/ApiController.php index 729582c850563..1215bf902baf6 100644 --- a/lib/public/AppFramework/ApiController.php +++ b/lib/public/AppFramework/ApiController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use OCP\AppFramework\Http\Attribute\NoAdminRequired; @@ -47,7 +48,6 @@ public function __construct($appName, $this->corsMaxAge = $corsMaxAge; } - /** * This method implements a preflighted cors response for you that you can * link to for the options request diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index b2efeea7436aa..b012e93bce894 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use OC\AppFramework\Utility\SimpleContainer; @@ -42,7 +43,6 @@ public static function buildAppNamespace(string $appId, string $topNamespace = ' return \OC\AppFramework\App::buildAppNamespace($appId, $topNamespace); } - /** * @param string $appName * @param array $urlParams an array with variables extracted from the routes diff --git a/lib/public/AppFramework/AuthPublicShareController.php b/lib/public/AppFramework/AuthPublicShareController.php index 4113f95770b12..49b47e4cbd2f5 100644 --- a/lib/public/AppFramework/AuthPublicShareController.php +++ b/lib/public/AppFramework/AuthPublicShareController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework; use OCP\AppFramework\Http\Attribute\BruteForceProtection; @@ -181,7 +182,6 @@ final public function getAuthenticationRedirect(string $redirect): RedirectRespo ); } - /** * @since 14.0.0 */ diff --git a/lib/public/AppFramework/Bootstrap/IBootContext.php b/lib/public/AppFramework/Bootstrap/IBootContext.php index cdf3a0af73266..dc9f046b9e37f 100644 --- a/lib/public/AppFramework/Bootstrap/IBootContext.php +++ b/lib/public/AppFramework/Bootstrap/IBootContext.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Bootstrap; use OCP\AppFramework\IAppContainer; diff --git a/lib/public/AppFramework/Bootstrap/IBootstrap.php b/lib/public/AppFramework/Bootstrap/IBootstrap.php index 7260d2b77a118..a7d058a427e96 100644 --- a/lib/public/AppFramework/Bootstrap/IBootstrap.php +++ b/lib/public/AppFramework/Bootstrap/IBootstrap.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Bootstrap; /** diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index fa83eda180179..15d89371be21b 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -448,7 +448,6 @@ public function registerFileConversionProvider(string $class): void; */ public function registerMailProvider(string $class): void; - /** * Register an implementation of \OCP\Config\Lexicon\IConfigLexicon that * will handle the config lexicon diff --git a/lib/public/AppFramework/Controller.php b/lib/public/AppFramework/Controller.php index d4f26bef00713..d2cd6269a34ae 100644 --- a/lib/public/AppFramework/Controller.php +++ b/lib/public/AppFramework/Controller.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use Closure; @@ -82,7 +83,6 @@ public function __construct($appName, ]; } - /** * Parses an HTTP accept header and returns the supported responder type * @param string $acceptHeader @@ -110,7 +110,6 @@ public function getResponderByHTTPHeader($acceptHeader, $default = 'json') { return $default; } - /** * Registers a formatter for a type * @param string $format @@ -121,7 +120,6 @@ protected function registerResponder($format, Closure $responder) { $this->responders[$format] = $responder; } - /** * Serializes and formats a response * @param mixed $response the value that was returned from a controller and diff --git a/lib/public/AppFramework/Db/DoesNotExistException.php b/lib/public/AppFramework/Db/DoesNotExistException.php index 416268b27c1c8..49bbb80b00850 100644 --- a/lib/public/AppFramework/Db/DoesNotExistException.php +++ b/lib/public/AppFramework/Db/DoesNotExistException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php index 5313447e04560..fe7c1414fe3f4 100644 --- a/lib/public/AppFramework/Db/Entity.php +++ b/lib/public/AppFramework/Db/Entity.php @@ -5,10 +5,10 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Db; use OCP\DB\Types; - use function lcfirst; use function substr; @@ -61,7 +61,6 @@ public static function fromRow(array $row): static { return $instance; } - /** * @return array with attribute and type * @since 7.0.0 @@ -70,7 +69,6 @@ public function getFieldTypes(): array { return $this->_fieldTypes; } - /** * Marks the entity as clean needed for setting the id after the insertion * @since 7.0.0 @@ -161,7 +159,6 @@ protected function getter(string $name): mixed { } } - /** * Each time a setter is called, push the part after set * into an array: for instance setId will save Id in the @@ -204,7 +201,6 @@ protected function markFieldUpdated(string $attribute): void { $this->_updatedFields[$attribute] = true; } - /** * Transform a database columnname to a property * @@ -227,7 +223,6 @@ public function columnToProperty(string $columnName) { return $property; } - /** * Transform a property to a database column name * @@ -250,7 +245,6 @@ public function propertyToColumn(string $property): string { return $column; } - /** * @return array array of updated fields for update query * @since 7.0.0 @@ -259,7 +253,6 @@ public function getUpdatedFields(): array { return $this->_updatedFields; } - /** * Adds type information for a field so that it's automatically cast to * that value once its being returned from the database @@ -285,7 +278,6 @@ protected function addType(string $fieldName, string $type): void { $this->_fieldTypes[$fieldName] = $type; } - /** * Slugify the value of a given attribute * Warning: This doesn't result in a unique value diff --git a/lib/public/AppFramework/Db/IMapperException.php b/lib/public/AppFramework/Db/IMapperException.php index 3e91422a89faa..21affadfe4ab1 100644 --- a/lib/public/AppFramework/Db/IMapperException.php +++ b/lib/public/AppFramework/Db/IMapperException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php index e83bc1647d70c..328984a015fa7 100644 --- a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php +++ b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Db; /** diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php index 681d98f69f658..9e6a47dce120b 100644 --- a/lib/public/AppFramework/Db/QBMapper.php +++ b/lib/public/AppFramework/Db/QBMapper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Db; use Generator; @@ -51,7 +52,6 @@ public function __construct(IDBConnection $db, string $tableName, ?string $entit } } - /** * @return string the table name * @since 14.0.0 @@ -60,7 +60,6 @@ public function getTableName(): string { return $this->tableName; } - /** * Deletes an entity from the table * @@ -307,7 +306,6 @@ private function buildDebugMessage(string $msg, IQueryBuilder $sql): string { . ': query "' . $sql->getSQL() . '"; '; } - /** * Creates an entity from a row. Automatically determines the entity class * from the current mapper name (MyEntityMapper -> MyEntity) @@ -322,7 +320,6 @@ protected function mapRowToEntity(array $row): Entity { return \call_user_func($this->entityClass . '::fromRow', $row); } - /** * Runs a sql query and returns an array of entities * @@ -365,7 +362,6 @@ protected function yieldEntities(IQueryBuilder $query): Generator { } } - /** * Returns an db result and throws exceptions when there are more or less * results diff --git a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php index 9a0aee65ec7ef..5f68708a6caf8 100644 --- a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php +++ b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Db; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/AppFramework/Db/TTransactional.php b/lib/public/AppFramework/Db/TTransactional.php index 8dd275e542031..56ecf522504c3 100644 --- a/lib/public/AppFramework/Db/TTransactional.php +++ b/lib/public/AppFramework/Db/TTransactional.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Db; use OC\DB\Exceptions\DbalException; diff --git a/lib/public/AppFramework/Http.php b/lib/public/AppFramework/Http.php index 72bdadc9d1765..ea609b3b1f1da 100644 --- a/lib/public/AppFramework/Http.php +++ b/lib/public/AppFramework/Http.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; /** diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php index c5a2fdb34d01b..d70916e61b0b4 100644 --- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/DataDisplayResponse.php b/lib/public/AppFramework/Http/DataDisplayResponse.php index 6141659eb3fe3..4bab86a1a4adc 100644 --- a/lib/public/AppFramework/Http/DataDisplayResponse.php +++ b/lib/public/AppFramework/Http/DataDisplayResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -24,7 +25,6 @@ class DataDisplayResponse extends Response { */ protected $data; - /** * @param string $data the data to display * @param S $statusCode the Http status code, defaults to 200 @@ -48,7 +48,6 @@ public function render() { return $this->data; } - /** * Sets values in the data * @param string $data the data to display @@ -61,7 +60,6 @@ public function setData($data) { return $this; } - /** * Used to get the set parameters * @return string the data diff --git a/lib/public/AppFramework/Http/DataDownloadResponse.php b/lib/public/AppFramework/Http/DataDownloadResponse.php index de4706f2c1740..3de2265a74f0c 100644 --- a/lib/public/AppFramework/Http/DataDownloadResponse.php +++ b/lib/public/AppFramework/Http/DataDownloadResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index 12ac2afd56024..ea03ffc877a17 100644 --- a/lib/public/AppFramework/Http/DataResponse.php +++ b/lib/public/AppFramework/Http/DataResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -25,7 +26,6 @@ class DataResponse extends Response { */ protected $data; - /** * @param T $data the object or array that should be transformed * @param S $statusCode the Http status code, defaults to 200 @@ -38,7 +38,6 @@ public function __construct(mixed $data = [], int $statusCode = Http::STATUS_OK, $this->data = $data; } - /** * Sets values in the data json array * @psalm-suppress InvalidTemplateParam @@ -52,7 +51,6 @@ public function setData($data) { return $this; } - /** * Used to get the set parameters * @return T the data diff --git a/lib/public/AppFramework/Http/DownloadResponse.php b/lib/public/AppFramework/Http/DownloadResponse.php index a31a8d2953604..58b5c2bfc8934 100644 --- a/lib/public/AppFramework/Http/DownloadResponse.php +++ b/lib/public/AppFramework/Http/DownloadResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php index 322c8a09b8f0e..ec8c5d67c1535 100644 --- a/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php +++ b/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/EmptyFeaturePolicy.php b/lib/public/AppFramework/Http/EmptyFeaturePolicy.php index a1d19a9f34b3c..2ff10a6d6d518 100644 --- a/lib/public/AppFramework/Http/EmptyFeaturePolicy.php +++ b/lib/public/AppFramework/Http/EmptyFeaturePolicy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php b/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php index b724b3a72adc8..7346a69d0483a 100644 --- a/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php +++ b/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Events; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php b/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php index 7219ca5bfb6f7..35a628c09e26c 100644 --- a/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php +++ b/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Events; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/public/AppFramework/Http/FeaturePolicy.php b/lib/public/AppFramework/Http/FeaturePolicy.php index 2291a78055c3b..451b21fc0f9c0 100644 --- a/lib/public/AppFramework/Http/FeaturePolicy.php +++ b/lib/public/AppFramework/Http/FeaturePolicy.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/FileDisplayResponse.php b/lib/public/AppFramework/Http/FileDisplayResponse.php index a22f540a90fef..45a8fb19ffe8e 100644 --- a/lib/public/AppFramework/Http/FileDisplayResponse.php +++ b/lib/public/AppFramework/Http/FileDisplayResponse.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/ICallbackResponse.php b/lib/public/AppFramework/Http/ICallbackResponse.php index a51f72612fb3a..4ae02d9005897 100644 --- a/lib/public/AppFramework/Http/ICallbackResponse.php +++ b/lib/public/AppFramework/Http/ICallbackResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/IOutput.php b/lib/public/AppFramework/Http/IOutput.php index 105eaa0edb98d..bd20251a8ba2e 100644 --- a/lib/public/AppFramework/Http/IOutput.php +++ b/lib/public/AppFramework/Http/IOutput.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; /** diff --git a/lib/public/AppFramework/Http/JSONResponse.php b/lib/public/AppFramework/Http/JSONResponse.php index 9936f095e1c49..ee0520e7aba71 100644 --- a/lib/public/AppFramework/Http/JSONResponse.php +++ b/lib/public/AppFramework/Http/JSONResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -29,7 +30,6 @@ class JSONResponse extends Response { */ protected $encodeFlags; - /** * constructor of JSONResponse * @param T $data the object or array that should be transformed @@ -52,7 +52,6 @@ public function __construct( $this->addHeader('Content-Type', 'application/json; charset=utf-8'); } - /** * Returns the rendered json * @return string the rendered json @@ -82,7 +81,6 @@ public function setData($data) { return $this; } - /** * @return T the data * @since 6.0.0 diff --git a/lib/public/AppFramework/Http/NotFoundResponse.php b/lib/public/AppFramework/Http/NotFoundResponse.php index 6faeb4110d27e..7be6b4ab991eb 100644 --- a/lib/public/AppFramework/Http/NotFoundResponse.php +++ b/lib/public/AppFramework/Http/NotFoundResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/RedirectResponse.php b/lib/public/AppFramework/Http/RedirectResponse.php index ef1fb2761eaae..ceb64c3b36a11 100644 --- a/lib/public/AppFramework/Http/RedirectResponse.php +++ b/lib/public/AppFramework/Http/RedirectResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -33,7 +34,6 @@ public function __construct(string $redirectURL, int $status = Http::STATUS_SEE_ $this->addHeader('Location', $redirectURL); } - /** * @return string the url to redirect * @since 7.0.0 diff --git a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php index 32fcb1c49519b..bfcc960f3ac2f 100644 --- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php +++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php index 323ff8fc8cd14..cccd6a318a4c7 100644 --- a/lib/public/AppFramework/Http/Response.php +++ b/lib/public/AppFramework/Http/Response.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -31,28 +32,24 @@ class Response { */ private $headers; - /** * Cookies that will be need to be constructed as header * @var array */ private $cookies = []; - /** * HTTP status code - defaults to STATUS OK * @var S */ private $status; - /** * Last modified date * @var \DateTime */ private $lastModified; - /** * ETag * @var string @@ -124,7 +121,6 @@ public function addCookie($name, $value, ?\DateTime $expireDate = null, $sameSit return $this; } - /** * Set the specified cookies * @param array $cookies array('foo' => array('value' => 'bar', 'expire' => null)) @@ -136,7 +132,6 @@ public function setCookies(array $cookies) { return $this; } - /** * Invalidates the specified cookie * @param string $name @@ -204,7 +199,6 @@ public function addHeader($name, $value) { return $this; } - /** * Set the headers * @template NewH as array @@ -220,7 +214,6 @@ public function setHeaders(array $headers): static { return $this; } - /** * Returns the set headers * @return array{X-Request-Id: string, Cache-Control: string, Content-Security-Policy: string, Feature-Policy: string, X-Robots-Tag: string, Last-Modified?: string, ETag?: string, ...H} the headers @@ -256,7 +249,6 @@ public function getHeaders() { return array_merge($mergeWith, $this->headers); } - /** * By default renders no output * @return string @@ -266,7 +258,6 @@ public function render() { return ''; } - /** * Set response status * @template NewS as int @@ -306,7 +297,6 @@ public function getContentSecurityPolicy() { return $this->contentSecurityPolicy; } - /** * @since 17.0.0 */ @@ -326,8 +316,6 @@ public function setFeaturePolicy(EmptyFeaturePolicy $featurePolicy): self { return $this; } - - /** * Get response status * @since 6.0.0 @@ -337,7 +325,6 @@ public function getStatus() { return $this->status; } - /** * Get the ETag * @return string the etag @@ -347,7 +334,6 @@ public function getETag() { return $this->ETag; } - /** * Get "last modified" date * @return \DateTime RFC2822 formatted last modified date @@ -357,7 +343,6 @@ public function getLastModified() { return $this->lastModified; } - /** * Set the ETag * @param string $ETag @@ -370,7 +355,6 @@ public function setETag($ETag) { return $this; } - /** * Set "last modified" date * @param \DateTime $lastModified diff --git a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php index 06be77b6c3f51..dcf12ae385b51 100644 --- a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php +++ b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/StreamResponse.php b/lib/public/AppFramework/Http/StreamResponse.php index a6d122eb66d4d..86b19914b032a 100644 --- a/lib/public/AppFramework/Http/StreamResponse.php +++ b/lib/public/AppFramework/Http/StreamResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -33,7 +34,6 @@ public function __construct(mixed $filePath, int $status = Http::STATUS_OK, arra $this->filePath = $filePath; } - /** * Streams the file using readfile * diff --git a/lib/public/AppFramework/Http/StreamTraversableResponse.php b/lib/public/AppFramework/Http/StreamTraversableResponse.php index 4338ed73d5d94..39f49d55ad409 100644 --- a/lib/public/AppFramework/Http/StreamTraversableResponse.php +++ b/lib/public/AppFramework/Http/StreamTraversableResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -34,7 +35,6 @@ public function __construct( parent::__construct($status, $headers); } - /** * Streams the generator output * diff --git a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php index 281bb559a10e2..9a60626b0cb32 100644 --- a/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php +++ b/lib/public/AppFramework/Http/Template/ExternalShareMenuAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Template; /** diff --git a/lib/public/AppFramework/Http/Template/IMenuAction.php b/lib/public/AppFramework/Http/Template/IMenuAction.php index 124e95fe0194e..47cf9c0ee24c4 100644 --- a/lib/public/AppFramework/Http/Template/IMenuAction.php +++ b/lib/public/AppFramework/Http/Template/IMenuAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Template; /** diff --git a/lib/public/AppFramework/Http/Template/LinkMenuAction.php b/lib/public/AppFramework/Http/Template/LinkMenuAction.php index 391802a1dce71..a29f0c6c91ff6 100644 --- a/lib/public/AppFramework/Http/Template/LinkMenuAction.php +++ b/lib/public/AppFramework/Http/Template/LinkMenuAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Template; /** diff --git a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php index 14adeb27d02ce..3eb895a9a452c 100644 --- a/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php +++ b/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Template; use InvalidArgumentException; diff --git a/lib/public/AppFramework/Http/Template/SimpleMenuAction.php b/lib/public/AppFramework/Http/Template/SimpleMenuAction.php index 5339ef2483a88..c4e89f13f2d75 100644 --- a/lib/public/AppFramework/Http/Template/SimpleMenuAction.php +++ b/lib/public/AppFramework/Http/Template/SimpleMenuAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http\Template; /** diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index b1cee3fd8bd4f..3e4b43c044b9c 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -96,7 +95,6 @@ public function __construct(string $appName, string $templateName, array $params $this->setFeaturePolicy(new FeaturePolicy()); } - /** * Sets template parameters * @param array $params an array with key => value structure which sets template @@ -110,7 +108,6 @@ public function setParams(array $params) { return $this; } - /** * Used for accessing the set parameters * @return array the params @@ -120,7 +117,6 @@ public function getParams() { return $this->params; } - /** * @return string the app id of the used template * @since 25.0.0 @@ -129,7 +125,6 @@ public function getApp(): string { return $this->appName; } - /** * Used for accessing the name of the set template * @return string the name of the used template @@ -139,7 +134,6 @@ public function getTemplateName() { return $this->templateName; } - /** * Sets the template page * @param string $renderAs admin, user or blank. Admin also prints the admin @@ -155,7 +149,6 @@ public function renderAs($renderAs) { return $this; } - /** * Returns the set renderAs * @return string the renderAs value @@ -165,7 +158,6 @@ public function getRenderAs() { return $this->renderAs; } - /** * Returns the rendered html * @return string the rendered html diff --git a/lib/public/AppFramework/Http/TextPlainResponse.php b/lib/public/AppFramework/Http/TextPlainResponse.php index f0bc873dee80d..9b8a89e0ac064 100644 --- a/lib/public/AppFramework/Http/TextPlainResponse.php +++ b/lib/public/AppFramework/Http/TextPlainResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; @@ -34,7 +35,6 @@ public function __construct(string $text = '', int $statusCode = Http::STATUS_OK $this->addHeader('Content-Type', 'text/plain'); } - /** * Returns the text * @return string diff --git a/lib/public/AppFramework/Http/TooManyRequestsResponse.php b/lib/public/AppFramework/Http/TooManyRequestsResponse.php index 41687e5d9ce71..e83049a6cc9b2 100644 --- a/lib/public/AppFramework/Http/TooManyRequestsResponse.php +++ b/lib/public/AppFramework/Http/TooManyRequestsResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; diff --git a/lib/public/AppFramework/Http/ZipResponse.php b/lib/public/AppFramework/Http/ZipResponse.php index 85b1cbe18a570..16ddcf8b9efcd 100644 --- a/lib/public/AppFramework/Http/ZipResponse.php +++ b/lib/public/AppFramework/Http/ZipResponse.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Http; use OC\Streamer; diff --git a/lib/public/AppFramework/IAppContainer.php b/lib/public/AppFramework/IAppContainer.php index dac7926f612a4..d8146fcc58f2a 100644 --- a/lib/public/AppFramework/IAppContainer.php +++ b/lib/public/AppFramework/IAppContainer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use OCP\IContainer; diff --git a/lib/public/AppFramework/Middleware.php b/lib/public/AppFramework/Middleware.php index 33bc288780ea1..47eec0d729b09 100644 --- a/lib/public/AppFramework/Middleware.php +++ b/lib/public/AppFramework/Middleware.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use Exception; @@ -31,7 +32,6 @@ abstract class Middleware { public function beforeController(Controller $controller, string $methodName) { } - /** * This is being run when either the beforeController method or the * controller method itself is throwing an exception. The middleware is @@ -51,7 +51,6 @@ public function afterException(Controller $controller, string $methodName, Excep throw $exception; } - /** * This is being run after a successful controllermethod call and allows * the manipulation of a Response object. The middleware is run in reverse order @@ -67,7 +66,6 @@ public function afterController(Controller $controller, string $methodName, Resp return $response; } - /** * This is being run after the response object has been rendered and * allows the manipulation of the output. The middleware is run in reverse order diff --git a/lib/public/AppFramework/OCS/OCSBadRequestException.php b/lib/public/AppFramework/OCS/OCSBadRequestException.php index 77b8ec6c86dc4..f1901346701b9 100644 --- a/lib/public/AppFramework/OCS/OCSBadRequestException.php +++ b/lib/public/AppFramework/OCS/OCSBadRequestException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSException.php b/lib/public/AppFramework/OCS/OCSException.php index 02901992f8dcf..4c0fa2de2eb79 100644 --- a/lib/public/AppFramework/OCS/OCSException.php +++ b/lib/public/AppFramework/OCS/OCSException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSForbiddenException.php b/lib/public/AppFramework/OCS/OCSForbiddenException.php index 0d001377043aa..2c8ad02f8409f 100644 --- a/lib/public/AppFramework/OCS/OCSForbiddenException.php +++ b/lib/public/AppFramework/OCS/OCSForbiddenException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSNotFoundException.php b/lib/public/AppFramework/OCS/OCSNotFoundException.php index 67cea9ed75993..85323ba13c2bb 100644 --- a/lib/public/AppFramework/OCS/OCSNotFoundException.php +++ b/lib/public/AppFramework/OCS/OCSNotFoundException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php b/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php index 4fc2820eaecae..9bf1108d3dbc1 100644 --- a/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php +++ b/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\OCS; use Exception; diff --git a/lib/public/AppFramework/OCSController.php b/lib/public/AppFramework/OCSController.php index b7c2531665388..56e55f02140cc 100644 --- a/lib/public/AppFramework/OCSController.php +++ b/lib/public/AppFramework/OCSController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use OCP\AppFramework\Http\DataResponse; diff --git a/lib/public/AppFramework/PublicShareController.php b/lib/public/AppFramework/PublicShareController.php index feb4ca53a388f..302fc4b1c01ae 100644 --- a/lib/public/AppFramework/PublicShareController.php +++ b/lib/public/AppFramework/PublicShareController.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework; use OCP\IRequest; diff --git a/lib/public/AppFramework/QueryException.php b/lib/public/AppFramework/QueryException.php index 20a964e82c8f5..1879bcd8e72c1 100644 --- a/lib/public/AppFramework/QueryException.php +++ b/lib/public/AppFramework/QueryException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework; use Exception; diff --git a/lib/public/AppFramework/Services/IAppConfig.php b/lib/public/AppFramework/Services/IAppConfig.php index aa95e66560482..faf380d03805f 100644 --- a/lib/public/AppFramework/Services/IAppConfig.php +++ b/lib/public/AppFramework/Services/IAppConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Services; use OCP\Exceptions\AppConfigUnknownKeyException; diff --git a/lib/public/AppFramework/Services/IInitialState.php b/lib/public/AppFramework/Services/IInitialState.php index ac58bcad3ccda..41910f23ccc91 100644 --- a/lib/public/AppFramework/Services/IInitialState.php +++ b/lib/public/AppFramework/Services/IInitialState.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Services; use Closure; diff --git a/lib/public/AppFramework/Services/InitialStateProvider.php b/lib/public/AppFramework/Services/InitialStateProvider.php index a7e061ed7c6d0..2e7d60f2dede6 100644 --- a/lib/public/AppFramework/Services/InitialStateProvider.php +++ b/lib/public/AppFramework/Services/InitialStateProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\AppFramework\Services; /** diff --git a/lib/public/AppFramework/Utility/IControllerMethodReflector.php b/lib/public/AppFramework/Utility/IControllerMethodReflector.php index d4e36e310e084..3e675a4048e8c 100644 --- a/lib/public/AppFramework/Utility/IControllerMethodReflector.php +++ b/lib/public/AppFramework/Utility/IControllerMethodReflector.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Utility; /** diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php index cd63b94dee316..c1cffcb0ab3a3 100644 --- a/lib/public/AppFramework/Utility/ITimeFactory.php +++ b/lib/public/AppFramework/Utility/ITimeFactory.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Utility; use Psr\Clock\ClockInterface; diff --git a/lib/public/Authentication/Events/AnyLoginFailedEvent.php b/lib/public/Authentication/Events/AnyLoginFailedEvent.php index e39a39372cbe9..cea2a7f59d984 100644 --- a/lib/public/Authentication/Events/AnyLoginFailedEvent.php +++ b/lib/public/Authentication/Events/AnyLoginFailedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/Events/LoginFailedEvent.php b/lib/public/Authentication/Events/LoginFailedEvent.php index 36d31e766dce2..a6462c798ef32 100644 --- a/lib/public/Authentication/Events/LoginFailedEvent.php +++ b/lib/public/Authentication/Events/LoginFailedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/Events/TokenInvalidatedEvent.php b/lib/public/Authentication/Events/TokenInvalidatedEvent.php index f2d3a6c1594d1..3bf2648cf8785 100644 --- a/lib/public/Authentication/Events/TokenInvalidatedEvent.php +++ b/lib/public/Authentication/Events/TokenInvalidatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Events; use OCP\Authentication\Token\IToken; diff --git a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php index 6ca8e68ed9551..c55cf2621f037 100644 --- a/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php +++ b/lib/public/Authentication/Exceptions/CredentialsUnavailableException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Exceptions; use Exception; diff --git a/lib/public/Authentication/Exceptions/ExpiredTokenException.php b/lib/public/Authentication/Exceptions/ExpiredTokenException.php index 27a5a2ad5ce20..9299970c02d85 100644 --- a/lib/public/Authentication/Exceptions/ExpiredTokenException.php +++ b/lib/public/Authentication/Exceptions/ExpiredTokenException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Exceptions; use OCP\Authentication\Token\IToken; diff --git a/lib/public/Authentication/Exceptions/InvalidTokenException.php b/lib/public/Authentication/Exceptions/InvalidTokenException.php index af2ddf04f9d5d..c6941e47df25a 100644 --- a/lib/public/Authentication/Exceptions/InvalidTokenException.php +++ b/lib/public/Authentication/Exceptions/InvalidTokenException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Exceptions; use Exception; diff --git a/lib/public/Authentication/Exceptions/PasswordUnavailableException.php b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php index 89e254e8ba13d..52de7c3633c37 100644 --- a/lib/public/Authentication/Exceptions/PasswordUnavailableException.php +++ b/lib/public/Authentication/Exceptions/PasswordUnavailableException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Exceptions; use Exception; diff --git a/lib/public/Authentication/Exceptions/WipeTokenException.php b/lib/public/Authentication/Exceptions/WipeTokenException.php index 9ae8d6dace382..a8e386e02c29e 100644 --- a/lib/public/Authentication/Exceptions/WipeTokenException.php +++ b/lib/public/Authentication/Exceptions/WipeTokenException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Exceptions; use OCP\Authentication\Token\IToken; diff --git a/lib/public/Authentication/IAlternativeLogin.php b/lib/public/Authentication/IAlternativeLogin.php index 185b0954940e3..6d36cb5bb7437 100644 --- a/lib/public/Authentication/IAlternativeLogin.php +++ b/lib/public/Authentication/IAlternativeLogin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication; /** diff --git a/lib/public/Authentication/IAlternativeLoginProvider.php b/lib/public/Authentication/IAlternativeLoginProvider.php index 818f87165045d..b566c5a785d95 100644 --- a/lib/public/Authentication/IAlternativeLoginProvider.php +++ b/lib/public/Authentication/IAlternativeLoginProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication; /** diff --git a/lib/public/Authentication/LoginCredentials/ICredentials.php b/lib/public/Authentication/LoginCredentials/ICredentials.php index 315ae0ccca5d5..cda967a5c660d 100644 --- a/lib/public/Authentication/LoginCredentials/ICredentials.php +++ b/lib/public/Authentication/LoginCredentials/ICredentials.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\LoginCredentials; use OCP\Authentication\Exceptions\PasswordUnavailableException; diff --git a/lib/public/Authentication/LoginCredentials/IStore.php b/lib/public/Authentication/LoginCredentials/IStore.php index e92a492f14539..30ee562da3aab 100644 --- a/lib/public/Authentication/LoginCredentials/IStore.php +++ b/lib/public/Authentication/LoginCredentials/IStore.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\LoginCredentials; use OCP\Authentication\Exceptions\CredentialsUnavailableException; diff --git a/lib/public/Authentication/Token/IProvider.php b/lib/public/Authentication/Token/IProvider.php index ade44a3ee94e4..3eeb8da73ee75 100644 --- a/lib/public/Authentication/Token/IProvider.php +++ b/lib/public/Authentication/Token/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Authentication\Token; use OCP\Authentication\Exceptions\ExpiredTokenException; diff --git a/lib/public/Authentication/Token/IToken.php b/lib/public/Authentication/Token/IToken.php index 546e6a4225550..c4496fe1f50cf 100644 --- a/lib/public/Authentication/Token/IToken.php +++ b/lib/public/Authentication/Token/IToken.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\Token; use JsonSerializable; diff --git a/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php b/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php index f298ccbc64b58..71eaf31484e54 100644 --- a/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php +++ b/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\AppFramework\Controller; diff --git a/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php b/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php index 176b593afb76e..791ad96d99f1f 100644 --- a/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php +++ b/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php b/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php index fffb154b17427..3a566c316a773 100644 --- a/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php +++ b/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php b/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php index e6cf91ac6a3bf..ded9b32bab4be 100644 --- a/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php +++ b/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php index 32ede4f385c45..42bfd33882ec7 100644 --- a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php +++ b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\Template\ITemplate; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvider.php b/lib/public/Authentication/TwoFactorAuth/IProvider.php index 27c4121f4ac99..b66e40d4cabd7 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvider.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php b/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php index 8dd0a1dd20538..b2a4c251a8096 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\AppFramework\Http\ContentSecurityPolicy; diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php b/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php index b19926cab0391..88928f764a30f 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; /** diff --git a/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php b/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php index 4c922318950cd..398fde14edfe4 100644 --- a/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php +++ b/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php index 6817f1763cfd2..06617c83a6630 100644 --- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php +++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\IUser; diff --git a/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php b/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php index d498f51316f09..1c57f720c883c 100644 --- a/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php +++ b/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php index 4a8d265b9ceb1..00f3af9ccde45 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud GmbH. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Authentication\TwoFactorAuth; use Exception; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php index 42ca855df35a2..bcabb3687f208 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php index 396fbf9e9a5bd..44b62188b8e82 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php index 48690cb9e2a5f..9669f6d4c48dc 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php index 002ac079e067d..ee117a32fdc5f 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php index 9172358cd16a6..0c304494e9f38 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php index ed51cee99c83d..804d9a099218a 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php index 1c488a04cdf96..4a244985dce57 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php index e99c91b846422..4ab7fb637100a 100644 --- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php +++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Authentication\TwoFactorAuth; use OCP\EventDispatcher\Event; diff --git a/lib/public/AutoloadNotAllowedException.php b/lib/public/AutoloadNotAllowedException.php index a296ea3356a85..aed94dca1ba24 100644 --- a/lib/public/AutoloadNotAllowedException.php +++ b/lib/public/AutoloadNotAllowedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/BackgroundJob/IJob.php b/lib/public/BackgroundJob/IJob.php index 2b2b031be4690..9ff95982e6d21 100644 --- a/lib/public/BackgroundJob/IJob.php +++ b/lib/public/BackgroundJob/IJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\BackgroundJob; /** diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php index ee1066d8a479e..340f00b443546 100644 --- a/lib/public/BackgroundJob/IJobList.php +++ b/lib/public/BackgroundJob/IJobList.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\BackgroundJob; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/BackgroundJob/IJobRuns.php b/lib/public/BackgroundJob/IJobRuns.php index 276224b0e5298..d257cb4f7dc25 100644 --- a/lib/public/BackgroundJob/IJobRuns.php +++ b/lib/public/BackgroundJob/IJobRuns.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; /** diff --git a/lib/public/BackgroundJob/IParallelAwareJob.php b/lib/public/BackgroundJob/IParallelAwareJob.php index d69d897cb0c8a..d325e8640a9cf 100644 --- a/lib/public/BackgroundJob/IParallelAwareJob.php +++ b/lib/public/BackgroundJob/IParallelAwareJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; /** diff --git a/lib/public/BackgroundJob/Job.php b/lib/public/BackgroundJob/Job.php index dbf3dda866d05..645e210383f7f 100644 --- a/lib/public/BackgroundJob/Job.php +++ b/lib/public/BackgroundJob/Job.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; use OCP\AppFramework\Utility\ITimeFactory; diff --git a/lib/public/BackgroundJob/JobRun.php b/lib/public/BackgroundJob/JobRun.php index 8432f6b94f7f0..13a1c663969cf 100644 --- a/lib/public/BackgroundJob/JobRun.php +++ b/lib/public/BackgroundJob/JobRun.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; use DateTimeImmutable; diff --git a/lib/public/BackgroundJob/JobStatus.php b/lib/public/BackgroundJob/JobStatus.php index e24837bf2f472..d6e9580730474 100644 --- a/lib/public/BackgroundJob/JobStatus.php +++ b/lib/public/BackgroundJob/JobStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; /** diff --git a/lib/public/BackgroundJob/QueuedJob.php b/lib/public/BackgroundJob/QueuedJob.php index 0b86d6909b51a..811ca37297b7d 100644 --- a/lib/public/BackgroundJob/QueuedJob.php +++ b/lib/public/BackgroundJob/QueuedJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; /** diff --git a/lib/public/BackgroundJob/TimedJob.php b/lib/public/BackgroundJob/TimedJob.php index ab5e09e01c871..9c2de7fb9fd47 100644 --- a/lib/public/BackgroundJob/TimedJob.php +++ b/lib/public/BackgroundJob/TimedJob.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\BackgroundJob; use OCP\Server; diff --git a/lib/public/BeforeSabrePubliclyLoadedEvent.php b/lib/public/BeforeSabrePubliclyLoadedEvent.php index 33f9f8bc37826..13b9690d94981 100644 --- a/lib/public/BeforeSabrePubliclyLoadedEvent.php +++ b/lib/public/BeforeSabrePubliclyLoadedEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/Broadcast/Events/IBroadcastEvent.php b/lib/public/Broadcast/Events/IBroadcastEvent.php index 00cd79f7d77b0..5fffc10e2af0f 100644 --- a/lib/public/Broadcast/Events/IBroadcastEvent.php +++ b/lib/public/Broadcast/Events/IBroadcastEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Broadcast\Events; use JsonSerializable; diff --git a/lib/public/Cache/CappedMemoryCache.php b/lib/public/Cache/CappedMemoryCache.php index cbffece2c0fa9..a071d7a9cb93d 100644 --- a/lib/public/Cache/CappedMemoryCache.php +++ b/lib/public/Cache/CappedMemoryCache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Cache; use OCP\ICache; @@ -134,7 +135,6 @@ public function getData(): array { return $this->cache; } - /** * @since 25.0.0 */ diff --git a/lib/public/Calendar/BackendTemporarilyUnavailableException.php b/lib/public/Calendar/BackendTemporarilyUnavailableException.php index c2bbb1417eead..09df5352dce54 100644 --- a/lib/public/Calendar/BackendTemporarilyUnavailableException.php +++ b/lib/public/Calendar/BackendTemporarilyUnavailableException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/CalendarEventStatus.php b/lib/public/Calendar/CalendarEventStatus.php index fd73515057854..c2ba687fc4cb3 100644 --- a/lib/public/Calendar/CalendarEventStatus.php +++ b/lib/public/Calendar/CalendarEventStatus.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use OCP\AppFramework\Attribute\Listenable; diff --git a/lib/public/Calendar/CalendarExportOptions.php b/lib/public/Calendar/CalendarExportOptions.php index a7778f57852b6..71801f3db8538 100644 --- a/lib/public/Calendar/CalendarExportOptions.php +++ b/lib/public/Calendar/CalendarExportOptions.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/CalendarImportOptions.php b/lib/public/Calendar/CalendarImportOptions.php index f5f330a425497..f7322a7ed56f5 100644 --- a/lib/public/Calendar/CalendarImportOptions.php +++ b/lib/public/Calendar/CalendarImportOptions.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use InvalidArgumentException; diff --git a/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php b/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php index f500aa9c646a4..5e1c1f0e26fb5 100644 --- a/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php +++ b/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php b/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php index a4d0f40ec5551..a0ea592c7b346 100644 --- a/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; /** diff --git a/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php b/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php index 5466213584e97..c63cb80bc1d6e 100644 --- a/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; /** diff --git a/lib/public/Calendar/Events/CalendarObjectMovedEvent.php b/lib/public/Calendar/Events/CalendarObjectMovedEvent.php index e678f7c50637c..1f2b191ed0797 100644 --- a/lib/public/Calendar/Events/CalendarObjectMovedEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectMovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php b/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php index ffbd7b0375a8f..1d472a8b13e50 100644 --- a/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; /** diff --git a/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php b/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php index 7890e3ca5b35e..f5d8d333a45db 100644 --- a/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; /** diff --git a/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php b/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php index c06b2b8198ff7..bb6048506e5c8 100644 --- a/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php +++ b/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Events; /** diff --git a/lib/public/Calendar/Exceptions/CalendarException.php b/lib/public/Calendar/Exceptions/CalendarException.php index 27fea75bf1464..62c0e96f77e63 100644 --- a/lib/public/Calendar/Exceptions/CalendarException.php +++ b/lib/public/Calendar/Exceptions/CalendarException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Exceptions; use Exception; diff --git a/lib/public/Calendar/ICalendar.php b/lib/public/Calendar/ICalendar.php index a267ec097bd90..bf811be4677f7 100644 --- a/lib/public/Calendar/ICalendar.php +++ b/lib/public/Calendar/ICalendar.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use DateTimeInterface; diff --git a/lib/public/Calendar/ICalendarExport.php b/lib/public/Calendar/ICalendarExport.php index d884c104a4a2a..03b0cfee5ca1b 100644 --- a/lib/public/Calendar/ICalendarExport.php +++ b/lib/public/Calendar/ICalendarExport.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use Generator; diff --git a/lib/public/Calendar/ICalendarIsEnabled.php b/lib/public/Calendar/ICalendarIsEnabled.php index 6bcb487e3dc77..24c4da917e15a 100644 --- a/lib/public/Calendar/ICalendarIsEnabled.php +++ b/lib/public/Calendar/ICalendarIsEnabled.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICalendarIsPublic.php b/lib/public/Calendar/ICalendarIsPublic.php index 1cf66de2ddcdc..e1b71b0d93867 100644 --- a/lib/public/Calendar/ICalendarIsPublic.php +++ b/lib/public/Calendar/ICalendarIsPublic.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICalendarIsShared.php b/lib/public/Calendar/ICalendarIsShared.php index 6f63c6eefd0d5..c6c7da740faf0 100644 --- a/lib/public/Calendar/ICalendarIsShared.php +++ b/lib/public/Calendar/ICalendarIsShared.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICalendarIsWritable.php b/lib/public/Calendar/ICalendarIsWritable.php index 5bf08a25cdccd..ec75459082976 100644 --- a/lib/public/Calendar/ICalendarIsWritable.php +++ b/lib/public/Calendar/ICalendarIsWritable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICalendarProvider.php b/lib/public/Calendar/ICalendarProvider.php index 95090b1c377d8..e124c953f6f8a 100644 --- a/lib/public/Calendar/ICalendarProvider.php +++ b/lib/public/Calendar/ICalendarProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/ICreateFromString.php b/lib/public/Calendar/ICreateFromString.php index 2bb0f2ffa20f2..2b4c06468be8d 100644 --- a/lib/public/Calendar/ICreateFromString.php +++ b/lib/public/Calendar/ICreateFromString.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use OCP\Calendar\Exceptions\CalendarException; diff --git a/lib/public/Calendar/IHandleImipMessage.php b/lib/public/Calendar/IHandleImipMessage.php index 27190f93f2439..5789cab7bf75b 100644 --- a/lib/public/Calendar/IHandleImipMessage.php +++ b/lib/public/Calendar/IHandleImipMessage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use OCP\Calendar\Exceptions\CalendarException; diff --git a/lib/public/Calendar/IManager.php b/lib/public/Calendar/IManager.php index 3c2247b7548ad..587f69ef3e088 100644 --- a/lib/public/Calendar/IManager.php +++ b/lib/public/Calendar/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; use DateTimeInterface; diff --git a/lib/public/Calendar/IMetadataProvider.php b/lib/public/Calendar/IMetadataProvider.php index acacf7efdaf33..adeb9b5b19378 100644 --- a/lib/public/Calendar/IMetadataProvider.php +++ b/lib/public/Calendar/IMetadataProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar; /** diff --git a/lib/public/Calendar/Resource/IBackend.php b/lib/public/Calendar/Resource/IBackend.php index 23d37c102f208..e206700c07873 100644 --- a/lib/public/Calendar/Resource/IBackend.php +++ b/lib/public/Calendar/Resource/IBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Resource; use OCP\Calendar\BackendTemporarilyUnavailableException; diff --git a/lib/public/Calendar/Resource/IManager.php b/lib/public/Calendar/Resource/IManager.php index d3a6b2449e35e..6bc0c9e82f9f3 100644 --- a/lib/public/Calendar/Resource/IManager.php +++ b/lib/public/Calendar/Resource/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Resource/IResource.php b/lib/public/Calendar/Resource/IResource.php index 15abe4e2d0f97..88abf00861559 100644 --- a/lib/public/Calendar/Resource/IResource.php +++ b/lib/public/Calendar/Resource/IResource.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Resource/IResourceMetadata.php b/lib/public/Calendar/Resource/IResourceMetadata.php index 29f628d6f7fcc..7283beb6b778b 100644 --- a/lib/public/Calendar/Resource/IResourceMetadata.php +++ b/lib/public/Calendar/Resource/IResourceMetadata.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Resource; /** diff --git a/lib/public/Calendar/Room/IBackend.php b/lib/public/Calendar/Room/IBackend.php index c99f5fbdb72ed..34dfbf77f729b 100644 --- a/lib/public/Calendar/Room/IBackend.php +++ b/lib/public/Calendar/Room/IBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Room; use OCP\Calendar\BackendTemporarilyUnavailableException; diff --git a/lib/public/Calendar/Room/IManager.php b/lib/public/Calendar/Room/IManager.php index b1136ede3fe77..eadb9c1669526 100644 --- a/lib/public/Calendar/Room/IManager.php +++ b/lib/public/Calendar/Room/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Room; /** diff --git a/lib/public/Calendar/Room/IRoom.php b/lib/public/Calendar/Room/IRoom.php index 526e65b8f5f02..893dc157d2483 100644 --- a/lib/public/Calendar/Room/IRoom.php +++ b/lib/public/Calendar/Room/IRoom.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Room; /** diff --git a/lib/public/Calendar/Room/IRoomMetadata.php b/lib/public/Calendar/Room/IRoomMetadata.php index 15d4b501e1256..66867d1da622c 100644 --- a/lib/public/Calendar/Room/IRoomMetadata.php +++ b/lib/public/Calendar/Room/IRoomMetadata.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Calendar\Room; /** diff --git a/lib/public/Capabilities/ICapability.php b/lib/public/Capabilities/ICapability.php index c51d8b26f1a44..a1d3542cff44c 100644 --- a/lib/public/Capabilities/ICapability.php +++ b/lib/public/Capabilities/ICapability.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Capabilities; /** diff --git a/lib/public/Capabilities/IInitialStateExcludedCapability.php b/lib/public/Capabilities/IInitialStateExcludedCapability.php index d11c9f087689c..bdb07e0e183c5 100644 --- a/lib/public/Capabilities/IInitialStateExcludedCapability.php +++ b/lib/public/Capabilities/IInitialStateExcludedCapability.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Capabilities; /** diff --git a/lib/public/Capabilities/IPublicCapability.php b/lib/public/Capabilities/IPublicCapability.php index 1a9dd965b1623..f1b3dbe25a7cd 100644 --- a/lib/public/Capabilities/IPublicCapability.php +++ b/lib/public/Capabilities/IPublicCapability.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Capabilities; /** diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php index 1a2251783106b..44826403a5a97 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\AutoComplete; use OCP\EventDispatcher\GenericEvent; diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php index 0ae49a9a1f3c1..08fad839e9631 100644 --- a/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php +++ b/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\AutoComplete; use OCP\EventDispatcher\Event; diff --git a/lib/public/Collaboration/AutoComplete/IManager.php b/lib/public/Collaboration/AutoComplete/IManager.php index 2d5443b921dc9..7d64cb5afb5a5 100644 --- a/lib/public/Collaboration/AutoComplete/IManager.php +++ b/lib/public/Collaboration/AutoComplete/IManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\AutoComplete; /** diff --git a/lib/public/Collaboration/AutoComplete/ISorter.php b/lib/public/Collaboration/AutoComplete/ISorter.php index 1009092af6a56..39a626fdb92a2 100644 --- a/lib/public/Collaboration/AutoComplete/ISorter.php +++ b/lib/public/Collaboration/AutoComplete/ISorter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\AutoComplete; /** diff --git a/lib/public/Collaboration/Collaborators/ISearch.php b/lib/public/Collaboration/Collaborators/ISearch.php index d2c5c85c07fb6..8ad9a76c489c2 100644 --- a/lib/public/Collaboration/Collaborators/ISearch.php +++ b/lib/public/Collaboration/Collaborators/ISearch.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Collaborators/ISearchPlugin.php b/lib/public/Collaboration/Collaborators/ISearchPlugin.php index e55a095e2b693..986f4725c5c82 100644 --- a/lib/public/Collaboration/Collaborators/ISearchPlugin.php +++ b/lib/public/Collaboration/Collaborators/ISearchPlugin.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Collaborators/ISearchResult.php b/lib/public/Collaboration/Collaborators/ISearchResult.php index bcc5a91ce9934..d8fde04fa915a 100644 --- a/lib/public/Collaboration/Collaborators/ISearchResult.php +++ b/lib/public/Collaboration/Collaborators/ISearchResult.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Collaborators/SearchResultType.php b/lib/public/Collaboration/Collaborators/SearchResultType.php index 3fdbefdcf1fd6..538df1555a595 100644 --- a/lib/public/Collaboration/Collaborators/SearchResultType.php +++ b/lib/public/Collaboration/Collaborators/SearchResultType.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Collaborators; /** diff --git a/lib/public/Collaboration/Resources/CollectionException.php b/lib/public/Collaboration/Resources/CollectionException.php index da1c66352b057..9badcbd2ebb01 100644 --- a/lib/public/Collaboration/Resources/CollectionException.php +++ b/lib/public/Collaboration/Resources/CollectionException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Collaboration/Resources/ICollection.php b/lib/public/Collaboration/Resources/ICollection.php index 6f9e14c52e2a9..e1994b7e37427 100644 --- a/lib/public/Collaboration/Resources/ICollection.php +++ b/lib/public/Collaboration/Resources/ICollection.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IManager.php b/lib/public/Collaboration/Resources/IManager.php index f017f348241e7..1eeea1283070d 100644 --- a/lib/public/Collaboration/Resources/IManager.php +++ b/lib/public/Collaboration/Resources/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php index f0e54b1ef6fdf..8339f06f15dea 100644 --- a/lib/public/Collaboration/Resources/IProvider.php +++ b/lib/public/Collaboration/Resources/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/IProviderManager.php b/lib/public/Collaboration/Resources/IProviderManager.php index 2f5a652dcefe8..b183f2374cb2f 100644 --- a/lib/public/Collaboration/Resources/IProviderManager.php +++ b/lib/public/Collaboration/Resources/IProviderManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Collaboration/Resources/IResource.php b/lib/public/Collaboration/Resources/IResource.php index ccea7acb4a79d..3144812e85395 100644 --- a/lib/public/Collaboration/Resources/IResource.php +++ b/lib/public/Collaboration/Resources/IResource.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; use OCP\IUser; diff --git a/lib/public/Collaboration/Resources/ResourceException.php b/lib/public/Collaboration/Resources/ResourceException.php index 60d86f95f7af7..63b1254eb3dc5 100644 --- a/lib/public/Collaboration/Resources/ResourceException.php +++ b/lib/public/Collaboration/Resources/ResourceException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Collaboration\Resources; /** diff --git a/lib/public/Color.php b/lib/public/Color.php index ed955b8f05618..5773c6af79524 100644 --- a/lib/public/Color.php +++ b/lib/public/Color.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/Command/IBus.php b/lib/public/Command/IBus.php index 35f26abb58c05..fdebc3437e044 100644 --- a/lib/public/Command/IBus.php +++ b/lib/public/Command/IBus.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Command; /** diff --git a/lib/public/Command/ICommand.php b/lib/public/Command/ICommand.php index e063bb5f97b55..9307b326e20e7 100644 --- a/lib/public/Command/ICommand.php +++ b/lib/public/Command/ICommand.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Command; /** diff --git a/lib/public/Comments/CommentsEntityEvent.php b/lib/public/Comments/CommentsEntityEvent.php index 9adac1030a4f3..86553fe4b557d 100644 --- a/lib/public/Comments/CommentsEntityEvent.php +++ b/lib/public/Comments/CommentsEntityEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/CommentsEvent.php b/lib/public/Comments/CommentsEvent.php index 46e6ad202ac71..6b9e7a12f9f1e 100644 --- a/lib/public/Comments/CommentsEvent.php +++ b/lib/public/Comments/CommentsEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php b/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php index 15df999a42748..2adf360dff111 100644 --- a/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php +++ b/lib/public/Comments/Events/BeforeCommentUpdatedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments\Events; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/Events/CommentAddedEvent.php b/lib/public/Comments/Events/CommentAddedEvent.php index 3323b46a93e3f..1ee6bdd7cddb3 100644 --- a/lib/public/Comments/Events/CommentAddedEvent.php +++ b/lib/public/Comments/Events/CommentAddedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments\Events; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/Events/CommentDeletedEvent.php b/lib/public/Comments/Events/CommentDeletedEvent.php index b2f146ce50fb0..0423579a3819d 100644 --- a/lib/public/Comments/Events/CommentDeletedEvent.php +++ b/lib/public/Comments/Events/CommentDeletedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments\Events; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/Events/CommentUpdatedEvent.php b/lib/public/Comments/Events/CommentUpdatedEvent.php index 23d21500ecb9a..b22274730515c 100644 --- a/lib/public/Comments/Events/CommentUpdatedEvent.php +++ b/lib/public/Comments/Events/CommentUpdatedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments\Events; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Comments/IComment.php b/lib/public/Comments/IComment.php index 7b0611c700113..45b15f1900db2 100644 --- a/lib/public/Comments/IComment.php +++ b/lib/public/Comments/IComment.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; /** @@ -71,7 +72,6 @@ public function setParentId($parentId); */ public function getTopmostParentId(); - /** * sets the topmost parent ID and returns itself * diff --git a/lib/public/Comments/ICommentsEventHandler.php b/lib/public/Comments/ICommentsEventHandler.php index 148ead2c367f6..f33f3a0f907c5 100644 --- a/lib/public/Comments/ICommentsEventHandler.php +++ b/lib/public/Comments/ICommentsEventHandler.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Comments; /** diff --git a/lib/public/Comments/ICommentsManager.php b/lib/public/Comments/ICommentsManager.php index 651734ea1ffae..14cc8f6cc9447 100644 --- a/lib/public/Comments/ICommentsManager.php +++ b/lib/public/Comments/ICommentsManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; use OCP\IUser; @@ -219,7 +220,6 @@ public function getNumberOfUnreadCommentsForObjects(string $objectType, array $o */ public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int; - /** * @param string $objectType * @param string $objectId diff --git a/lib/public/Comments/ICommentsManagerFactory.php b/lib/public/Comments/ICommentsManagerFactory.php index bfe6154a48f43..38d66d674ad33 100644 --- a/lib/public/Comments/ICommentsManagerFactory.php +++ b/lib/public/Comments/ICommentsManagerFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; use OCP\IServerContainer; diff --git a/lib/public/Comments/IllegalIDChangeException.php b/lib/public/Comments/IllegalIDChangeException.php index 08eddfc6fa479..ad9a3a38d2f72 100644 --- a/lib/public/Comments/IllegalIDChangeException.php +++ b/lib/public/Comments/IllegalIDChangeException.php @@ -5,6 +5,7 @@ * 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 4358dc2e291d3..6ff78aa0f144d 100644 --- a/lib/public/Comments/MessageTooLongException.php +++ b/lib/public/Comments/MessageTooLongException.php @@ -5,6 +5,7 @@ * 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 4f25fdbf09fe1..eed084241b63f 100644 --- a/lib/public/Comments/NotFoundException.php +++ b/lib/public/Comments/NotFoundException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Comments; /** diff --git a/lib/public/Common/Exception/NotFoundException.php b/lib/public/Common/Exception/NotFoundException.php index d4922ae8734e9..050810852b328 100644 --- a/lib/public/Common/Exception/NotFoundException.php +++ b/lib/public/Common/Exception/NotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Common\Exception; /** diff --git a/lib/public/Config/IUserConfig.php b/lib/public/Config/IUserConfig.php index 0c50c349d5a48..7b2bd71e2e2c6 100644 --- a/lib/public/Config/IUserConfig.php +++ b/lib/public/Config/IUserConfig.php @@ -631,7 +631,6 @@ public function updateSensitive(string $userId, string $app, string $key, bool $ */ public function updateGlobalSensitive(string $app, string $key, bool $sensitive): void; - /** * switch indexed status of a config value * diff --git a/lib/public/Console/ConsoleEvent.php b/lib/public/Console/ConsoleEvent.php index fc98a40b88fe8..a2eeee84b9246 100644 --- a/lib/public/Console/ConsoleEvent.php +++ b/lib/public/Console/ConsoleEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Console; use OCP\EventDispatcher\Event; diff --git a/lib/public/Contacts/ContactsMenu/IAction.php b/lib/public/Contacts/ContactsMenu/IAction.php index 00fe8ba35c44a..d8cee298b472a 100644 --- a/lib/public/Contacts/ContactsMenu/IAction.php +++ b/lib/public/Contacts/ContactsMenu/IAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; use JsonSerializable; diff --git a/lib/public/Contacts/ContactsMenu/IActionFactory.php b/lib/public/Contacts/ContactsMenu/IActionFactory.php index 69e6030e95b06..75947ac0606e5 100644 --- a/lib/public/Contacts/ContactsMenu/IActionFactory.php +++ b/lib/public/Contacts/ContactsMenu/IActionFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/ContactsMenu/IBulkProvider.php b/lib/public/Contacts/ContactsMenu/IBulkProvider.php index b817b8cbcdc4c..6515478078338 100644 --- a/lib/public/Contacts/ContactsMenu/IBulkProvider.php +++ b/lib/public/Contacts/ContactsMenu/IBulkProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/ContactsMenu/IContactsStore.php b/lib/public/Contacts/ContactsMenu/IContactsStore.php index 67913a2d91995..c1a7c0d67617d 100644 --- a/lib/public/Contacts/ContactsMenu/IContactsStore.php +++ b/lib/public/Contacts/ContactsMenu/IContactsStore.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; use OCP\IUser; diff --git a/lib/public/Contacts/ContactsMenu/IEntry.php b/lib/public/Contacts/ContactsMenu/IEntry.php index 9ae8a207297bb..8ba394f7c1993 100644 --- a/lib/public/Contacts/ContactsMenu/IEntry.php +++ b/lib/public/Contacts/ContactsMenu/IEntry.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; use JsonSerializable; diff --git a/lib/public/Contacts/ContactsMenu/ILinkAction.php b/lib/public/Contacts/ContactsMenu/ILinkAction.php index 559e04885c5e4..6b8ebb66cb184 100644 --- a/lib/public/Contacts/ContactsMenu/ILinkAction.php +++ b/lib/public/Contacts/ContactsMenu/ILinkAction.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/ContactsMenu/IProvider.php b/lib/public/Contacts/ContactsMenu/IProvider.php index e462b0133b8b1..1c0b1d20707eb 100644 --- a/lib/public/Contacts/ContactsMenu/IProvider.php +++ b/lib/public/Contacts/ContactsMenu/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\ContactsMenu; /** diff --git a/lib/public/Contacts/Events/ContactInteractedWithEvent.php b/lib/public/Contacts/Events/ContactInteractedWithEvent.php index 6f37cee7dba2b..c1a5a5e3a932c 100644 --- a/lib/public/Contacts/Events/ContactInteractedWithEvent.php +++ b/lib/public/Contacts/Events/ContactInteractedWithEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Contacts\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/DB/Exception.php b/lib/public/DB/Exception.php index 6b908382aeab6..09fcecffb25ba 100644 --- a/lib/public/DB/Exception.php +++ b/lib/public/DB/Exception.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB; use Exception as BaseException; diff --git a/lib/public/DB/IPreparedStatement.php b/lib/public/DB/IPreparedStatement.php index 887451a1caf87..f7c0766cd37ee 100644 --- a/lib/public/DB/IPreparedStatement.php +++ b/lib/public/DB/IPreparedStatement.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB; use Doctrine\DBAL\Exception; diff --git a/lib/public/DB/IResult.php b/lib/public/DB/IResult.php index daca3be31bab7..70c082493a22f 100644 --- a/lib/public/DB/IResult.php +++ b/lib/public/DB/IResult.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/DB/ISchemaWrapper.php b/lib/public/DB/ISchemaWrapper.php index 8995fd5bfb1ee..faefa988e4d68 100644 --- a/lib/public/DB/ISchemaWrapper.php +++ b/lib/public/DB/ISchemaWrapper.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB; use Doctrine\DBAL\Exception; diff --git a/lib/public/DB/QueryBuilder/ICompositeExpression.php b/lib/public/DB/QueryBuilder/ICompositeExpression.php index 12f321d9e543b..4363f78abb797 100644 --- a/lib/public/DB/QueryBuilder/ICompositeExpression.php +++ b/lib/public/DB/QueryBuilder/ICompositeExpression.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index 12e30a45071b7..5d4dac3966f87 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; use Doctrine\DBAL\Query\Expression\ExpressionBuilder; @@ -370,7 +371,6 @@ public function emptyString($x): string; */ public function nonEmptyString($x): string; - /** * Creates a bitwise AND comparison * diff --git a/lib/public/DB/QueryBuilder/IFunctionBuilder.php b/lib/public/DB/QueryBuilder/IFunctionBuilder.php index 1d10e5a4dcf1f..2667f1487969a 100644 --- a/lib/public/DB/QueryBuilder/IFunctionBuilder.php +++ b/lib/public/DB/QueryBuilder/IFunctionBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/ILiteral.php b/lib/public/DB/QueryBuilder/ILiteral.php index 574eb0894eb28..4d83313a9ba1d 100644 --- a/lib/public/DB/QueryBuilder/ILiteral.php +++ b/lib/public/DB/QueryBuilder/ILiteral.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IParameter.php b/lib/public/DB/QueryBuilder/IParameter.php index 86ea9437e9c1c..bfb44d42a1551 100644 --- a/lib/public/DB/QueryBuilder/IParameter.php +++ b/lib/public/DB/QueryBuilder/IParameter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php index f3b7e8d207535..a999150d4529b 100644 --- a/lib/public/DB/QueryBuilder/IQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; use Doctrine\DBAL\ArrayParameterType; diff --git a/lib/public/DB/QueryBuilder/IQueryFunction.php b/lib/public/DB/QueryBuilder/IQueryFunction.php index e19fc2959dba8..a4c45f3513d0b 100644 --- a/lib/public/DB/QueryBuilder/IQueryFunction.php +++ b/lib/public/DB/QueryBuilder/IQueryFunction.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\DB\QueryBuilder; /** diff --git a/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php b/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php index 5a9063138023e..f096b5cff0f41 100644 --- a/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php +++ b/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB\QueryBuilder; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/DB/Types.php b/lib/public/DB/Types.php index f6221d98a89b1..ad5525c3346f6 100644 --- a/lib/public/DB/Types.php +++ b/lib/public/DB/Types.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DB; /** @@ -88,7 +89,6 @@ final class Types { */ public const DATETIME_IMMUTABLE = 'datetime_immutable'; - /** * A datetime instance with timezone support * This will be (de)serialized into a \DateTime instance, diff --git a/lib/public/Dashboard/IAPIWidgetV2.php b/lib/public/Dashboard/IAPIWidgetV2.php index 3acd675202dd1..533546d21e8e2 100644 --- a/lib/public/Dashboard/IAPIWidgetV2.php +++ b/lib/public/Dashboard/IAPIWidgetV2.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; use OCP\Dashboard\Model\WidgetItems; diff --git a/lib/public/Dashboard/IButtonWidget.php b/lib/public/Dashboard/IButtonWidget.php index f4ebd9253c77d..34d9fb3825f8a 100644 --- a/lib/public/Dashboard/IButtonWidget.php +++ b/lib/public/Dashboard/IButtonWidget.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; use OCP\Dashboard\Model\WidgetButton; diff --git a/lib/public/Dashboard/IIconWidget.php b/lib/public/Dashboard/IIconWidget.php index 203a89279b0c7..cbe88bd8969f1 100644 --- a/lib/public/Dashboard/IIconWidget.php +++ b/lib/public/Dashboard/IIconWidget.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/IManager.php b/lib/public/Dashboard/IManager.php index e69bf78225e5e..e87a0d2c8c407 100644 --- a/lib/public/Dashboard/IManager.php +++ b/lib/public/Dashboard/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/IOptionWidget.php b/lib/public/Dashboard/IOptionWidget.php index 3f4cd4dcd2e48..1d37c83cb90ea 100644 --- a/lib/public/Dashboard/IOptionWidget.php +++ b/lib/public/Dashboard/IOptionWidget.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; use OCP\Dashboard\Model\WidgetOptions; diff --git a/lib/public/Dashboard/IReloadableWidget.php b/lib/public/Dashboard/IReloadableWidget.php index 80f0181a33cc8..a156f5e0fcd12 100644 --- a/lib/public/Dashboard/IReloadableWidget.php +++ b/lib/public/Dashboard/IReloadableWidget.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/IWidget.php b/lib/public/Dashboard/IWidget.php index c6bac98cae2aa..46e1dd867a837 100644 --- a/lib/public/Dashboard/IWidget.php +++ b/lib/public/Dashboard/IWidget.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard; /** diff --git a/lib/public/Dashboard/Model/WidgetItems.php b/lib/public/Dashboard/Model/WidgetItems.php index 80ceaf9fc9bad..a8bbf37db5b07 100644 --- a/lib/public/Dashboard/Model/WidgetItems.php +++ b/lib/public/Dashboard/Model/WidgetItems.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Dashboard\Model; use JsonSerializable; diff --git a/lib/public/Diagnostics/IEvent.php b/lib/public/Diagnostics/IEvent.php index dd664c4dad51a..8e4f9d4946fa7 100644 --- a/lib/public/Diagnostics/IEvent.php +++ b/lib/public/Diagnostics/IEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IEventLogger.php b/lib/public/Diagnostics/IEventLogger.php index fc3cb4288d0f0..a2a0bf3443d24 100644 --- a/lib/public/Diagnostics/IEventLogger.php +++ b/lib/public/Diagnostics/IEventLogger.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IQuery.php b/lib/public/Diagnostics/IQuery.php index 3fe39be27bd99..48041540688fa 100644 --- a/lib/public/Diagnostics/IQuery.php +++ b/lib/public/Diagnostics/IQuery.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Diagnostics; /** diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php index a1b42fd7d32db..b8a934b2749a0 100644 --- a/lib/public/Diagnostics/IQueryLogger.php +++ b/lib/public/Diagnostics/IQueryLogger.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Diagnostics; use Doctrine\DBAL\Logging\SQLLogger; diff --git a/lib/public/DirectEditing/ACreateEmpty.php b/lib/public/DirectEditing/ACreateEmpty.php index 6ad499ec76022..8d228ca6f14c9 100644 --- a/lib/public/DirectEditing/ACreateEmpty.php +++ b/lib/public/DirectEditing/ACreateEmpty.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use OCP\Files\File; diff --git a/lib/public/DirectEditing/ACreateFromTemplate.php b/lib/public/DirectEditing/ACreateFromTemplate.php index e56e9c09cbb5c..d1bf4a1256603 100644 --- a/lib/public/DirectEditing/ACreateFromTemplate.php +++ b/lib/public/DirectEditing/ACreateFromTemplate.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; /** diff --git a/lib/public/DirectEditing/ATemplate.php b/lib/public/DirectEditing/ATemplate.php index b08c39fe6f6fe..84d6305fc863c 100644 --- a/lib/public/DirectEditing/ATemplate.php +++ b/lib/public/DirectEditing/ATemplate.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use JsonSerializable; diff --git a/lib/public/DirectEditing/IEditor.php b/lib/public/DirectEditing/IEditor.php index 096af1d2a24c6..2355576929ea9 100644 --- a/lib/public/DirectEditing/IEditor.php +++ b/lib/public/DirectEditing/IEditor.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use OCP\AppFramework\Http\Response; diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php index dcc3493bcf297..bfe7ab19e3c44 100644 --- a/lib/public/DirectEditing/IManager.php +++ b/lib/public/DirectEditing/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use OCP\AppFramework\Http\Response; diff --git a/lib/public/DirectEditing/IToken.php b/lib/public/DirectEditing/IToken.php index 64abbf939f414..2b863d0b445c5 100644 --- a/lib/public/DirectEditing/IToken.php +++ b/lib/public/DirectEditing/IToken.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use OCP\Files\File; diff --git a/lib/public/DirectEditing/RegisterDirectEditorEvent.php b/lib/public/DirectEditing/RegisterDirectEditorEvent.php index cbf9b07185d71..e989184563bf1 100644 --- a/lib/public/DirectEditing/RegisterDirectEditorEvent.php +++ b/lib/public/DirectEditing/RegisterDirectEditorEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\DirectEditing; use OCP\EventDispatcher\Event; diff --git a/lib/public/Encryption/Exceptions/GenericEncryptionException.php b/lib/public/Encryption/Exceptions/GenericEncryptionException.php index 772ba23b73eb7..f6910ad15d62c 100644 --- a/lib/public/Encryption/Exceptions/GenericEncryptionException.php +++ b/lib/public/Encryption/Exceptions/GenericEncryptionException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption\Exceptions; use OCP\HintException; diff --git a/lib/public/Encryption/Exceptions/InvalidHeaderException.php b/lib/public/Encryption/Exceptions/InvalidHeaderException.php index f7213577fb65b..1917a95b26402 100644 --- a/lib/public/Encryption/Exceptions/InvalidHeaderException.php +++ b/lib/public/Encryption/Exceptions/InvalidHeaderException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption\Exceptions; use OCP\HintException; diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 0bf0ef3476beb..a5a74ad1610d2 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption; use Symfony\Component\Console\Input\InputInterface; diff --git a/lib/public/Encryption/IFile.php b/lib/public/Encryption/IFile.php index ca8783290e3d1..1715212dca24d 100644 --- a/lib/public/Encryption/IFile.php +++ b/lib/public/Encryption/IFile.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption; /** diff --git a/lib/public/Encryption/IManager.php b/lib/public/Encryption/IManager.php index 27cceab29df49..d33276ee089f6 100644 --- a/lib/public/Encryption/IManager.php +++ b/lib/public/Encryption/IManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption; use OC\Encryption\Exceptions\ModuleAlreadyExistsException; @@ -51,7 +52,6 @@ public function unregisterEncryptionModule($moduleId); */ public function getEncryptionModules(); - /** * get a specific encryption module * diff --git a/lib/public/Encryption/Keys/IStorage.php b/lib/public/Encryption/Keys/IStorage.php index e0a21751ad77e..8e2bc1177e3c5 100644 --- a/lib/public/Encryption/Keys/IStorage.php +++ b/lib/public/Encryption/Keys/IStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Encryption\Keys; /** diff --git a/lib/public/EventDispatcher/ABroadcastedEvent.php b/lib/public/EventDispatcher/ABroadcastedEvent.php index cb3adbe46b33a..d4f0b8da52d82 100644 --- a/lib/public/EventDispatcher/ABroadcastedEvent.php +++ b/lib/public/EventDispatcher/ABroadcastedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\EventDispatcher; use JsonSerializable; diff --git a/lib/public/EventDispatcher/Event.php b/lib/public/EventDispatcher/Event.php index 1d6fc66a4c6e6..711ce3be5db85 100644 --- a/lib/public/EventDispatcher/Event.php +++ b/lib/public/EventDispatcher/Event.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\EventDispatcher; use Psr\EventDispatcher\StoppableEventInterface; diff --git a/lib/public/EventDispatcher/GenericEvent.php b/lib/public/EventDispatcher/GenericEvent.php index 2d69c79faf01f..b09bda5acc8db 100644 --- a/lib/public/EventDispatcher/GenericEvent.php +++ b/lib/public/EventDispatcher/GenericEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\EventDispatcher; use ArrayAccess; diff --git a/lib/public/EventDispatcher/IEventDispatcher.php b/lib/public/EventDispatcher/IEventDispatcher.php index a1eb75580fe79..35796371854e5 100644 --- a/lib/public/EventDispatcher/IEventDispatcher.php +++ b/lib/public/EventDispatcher/IEventDispatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\EventDispatcher; /** diff --git a/lib/public/EventDispatcher/IEventListener.php b/lib/public/EventDispatcher/IEventListener.php index 46ed53fa7a299..e671d801addb1 100644 --- a/lib/public/EventDispatcher/IEventListener.php +++ b/lib/public/EventDispatcher/IEventListener.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\EventDispatcher; /** diff --git a/lib/public/Federation/Events/TrustedServerRemovedEvent.php b/lib/public/Federation/Events/TrustedServerRemovedEvent.php index 773377eb8533b..19e4b54bb48bb 100644 --- a/lib/public/Federation/Events/TrustedServerRemovedEvent.php +++ b/lib/public/Federation/Events/TrustedServerRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Federation/Exceptions/ActionNotSupportedException.php b/lib/public/Federation/Exceptions/ActionNotSupportedException.php index 7f0e0f46907ec..dfc307284f85d 100644 --- a/lib/public/Federation/Exceptions/ActionNotSupportedException.php +++ b/lib/public/Federation/Exceptions/ActionNotSupportedException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\HintException; diff --git a/lib/public/Federation/Exceptions/AuthenticationFailedException.php b/lib/public/Federation/Exceptions/AuthenticationFailedException.php index 6ce5314844e56..ccefe708d820a 100644 --- a/lib/public/Federation/Exceptions/AuthenticationFailedException.php +++ b/lib/public/Federation/Exceptions/AuthenticationFailedException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\HintException; diff --git a/lib/public/Federation/Exceptions/BadRequestException.php b/lib/public/Federation/Exceptions/BadRequestException.php index 0210437a8d5fe..0bcdb095f8f21 100644 --- a/lib/public/Federation/Exceptions/BadRequestException.php +++ b/lib/public/Federation/Exceptions/BadRequestException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\HintException; diff --git a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php index f753f5f33269e..c9c8eba562cf3 100644 --- a/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderAlreadyExistsException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\HintException; diff --git a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php index 168eb2b8aeb79..bbfd3f8d9f99d 100644 --- a/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php +++ b/lib/public/Federation/Exceptions/ProviderCouldNotAddShareException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\AppFramework\Http; diff --git a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php index 64dfcf0f85679..8083724fa30cf 100644 --- a/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php +++ b/lib/public/Federation/Exceptions/ProviderDoesNotExistsException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation\Exceptions; use OCP\HintException; diff --git a/lib/public/Federation/ICloudFederationFactory.php b/lib/public/Federation/ICloudFederationFactory.php index 5238188b4fae8..583aafa151f53 100644 --- a/lib/public/Federation/ICloudFederationFactory.php +++ b/lib/public/Federation/ICloudFederationFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudFederationNotification.php b/lib/public/Federation/ICloudFederationNotification.php index c550a93692782..100602767e765 100644 --- a/lib/public/Federation/ICloudFederationNotification.php +++ b/lib/public/Federation/ICloudFederationNotification.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudFederationProvider.php b/lib/public/Federation/ICloudFederationProvider.php index b92404866cb5f..717ec1811e46a 100644 --- a/lib/public/Federation/ICloudFederationProvider.php +++ b/lib/public/Federation/ICloudFederationProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; use OCP\Federation\Exceptions\ActionNotSupportedException; diff --git a/lib/public/Federation/ICloudFederationProviderManager.php b/lib/public/Federation/ICloudFederationProviderManager.php index 68adb4b4da752..815808ffa4189 100644 --- a/lib/public/Federation/ICloudFederationProviderManager.php +++ b/lib/public/Federation/ICloudFederationProviderManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; use OCP\Http\Client\IResponse; diff --git a/lib/public/Federation/ICloudFederationShare.php b/lib/public/Federation/ICloudFederationShare.php index 0b67bbfadee85..56ef7ed3bf7ed 100644 --- a/lib/public/Federation/ICloudFederationShare.php +++ b/lib/public/Federation/ICloudFederationShare.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; /** @@ -220,7 +221,6 @@ public function getShareType(); */ public function getShareSecret(); - /** * get protocol specification * diff --git a/lib/public/Federation/ICloudId.php b/lib/public/Federation/ICloudId.php index 44b653e327e3c..da7a484792266 100644 --- a/lib/public/Federation/ICloudId.php +++ b/lib/public/Federation/ICloudId.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; /** diff --git a/lib/public/Federation/ICloudIdManager.php b/lib/public/Federation/ICloudIdManager.php index 29e261ab3afd9..4e32a64f4e1f3 100644 --- a/lib/public/Federation/ICloudIdManager.php +++ b/lib/public/Federation/ICloudIdManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Federation; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Federation/ICloudIdResolver.php b/lib/public/Federation/ICloudIdResolver.php index 79f9ed11dd75e..13537f0a5d961 100644 --- a/lib/public/Federation/ICloudIdResolver.php +++ b/lib/public/Federation/ICloudIdResolver.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Federation; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Files/AppData/IAppDataFactory.php b/lib/public/Files/AppData/IAppDataFactory.php index e23b9cadfcb9d..f058133e2a962 100644 --- a/lib/public/Files/AppData/IAppDataFactory.php +++ b/lib/public/Files/AppData/IAppDataFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\AppData; use OCP\Files\IAppData; diff --git a/lib/public/Files/Cache/AbstractCacheEvent.php b/lib/public/Files/Cache/AbstractCacheEvent.php index 678332c907382..317c38b8780ec 100644 --- a/lib/public/Files/Cache/AbstractCacheEvent.php +++ b/lib/public/Files/Cache/AbstractCacheEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Cache/CacheEntriesRemovedEvent.php b/lib/public/Files/Cache/CacheEntriesRemovedEvent.php index 35c3f79844f84..31d33584b832c 100644 --- a/lib/public/Files/Cache/CacheEntriesRemovedEvent.php +++ b/lib/public/Files/Cache/CacheEntriesRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; use OCP\AppFramework\Attribute\Listenable; diff --git a/lib/public/Files/Cache/CacheEntryInsertedEvent.php b/lib/public/Files/Cache/CacheEntryInsertedEvent.php index c3afe0f034f7f..922c223ba03d3 100644 --- a/lib/public/Files/Cache/CacheEntryInsertedEvent.php +++ b/lib/public/Files/Cache/CacheEntryInsertedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheEntryRemovedEvent.php b/lib/public/Files/Cache/CacheEntryRemovedEvent.php index d015f3ba94dcd..cda226b5ff241 100644 --- a/lib/public/Files/Cache/CacheEntryRemovedEvent.php +++ b/lib/public/Files/Cache/CacheEntryRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/CacheEntryUpdatedEvent.php b/lib/public/Files/Cache/CacheEntryUpdatedEvent.php index 91dcf5340aa66..d83ae68ba01d5 100644 --- a/lib/public/Files/Cache/CacheEntryUpdatedEvent.php +++ b/lib/public/Files/Cache/CacheEntryUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/ICache.php b/lib/public/Files/Cache/ICache.php index 2f324c85f85aa..2891fbbc6afde 100644 --- a/lib/public/Files/Cache/ICache.php +++ b/lib/public/Files/Cache/ICache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Cache; use OCP\Files\Search\ISearchOperator; diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php index 790c972b51bfc..9dc9a7d9806f6 100644 --- a/lib/public/Files/Cache/ICacheEntry.php +++ b/lib/public/Files/Cache/ICacheEntry.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Cache; use ArrayAccess; diff --git a/lib/public/Files/Cache/ICacheEvent.php b/lib/public/Files/Cache/ICacheEvent.php index a5659efd4a655..d2e3c1dc071e7 100644 --- a/lib/public/Files/Cache/ICacheEvent.php +++ b/lib/public/Files/Cache/ICacheEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; use OCP\Files\Storage\IStorage; diff --git a/lib/public/Files/Cache/IFileAccess.php b/lib/public/Files/Cache/IFileAccess.php index 7a993d81e7af5..9b40d19a10abc 100644 --- a/lib/public/Files/Cache/IFileAccess.php +++ b/lib/public/Files/Cache/IFileAccess.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/IScanner.php b/lib/public/Files/Cache/IScanner.php index 9b3c283b436b9..a48a066fa141f 100644 --- a/lib/public/Files/Cache/IScanner.php +++ b/lib/public/Files/Cache/IScanner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Cache/IUpdater.php b/lib/public/Files/Cache/IUpdater.php index 65c4ce3bfdb09..d533005c7d6b8 100644 --- a/lib/public/Files/Cache/IUpdater.php +++ b/lib/public/Files/Cache/IUpdater.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Cache; use OCP\Files\Storage\IStorage; diff --git a/lib/public/Files/Cache/IWatcher.php b/lib/public/Files/Cache/IWatcher.php index 55063eec817ed..15a60d500dc38 100644 --- a/lib/public/Files/Cache/IWatcher.php +++ b/lib/public/Files/Cache/IWatcher.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Cache; /** diff --git a/lib/public/Files/Config/IAuthoritativeMountProvider.php b/lib/public/Files/Config/IAuthoritativeMountProvider.php index d0a6b69d8d874..20e054187a06e 100644 --- a/lib/public/Files/Config/IAuthoritativeMountProvider.php +++ b/lib/public/Files/Config/IAuthoritativeMountProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Robin Appelman * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Config; /** diff --git a/lib/public/Files/Config/ICachedMountFileInfo.php b/lib/public/Files/Config/ICachedMountFileInfo.php index a9b30d8ba6d6f..921598c16241a 100644 --- a/lib/public/Files/Config/ICachedMountFileInfo.php +++ b/lib/public/Files/Config/ICachedMountFileInfo.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Config; /** diff --git a/lib/public/Files/Config/ICachedMountInfo.php b/lib/public/Files/Config/ICachedMountInfo.php index cb9c0205d3d40..cd96806199326 100644 --- a/lib/public/Files/Config/ICachedMountInfo.php +++ b/lib/public/Files/Config/ICachedMountInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Config; use OCP\Files\Node; diff --git a/lib/public/Files/Config/IHomeMountProvider.php b/lib/public/Files/Config/IHomeMountProvider.php index b193e9ba22ebf..1612de719ba0d 100644 --- a/lib/public/Files/Config/IHomeMountProvider.php +++ b/lib/public/Files/Config/IHomeMountProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Config; use OCP\Files\Storage\IStorageFactory; diff --git a/lib/public/Files/Config/IMountProvider.php b/lib/public/Files/Config/IMountProvider.php index 189f9c07e7a31..cbc1ca45846c1 100644 --- a/lib/public/Files/Config/IMountProvider.php +++ b/lib/public/Files/Config/IMountProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Config; use OCP\Files\Mount\IMountPoint; diff --git a/lib/public/Files/Config/IMountProviderCollection.php b/lib/public/Files/Config/IMountProviderCollection.php index db5188372c1f0..1b9e114c887fc 100644 --- a/lib/public/Files/Config/IMountProviderCollection.php +++ b/lib/public/Files/Config/IMountProviderCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Config; use OCP\IUser; diff --git a/lib/public/Files/Config/IPartialMountProvider.php b/lib/public/Files/Config/IPartialMountProvider.php index 0b603e500baf6..fd9102f042ae3 100644 --- a/lib/public/Files/Config/IPartialMountProvider.php +++ b/lib/public/Files/Config/IPartialMountProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Config; use OCP\Files\Mount\IMountPoint; diff --git a/lib/public/Files/Config/IRootMountProvider.php b/lib/public/Files/Config/IRootMountProvider.php index e2a32fc346a8f..dd53b663a16a8 100644 --- a/lib/public/Files/Config/IRootMountProvider.php +++ b/lib/public/Files/Config/IRootMountProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Config; use OCP\Files\Storage\IStorageFactory; diff --git a/lib/public/Files/Config/IUserMountCache.php b/lib/public/Files/Config/IUserMountCache.php index fc0ec3f1f9284..9ff3118664d07 100644 --- a/lib/public/Files/Config/IUserMountCache.php +++ b/lib/public/Files/Config/IUserMountCache.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Config; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/public/Files/Config/MountProviderArgs.php b/lib/public/Files/Config/MountProviderArgs.php index 73eefd52841f5..3d1ed66543745 100644 --- a/lib/public/Files/Config/MountProviderArgs.php +++ b/lib/public/Files/Config/MountProviderArgs.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Config; use OCP\Files\Cache\ICacheEntry; diff --git a/lib/public/Files/ConnectionLostException.php b/lib/public/Files/ConnectionLostException.php index 3fd97b48901af..a0ea4cde865ca 100644 --- a/lib/public/Files/ConnectionLostException.php +++ b/lib/public/Files/ConnectionLostException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/EmptyFileNameException.php b/lib/public/Files/EmptyFileNameException.php index 1630ce63ea299..649a7b954d1e5 100644 --- a/lib/public/Files/EmptyFileNameException.php +++ b/lib/public/Files/EmptyFileNameException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files; /** diff --git a/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php b/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php index 550a5e17496d4..b5303aa0d10cc 100644 --- a/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php +++ b/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/BeforeFileScannedEvent.php b/lib/public/Files/Events/BeforeFileScannedEvent.php index 70c9d23c156f2..17e51c23401cf 100644 --- a/lib/public/Files/Events/BeforeFileScannedEvent.php +++ b/lib/public/Files/Events/BeforeFileScannedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/BeforeFolderScannedEvent.php b/lib/public/Files/Events/BeforeFolderScannedEvent.php index cd72c79e8d886..bb0f941f700ce 100644 --- a/lib/public/Files/Events/BeforeFolderScannedEvent.php +++ b/lib/public/Files/Events/BeforeFolderScannedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FileCacheUpdated.php b/lib/public/Files/Events/FileCacheUpdated.php index 7b3877bb05d57..042f4a8b3988f 100644 --- a/lib/public/Files/Events/FileCacheUpdated.php +++ b/lib/public/Files/Events/FileCacheUpdated.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FileScannedEvent.php b/lib/public/Files/Events/FileScannedEvent.php index 9ede4e2425f30..63545c3b93fc8 100644 --- a/lib/public/Files/Events/FileScannedEvent.php +++ b/lib/public/Files/Events/FileScannedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/FolderScannedEvent.php b/lib/public/Files/Events/FolderScannedEvent.php index 5e14bbfb6a84d..b0ca71c3c0453 100644 --- a/lib/public/Files/Events/FolderScannedEvent.php +++ b/lib/public/Files/Events/FolderScannedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/AbstractNodeEvent.php b/lib/public/Files/Events/Node/AbstractNodeEvent.php index 06259051f9ce4..90a084116b183 100644 --- a/lib/public/Files/Events/Node/AbstractNodeEvent.php +++ b/lib/public/Files/Events/Node/AbstractNodeEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/AbstractNodesEvent.php b/lib/public/Files/Events/Node/AbstractNodesEvent.php index 1569b58cfc1ce..0b8f7cc8afc82 100644 --- a/lib/public/Files/Events/Node/AbstractNodesEvent.php +++ b/lib/public/Files/Events/Node/AbstractNodesEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php b/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php index c7c014cfd64a1..4c39f62cf7fa2 100644 --- a/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php b/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php index 3f42687576d35..f94c42961ba65 100644 --- a/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php b/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php index 83d9402dbeb99..d7f5729a33e7c 100644 --- a/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; use OCP\Exceptions\AbortedEventException; diff --git a/lib/public/Files/Events/Node/BeforeNodeReadEvent.php b/lib/public/Files/Events/Node/BeforeNodeReadEvent.php index ae688fccb3069..9a0c9e19bd01f 100644 --- a/lib/public/Files/Events/Node/BeforeNodeReadEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeReadEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php b/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php index 54714b8f7e289..b73f5bea7beb5 100644 --- a/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; use OCP\Exceptions\AbortedEventException; diff --git a/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php b/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php index ed2e561e947f1..2ae73076e4a97 100644 --- a/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php b/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php index 61d3afb9cd669..4032cf967ffb6 100644 --- a/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php +++ b/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeCopiedEvent.php b/lib/public/Files/Events/Node/NodeCopiedEvent.php index 8913f34835ebf..4c4e442cb77f9 100644 --- a/lib/public/Files/Events/Node/NodeCopiedEvent.php +++ b/lib/public/Files/Events/Node/NodeCopiedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeCreatedEvent.php b/lib/public/Files/Events/Node/NodeCreatedEvent.php index ffcbc9a9f1072..a83849f2d048e 100644 --- a/lib/public/Files/Events/Node/NodeCreatedEvent.php +++ b/lib/public/Files/Events/Node/NodeCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeDeletedEvent.php b/lib/public/Files/Events/Node/NodeDeletedEvent.php index 58689e2c3d950..94183bf810bdf 100644 --- a/lib/public/Files/Events/Node/NodeDeletedEvent.php +++ b/lib/public/Files/Events/Node/NodeDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeRenamedEvent.php b/lib/public/Files/Events/Node/NodeRenamedEvent.php index f126d191d7f78..11e65816e378d 100644 --- a/lib/public/Files/Events/Node/NodeRenamedEvent.php +++ b/lib/public/Files/Events/Node/NodeRenamedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeTouchedEvent.php b/lib/public/Files/Events/Node/NodeTouchedEvent.php index 88037311b4a22..f0762c4414425 100644 --- a/lib/public/Files/Events/Node/NodeTouchedEvent.php +++ b/lib/public/Files/Events/Node/NodeTouchedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/Node/NodeWrittenEvent.php b/lib/public/Files/Events/Node/NodeWrittenEvent.php index b6bb949167c54..1f25a870a44d9 100644 --- a/lib/public/Files/Events/Node/NodeWrittenEvent.php +++ b/lib/public/Files/Events/Node/NodeWrittenEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events\Node; /** diff --git a/lib/public/Files/Events/NodeAddedToCache.php b/lib/public/Files/Events/NodeAddedToCache.php index 4ea20a3f3c104..a505abe6d2843 100644 --- a/lib/public/Files/Events/NodeAddedToCache.php +++ b/lib/public/Files/Events/NodeAddedToCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/NodeAddedToFavorite.php b/lib/public/Files/Events/NodeAddedToFavorite.php index 2a2725063b653..dfedbba0f0610 100644 --- a/lib/public/Files/Events/NodeAddedToFavorite.php +++ b/lib/public/Files/Events/NodeAddedToFavorite.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/NodeRemovedFromCache.php b/lib/public/Files/Events/NodeRemovedFromCache.php index 01c8c21f71df3..dd10a214eae23 100644 --- a/lib/public/Files/Events/NodeRemovedFromCache.php +++ b/lib/public/Files/Events/NodeRemovedFromCache.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Events/NodeRemovedFromFavorite.php b/lib/public/Files/Events/NodeRemovedFromFavorite.php index 3b2f75346c41b..53877af8150a4 100644 --- a/lib/public/Files/Events/NodeRemovedFromFavorite.php +++ b/lib/public/Files/Events/NodeRemovedFromFavorite.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/FileInfo.php b/lib/public/Files/FileInfo.php index 76b2083085daf..4d93e57601447 100644 --- a/lib/public/Files/FileInfo.php +++ b/lib/public/Files/FileInfo.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Files/GenericFileException.php b/lib/public/Files/GenericFileException.php index 66a3b5e5ac4b5..f9b3108cf98be 100644 --- a/lib/public/Files/GenericFileException.php +++ b/lib/public/Files/GenericFileException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files; /** diff --git a/lib/public/Files/IAppData.php b/lib/public/Files/IAppData.php index 4d0c4da6a8a8d..959c5d5dd38ee 100644 --- a/lib/public/Files/IAppData.php +++ b/lib/public/Files/IAppData.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files; use OCP\Files\SimpleFS\ISimpleRoot; diff --git a/lib/public/Files/IFilenameValidator.php b/lib/public/Files/IFilenameValidator.php index 9b7fa1e2e2ec2..f60007e5f5562 100644 --- a/lib/public/Files/IFilenameValidator.php +++ b/lib/public/Files/IFilenameValidator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files; /** diff --git a/lib/public/Files/IMimeTypeLoader.php b/lib/public/Files/IMimeTypeLoader.php index 77c59fb2c0a8a..cda549b96f50a 100644 --- a/lib/public/Files/IMimeTypeLoader.php +++ b/lib/public/Files/IMimeTypeLoader.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/IRootFolder.php b/lib/public/Files/IRootFolder.php index fb8532f8c8153..870b2dceb1a9c 100644 --- a/lib/public/Files/IRootFolder.php +++ b/lib/public/Files/IRootFolder.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; use OC\Hooks\Emitter; diff --git a/lib/public/Files/InvalidDirectoryException.php b/lib/public/Files/InvalidDirectoryException.php index b9640209cbf1b..bb61ea14e784c 100644 --- a/lib/public/Files/InvalidDirectoryException.php +++ b/lib/public/Files/InvalidDirectoryException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files; /** diff --git a/lib/public/Files/Mount/IMountManager.php b/lib/public/Files/Mount/IMountManager.php index 43a771c07ce82..9cdf546aea22c 100644 --- a/lib/public/Files/Mount/IMountManager.php +++ b/lib/public/Files/Mount/IMountManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Mount; use OCP\Files\Config\ICachedMountInfo; diff --git a/lib/public/Files/Mount/IMountPoint.php b/lib/public/Files/Mount/IMountPoint.php index 8989a885fda49..ff06021ca888b 100644 --- a/lib/public/Files/Mount/IMountPoint.php +++ b/lib/public/Files/Mount/IMountPoint.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Mount; /** diff --git a/lib/public/Files/Mount/IMovableMount.php b/lib/public/Files/Mount/IMovableMount.php index e9026c2446f63..a5e7c127500b9 100644 --- a/lib/public/Files/Mount/IMovableMount.php +++ b/lib/public/Files/Mount/IMovableMount.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Mount; /** diff --git a/lib/public/Files/Mount/ISystemMountPoint.php b/lib/public/Files/Mount/ISystemMountPoint.php index ae1d51621ea89..56d2bcffae1b9 100644 --- a/lib/public/Files/Mount/ISystemMountPoint.php +++ b/lib/public/Files/Mount/ISystemMountPoint.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Mount; /** diff --git a/lib/public/Files/Node.php b/lib/public/Files/Node.php index b3b0ffb5c01fc..727cb2f4da1c0 100644 --- a/lib/public/Files/Node.php +++ b/lib/public/Files/Node.php @@ -151,7 +151,6 @@ public function getSize($includeMounts = true); #[\Override] public function getEtag(); - /** * Get the permissions of the file or folder as a combination of one or more of the following constants: * - \OCP\Constants::PERMISSION_READ diff --git a/lib/public/Files/Notify/IChange.php b/lib/public/Files/Notify/IChange.php index c7c758eec11ea..d9b70b3823aec 100644 --- a/lib/public/Files/Notify/IChange.php +++ b/lib/public/Files/Notify/IChange.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/Notify/INotifyHandler.php b/lib/public/Files/Notify/INotifyHandler.php index 09b3dbca919f0..b10efadaca776 100644 --- a/lib/public/Files/Notify/INotifyHandler.php +++ b/lib/public/Files/Notify/INotifyHandler.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/Notify/IRenameChange.php b/lib/public/Files/Notify/IRenameChange.php index b1bfae5fc00c8..4e8c1bd55c2d6 100644 --- a/lib/public/Files/Notify/IRenameChange.php +++ b/lib/public/Files/Notify/IRenameChange.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Notify; /** diff --git a/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php b/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php index fc9f5f6053840..587b8001268e8 100644 --- a/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php +++ b/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\ObjectStore\Events; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Files/ObjectStore/IObjectStore.php b/lib/public/Files/ObjectStore/IObjectStore.php index 2b33ed485ad9c..3226990275cfc 100644 --- a/lib/public/Files/ObjectStore/IObjectStore.php +++ b/lib/public/Files/ObjectStore/IObjectStore.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\ObjectStore; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/ObjectStore/IObjectStoreMetaData.php b/lib/public/Files/ObjectStore/IObjectStoreMetaData.php index 9683873be3604..8ceb1ea160a12 100644 --- a/lib/public/Files/ObjectStore/IObjectStoreMetaData.php +++ b/lib/public/Files/ObjectStore/IObjectStoreMetaData.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\ObjectStore; /** diff --git a/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php b/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php index 7989e27dfc851..fe4119e38de43 100644 --- a/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php +++ b/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\ObjectStore; use Aws\Result; diff --git a/lib/public/Files/Search/ISearchBinaryOperator.php b/lib/public/Files/Search/ISearchBinaryOperator.php index fa7ef4d1bb34c..2270ab7ecea9c 100644 --- a/lib/public/Files/Search/ISearchBinaryOperator.php +++ b/lib/public/Files/Search/ISearchBinaryOperator.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Search; /** diff --git a/lib/public/Files/Search/ISearchComparison.php b/lib/public/Files/Search/ISearchComparison.php index ab298fa0a57d9..b26a8a312a4c6 100644 --- a/lib/public/Files/Search/ISearchComparison.php +++ b/lib/public/Files/Search/ISearchComparison.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Search; /** diff --git a/lib/public/Files/Search/ISearchOperator.php b/lib/public/Files/Search/ISearchOperator.php index f6ae8edcbb150..f6f91e7bcbcef 100644 --- a/lib/public/Files/Search/ISearchOperator.php +++ b/lib/public/Files/Search/ISearchOperator.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Search; /** diff --git a/lib/public/Files/Search/ISearchOrder.php b/lib/public/Files/Search/ISearchOrder.php index e6e688494433a..1efeffdf9e7c8 100644 --- a/lib/public/Files/Search/ISearchOrder.php +++ b/lib/public/Files/Search/ISearchOrder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Search; use OCP\Files\FileInfo; diff --git a/lib/public/Files/Search/ISearchQuery.php b/lib/public/Files/Search/ISearchQuery.php index 1b400c56e5b59..dc96a7a2f9825 100644 --- a/lib/public/Files/Search/ISearchQuery.php +++ b/lib/public/Files/Search/ISearchQuery.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Search; use OCP\IUser; diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php index 4e77299ab00da..100e1ad402a82 100644 --- a/lib/public/Files/SimpleFS/ISimpleFile.php +++ b/lib/public/Files/SimpleFS/ISimpleFile.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\SimpleFS; use OCP\Files\GenericFileException; diff --git a/lib/public/Files/SimpleFS/ISimpleFolder.php b/lib/public/Files/SimpleFS/ISimpleFolder.php index 95efc676688ad..ebd36b866582a 100644 --- a/lib/public/Files/SimpleFS/ISimpleFolder.php +++ b/lib/public/Files/SimpleFS/ISimpleFolder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\SimpleFS; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/SimpleFS/ISimpleRoot.php b/lib/public/Files/SimpleFS/ISimpleRoot.php index 6be8a1d47c9db..1fbfe3028319d 100644 --- a/lib/public/Files/SimpleFS/ISimpleRoot.php +++ b/lib/public/Files/SimpleFS/ISimpleRoot.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\SimpleFS; use OCP\Files\NotFoundException; diff --git a/lib/public/Files/SimpleFS/InMemoryFile.php b/lib/public/Files/SimpleFS/InMemoryFile.php index b8bfbabbf6e72..eef075119f094 100644 --- a/lib/public/Files/SimpleFS/InMemoryFile.php +++ b/lib/public/Files/SimpleFS/InMemoryFile.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\SimpleFS; use OCP\Files\NotPermittedException; diff --git a/lib/public/Files/Storage/IChunkedFileWrite.php b/lib/public/Files/Storage/IChunkedFileWrite.php index 0cf27814f0ed2..6dc4ff792ed52 100644 --- a/lib/public/Files/Storage/IChunkedFileWrite.php +++ b/lib/public/Files/Storage/IChunkedFileWrite.php @@ -7,7 +7,6 @@ declare(strict_types=1); - namespace OCP\Files\Storage; use OCP\Files\GenericFileException; diff --git a/lib/public/Files/Storage/IDisableEncryptionStorage.php b/lib/public/Files/Storage/IDisableEncryptionStorage.php index 19951da20157f..3d64e3c309b9d 100644 --- a/lib/public/Files/Storage/IDisableEncryptionStorage.php +++ b/lib/public/Files/Storage/IDisableEncryptionStorage.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Storage; /** diff --git a/lib/public/Files/Storage/ILockingStorage.php b/lib/public/Files/Storage/ILockingStorage.php index ceedf33ceabe4..cc269f0477fa8 100644 --- a/lib/public/Files/Storage/ILockingStorage.php +++ b/lib/public/Files/Storage/ILockingStorage.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Storage; use OCP\Lock\ILockingProvider; diff --git a/lib/public/Files/Storage/INotifyStorage.php b/lib/public/Files/Storage/INotifyStorage.php index 063ff81558106..e081c6eb1567e 100644 --- a/lib/public/Files/Storage/INotifyStorage.php +++ b/lib/public/Files/Storage/INotifyStorage.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Storage; use OCP\Files\Notify\INotifyHandler; diff --git a/lib/public/Files/Storage/ISharedStorage.php b/lib/public/Files/Storage/ISharedStorage.php index 69fc60750c5dc..e63cbc3ed57e8 100644 --- a/lib/public/Files/Storage/ISharedStorage.php +++ b/lib/public/Files/Storage/ISharedStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Storage; use OCP\Share\IShare; diff --git a/lib/public/Files/Storage/IStorageFactory.php b/lib/public/Files/Storage/IStorageFactory.php index 24f87d2e77544..76b701199fde1 100644 --- a/lib/public/Files/Storage/IStorageFactory.php +++ b/lib/public/Files/Storage/IStorageFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files\Storage; use OCP\Files\Mount\IMountPoint; diff --git a/lib/public/Files/Storage/IWriteStreamStorage.php b/lib/public/Files/Storage/IWriteStreamStorage.php index b03f46ef2bc26..ed3559e2ad449 100644 --- a/lib/public/Files/Storage/IWriteStreamStorage.php +++ b/lib/public/Files/Storage/IWriteStreamStorage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Storage; use OCP\Files\GenericFileException; diff --git a/lib/public/Files/StorageAuthException.php b/lib/public/Files/StorageAuthException.php index d0115313a967e..6cf56c19b6d11 100644 --- a/lib/public/Files/StorageAuthException.php +++ b/lib/public/Files/StorageAuthException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/StorageBadConfigException.php b/lib/public/Files/StorageBadConfigException.php index c38bd840d3ee0..0d994069faa06 100644 --- a/lib/public/Files/StorageBadConfigException.php +++ b/lib/public/Files/StorageBadConfigException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/StorageConnectionException.php b/lib/public/Files/StorageConnectionException.php index 8629d8cee6eba..b659357f6a309 100644 --- a/lib/public/Files/StorageConnectionException.php +++ b/lib/public/Files/StorageConnectionException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/StorageTimeoutException.php b/lib/public/Files/StorageTimeoutException.php index 85201932d666f..b09d7f6442e2a 100644 --- a/lib/public/Files/StorageTimeoutException.php +++ b/lib/public/Files/StorageTimeoutException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Files; /** diff --git a/lib/public/Files/Template/FileCreatedFromTemplateEvent.php b/lib/public/Files/Template/FileCreatedFromTemplateEvent.php index 0636d1dc25155..09b1f2748750c 100644 --- a/lib/public/Files/Template/FileCreatedFromTemplateEvent.php +++ b/lib/public/Files/Template/FileCreatedFromTemplateEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Template; use OCP\EventDispatcher\Event; diff --git a/lib/public/Files/Template/ICustomTemplateProvider.php b/lib/public/Files/Template/ICustomTemplateProvider.php index 6136bc4f1c0b8..96aeac86bfbb9 100644 --- a/lib/public/Files/Template/ICustomTemplateProvider.php +++ b/lib/public/Files/Template/ICustomTemplateProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Template; use OCP\Files\File; diff --git a/lib/public/Files/Template/ITemplateManager.php b/lib/public/Files/Template/ITemplateManager.php index c838bfff20de3..8d47a3fddaf9e 100644 --- a/lib/public/Files/Template/ITemplateManager.php +++ b/lib/public/Files/Template/ITemplateManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Template; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Files/Template/Template.php b/lib/public/Files/Template/Template.php index 4d838a6d4ad08..bdc95e68d3ee7 100644 --- a/lib/public/Files/Template/Template.php +++ b/lib/public/Files/Template/Template.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Template; use OCP\Files\File; diff --git a/lib/public/Files/Template/TemplateFileCreator.php b/lib/public/Files/Template/TemplateFileCreator.php index eb5c79600e4fe..312c039c71071 100644 --- a/lib/public/Files/Template/TemplateFileCreator.php +++ b/lib/public/Files/Template/TemplateFileCreator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files\Template; /** diff --git a/lib/public/FilesMetadata/Model/IMetadataValueWrapper.php b/lib/public/FilesMetadata/Model/IMetadataValueWrapper.php index 72eaae61733bc..09d5e48acf429 100644 --- a/lib/public/FilesMetadata/Model/IMetadataValueWrapper.php +++ b/lib/public/FilesMetadata/Model/IMetadataValueWrapper.php @@ -44,7 +44,6 @@ interface IMetadataValueWrapper extends JsonSerializable { /** @since 28.0.0 */ public const EDIT_REQ_READ_PERMISSION = 3; - /** * Unless a call of import() to deserialize an object is expected, a valid value type is needed here. * @@ -188,7 +187,6 @@ public function setValueStringList(array $value): self; */ public function setValueIntList(array $value): self; - /** * get stored value * diff --git a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php index 297d6bc6ffc63..eed0c374414c2 100644 --- a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php +++ b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Files_FullTextSearch\Model; use OC\FullTextSearch\Model\IndexDocument; @@ -40,7 +41,6 @@ abstract class AFilesDocument extends IndexDocument { */ abstract public function getOwnerId(): string; - /** * Returns the current viewer of the document/file. * @@ -50,7 +50,6 @@ abstract public function getOwnerId(): string; */ abstract public function getViewerId(): string; - /** * Returns the type of the document/file. * @@ -60,7 +59,6 @@ abstract public function getViewerId(): string; */ abstract public function getType(): string; - /** * Returns the mimetype of the document/file. * diff --git a/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php b/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php index 11c7fc62de96c..0040f5638b2eb 100644 --- a/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php +++ b/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Exceptions; /** diff --git a/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php b/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php index a2222fe57cbe0..e156baca623e3 100644 --- a/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php +++ b/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Exceptions; /** diff --git a/lib/public/FullTextSearch/IFullTextSearchManager.php b/lib/public/FullTextSearch/IFullTextSearchManager.php index db7a50adabbcd..c3ba54401efca 100644 --- a/lib/public/FullTextSearch/IFullTextSearchManager.php +++ b/lib/public/FullTextSearch/IFullTextSearchManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IIndex; @@ -61,7 +62,6 @@ public function registerSearchService(ISearchService $searchService); */ public function isAvailable(): bool; - /** * Add the Javascript API in the navigation page of an app. * Needed to replace the default search. @@ -70,7 +70,6 @@ public function isAvailable(): bool; */ public function addJavascriptAPI(); - /** * Check if the provider $providerId is already indexed. * @@ -82,7 +81,6 @@ public function addJavascriptAPI(); */ public function isProviderIndexed(string $providerId): bool; - /** * Retrieve an Index from the database, based on the Id of the Provider * and the Id of the Document @@ -96,7 +94,6 @@ public function isProviderIndexed(string $providerId): bool; */ public function getIndex(string $providerId, string $documentId): IIndex; - /** * Create a new Index. * @@ -113,7 +110,6 @@ public function getIndex(string $providerId, string $documentId): IIndex; */ public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex; - /** * Update the status of an Index. status is a bitflag, setting $reset to * true will reset the status to the value defined in the parameter. @@ -127,7 +123,6 @@ public function createIndex(string $providerId, string $documentId, string $user */ public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); - /** * Update the status of an array of Index. status is a bit flag, setting $reset to * true will reset the status to the value defined in the parameter. diff --git a/lib/public/FullTextSearch/IFullTextSearchPlatform.php b/lib/public/FullTextSearch/IFullTextSearchPlatform.php index 62b3070d5f29e..a32e0c7e47b2e 100644 --- a/lib/public/FullTextSearch/IFullTextSearchPlatform.php +++ b/lib/public/FullTextSearch/IFullTextSearchPlatform.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IDocumentAccess; @@ -62,7 +63,6 @@ interface IFullTextSearchPlatform { */ public function getId(): string; - /** * Must returns a descriptive name of the Search Platform. * This is used mainly in the admin settings page to display the list of @@ -74,7 +74,6 @@ public function getId(): string; */ public function getName(): string; - /** * should returns the current configuration of the Search Platform. * This is used to display the configuration when using the @@ -86,7 +85,6 @@ public function getName(): string; */ public function getConfiguration(): array; - /** * Set the wrapper of the currently executed process. * Because the index process can be long and heavy, and because errors can @@ -103,7 +101,6 @@ public function getConfiguration(): array; */ public function setRunner(IRunner $runner); - /** * Called when FullTextSearch is loading your Search Platform. * @@ -111,7 +108,6 @@ public function setRunner(IRunner $runner); */ public function loadPlatform(); - /** * Called to check that your Search Platform is correctly configured and that * This is also the right place to check that the Search Service is available. @@ -122,7 +118,6 @@ public function loadPlatform(); */ public function testPlatform(): bool; - /** * Called before an index is initiated. * Best place to initiate some stuff on the Search Server (mapping, ...) @@ -131,7 +126,6 @@ public function testPlatform(): bool; */ public function initializeIndex(); - /** * Reset the indexes for a specific providerId. * $providerId can be 'all' if it is a global reset. @@ -142,7 +136,6 @@ public function initializeIndex(); */ public function resetIndex(string $providerId); - /** * Deleting some IIndex, sent in an array * @@ -154,7 +147,6 @@ public function resetIndex(string $providerId); */ public function deleteIndexes(array $indexes); - /** * Indexing a document. * @@ -168,7 +160,6 @@ public function deleteIndexes(array $indexes); */ public function indexDocument(IIndexDocument $document): IIndex; - /** * Searching documents, ISearchResult should be updated with the result of * the search. @@ -180,7 +171,6 @@ public function indexDocument(IIndexDocument $document): IIndex; */ public function searchRequest(ISearchResult $result, IDocumentAccess $access); - /** * Return a document based on its Id and the Provider. * This is used when an admin execute ./occ fulltextsearch:document:platform diff --git a/lib/public/FullTextSearch/IFullTextSearchProvider.php b/lib/public/FullTextSearch/IFullTextSearchProvider.php index b1ee3b662743c..2bd24238a7fd8 100644 --- a/lib/public/FullTextSearch/IFullTextSearchProvider.php +++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch; use OCP\FullTextSearch\Model\IIndex; @@ -62,7 +63,6 @@ interface IFullTextSearchProvider { */ public function getId(): string; - /** * Must returns a descriptive name of the Content Provider. * This is used in multiple places, so better use a clear display name. @@ -73,7 +73,6 @@ public function getId(): string; */ public function getName(): string; - /** * Should returns the current configuration of the Content Provider. * This is used to display the configuration when using the @@ -85,7 +84,6 @@ public function getName(): string; */ public function getConfiguration(): array; - /** * Must returns a ISearchTemplate that contains displayable items and * available options to users when searching. @@ -98,7 +96,6 @@ public function getConfiguration(): array; */ public function getSearchTemplate(): ISearchTemplate; - /** * Called when FullTextSearch is loading your Content Provider. * @@ -106,7 +103,6 @@ public function getSearchTemplate(): ISearchTemplate; */ public function loadProvider(); - /** * Set the wrapper of the currently executed process. * Because the index process can be long and heavy, and because errors can @@ -123,7 +119,6 @@ public function loadProvider(); */ public function setRunner(IRunner $runner); - /** * This method is called when the administrator specify options when running * the ./occ fulltextsearch:index or ./occ fulltextsearch:live @@ -134,7 +129,6 @@ public function setRunner(IRunner $runner); */ public function setIndexOptions(IIndexOptions $options); - /** * Allow the provider to generate a list of chunk to split a huge list of * indexable documents @@ -152,7 +146,6 @@ public function setIndexOptions(IIndexOptions $options); */ public function generateChunks(string $userId): array; - /** * Returns all indexable document for a user as an array of IIndexDocument. * @@ -178,7 +171,6 @@ public function generateChunks(string $userId): array; */ public function generateIndexableDocuments(string $userId, string $chunk): array; - /** * Called to verify that the document is not already indexed and that the * old index is not up-to-date, using the IIndex from @@ -196,7 +188,6 @@ public function generateIndexableDocuments(string $userId, string $chunk): array */ public function isDocumentUpToDate(IIndexDocument $document): bool; - /** * Must fill IIndexDocument with all information relative to the document, * before its indexing by the Search Platform. @@ -212,7 +203,6 @@ public function isDocumentUpToDate(IIndexDocument $document): bool; */ public function fillIndexDocument(IIndexDocument $document); - /** * The Search Provider must create and return an IIndexDocument * based on the IIndex and its status. The IIndexDocument must contains all @@ -229,7 +219,6 @@ public function fillIndexDocument(IIndexDocument $document); */ public function updateDocument(IIndex $index): IIndexDocument; - /** * Called when an index is initiated by the administrator. * This is should only be used in case of a specific mapping is needed. @@ -241,7 +230,6 @@ public function updateDocument(IIndex $index): IIndexDocument; */ public function onInitializingIndex(IFullTextSearchPlatform $platform); - /** * Called when administrator is resetting the index. * This is should only be used in case of a specific mapping has been @@ -253,7 +241,6 @@ public function onInitializingIndex(IFullTextSearchPlatform $platform); */ public function onResettingIndex(IFullTextSearchPlatform $platform); - /** * Method is called when a search request is initiated by a user, prior to * be sent to the Search Platform. @@ -269,7 +256,6 @@ public function onResettingIndex(IFullTextSearchPlatform $platform); */ public function improveSearchRequest(ISearchRequest $searchRequest); - /** * Method is called after results of a search are returned by the * Search Platform. @@ -285,7 +271,6 @@ public function improveSearchRequest(ISearchRequest $searchRequest); */ public function improveSearchResult(ISearchResult $searchResult); - /** * not used yet. * diff --git a/lib/public/FullTextSearch/Model/IDocumentAccess.php b/lib/public/FullTextSearch/Model/IDocumentAccess.php index 407f0f2bb289f..b7a71e27a42cc 100644 --- a/lib/public/FullTextSearch/Model/IDocumentAccess.php +++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -38,7 +39,6 @@ interface IDocumentAccess { */ public function __construct(string $ownerId = ''); - /** * Set the Owner of the document. * @@ -59,7 +59,6 @@ public function setOwnerId(string $ownerId): IDocumentAccess; */ public function getOwnerId(): string; - /** * Set the viewer of the document. * @@ -80,7 +79,6 @@ public function setViewerId(string $viewerId): IDocumentAccess; */ public function getViewerId(): string; - /** * Set the list of users that have read access to the document. * @@ -124,7 +122,6 @@ public function addUsers($users): IDocumentAccess; */ public function getUsers(): array; - /** * Set the list of groups that have read access to the document. * @@ -168,7 +165,6 @@ public function addGroups(array $groups); */ public function getGroups(): array; - /** * Set the list of circles that have read access to the document. * @@ -212,7 +208,6 @@ public function addCircles(array $circles): IDocumentAccess; */ public function getCircles(): array; - /** * Set the list of links that have read access to the document. * diff --git a/lib/public/FullTextSearch/Model/IIndex.php b/lib/public/FullTextSearch/Model/IIndex.php index 13aee916498ae..858c3a6d3b19d 100644 --- a/lib/public/FullTextSearch/Model/IIndex.php +++ b/lib/public/FullTextSearch/Model/IIndex.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -104,7 +105,6 @@ interface IIndex { */ public const ERROR_SEV_4 = 4; - /** * Get the Id of the Content Provider. * @@ -114,7 +114,6 @@ interface IIndex { */ public function getProviderId(): string; - /** * Get the Id of the original document. * @@ -124,7 +123,6 @@ public function getProviderId(): string; */ public function getDocumentId(): string; - /** * Get the collection of the index. * If empty (''), means collection is the default one used by the internal framework @@ -135,7 +133,6 @@ public function getDocumentId(): string; */ public function getCollection(): string; - /** * Set the source of the original document. * @@ -156,7 +153,6 @@ public function setSource(string $source): IIndex; */ public function getSource(): string; - /** * Set the owner of the original document. * @@ -177,7 +173,6 @@ public function setOwnerId(string $ownerId): IIndex; */ public function getOwnerId(): string; - /** * Set the current index status (bit flag) of the original document. * If $reset is true, the status is reset to the defined value. @@ -222,7 +217,6 @@ public function isStatus(int $status): bool; */ public function unsetStatus(int $status): IIndex; - /** * Add an option related to the original document (as string). * @@ -280,7 +274,6 @@ public function getOptionInt(string $option, int $default = 0): int; */ public function getOptions(): array; - /** * Add an error log related to the Index. * @@ -310,7 +303,6 @@ public function getErrorCount(): int; */ public function resetErrors(): IIndex; - /** * Set the date of the last index. * diff --git a/lib/public/FullTextSearch/Model/IIndexDocument.php b/lib/public/FullTextSearch/Model/IIndexDocument.php index ae93272d24617..7d0a65f0af0d0 100644 --- a/lib/public/FullTextSearch/Model/IIndexDocument.php +++ b/lib/public/FullTextSearch/Model/IIndexDocument.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -32,8 +33,6 @@ interface IIndexDocument { */ public const ENCODED_BASE64 = 1; - - /** * Returns the Id of the original document. * @@ -43,7 +42,6 @@ interface IIndexDocument { */ public function getId(): string; - /** * Returns the Id of the provider. * @@ -53,7 +51,6 @@ public function getId(): string; */ public function getProviderId(): string; - /** * Set the Index related to the IIndexDocument. * @@ -85,7 +82,6 @@ public function getIndex(): IIndex; */ public function hasIndex(): bool; - /** * Set the modified time of the original document. * @@ -117,7 +113,6 @@ public function getModifiedTime(): int; */ public function isOlderThan(int $time): bool; - /** * Set the read rights of the original document using a IDocumentAccess. * @@ -140,7 +135,6 @@ public function setAccess(IDocumentAccess $access): IIndexDocument; */ public function getAccess(): IDocumentAccess; - /** * Add a tag to the list. * @@ -172,7 +166,6 @@ public function setTags(array $tags): IIndexDocument; */ public function getTags(): array; - /** * Add a meta tag to the list. * @@ -204,7 +197,6 @@ public function setMetaTags(array $tags): IIndexDocument; */ public function getMetaTags(): array; - /** * Add a sub tag to the list. * @@ -241,7 +233,6 @@ public function setSubTags(array $tags): IIndexDocument; */ public function getSubTags(bool $formatted = false): array; - /** * Set the source of the original document. * @@ -262,7 +253,6 @@ public function setSource(string $source): IIndexDocument; */ public function getSource(): string; - /** * Set the title of the original document. * @@ -283,7 +273,6 @@ public function setTitle(string $title): IIndexDocument; */ public function getTitle(): string; - /** * Set the content of the document. * $encoded can be NOT_ENCODED or ENCODED_BASE64 if the content is raw or @@ -325,7 +314,6 @@ public function isContentEncoded(): int; */ public function getContentSize(): int; - /** * Generate an hash, based on the content of the original document. * @@ -355,7 +343,6 @@ public function setHash(string $hash): IIndexDocument; */ public function getHash(): string; - /** * Add a part, identified by a string, and its content. * @@ -391,7 +378,6 @@ public function setParts(array $parts): IIndexDocument; */ public function getParts(): array; - /** * Add a link, usable by the frontend. * @@ -412,7 +398,6 @@ public function setLink(string $link): IIndexDocument; */ public function getLink(): string; - /** * Set more information that couldn't be set using other method. * @@ -433,7 +418,6 @@ public function setMore(array $more): IIndexDocument; */ public function getMore(): array; - /** * Add some excerpt of the content of the original document, usually based * on the search request. @@ -467,7 +451,6 @@ public function setExcerpts(array $excerpts): IIndexDocument; */ public function getExcerpts(): array; - /** * Set the score to the result assigned to this document during a search * request. @@ -489,7 +472,6 @@ public function setScore(string $score): IIndexDocument; */ public function getScore(): string; - /** * Set some information about the original document that will be available * to the front-end when displaying search result. (as string) diff --git a/lib/public/FullTextSearch/Model/IIndexOptions.php b/lib/public/FullTextSearch/Model/IIndexOptions.php index 951da3b9a76f1..697555f542882 100644 --- a/lib/public/FullTextSearch/Model/IIndexOptions.php +++ b/lib/public/FullTextSearch/Model/IIndexOptions.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** diff --git a/lib/public/FullTextSearch/Model/IRunner.php b/lib/public/FullTextSearch/Model/IRunner.php index 3ea7de43dd7e8..5a5c7f08b8cde 100644 --- a/lib/public/FullTextSearch/Model/IRunner.php +++ b/lib/public/FullTextSearch/Model/IRunner.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -36,7 +37,6 @@ interface IRunner { */ public const RESULT_TYPE_FAIL = 9; - /** * Info are displayed in the user interface when an admin execute the * ./occ fulltextsearch:index command. @@ -57,7 +57,6 @@ interface IRunner { */ public function setInfo(string $info, string $value); - /** * This method should be used when editing multiple info to avoid too many * refresh of the interface. @@ -68,7 +67,6 @@ public function setInfo(string $info, string $value); */ public function setInfoArray(array $data); - /** * Method used to update the current Action when an index is running. * @@ -90,7 +88,6 @@ public function setInfoArray(array $data); */ public function updateAction(string $action = '', bool $force = false): string; - /** * Call this method in a Search Platform or Content Provider if there is an * issue while generating a document or while indexing the current document. @@ -106,7 +103,6 @@ public function updateAction(string $action = '', bool $force = false): string; */ public function newIndexError(IIndex $index, string $message, string $class = '', int $sev = 3); - /** * Call this method only in a Search Platform after an index of a document. * This is used to store and display results (good or bad) in the UI during diff --git a/lib/public/FullTextSearch/Model/ISearchOption.php b/lib/public/FullTextSearch/Model/ISearchOption.php index 50e2cb5010a0e..e0f828721b8e0 100644 --- a/lib/public/FullTextSearch/Model/ISearchOption.php +++ b/lib/public/FullTextSearch/Model/ISearchOption.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -29,7 +30,6 @@ interface ISearchOption { */ public const INPUT_SMALL = 'small'; - /** * Set the name/key of the option. * The string should only contains alphanumerical chars and underscore. @@ -54,7 +54,6 @@ public function setName(string $name): ISearchOption; */ public function getName(): string; - /** * Set the title/display name of the option. * @@ -75,7 +74,6 @@ public function setTitle(string $title): ISearchOption; */ public function getTitle(): string; - /** * Set the type of the option. * $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT @@ -97,7 +95,6 @@ public function setType(string $type): ISearchOption; */ public function getType(): string; - /** * In case of Type is INPUT, set the size of the input field. * Value can be ISearchOption::INPUT_SMALL or not defined. @@ -119,7 +116,6 @@ public function setSize(string $size): ISearchOption; */ public function getSize(): string; - /** * In case of Type is , set the placeholder to be displayed in the input * field. diff --git a/lib/public/FullTextSearch/Model/ISearchRequest.php b/lib/public/FullTextSearch/Model/ISearchRequest.php index 9dc9613c40722..16c30d8279cbe 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequest.php +++ b/lib/public/FullTextSearch/Model/ISearchRequest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -34,7 +35,6 @@ interface ISearchRequest { */ public function getSize(): int; - /** * Get the current page. * Used by pagination. @@ -45,7 +45,6 @@ public function getSize(): int; */ public function getPage(): int; - /** * Get the author of the request. * @@ -86,7 +85,6 @@ public function setSearch(string $search): ISearchRequest; */ public function addSearch(string $search): ISearchRequest; - /** * Get the value of an option (as string). * @@ -111,7 +109,6 @@ public function getOption(string $option, string $default = ''): string; */ public function getOptionArray(string $option, array $default = []): array; - /** * Limit the search to a part of the document. * @@ -143,7 +140,6 @@ public function setParts(array $parts): ISearchRequest; */ public function getParts(): array; - /** * Limit the search to a specific meta tag. * @@ -175,7 +171,6 @@ public function getMetaTags(): array; */ public function setMetaTags(array $tags): ISearchRequest; - /** * Limit the search to a specific sub tag. * @@ -210,7 +205,6 @@ public function getSubTags(bool $formatted): array; */ public function setSubTags(array $tags): ISearchRequest; - /** * Limit the search to a specific field of the mapping, using a full string. * @@ -231,7 +225,6 @@ public function addLimitField(string $field): ISearchRequest; */ public function getLimitFields(): array; - /** * Limit the search to a specific field of the mapping, using a wildcard on * the search string. @@ -253,7 +246,6 @@ public function addWildcardField(string $field): ISearchRequest; */ public function getWildcardFields(): array; - /** * Filter the results, based on a group of field, using regex * @@ -274,7 +266,6 @@ public function addRegexFilters(array $filters): ISearchRequest; */ public function getRegexFilters(): array; - /** * Filter the results, based on a group of field, using wildcard * @@ -295,7 +286,6 @@ public function addWildcardFilter(array $filter): ISearchRequest; */ public function getWildcardFilters(): array; - /** * Add an extra field to the search. * @@ -316,8 +306,6 @@ public function addField(string $field): ISearchRequest; */ public function getFields(): array; - - /** * Add a MUST search on an extra field * @@ -328,7 +316,6 @@ public function getFields(): array; */ public function addSimpleQuery(ISearchRequestSimpleQuery $query): ISearchRequest; - /** * Get the list of queries on extra field. * diff --git a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php index 3a6217398b60d..7e6e1627b90eb 100644 --- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php +++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; /** @@ -74,7 +75,6 @@ interface ISearchRequestSimpleQuery { */ public const COMPARE_TYPE_WILDCARD = 11; - /** * Get the compare type of the query * @@ -83,7 +83,6 @@ interface ISearchRequestSimpleQuery { */ public function getType(): int; - /** * Get the field to apply query * @@ -102,7 +101,6 @@ public function getField(): string; */ public function setField(string $field): ISearchRequestSimpleQuery; - /** * Get the all values to compare * diff --git a/lib/public/FullTextSearch/Model/ISearchResult.php b/lib/public/FullTextSearch/Model/ISearchResult.php index cf902835a4c1b..506d43c5c77ab 100644 --- a/lib/public/FullTextSearch/Model/ISearchResult.php +++ b/lib/public/FullTextSearch/Model/ISearchResult.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; use OCP\FullTextSearch\IFullTextSearchProvider; @@ -48,7 +49,6 @@ public function getRequest(): ISearchRequest; */ public function getProvider(): IFullTextSearchProvider; - /** * Add an IIndexDocument as one of the result of the search request. * @@ -80,7 +80,6 @@ public function getDocuments(): array; */ public function setDocuments(array $documents): ISearchResult; - /** * Add an aggregation to the result. * @@ -105,7 +104,6 @@ public function addAggregation(string $category, string $value, int $count): ISe */ public function getAggregations(string $category): array; - /** * Set the raw result of the request. * @@ -117,7 +115,6 @@ public function getAggregations(string $category): array; */ public function setRawResult(string $result): ISearchResult; - /** * Set the total number of results for the search request. * Used by pagination. @@ -130,7 +127,6 @@ public function setRawResult(string $result): ISearchResult; */ public function setTotal(int $total): ISearchResult; - /** * Set the top score for the search request. * @@ -142,7 +138,6 @@ public function setTotal(int $total): ISearchResult; */ public function setMaxScore(int $score): ISearchResult; - /** * Set the time spent by the request to perform the search. * @@ -154,7 +149,6 @@ public function setMaxScore(int $score): ISearchResult; */ public function setTime(int $time): ISearchResult; - /** * Set to true if the request timed out. * diff --git a/lib/public/FullTextSearch/Model/ISearchTemplate.php b/lib/public/FullTextSearch/Model/ISearchTemplate.php index 89f683ca013bf..20a2e1c415869 100644 --- a/lib/public/FullTextSearch/Model/ISearchTemplate.php +++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Model; use OCP\FullTextSearch\IFullTextSearchProvider; @@ -55,7 +56,6 @@ public function setIcon(string $class): ISearchTemplate; */ public function getIcon(): string; - /** * Set the path of a CSS file that will be loaded when needed. * @@ -76,7 +76,6 @@ public function setCss(string $css): ISearchTemplate; */ public function getCss(): string; - /** * Set the path of the file of a template that the HTML will be displayed * below the Options. @@ -100,7 +99,6 @@ public function setTemplate(string $template): ISearchTemplate; */ public function getTemplate(): string; - /** * Add an option in the Panel that is displayed when the user start a search * within the app that generate the content. @@ -124,7 +122,6 @@ public function addPanelOption(ISearchOption $option): ISearchTemplate; */ public function getPanelOptions(): array; - /** * Add an option in the left panel of the FullTextSearch navigation page. * diff --git a/lib/public/FullTextSearch/Service/IIndexService.php b/lib/public/FullTextSearch/Service/IIndexService.php index c4d1a9f81723f..3dc29d0cfc2c3 100644 --- a/lib/public/FullTextSearch/Service/IIndexService.php +++ b/lib/public/FullTextSearch/Service/IIndexService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Service; use OCP\FullTextSearch\Model\IIndex; @@ -30,7 +31,6 @@ interface IIndexService { */ public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex; - /** * Retrieve an Index from the database, based on the Id of the Provider * and the Id of the Document @@ -44,7 +44,6 @@ public function createIndex(string $providerId, string $documentId, string $user */ public function getIndex(string $providerId, string $documentId): IIndex; - /** * Update the status of an Index. status is a bit flag, setting $reset to * true will reset the status to the value defined in the parameter. @@ -58,7 +57,6 @@ public function getIndex(string $providerId, string $documentId): IIndex; */ public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); - /** * Update the status of an array of Index. status is a bit flag, setting $reset to * true will reset the status to the value defined in the parameter. @@ -72,7 +70,6 @@ public function updateIndexStatus(string $providerId, string $documentId, int $s */ public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false); - /** * Update an array of Index. * diff --git a/lib/public/FullTextSearch/Service/IProviderService.php b/lib/public/FullTextSearch/Service/IProviderService.php index e6036b1eb7d56..70269150b2c55 100644 --- a/lib/public/FullTextSearch/Service/IProviderService.php +++ b/lib/public/FullTextSearch/Service/IProviderService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Service; /** @@ -26,7 +27,6 @@ interface IProviderService { */ public function isProviderIndexed(string $providerId); - /** * Add the Javascript API in the navigation page of an app. * diff --git a/lib/public/FullTextSearch/Service/ISearchService.php b/lib/public/FullTextSearch/Service/ISearchService.php index ab3ec953789b7..e97f252483809 100644 --- a/lib/public/FullTextSearch/Service/ISearchService.php +++ b/lib/public/FullTextSearch/Service/ISearchService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\FullTextSearch\Service; use OCP\FullTextSearch\Model\ISearchRequest; @@ -45,7 +46,6 @@ interface ISearchService { */ public function generateSearchRequest(array $request): ISearchRequest; - /** * Search documents * diff --git a/lib/public/GlobalScale/IConfig.php b/lib/public/GlobalScale/IConfig.php index 38efce4b8b55e..1936e7912dcde 100644 --- a/lib/public/GlobalScale/IConfig.php +++ b/lib/public/GlobalScale/IConfig.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\GlobalScale; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Group/Backend/ABackend.php b/lib/public/Group/Backend/ABackend.php index 37605d58a5ef7..93c7a21070319 100644 --- a/lib/public/Group/Backend/ABackend.php +++ b/lib/public/Group/Backend/ABackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; use OCP\GroupInterface; diff --git a/lib/public/Group/Backend/IAddToGroupBackend.php b/lib/public/Group/Backend/IAddToGroupBackend.php index 011cd438bd78d..eab757f313dcb 100644 --- a/lib/public/Group/Backend/IAddToGroupBackend.php +++ b/lib/public/Group/Backend/IAddToGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IBatchMethodsBackend.php b/lib/public/Group/Backend/IBatchMethodsBackend.php index 5853447d5e9f4..9ed8248d5698b 100644 --- a/lib/public/Group/Backend/IBatchMethodsBackend.php +++ b/lib/public/Group/Backend/IBatchMethodsBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICountDisabledInGroup.php b/lib/public/Group/Backend/ICountDisabledInGroup.php index 021ebcf961249..cb1316c21a711 100644 --- a/lib/public/Group/Backend/ICountDisabledInGroup.php +++ b/lib/public/Group/Backend/ICountDisabledInGroup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICountUsersBackend.php b/lib/public/Group/Backend/ICountUsersBackend.php index 6afa49a8b4de2..d6001eaca1bcb 100644 --- a/lib/public/Group/Backend/ICountUsersBackend.php +++ b/lib/public/Group/Backend/ICountUsersBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICreateGroupBackend.php b/lib/public/Group/Backend/ICreateGroupBackend.php index 405d0f0a8533f..e7412c8418c40 100644 --- a/lib/public/Group/Backend/ICreateGroupBackend.php +++ b/lib/public/Group/Backend/ICreateGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ICreateNamedGroupBackend.php b/lib/public/Group/Backend/ICreateNamedGroupBackend.php index 25cef4f868771..d2bfd80596d59 100644 --- a/lib/public/Group/Backend/ICreateNamedGroupBackend.php +++ b/lib/public/Group/Backend/ICreateNamedGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IDeleteGroupBackend.php b/lib/public/Group/Backend/IDeleteGroupBackend.php index 5e2d3f5e52b99..59fe5b629b571 100644 --- a/lib/public/Group/Backend/IDeleteGroupBackend.php +++ b/lib/public/Group/Backend/IDeleteGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IGetDisplayNameBackend.php b/lib/public/Group/Backend/IGetDisplayNameBackend.php index 0f11dd67bb72c..6a5daefcc0785 100644 --- a/lib/public/Group/Backend/IGetDisplayNameBackend.php +++ b/lib/public/Group/Backend/IGetDisplayNameBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IGroupDetailsBackend.php b/lib/public/Group/Backend/IGroupDetailsBackend.php index a2830849f6c76..ae78cec16cef2 100644 --- a/lib/public/Group/Backend/IGroupDetailsBackend.php +++ b/lib/public/Group/Backend/IGroupDetailsBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IHideFromCollaborationBackend.php b/lib/public/Group/Backend/IHideFromCollaborationBackend.php index 605de213c284a..28e3572da7fea 100644 --- a/lib/public/Group/Backend/IHideFromCollaborationBackend.php +++ b/lib/public/Group/Backend/IHideFromCollaborationBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IIsAdminBackend.php b/lib/public/Group/Backend/IIsAdminBackend.php index ed299961dc277..1044e9d404a56 100644 --- a/lib/public/Group/Backend/IIsAdminBackend.php +++ b/lib/public/Group/Backend/IIsAdminBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/INamedBackend.php b/lib/public/Group/Backend/INamedBackend.php index d98cc8cdb8393..d7ab0828e0acb 100644 --- a/lib/public/Group/Backend/INamedBackend.php +++ b/lib/public/Group/Backend/INamedBackend.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/IRemoveFromGroupBackend.php b/lib/public/Group/Backend/IRemoveFromGroupBackend.php index e4862feb2f2f5..0bc6ac76c2899 100644 --- a/lib/public/Group/Backend/IRemoveFromGroupBackend.php +++ b/lib/public/Group/Backend/IRemoveFromGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Backend/ISearchableGroupBackend.php b/lib/public/Group/Backend/ISearchableGroupBackend.php index e9909fcdba070..9fecf7e41f0f2 100644 --- a/lib/public/Group/Backend/ISearchableGroupBackend.php +++ b/lib/public/Group/Backend/ISearchableGroupBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; use OCP\IUser; diff --git a/lib/public/Group/Backend/ISetDisplayNameBackend.php b/lib/public/Group/Backend/ISetDisplayNameBackend.php index d0875e84768d5..70deb49b65dd8 100644 --- a/lib/public/Group/Backend/ISetDisplayNameBackend.php +++ b/lib/public/Group/Backend/ISetDisplayNameBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Backend; /** diff --git a/lib/public/Group/Events/BeforeGroupChangedEvent.php b/lib/public/Group/Events/BeforeGroupChangedEvent.php index 7fb46b8ce6d9f..6ddcd42d0e3ee 100644 --- a/lib/public/Group/Events/BeforeGroupChangedEvent.php +++ b/lib/public/Group/Events/BeforeGroupChangedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeGroupCreatedEvent.php b/lib/public/Group/Events/BeforeGroupCreatedEvent.php index 2f197d6a08800..eb43304df82ce 100644 --- a/lib/public/Group/Events/BeforeGroupCreatedEvent.php +++ b/lib/public/Group/Events/BeforeGroupCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeGroupDeletedEvent.php b/lib/public/Group/Events/BeforeGroupDeletedEvent.php index 3c8f83440c7f0..48fbb629a6279 100644 --- a/lib/public/Group/Events/BeforeGroupDeletedEvent.php +++ b/lib/public/Group/Events/BeforeGroupDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeUserAddedEvent.php b/lib/public/Group/Events/BeforeUserAddedEvent.php index 0919811253924..1bac10bb5dd82 100644 --- a/lib/public/Group/Events/BeforeUserAddedEvent.php +++ b/lib/public/Group/Events/BeforeUserAddedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/BeforeUserRemovedEvent.php b/lib/public/Group/Events/BeforeUserRemovedEvent.php index 50d34e0c7cf5f..3c661f1285e6f 100644 --- a/lib/public/Group/Events/BeforeUserRemovedEvent.php +++ b/lib/public/Group/Events/BeforeUserRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/GroupChangedEvent.php b/lib/public/Group/Events/GroupChangedEvent.php index c9fd12b8c3a6d..b8206f9d943aa 100644 --- a/lib/public/Group/Events/GroupChangedEvent.php +++ b/lib/public/Group/Events/GroupChangedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/GroupCreatedEvent.php b/lib/public/Group/Events/GroupCreatedEvent.php index 106f57c715423..44293f5a63a48 100644 --- a/lib/public/Group/Events/GroupCreatedEvent.php +++ b/lib/public/Group/Events/GroupCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/GroupDeletedEvent.php b/lib/public/Group/Events/GroupDeletedEvent.php index b651f5cdfa915..5f6ddfcd731b7 100644 --- a/lib/public/Group/Events/GroupDeletedEvent.php +++ b/lib/public/Group/Events/GroupDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/SubAdminAddedEvent.php b/lib/public/Group/Events/SubAdminAddedEvent.php index cb1caebdb7752..5eb4131afcdee 100644 --- a/lib/public/Group/Events/SubAdminAddedEvent.php +++ b/lib/public/Group/Events/SubAdminAddedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/SubAdminRemovedEvent.php b/lib/public/Group/Events/SubAdminRemovedEvent.php index 1d76d05cc582d..c8b8ea5627c68 100644 --- a/lib/public/Group/Events/SubAdminRemovedEvent.php +++ b/lib/public/Group/Events/SubAdminRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/UserAddedEvent.php b/lib/public/Group/Events/UserAddedEvent.php index 0c15d2b5c05ee..367e168b8d098 100644 --- a/lib/public/Group/Events/UserAddedEvent.php +++ b/lib/public/Group/Events/UserAddedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/Events/UserRemovedEvent.php b/lib/public/Group/Events/UserRemovedEvent.php index c1d6bb3cda26c..7b88f31f95cd6 100644 --- a/lib/public/Group/Events/UserRemovedEvent.php +++ b/lib/public/Group/Events/UserRemovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Group/ISubAdmin.php b/lib/public/Group/ISubAdmin.php index ed4ef1fa92687..e70ed3b31d615 100644 --- a/lib/public/Group/ISubAdmin.php +++ b/lib/public/Group/ISubAdmin.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Group; use OCP\IGroup; diff --git a/lib/public/HintException.php b/lib/public/HintException.php index 9dcba50674118..e246befe22f15 100644 --- a/lib/public/HintException.php +++ b/lib/public/HintException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/Http/Client/IClient.php b/lib/public/Http/Client/IClient.php index db675b277cd4b..b83c97cc6d371 100644 --- a/lib/public/Http/Client/IClient.php +++ b/lib/public/Http/Client/IClient.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Http\Client; use Psr\Http\Client\ClientInterface; diff --git a/lib/public/Http/Client/IClientService.php b/lib/public/Http/Client/IClientService.php index 148757e5b3198..12edf3dcf840e 100644 --- a/lib/public/Http/Client/IClientService.php +++ b/lib/public/Http/Client/IClientService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Http\Client; /** diff --git a/lib/public/Http/Client/IPromise.php b/lib/public/Http/Client/IPromise.php index 8778829af0e6b..a3fa51abe6488 100644 --- a/lib/public/Http/Client/IPromise.php +++ b/lib/public/Http/Client/IPromise.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\Client; use Exception; diff --git a/lib/public/Http/Client/IResponse.php b/lib/public/Http/Client/IResponse.php index 53032ef2a3772..4932acc2e9986 100644 --- a/lib/public/Http/Client/IResponse.php +++ b/lib/public/Http/Client/IResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Http\Client; /** diff --git a/lib/public/Http/Client/LocalServerException.php b/lib/public/Http/Client/LocalServerException.php index 1becf3d77c9db..dca0bd68b0286 100644 --- a/lib/public/Http/Client/LocalServerException.php +++ b/lib/public/Http/Client/LocalServerException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\Client; use Psr\Http\Client\ClientExceptionInterface; diff --git a/lib/public/Http/WellKnown/GenericResponse.php b/lib/public/Http/WellKnown/GenericResponse.php index 99a238d72e329..cadaf8fee3f63 100644 --- a/lib/public/Http/WellKnown/GenericResponse.php +++ b/lib/public/Http/WellKnown/GenericResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\Response; diff --git a/lib/public/Http/WellKnown/IHandler.php b/lib/public/Http/WellKnown/IHandler.php index 274d0241969df..eb68f27a2ba6b 100644 --- a/lib/public/Http/WellKnown/IHandler.php +++ b/lib/public/Http/WellKnown/IHandler.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\WellKnown; /** diff --git a/lib/public/Http/WellKnown/IRequestContext.php b/lib/public/Http/WellKnown/IRequestContext.php index 241a9069904a9..ada0e976391d4 100644 --- a/lib/public/Http/WellKnown/IRequestContext.php +++ b/lib/public/Http/WellKnown/IRequestContext.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\WellKnown; use OCP\IRequest; diff --git a/lib/public/Http/WellKnown/IResponse.php b/lib/public/Http/WellKnown/IResponse.php index 2cf63043b6360..1e3d826b4db34 100644 --- a/lib/public/Http/WellKnown/IResponse.php +++ b/lib/public/Http/WellKnown/IResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\Response; diff --git a/lib/public/Http/WellKnown/JrdResponse.php b/lib/public/Http/WellKnown/JrdResponse.php index d7eb3dfdf2e95..3b10048f43330 100644 --- a/lib/public/Http/WellKnown/JrdResponse.php +++ b/lib/public/Http/WellKnown/JrdResponse.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Http\WellKnown; use OCP\AppFramework\Http\JSONResponse; diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php index eb89680767dc5..790ce30d70a2b 100644 --- a/lib/public/IAppConfig.php +++ b/lib/public/IAppConfig.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\Config\ValueType; diff --git a/lib/public/IAvatar.php b/lib/public/IAvatar.php index f45af4828375d..fc19eb41af9b5 100644 --- a/lib/public/IAvatar.php +++ b/lib/public/IAvatar.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\Files\NotFoundException; diff --git a/lib/public/IAvatarManager.php b/lib/public/IAvatarManager.php index 2a8733eff5a0c..049a02e5da776 100644 --- a/lib/public/IAvatarManager.php +++ b/lib/public/IAvatarManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/ICacheFactory.php b/lib/public/ICacheFactory.php index d12be3fd4bca2..9a677ca91f77f 100644 --- a/lib/public/ICacheFactory.php +++ b/lib/public/ICacheFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/ICertificate.php b/lib/public/ICertificate.php index 29081337ebf38..eea088271f864 100644 --- a/lib/public/ICertificate.php +++ b/lib/public/ICertificate.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/ICertificateManager.php b/lib/public/ICertificateManager.php index be4afc799fa63..7adc796ba9b99 100644 --- a/lib/public/ICertificateManager.php +++ b/lib/public/ICertificateManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IConfig.php b/lib/public/IConfig.php index 4734f40cb3f7d..30696af8d5f1b 100644 --- a/lib/public/IConfig.php +++ b/lib/public/IConfig.php @@ -152,7 +152,6 @@ public function deleteAppValue($appName, $key); */ public function deleteAppValues($appName); - /** * Set a user defined value * diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php index 0f91a9990d6ad..dc1c872f4aa84 100644 --- a/lib/public/IContainer.php +++ b/lib/public/IContainer.php @@ -9,6 +9,7 @@ */ // use OCP namespace for all classes that are considered public. // This means that they should be used by apps instead of the internal Nextcloud classes + namespace OCP; use Closure; diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index 4526f71ceeb47..d526d3d0b7792 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -159,7 +159,6 @@ public function lastInsertId(string $table): int; */ public function insertIfNotExist(string $table, array $input, ?array $compare = null); - /** * * Insert a row if the row does not exist. Eventual conflicts during insert will be ignored. diff --git a/lib/public/IDateTimeFormatter.php b/lib/public/IDateTimeFormatter.php index 2d47e1182c2d5..fd30df28fbf57 100644 --- a/lib/public/IDateTimeFormatter.php +++ b/lib/public/IDateTimeFormatter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IDateTimeZone.php b/lib/public/IDateTimeZone.php index 32b3903b81200..5572cd6f88873 100644 --- a/lib/public/IDateTimeZone.php +++ b/lib/public/IDateTimeZone.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/IEventSource.php b/lib/public/IEventSource.php index 6b63b0f15aaf9..bf651ed435877 100644 --- a/lib/public/IEventSource.php +++ b/lib/public/IEventSource.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IEventSourceFactory.php b/lib/public/IEventSourceFactory.php index 0f6b447c0af56..7cb4091962847 100644 --- a/lib/public/IEventSourceFactory.php +++ b/lib/public/IEventSourceFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/IGroup.php b/lib/public/IGroup.php index 3c53fa666ef62..ff98cfc8d4c07 100644 --- a/lib/public/IGroup.php +++ b/lib/public/IGroup.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IGroupManager.php b/lib/public/IGroupManager.php index 93013e72891b0..d0ca043e923aa 100644 --- a/lib/public/IGroupManager.php +++ b/lib/public/IGroupManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IImage.php b/lib/public/IImage.php index 7ba08c889dae5..acd7ff244ec94 100644 --- a/lib/public/IImage.php +++ b/lib/public/IImage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use GdImage; diff --git a/lib/public/IInitialStateService.php b/lib/public/IInitialStateService.php index 6c482c2cf20a7..b24f1b857ae27 100644 --- a/lib/public/IInitialStateService.php +++ b/lib/public/IInitialStateService.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; use Closure; diff --git a/lib/public/IL10N.php b/lib/public/IL10N.php index c4a64e371749c..fcb4a1f915ce5 100644 --- a/lib/public/IL10N.php +++ b/lib/public/IL10N.php @@ -74,7 +74,6 @@ public function n(string $text_singular, string $text_plural, int $count, array */ public function l(string $type, $data, array $options = []); - /** * The code (en, de, ...) of the language that is used for this IL10N object * diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php index 54f9ffeca9a3f..c34de1608c37d 100644 --- a/lib/public/ILogger.php +++ b/lib/public/ILogger.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IMemcacheTTL.php b/lib/public/IMemcacheTTL.php index 3fc171b912063..5f70bc3b8ebb2 100644 --- a/lib/public/IMemcacheTTL.php +++ b/lib/public/IMemcacheTTL.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IPhoneNumberUtil.php b/lib/public/IPhoneNumberUtil.php index 8909d306c7405..0f31dbd2b6179 100644 --- a/lib/public/IPhoneNumberUtil.php +++ b/lib/public/IPhoneNumberUtil.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/IRequest.php b/lib/public/IRequest.php index 913ecbdd4cd1d..1ca66c646e830 100644 --- a/lib/public/IRequest.php +++ b/lib/public/IRequest.php @@ -119,7 +119,6 @@ public function getHeader(string $name): string; */ public function getParam(string $key, $default = null); - /** * Returns all params that were received, be it from the request * @@ -149,7 +148,6 @@ public function getMethod(): string; */ public function getUploadedFile(string $key); - /** * Shortcut for getting env variables * @@ -159,7 +157,6 @@ public function getUploadedFile(string $key); */ public function getEnv(string $key); - /** * Shortcut for getting cookie variables * @@ -171,7 +168,6 @@ public function getEnv(string $key); */ public function getCookie(string $key); - /** * Checks if the CSRF check was correct * diff --git a/lib/public/IRequestId.php b/lib/public/IRequestId.php index 7c5a57716100d..fdbebfe2fc7f7 100644 --- a/lib/public/IRequestId.php +++ b/lib/public/IRequestId.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php index 4580c3890cc48..64e559667982c 100644 --- a/lib/public/IServerContainer.php +++ b/lib/public/IServerContainer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use Psr\Container\ContainerInterface; diff --git a/lib/public/IStreamImage.php b/lib/public/IStreamImage.php index 79b718fc291d4..ff96a1ecacc44 100644 --- a/lib/public/IStreamImage.php +++ b/lib/public/IStreamImage.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; /** diff --git a/lib/public/ITempManager.php b/lib/public/ITempManager.php index ac8f829f35751..45ed2e77c2a1b 100644 --- a/lib/public/ITempManager.php +++ b/lib/public/ITempManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** diff --git a/lib/public/IURLGenerator.php b/lib/public/IURLGenerator.php index e9a54f371f52b..46fcc6081ce81 100644 --- a/lib/public/IURLGenerator.php +++ b/lib/public/IURLGenerator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\AppFramework\Attribute\Consumable; @@ -84,7 +85,6 @@ public function linkTo(string $appName, string $file, array $args = []): string; */ public function imagePath(string $appName, string $file): string; - /** * Makes an URL absolute * @param string $url the url in the ownCloud host diff --git a/lib/public/IUser.php b/lib/public/IUser.php index 399be67789b4e..5a06577fde7d1 100644 --- a/lib/public/IUser.php +++ b/lib/public/IUser.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use InvalidArgumentException; diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php index f19685903baaf..863b000e9d4ad 100644 --- a/lib/public/IUserManager.php +++ b/lib/public/IUserManager.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; /** @@ -267,7 +268,6 @@ public function getSeenUsers(int $offset = 0, ?int $limit = null): \Iterator; */ public function getExistingUser(string $userId, ?string $displayName = null): IUser; - /** * @param 64|512 $size * @return non-empty-string diff --git a/lib/public/Install/Events/InstallationCompletedEvent.php b/lib/public/Install/Events/InstallationCompletedEvent.php index 7cf75d76d6fce..04a5ea2dd0a0e 100644 --- a/lib/public/Install/Events/InstallationCompletedEvent.php +++ b/lib/public/Install/Events/InstallationCompletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Install\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php index aebd318dfad2c..4217ff5e4cbff 100644 --- a/lib/public/L10N/IFactory.php +++ b/lib/public/L10N/IFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\L10N; use OCP\IUser; diff --git a/lib/public/L10N/ILanguageIterator.php b/lib/public/L10N/ILanguageIterator.php index f327923c7ada0..621ca4a072b1a 100644 --- a/lib/public/L10N/ILanguageIterator.php +++ b/lib/public/L10N/ILanguageIterator.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\L10N; /** diff --git a/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php b/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php index 35fca39f5eb3c..0d95b312a9e49 100644 --- a/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php +++ b/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\LDAP\Exceptions; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Lock/ILockingProvider.php b/lib/public/Lock/ILockingProvider.php index c92883a1377c3..3b412349ce775 100644 --- a/lib/public/Lock/ILockingProvider.php +++ b/lib/public/Lock/ILockingProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Lock; /** diff --git a/lib/public/Lock/LockedException.php b/lib/public/Lock/LockedException.php index 799886a2dbb24..f7d9df1f894d9 100644 --- a/lib/public/Lock/LockedException.php +++ b/lib/public/Lock/LockedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Lock; /** diff --git a/lib/public/Lock/ManuallyLockedException.php b/lib/public/Lock/ManuallyLockedException.php index 4a70c52011e8c..203191b989b9e 100644 --- a/lib/public/Lock/ManuallyLockedException.php +++ b/lib/public/Lock/ManuallyLockedException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Lock; /** @@ -28,7 +29,6 @@ class ManuallyLockedException extends LockedException { */ private $timeout = -1; - /** * ManuallyLockedException constructor. * @@ -46,7 +46,6 @@ public function __construct(string $path, ?\Exception $previous = null, ?string $this->timeout = $timeout; } - /** * @return int * @since 18.0.0 diff --git a/lib/public/Lockdown/ILockdownManager.php b/lib/public/Lockdown/ILockdownManager.php index fe8adaecf91fe..2d64e7125e06d 100644 --- a/lib/public/Lockdown/ILockdownManager.php +++ b/lib/public/Lockdown/ILockdownManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Lockdown; use OC\Authentication\Token\IToken; diff --git a/lib/public/Log/Audit/CriticalActionPerformedEvent.php b/lib/public/Log/Audit/CriticalActionPerformedEvent.php index da7bdda8c73ac..dbee799f5c5fe 100644 --- a/lib/public/Log/Audit/CriticalActionPerformedEvent.php +++ b/lib/public/Log/Audit/CriticalActionPerformedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log\Audit; use OCP\EventDispatcher\Event; diff --git a/lib/public/Log/BeforeMessageLoggedEvent.php b/lib/public/Log/BeforeMessageLoggedEvent.php index 8500a769bca16..4706019c7e0d1 100644 --- a/lib/public/Log/BeforeMessageLoggedEvent.php +++ b/lib/public/Log/BeforeMessageLoggedEvent.php @@ -42,7 +42,6 @@ public function getLevel(): int { return $this->level; } - /** * Get the app context of the log item * @@ -53,7 +52,6 @@ public function getApp(): string { return $this->app; } - /** * Get the message of the log item * diff --git a/lib/public/Log/IDataLogger.php b/lib/public/Log/IDataLogger.php index c3334d0bf1230..6d752c3c0078c 100644 --- a/lib/public/Log/IDataLogger.php +++ b/lib/public/Log/IDataLogger.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log; /** diff --git a/lib/public/Log/IFileBased.php b/lib/public/Log/IFileBased.php index ace10ee1b68ba..eefa0644ed5ac 100644 --- a/lib/public/Log/IFileBased.php +++ b/lib/public/Log/IFileBased.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log; /** diff --git a/lib/public/Log/ILogFactory.php b/lib/public/Log/ILogFactory.php index db7adca2192e9..ed6135bada417 100644 --- a/lib/public/Log/ILogFactory.php +++ b/lib/public/Log/ILogFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log; use Psr\Log\LoggerInterface; diff --git a/lib/public/Log/IWriter.php b/lib/public/Log/IWriter.php index 2fcbc094881cb..0ac8a83ff4644 100644 --- a/lib/public/Log/IWriter.php +++ b/lib/public/Log/IWriter.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log; /** diff --git a/lib/public/Log/RotationTrait.php b/lib/public/Log/RotationTrait.php index 73b3b16b665e5..0287b5879f24e 100644 --- a/lib/public/Log/RotationTrait.php +++ b/lib/public/Log/RotationTrait.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Log; /** diff --git a/lib/public/Mail/Events/BeforeMessageSent.php b/lib/public/Mail/Events/BeforeMessageSent.php index f528bd1140929..2d95ec6e0083d 100644 --- a/lib/public/Mail/Events/BeforeMessageSent.php +++ b/lib/public/Mail/Events/BeforeMessageSent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Mail/Headers/AutoSubmitted.php b/lib/public/Mail/Headers/AutoSubmitted.php index 1191628d401a8..064bdee02e814 100644 --- a/lib/public/Mail/Headers/AutoSubmitted.php +++ b/lib/public/Mail/Headers/AutoSubmitted.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Headers; /** diff --git a/lib/public/Mail/IAttachment.php b/lib/public/Mail/IAttachment.php index f58a5771cc245..9fb03ad8685fe 100644 --- a/lib/public/Mail/IAttachment.php +++ b/lib/public/Mail/IAttachment.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail; /** diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php index 66379abd8ae41..de75c97730317 100644 --- a/lib/public/Mail/IEMailTemplate.php +++ b/lib/public/Mail/IEMailTemplate.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail; /** diff --git a/lib/public/Mail/IMailer.php b/lib/public/Mail/IMailer.php index bdef34c2e3651..6ccee5b78f9c8 100644 --- a/lib/public/Mail/IMailer.php +++ b/lib/public/Mail/IMailer.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Mail; /** diff --git a/lib/public/Mail/IMessage.php b/lib/public/Mail/IMessage.php index c3d1d047478a8..69c9fc1e093ec 100644 --- a/lib/public/Mail/IMessage.php +++ b/lib/public/Mail/IMessage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail; /** diff --git a/lib/public/Mail/Provider/Address.php b/lib/public/Mail/Provider/Address.php index 7051335410945..28bc31b662cf1 100644 --- a/lib/public/Mail/Provider/Address.php +++ b/lib/public/Mail/Provider/Address.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/Attachment.php b/lib/public/Mail/Provider/Attachment.php index 8b8b2b9cac732..5b1df7617bbd3 100644 --- a/lib/public/Mail/Provider/Attachment.php +++ b/lib/public/Mail/Provider/Attachment.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/Exception/Exception.php b/lib/public/Mail/Provider/Exception/Exception.php index 7514c72a86969..da0e459ac59c6 100644 --- a/lib/public/Mail/Provider/Exception/Exception.php +++ b/lib/public/Mail/Provider/Exception/Exception.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider\Exception; /** diff --git a/lib/public/Mail/Provider/Exception/SendException.php b/lib/public/Mail/Provider/Exception/SendException.php index fba0903cbb37e..17382f37e4c0a 100644 --- a/lib/public/Mail/Provider/Exception/SendException.php +++ b/lib/public/Mail/Provider/Exception/SendException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider\Exception; /** diff --git a/lib/public/Mail/Provider/IAddress.php b/lib/public/Mail/Provider/IAddress.php index 47bb91489684a..2969effa15cd9 100644 --- a/lib/public/Mail/Provider/IAddress.php +++ b/lib/public/Mail/Provider/IAddress.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IAttachment.php b/lib/public/Mail/Provider/IAttachment.php index ff26699491920..53d5b0deb74df 100644 --- a/lib/public/Mail/Provider/IAttachment.php +++ b/lib/public/Mail/Provider/IAttachment.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IManager.php b/lib/public/Mail/Provider/IManager.php index b55fed3f26f86..58af66b829d49 100644 --- a/lib/public/Mail/Provider/IManager.php +++ b/lib/public/Mail/Provider/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IMessage.php b/lib/public/Mail/Provider/IMessage.php index 599d9b0566dbc..f312e66f3225c 100644 --- a/lib/public/Mail/Provider/IMessage.php +++ b/lib/public/Mail/Provider/IMessage.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IMessageSend.php b/lib/public/Mail/Provider/IMessageSend.php index fe1b2884452a0..22b44ffeb596a 100644 --- a/lib/public/Mail/Provider/IMessageSend.php +++ b/lib/public/Mail/Provider/IMessageSend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IProvider.php b/lib/public/Mail/Provider/IProvider.php index d89022d7cbf2b..91270a0ab11a4 100644 --- a/lib/public/Mail/Provider/IProvider.php +++ b/lib/public/Mail/Provider/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/IService.php b/lib/public/Mail/Provider/IService.php index e0bb5161aa669..17c5548ae7e7d 100644 --- a/lib/public/Mail/Provider/IService.php +++ b/lib/public/Mail/Provider/IService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Mail/Provider/Message.php b/lib/public/Mail/Provider/Message.php index 4251450bf8467..8601e9bcb0dc4 100644 --- a/lib/public/Mail/Provider/Message.php +++ b/lib/public/Mail/Provider/Message.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Mail\Provider; /** diff --git a/lib/public/Migration/Attributes/AddColumn.php b/lib/public/Migration/Attributes/AddColumn.php index ba9cd45ef4c3f..cb30f2adeb55c 100644 --- a/lib/public/Migration/Attributes/AddColumn.php +++ b/lib/public/Migration/Attributes/AddColumn.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/AddIndex.php b/lib/public/Migration/Attributes/AddIndex.php index 698eaa53a7002..1b5a9de0f2341 100644 --- a/lib/public/Migration/Attributes/AddIndex.php +++ b/lib/public/Migration/Attributes/AddIndex.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php index fa2b9544f9d06..38fd6ac0e138e 100644 --- a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php +++ b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/ColumnType.php b/lib/public/Migration/Attributes/ColumnType.php index 54c0365bc9e0e..9b1374f258f57 100644 --- a/lib/public/Migration/Attributes/ColumnType.php +++ b/lib/public/Migration/Attributes/ColumnType.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/CreateTable.php b/lib/public/Migration/Attributes/CreateTable.php index df759b123c32d..2f96011786da3 100644 --- a/lib/public/Migration/Attributes/CreateTable.php +++ b/lib/public/Migration/Attributes/CreateTable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/DataCleansing.php b/lib/public/Migration/Attributes/DataCleansing.php index cc4af24c431d2..d8c392128c5a1 100644 --- a/lib/public/Migration/Attributes/DataCleansing.php +++ b/lib/public/Migration/Attributes/DataCleansing.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/DataMigrationAttribute.php b/lib/public/Migration/Attributes/DataMigrationAttribute.php index 08d12a9f37b1f..2437b919e9cb5 100644 --- a/lib/public/Migration/Attributes/DataMigrationAttribute.php +++ b/lib/public/Migration/Attributes/DataMigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/DropColumn.php b/lib/public/Migration/Attributes/DropColumn.php index e18fe34f627d0..39d7e45194965 100644 --- a/lib/public/Migration/Attributes/DropColumn.php +++ b/lib/public/Migration/Attributes/DropColumn.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/DropIndex.php b/lib/public/Migration/Attributes/DropIndex.php index 3da7daf327dd6..825d1aa6ed200 100644 --- a/lib/public/Migration/Attributes/DropIndex.php +++ b/lib/public/Migration/Attributes/DropIndex.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/DropTable.php b/lib/public/Migration/Attributes/DropTable.php index cbd79a5209250..cb0aab565f4d2 100644 --- a/lib/public/Migration/Attributes/DropTable.php +++ b/lib/public/Migration/Attributes/DropTable.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/GenericMigrationAttribute.php b/lib/public/Migration/Attributes/GenericMigrationAttribute.php index 9e2ac9b5a6ce3..b438e4d1f638c 100644 --- a/lib/public/Migration/Attributes/GenericMigrationAttribute.php +++ b/lib/public/Migration/Attributes/GenericMigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/IndexMigrationAttribute.php b/lib/public/Migration/Attributes/IndexMigrationAttribute.php index b640a900f39d6..f80de4130e522 100644 --- a/lib/public/Migration/Attributes/IndexMigrationAttribute.php +++ b/lib/public/Migration/Attributes/IndexMigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/IndexType.php b/lib/public/Migration/Attributes/IndexType.php index dc3fcb9c6564b..283d457e71cb2 100644 --- a/lib/public/Migration/Attributes/IndexType.php +++ b/lib/public/Migration/Attributes/IndexType.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/Attributes/MigrationAttribute.php b/lib/public/Migration/Attributes/MigrationAttribute.php index 3ef4312a195d8..76984c43ca3f1 100644 --- a/lib/public/Migration/Attributes/MigrationAttribute.php +++ b/lib/public/Migration/Attributes/MigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use JsonSerializable; diff --git a/lib/public/Migration/Attributes/ModifyColumn.php b/lib/public/Migration/Attributes/ModifyColumn.php index 840a3db93ada5..24801c97342e5 100644 --- a/lib/public/Migration/Attributes/ModifyColumn.php +++ b/lib/public/Migration/Attributes/ModifyColumn.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use Attribute; diff --git a/lib/public/Migration/Attributes/TableMigrationAttribute.php b/lib/public/Migration/Attributes/TableMigrationAttribute.php index 4b11a75137a0f..1e6c23dc3bc42 100644 --- a/lib/public/Migration/Attributes/TableMigrationAttribute.php +++ b/lib/public/Migration/Attributes/TableMigrationAttribute.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration\Attributes; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Migration/BigIntMigration.php b/lib/public/Migration/BigIntMigration.php index c16a9ded8cb35..a21211b51c6b3 100644 --- a/lib/public/Migration/BigIntMigration.php +++ b/lib/public/Migration/BigIntMigration.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration; use Doctrine\DBAL\Types\Type; diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php index 584e243631848..2e22b4661e819 100644 --- a/lib/public/Migration/IMigrationStep.php +++ b/lib/public/Migration/IMigrationStep.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration; use Closure; diff --git a/lib/public/Migration/IOutput.php b/lib/public/Migration/IOutput.php index 60e870055fea3..a1540c55f2f65 100644 --- a/lib/public/Migration/IOutput.php +++ b/lib/public/Migration/IOutput.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Migration; /** diff --git a/lib/public/Migration/IRepairStep.php b/lib/public/Migration/IRepairStep.php index 33f07d4723a90..79eb204b4cca9 100644 --- a/lib/public/Migration/IRepairStep.php +++ b/lib/public/Migration/IRepairStep.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Migration; /** diff --git a/lib/public/Migration/IRepairStepExpensive.php b/lib/public/Migration/IRepairStepExpensive.php index 0f954c3eade24..1d31dd409c777 100644 --- a/lib/public/Migration/IRepairStepExpensive.php +++ b/lib/public/Migration/IRepairStepExpensive.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration; /** diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php index bea3d1be8fdf7..0323caff2656b 100644 --- a/lib/public/Migration/SimpleMigrationStep.php +++ b/lib/public/Migration/SimpleMigrationStep.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Migration; use OCP\DB\ISchemaWrapper; diff --git a/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php b/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php index 61db417b92792..2defc13a27116 100644 --- a/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php +++ b/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Navigation\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 162abd8186443..f4bf89aa8e5c7 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Notification/IAction.php b/lib/public/Notification/IAction.php index 3c33ee1d72763..c58345bd84553 100644 --- a/lib/public/Notification/IAction.php +++ b/lib/public/Notification/IAction.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Notification/IApp.php b/lib/public/Notification/IApp.php index 37c352d44cd94..b1d0be9e8e4c9 100644 --- a/lib/public/Notification/IApp.php +++ b/lib/public/Notification/IApp.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Implementable; diff --git a/lib/public/Notification/IDeferrableApp.php b/lib/public/Notification/IDeferrableApp.php index 00c7d691b108b..afca044af6ddd 100644 --- a/lib/public/Notification/IDeferrableApp.php +++ b/lib/public/Notification/IDeferrableApp.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Implementable; diff --git a/lib/public/Notification/IDismissableNotifier.php b/lib/public/Notification/IDismissableNotifier.php index d2f649b45a19a..60982166f12af 100644 --- a/lib/public/Notification/IDismissableNotifier.php +++ b/lib/public/Notification/IDismissableNotifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Implementable; diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php index b01cb37386a74..d31ea4acb4965 100644 --- a/lib/public/Notification/IManager.php +++ b/lib/public/Notification/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Notification/INotification.php b/lib/public/Notification/INotification.php index 281fe24faf46c..222a7c39eb2cc 100644 --- a/lib/public/Notification/INotification.php +++ b/lib/public/Notification/INotification.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Notification/INotifier.php b/lib/public/Notification/INotifier.php index b6851e3dfb3d1..4f28dcb3281a5 100644 --- a/lib/public/Notification/INotifier.php +++ b/lib/public/Notification/INotifier.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Notification; use OCP\AppFramework\Attribute\Implementable; diff --git a/lib/public/OCM/Exceptions/OCMArgumentException.php b/lib/public/OCM/Exceptions/OCMArgumentException.php index 386c8c39b4866..d68711c241619 100644 --- a/lib/public/OCM/Exceptions/OCMArgumentException.php +++ b/lib/public/OCM/Exceptions/OCMArgumentException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM\Exceptions; use Exception; diff --git a/lib/public/OCM/Exceptions/OCMCapabilityException.php b/lib/public/OCM/Exceptions/OCMCapabilityException.php index 98153d7d43e6b..684e18edcb4ba 100644 --- a/lib/public/OCM/Exceptions/OCMCapabilityException.php +++ b/lib/public/OCM/Exceptions/OCMCapabilityException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM\Exceptions; use Exception; diff --git a/lib/public/OCM/Exceptions/OCMProviderException.php b/lib/public/OCM/Exceptions/OCMProviderException.php index b24f1d1e1b19f..1750873d4f706 100644 --- a/lib/public/OCM/Exceptions/OCMProviderException.php +++ b/lib/public/OCM/Exceptions/OCMProviderException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM\Exceptions; use Exception; diff --git a/lib/public/OCM/Exceptions/OCMRequestException.php b/lib/public/OCM/Exceptions/OCMRequestException.php index 8017a34409a9f..f273e04154681 100644 --- a/lib/public/OCM/Exceptions/OCMRequestException.php +++ b/lib/public/OCM/Exceptions/OCMRequestException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM\Exceptions; use Exception; diff --git a/lib/public/OCM/ICapabilityAwareOCMProvider.php b/lib/public/OCM/ICapabilityAwareOCMProvider.php index faf44067d1255..051e7fa875264 100644 --- a/lib/public/OCM/ICapabilityAwareOCMProvider.php +++ b/lib/public/OCM/ICapabilityAwareOCMProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM; /** diff --git a/lib/public/OCM/IOCMProvider.php b/lib/public/OCM/IOCMProvider.php index 4896a050bd089..2acc2a4d7bb4e 100644 --- a/lib/public/OCM/IOCMProvider.php +++ b/lib/public/OCM/IOCMProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCM; use JsonSerializable; diff --git a/lib/public/OCS/IDiscoveryService.php b/lib/public/OCS/IDiscoveryService.php index 9f20a6077ff16..d35b15af24579 100644 --- a/lib/public/OCS/IDiscoveryService.php +++ b/lib/public/OCS/IDiscoveryService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\OCS; /** diff --git a/lib/public/Preview/BeforePreviewFetchedEvent.php b/lib/public/Preview/BeforePreviewFetchedEvent.php index 69cd281ac0260..8cdae08880348 100644 --- a/lib/public/Preview/BeforePreviewFetchedEvent.php +++ b/lib/public/Preview/BeforePreviewFetchedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Preview; use OCP\Files\Node; diff --git a/lib/public/Preview/IMimeIconProvider.php b/lib/public/Preview/IMimeIconProvider.php index 4a407f4857767..bc433859ba190 100644 --- a/lib/public/Preview/IMimeIconProvider.php +++ b/lib/public/Preview/IMimeIconProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Preview; /** diff --git a/lib/public/Preview/IProviderV2.php b/lib/public/Preview/IProviderV2.php index da52f6a7946c0..2b819965bf5bb 100644 --- a/lib/public/Preview/IProviderV2.php +++ b/lib/public/Preview/IProviderV2.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Preview; use OCP\Files\File; diff --git a/lib/public/Preview/IVersionedPreviewFile.php b/lib/public/Preview/IVersionedPreviewFile.php index 842ae877339ea..8323f38a8c58f 100644 --- a/lib/public/Preview/IVersionedPreviewFile.php +++ b/lib/public/Preview/IVersionedPreviewFile.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Preview; /** diff --git a/lib/public/Profile/BeforeTemplateRenderedEvent.php b/lib/public/Profile/BeforeTemplateRenderedEvent.php index 1fbeec28b0f01..d83e234b5986b 100644 --- a/lib/public/Profile/BeforeTemplateRenderedEvent.php +++ b/lib/public/Profile/BeforeTemplateRenderedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Profile; use OCP\EventDispatcher\Event; diff --git a/lib/public/Remote/Api/IApiCollection.php b/lib/public/Remote/Api/IApiCollection.php index e7181ab20f265..8b72871c3c179 100644 --- a/lib/public/Remote/Api/IApiCollection.php +++ b/lib/public/Remote/Api/IApiCollection.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote\Api; /** diff --git a/lib/public/Remote/Api/IApiFactory.php b/lib/public/Remote/Api/IApiFactory.php index 2089c61be82c3..2fb3dd13facea 100644 --- a/lib/public/Remote/Api/IApiFactory.php +++ b/lib/public/Remote/Api/IApiFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote\Api; use OCP\Remote\ICredentials; diff --git a/lib/public/Remote/Api/ICapabilitiesApi.php b/lib/public/Remote/Api/ICapabilitiesApi.php index d0e3fd7ad80d4..62eace36a95e5 100644 --- a/lib/public/Remote/Api/ICapabilitiesApi.php +++ b/lib/public/Remote/Api/ICapabilitiesApi.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote\Api; /** diff --git a/lib/public/Remote/Api/IUserApi.php b/lib/public/Remote/Api/IUserApi.php index 268594c0340a5..fcd38bf99c278 100644 --- a/lib/public/Remote/Api/IUserApi.php +++ b/lib/public/Remote/Api/IUserApi.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote\Api; use OCP\Remote\IUser; diff --git a/lib/public/Remote/ICredentials.php b/lib/public/Remote/ICredentials.php index c261d57093de9..a175c2c0cc674 100644 --- a/lib/public/Remote/ICredentials.php +++ b/lib/public/Remote/ICredentials.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote; /** diff --git a/lib/public/Remote/IInstance.php b/lib/public/Remote/IInstance.php index f25328841c0ed..6499297810a30 100644 --- a/lib/public/Remote/IInstance.php +++ b/lib/public/Remote/IInstance.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Remote/IInstanceFactory.php b/lib/public/Remote/IInstanceFactory.php index 1cd2b3330cefe..b8d84c17d6850 100644 --- a/lib/public/Remote/IInstanceFactory.php +++ b/lib/public/Remote/IInstanceFactory.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote; /** diff --git a/lib/public/Remote/IUser.php b/lib/public/Remote/IUser.php index 329e8876c0d39..e198be59cfb4a 100644 --- a/lib/public/Remote/IUser.php +++ b/lib/public/Remote/IUser.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Remote; /** diff --git a/lib/public/RichObjectStrings/Definitions.php b/lib/public/RichObjectStrings/Definitions.php index d6717e54aea32..89202cf234645 100644 --- a/lib/public/RichObjectStrings/Definitions.php +++ b/lib/public/RichObjectStrings/Definitions.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\RichObjectStrings; /** diff --git a/lib/public/RichObjectStrings/IValidator.php b/lib/public/RichObjectStrings/IValidator.php index fc486663c7329..c0ec87143725c 100644 --- a/lib/public/RichObjectStrings/IValidator.php +++ b/lib/public/RichObjectStrings/IValidator.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\RichObjectStrings; /** diff --git a/lib/public/RichObjectStrings/InvalidObjectExeption.php b/lib/public/RichObjectStrings/InvalidObjectExeption.php index 603f4432ba61f..d871edaa2156b 100644 --- a/lib/public/RichObjectStrings/InvalidObjectExeption.php +++ b/lib/public/RichObjectStrings/InvalidObjectExeption.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\RichObjectStrings; /** diff --git a/lib/public/Route/IRoute.php b/lib/public/Route/IRoute.php index 7dba6225affc1..0a46feee9022c 100644 --- a/lib/public/Route/IRoute.php +++ b/lib/public/Route/IRoute.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Route; /** diff --git a/lib/public/Route/IRouter.php b/lib/public/Route/IRouter.php index 5c1ccd0e52382..b51ad861cb5ca 100644 --- a/lib/public/Route/IRouter.php +++ b/lib/public/Route/IRouter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Route; /** diff --git a/lib/public/SabrePluginEvent.php b/lib/public/SabrePluginEvent.php index c8c9db58ac9f1..a004fa8b0263a 100644 --- a/lib/public/SabrePluginEvent.php +++ b/lib/public/SabrePluginEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\AppFramework\Http; diff --git a/lib/public/SabrePluginException.php b/lib/public/SabrePluginException.php index 82847e96023b2..b12c06e1219f7 100644 --- a/lib/public/SabrePluginException.php +++ b/lib/public/SabrePluginException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use Sabre\DAV\Exception; diff --git a/lib/public/Search/FilterDefinition.php b/lib/public/Search/FilterDefinition.php index 86b2bb655fff6..b5fc23d8c9f77 100644 --- a/lib/public/Search/FilterDefinition.php +++ b/lib/public/Search/FilterDefinition.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; use InvalidArgumentException; diff --git a/lib/public/Search/IExternalProvider.php b/lib/public/Search/IExternalProvider.php index a9a8e3ad6baf9..f3d74b60a1404 100644 --- a/lib/public/Search/IExternalProvider.php +++ b/lib/public/Search/IExternalProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; /** diff --git a/lib/public/Search/IFilter.php b/lib/public/Search/IFilter.php index d3617bbc84367..3f2663c87f9e8 100644 --- a/lib/public/Search/IFilter.php +++ b/lib/public/Search/IFilter.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; /** diff --git a/lib/public/Search/IFilterCollection.php b/lib/public/Search/IFilterCollection.php index a28578a6d317c..32fbf58546dc5 100644 --- a/lib/public/Search/IFilterCollection.php +++ b/lib/public/Search/IFilterCollection.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; use IteratorAggregate; diff --git a/lib/public/Search/IFilteringProvider.php b/lib/public/Search/IFilteringProvider.php index 8dee3af973d2c..0c1bac68a830e 100644 --- a/lib/public/Search/IFilteringProvider.php +++ b/lib/public/Search/IFilteringProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; /** diff --git a/lib/public/Search/IInAppSearch.php b/lib/public/Search/IInAppSearch.php index 1baccb70d1e82..1f635a3da6cf5 100644 --- a/lib/public/Search/IInAppSearch.php +++ b/lib/public/Search/IInAppSearch.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; /** diff --git a/lib/public/Search/IProvider.php b/lib/public/Search/IProvider.php index 070e46cf79816..d3416e68fd6b6 100644 --- a/lib/public/Search/IProvider.php +++ b/lib/public/Search/IProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; use OCP\IUser; diff --git a/lib/public/Search/ISearchQuery.php b/lib/public/Search/ISearchQuery.php index 80f6de914d046..f5f8cd478243c 100644 --- a/lib/public/Search/ISearchQuery.php +++ b/lib/public/Search/ISearchQuery.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; /** diff --git a/lib/public/Search/SearchResult.php b/lib/public/Search/SearchResult.php index 1168dca43ed2b..cd87b02d5062b 100644 --- a/lib/public/Search/SearchResult.php +++ b/lib/public/Search/SearchResult.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; use JsonSerializable; diff --git a/lib/public/Search/SearchResultEntry.php b/lib/public/Search/SearchResultEntry.php index cfa6ae52d0950..98aeb674cca87 100644 --- a/lib/public/Search/SearchResultEntry.php +++ b/lib/public/Search/SearchResultEntry.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Search; use JsonSerializable; diff --git a/lib/public/Security/Bruteforce/IThrottler.php b/lib/public/Security/Bruteforce/IThrottler.php index 502e9d2e88bc7..eb29af259e20e 100644 --- a/lib/public/Security/Bruteforce/IThrottler.php +++ b/lib/public/Security/Bruteforce/IThrottler.php @@ -51,7 +51,6 @@ interface IThrottler { */ public function registerAttempt(string $action, string $ip, array $metadata = []): void; - /** * Check if the IP is allowed to bypass the brute force protection * diff --git a/lib/public/Security/Bruteforce/MaxDelayReached.php b/lib/public/Security/Bruteforce/MaxDelayReached.php index b44112c5f045a..b8032e52817f0 100644 --- a/lib/public/Security/Bruteforce/MaxDelayReached.php +++ b/lib/public/Security/Bruteforce/MaxDelayReached.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Bruteforce; /** diff --git a/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php b/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php index c1cbddd298f5d..8cef17fc4dcee 100644 --- a/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php +++ b/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\CSP; use OC\Security\CSP\ContentSecurityPolicyManager; diff --git a/lib/public/Security/Events/GenerateSecurePasswordEvent.php b/lib/public/Security/Events/GenerateSecurePasswordEvent.php index 419e7b40ee4c3..288c6ec474096 100644 --- a/lib/public/Security/Events/GenerateSecurePasswordEvent.php +++ b/lib/public/Security/Events/GenerateSecurePasswordEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Security/Events/ValidatePasswordPolicyEvent.php b/lib/public/Security/Events/ValidatePasswordPolicyEvent.php index d7ac9442392f7..132e98a44a1a1 100644 --- a/lib/public/Security/Events/ValidatePasswordPolicyEvent.php +++ b/lib/public/Security/Events/ValidatePasswordPolicyEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php b/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php index c89c11bf7cd97..b52d347d20d42 100644 --- a/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php +++ b/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\FeaturePolicy; use OC\Security\FeaturePolicy\FeaturePolicyManager; diff --git a/lib/public/Security/IContentSecurityPolicyManager.php b/lib/public/Security/IContentSecurityPolicyManager.php index 00cdcc2c45472..7fa781964f180 100644 --- a/lib/public/Security/IContentSecurityPolicyManager.php +++ b/lib/public/Security/IContentSecurityPolicyManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Security; use OCP\AppFramework\Http\EmptyContentSecurityPolicy; diff --git a/lib/public/Security/ICredentialsManager.php b/lib/public/Security/ICredentialsManager.php index 7b24eb7e7a250..22d3867bde1cd 100644 --- a/lib/public/Security/ICredentialsManager.php +++ b/lib/public/Security/ICredentialsManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Security; /** diff --git a/lib/public/Security/ICrypto.php b/lib/public/Security/ICrypto.php index 78b0fc14d6daf..518ddd026cd20 100644 --- a/lib/public/Security/ICrypto.php +++ b/lib/public/Security/ICrypto.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Security; /** diff --git a/lib/public/Security/IHasher.php b/lib/public/Security/IHasher.php index d0d6e4e9028c6..f6e46b836a6f9 100644 --- a/lib/public/Security/IHasher.php +++ b/lib/public/Security/IHasher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Security; /** diff --git a/lib/public/Security/IRemoteHostValidator.php b/lib/public/Security/IRemoteHostValidator.php index 0707a63307302..af2559f9c6b68 100644 --- a/lib/public/Security/IRemoteHostValidator.php +++ b/lib/public/Security/IRemoteHostValidator.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security; /** diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php index 0f4a79e08e0dd..5d47bdc7a1bf8 100644 --- a/lib/public/Security/ISecureRandom.php +++ b/lib/public/Security/ISecureRandom.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Security; /** diff --git a/lib/public/Security/ITrustedDomainHelper.php b/lib/public/Security/ITrustedDomainHelper.php index 01edf57e6f3c3..f41c3bfed02c3 100644 --- a/lib/public/Security/ITrustedDomainHelper.php +++ b/lib/public/Security/ITrustedDomainHelper.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security; /** diff --git a/lib/public/Security/PasswordContext.php b/lib/public/Security/PasswordContext.php index 909070c09ff91..a74ad253ae0cb 100644 --- a/lib/public/Security/PasswordContext.php +++ b/lib/public/Security/PasswordContext.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security; /** diff --git a/lib/public/Security/Signature/Enum/DigestAlgorithm.php b/lib/public/Security/Signature/Enum/DigestAlgorithm.php index 2fdceaa8c01ae..191840f4c6617 100644 --- a/lib/public/Security/Signature/Enum/DigestAlgorithm.php +++ b/lib/public/Security/Signature/Enum/DigestAlgorithm.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Enum; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/Enum/SignatoryStatus.php b/lib/public/Security/Signature/Enum/SignatoryStatus.php index f62b5aeec5b27..61fded9d00d8c 100644 --- a/lib/public/Security/Signature/Enum/SignatoryStatus.php +++ b/lib/public/Security/Signature/Enum/SignatoryStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Enum; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/Enum/SignatoryType.php b/lib/public/Security/Signature/Enum/SignatoryType.php index 425bdc3d92ff2..a045e350b890d 100644 --- a/lib/public/Security/Signature/Enum/SignatoryType.php +++ b/lib/public/Security/Signature/Enum/SignatoryType.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Enum; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/Enum/SignatureAlgorithm.php b/lib/public/Security/Signature/Enum/SignatureAlgorithm.php index 356fae1306223..4d3afaf81ba4c 100644 --- a/lib/public/Security/Signature/Enum/SignatureAlgorithm.php +++ b/lib/public/Security/Signature/Enum/SignatureAlgorithm.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Enum; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/Exceptions/IncomingRequestException.php b/lib/public/Security/Signature/Exceptions/IncomingRequestException.php index 7e1fb8700c127..e7cf540186c09 100644 --- a/lib/public/Security/Signature/Exceptions/IncomingRequestException.php +++ b/lib/public/Security/Signature/Exceptions/IncomingRequestException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Exceptions; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php b/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php index 106d3e8fa6af8..9a3f2d0c65465 100644 --- a/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php +++ b/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Exceptions; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php b/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php index 035d1b790df88..a119d76d273c3 100644 --- a/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php +++ b/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Exceptions; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php b/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php index 71bf97b8dc1be..aeae95e6cef52 100644 --- a/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php +++ b/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Exceptions; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php b/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php index c7a05f6e48e5c..ce18858c6d5e3 100644 --- a/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php +++ b/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Exceptions; use OCP\AppFramework\Attribute\Throwable; diff --git a/lib/public/Security/Signature/IIncomingSignedRequest.php b/lib/public/Security/Signature/IIncomingSignedRequest.php index ab25816eb82d3..f01bbe3d217a3 100644 --- a/lib/public/Security/Signature/IIncomingSignedRequest.php +++ b/lib/public/Security/Signature/IIncomingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/IOutgoingSignedRequest.php b/lib/public/Security/Signature/IOutgoingSignedRequest.php index df8dc8a0de271..de40526434ddd 100644 --- a/lib/public/Security/Signature/IOutgoingSignedRequest.php +++ b/lib/public/Security/Signature/IOutgoingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/ISignatoryManager.php b/lib/public/Security/Signature/ISignatoryManager.php index 771ce669b65f3..53c361ac9f9bf 100644 --- a/lib/public/Security/Signature/ISignatoryManager.php +++ b/lib/public/Security/Signature/ISignatoryManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/ISignatureManager.php b/lib/public/Security/Signature/ISignatureManager.php index c5238e314c894..e4246d2f82089 100644 --- a/lib/public/Security/Signature/ISignatureManager.php +++ b/lib/public/Security/Signature/ISignatureManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/ISignedRequest.php b/lib/public/Security/Signature/ISignedRequest.php index 94f5f13b5e2d2..d52e5c7c80fca 100644 --- a/lib/public/Security/Signature/ISignedRequest.php +++ b/lib/public/Security/Signature/ISignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Security/Signature/Model/Signatory.php b/lib/public/Security/Signature/Model/Signatory.php index 563dadce56e33..7e5328f7b35c1 100644 --- a/lib/public/Security/Signature/Model/Signatory.php +++ b/lib/public/Security/Signature/Model/Signatory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\Signature\Model; use JsonSerializable; diff --git a/lib/public/Security/VerificationToken/IVerificationToken.php b/lib/public/Security/VerificationToken/IVerificationToken.php index 519fbd1bbed1d..10b2b72252c17 100644 --- a/lib/public/Security/VerificationToken/IVerificationToken.php +++ b/lib/public/Security/VerificationToken/IVerificationToken.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\VerificationToken; use OCP\IUser; diff --git a/lib/public/Security/VerificationToken/InvalidTokenException.php b/lib/public/Security/VerificationToken/InvalidTokenException.php index a84f88173506e..819a5ad6fdb90 100644 --- a/lib/public/Security/VerificationToken/InvalidTokenException.php +++ b/lib/public/Security/VerificationToken/InvalidTokenException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Security\VerificationToken; /** @since 23.0.0 */ diff --git a/lib/public/Server.php b/lib/public/Server.php index e30d67701f629..16f8e32d8cbea 100644 --- a/lib/public/Server.php +++ b/lib/public/Server.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP; use Psr\Container\ContainerExceptionInterface; diff --git a/lib/public/Session/Exceptions/SessionNotAvailableException.php b/lib/public/Session/Exceptions/SessionNotAvailableException.php index 3bd661c89c609..d83875beb1714 100644 --- a/lib/public/Session/Exceptions/SessionNotAvailableException.php +++ b/lib/public/Session/Exceptions/SessionNotAvailableException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Session\Exceptions; use Exception; diff --git a/lib/public/Settings/IDelegatedSettings.php b/lib/public/Settings/IDelegatedSettings.php index ae885dee705f7..5f7e1f3417acb 100644 --- a/lib/public/Settings/IDelegatedSettings.php +++ b/lib/public/Settings/IDelegatedSettings.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Settings; /** diff --git a/lib/public/Settings/IIconSection.php b/lib/public/Settings/IIconSection.php index 4d0fe40aa297c..5fe14cbf38c6a 100644 --- a/lib/public/Settings/IIconSection.php +++ b/lib/public/Settings/IIconSection.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Settings; /** diff --git a/lib/public/Settings/ISettings.php b/lib/public/Settings/ISettings.php index e33556f0b4a19..93cfae4ec7cf4 100644 --- a/lib/public/Settings/ISettings.php +++ b/lib/public/Settings/ISettings.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Settings; use OCP\AppFramework\Http\TemplateResponse; diff --git a/lib/public/Settings/ISubAdminSettings.php b/lib/public/Settings/ISubAdminSettings.php index dfe3b1b9e7358..c3feffbbda43f 100644 --- a/lib/public/Settings/ISubAdminSettings.php +++ b/lib/public/Settings/ISubAdminSettings.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Settings; /** diff --git a/lib/public/SetupCheck/CheckServerResponseTrait.php b/lib/public/SetupCheck/CheckServerResponseTrait.php index 29a2215aa673e..b6452b4563348 100644 --- a/lib/public/SetupCheck/CheckServerResponseTrait.php +++ b/lib/public/SetupCheck/CheckServerResponseTrait.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\SetupCheck; use Generator; diff --git a/lib/public/Share/Events/BeforeShareCreatedEvent.php b/lib/public/Share/Events/BeforeShareCreatedEvent.php index a2149b53e97de..7432865ec5d61 100644 --- a/lib/public/Share/Events/BeforeShareCreatedEvent.php +++ b/lib/public/Share/Events/BeforeShareCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/BeforeShareDeletedEvent.php b/lib/public/Share/Events/BeforeShareDeletedEvent.php index 0af902f7fb7b8..805a4a837a170 100644 --- a/lib/public/Share/Events/BeforeShareDeletedEvent.php +++ b/lib/public/Share/Events/BeforeShareDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareAcceptedEvent.php b/lib/public/Share/Events/ShareAcceptedEvent.php index dd9061563cc94..aa5f5beb2cc9a 100644 --- a/lib/public/Share/Events/ShareAcceptedEvent.php +++ b/lib/public/Share/Events/ShareAcceptedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareCreatedEvent.php b/lib/public/Share/Events/ShareCreatedEvent.php index e733c56bc744d..3681f68e0a0e7 100644 --- a/lib/public/Share/Events/ShareCreatedEvent.php +++ b/lib/public/Share/Events/ShareCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareDeletedEvent.php b/lib/public/Share/Events/ShareDeletedEvent.php index 70887a3f80b03..295e483cb84f5 100644 --- a/lib/public/Share/Events/ShareDeletedEvent.php +++ b/lib/public/Share/Events/ShareDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareDeletedFromSelfEvent.php b/lib/public/Share/Events/ShareDeletedFromSelfEvent.php index 1e49975acea91..d219c7d03da84 100644 --- a/lib/public/Share/Events/ShareDeletedFromSelfEvent.php +++ b/lib/public/Share/Events/ShareDeletedFromSelfEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareMovedEvent.php b/lib/public/Share/Events/ShareMovedEvent.php index 3c9fc71f1933f..a29bc5a9f41d1 100644 --- a/lib/public/Share/Events/ShareMovedEvent.php +++ b/lib/public/Share/Events/ShareMovedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/ShareTransferredEvent.php b/lib/public/Share/Events/ShareTransferredEvent.php index 06a7ac3759bae..a8e14e0fbddb6 100644 --- a/lib/public/Share/Events/ShareTransferredEvent.php +++ b/lib/public/Share/Events/ShareTransferredEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/Share/Events/VerifyMountPointEvent.php b/lib/public/Share/Events/VerifyMountPointEvent.php index 03c9ab1f6c9d2..7fcdc1181b391 100644 --- a/lib/public/Share/Events/VerifyMountPointEvent.php +++ b/lib/public/Share/Events/VerifyMountPointEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Events; use OC\Files\View; diff --git a/lib/public/Share/Exceptions/AlreadySharedException.php b/lib/public/Share/Exceptions/AlreadySharedException.php index ce58dd19e2a5e..912909c70dabc 100644 --- a/lib/public/Share/Exceptions/AlreadySharedException.php +++ b/lib/public/Share/Exceptions/AlreadySharedException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share\Exceptions; use OCP\Share\IShare; diff --git a/lib/public/Share/Exceptions/GenericShareException.php b/lib/public/Share/Exceptions/GenericShareException.php index b94d210f9709c..c9cb8e67a131c 100644 --- a/lib/public/Share/Exceptions/GenericShareException.php +++ b/lib/public/Share/Exceptions/GenericShareException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share\Exceptions; use OCP\HintException; diff --git a/lib/public/Share/Exceptions/IllegalIDChangeException.php b/lib/public/Share/Exceptions/IllegalIDChangeException.php index e9ff4b66c427d..45f8762de9eb5 100644 --- a/lib/public/Share/Exceptions/IllegalIDChangeException.php +++ b/lib/public/Share/Exceptions/IllegalIDChangeException.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share\Exceptions; /** diff --git a/lib/public/Share/Exceptions/ShareNotFound.php b/lib/public/Share/Exceptions/ShareNotFound.php index 0876078424ed3..74758580dec83 100644 --- a/lib/public/Share/Exceptions/ShareNotFound.php +++ b/lib/public/Share/Exceptions/ShareNotFound.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share\Exceptions; /** diff --git a/lib/public/Share/IAttributes.php b/lib/public/Share/IAttributes.php index 9ddd8275dd69c..af74d2cf12823 100644 --- a/lib/public/Share/IAttributes.php +++ b/lib/public/Share/IAttributes.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 ownCloud GmbH * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share; /** diff --git a/lib/public/Share/IManager.php b/lib/public/Share/IManager.php index 6a53646f559ce..86228837fc88a 100644 --- a/lib/public/Share/IManager.php +++ b/lib/public/Share/IManager.php @@ -5,12 +5,12 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share; use OCP\AppFramework\Attribute\Consumable; use OCP\Files\Folder; use OCP\Files\Node; - use OCP\IUser; use OCP\Share\Exceptions\GenericShareException; use OCP\Share\Exceptions\ShareNotFound; @@ -455,7 +455,6 @@ public function matchDisplayName(): bool; */ public function ignoreSecondDisplayName(): bool; - /** * Check if custom tokens are allowed * @@ -497,7 +496,6 @@ public function outgoingServer2ServerSharesAllowed(): bool; */ public function outgoingServer2ServerGroupSharesAllowed(): bool; - /** * Check if a given share provider exists * @param IShare::TYPE_* $shareType diff --git a/lib/public/Share/IPartialShareProvider.php b/lib/public/Share/IPartialShareProvider.php index fe0b4218c9a03..681a4870fdf45 100644 --- a/lib/public/Share/IPartialShareProvider.php +++ b/lib/public/Share/IPartialShareProvider.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; /** diff --git a/lib/public/Share/IProviderFactory.php b/lib/public/Share/IProviderFactory.php index 9107274c8c12f..f477e345286da 100644 --- a/lib/public/Share/IProviderFactory.php +++ b/lib/public/Share/IProviderFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share; use OC\Share20\Exception\ProviderException; diff --git a/lib/public/Share/IPublicShareTemplateFactory.php b/lib/public/Share/IPublicShareTemplateFactory.php index 1825c0c7dc6e7..6f9e9e7274791 100644 --- a/lib/public/Share/IPublicShareTemplateFactory.php +++ b/lib/public/Share/IPublicShareTemplateFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; /** diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index 7bd1b8c5ebda3..16fcd3f9f0010 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share; use OCP\AppFramework\Attribute\Consumable; @@ -353,7 +354,6 @@ public function setNote($note); */ public function getNote(); - /** * Set the expiration date * @@ -380,7 +380,6 @@ public function getExpirationDate(); */ public function setNoExpirationDate(bool $noExpirationDate); - /** * Get value of overwrite falsy expiry date flag * diff --git a/lib/public/Share/IShareHelper.php b/lib/public/Share/IShareHelper.php index 9c91aa32c8c63..cd9675b56ab5b 100644 --- a/lib/public/Share/IShareHelper.php +++ b/lib/public/Share/IShareHelper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/Share/IShareProvider.php b/lib/public/Share/IShareProvider.php index c76040fccc5a2..6743af9dc3a67 100644 --- a/lib/public/Share/IShareProvider.php +++ b/lib/public/Share/IShareProvider.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\Share; use OCP\Files\Folder; diff --git a/lib/public/Share/IShareProviderGetUsers.php b/lib/public/Share/IShareProviderGetUsers.php index 44e2d8eab7014..d8c0a42d69e65 100644 --- a/lib/public/Share/IShareProviderGetUsers.php +++ b/lib/public/Share/IShareProviderGetUsers.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; use OCP\IUser; diff --git a/lib/public/Share/IShareProviderSupportsAccept.php b/lib/public/Share/IShareProviderSupportsAccept.php index c3a0c2d0218dd..a86e01d0f681e 100644 --- a/lib/public/Share/IShareProviderSupportsAccept.php +++ b/lib/public/Share/IShareProviderSupportsAccept.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; /** diff --git a/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php b/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php index e27da7682ce27..8bb8ec534a07e 100644 --- a/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php +++ b/lib/public/Share/IShareProviderSupportsAllSharesInFolder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; use OCP\Files\Folder; diff --git a/lib/public/Share/IShareProviderWithNotification.php b/lib/public/Share/IShareProviderWithNotification.php index c2ba8118175a6..de56b9509229c 100644 --- a/lib/public/Share/IShareProviderWithNotification.php +++ b/lib/public/Share/IShareProviderWithNotification.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Share; /** diff --git a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php index 6554292d413f9..bca47dd03c9e0 100644 --- a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php +++ b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\SpeechToText\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php index 4c2b0d5201751..b5d97050da2a4 100644 --- a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php +++ b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\SpeechToText\Events; use OCP\Files\File; diff --git a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php index e8e5359a29ec1..2c3b965e15873 100644 --- a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php +++ b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\SpeechToText\Events; use OCP\Files\File; diff --git a/lib/public/SpeechToText/ISpeechToTextManager.php b/lib/public/SpeechToText/ISpeechToTextManager.php index 6bd95197695b3..be49b2fcd85f7 100644 --- a/lib/public/SpeechToText/ISpeechToTextManager.php +++ b/lib/public/SpeechToText/ISpeechToTextManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\SpeechToText; use InvalidArgumentException; diff --git a/lib/public/SpeechToText/ISpeechToTextProvider.php b/lib/public/SpeechToText/ISpeechToTextProvider.php index dce4a68ea0ae0..041d5da67490f 100644 --- a/lib/public/SpeechToText/ISpeechToTextProvider.php +++ b/lib/public/SpeechToText/ISpeechToTextProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\SpeechToText; use OCP\Files\File; diff --git a/lib/public/SpeechToText/ISpeechToTextProviderWithId.php b/lib/public/SpeechToText/ISpeechToTextProviderWithId.php index 8020c6c9b96ef..ab8f52d420049 100644 --- a/lib/public/SpeechToText/ISpeechToTextProviderWithId.php +++ b/lib/public/SpeechToText/ISpeechToTextProviderWithId.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\SpeechToText; /** diff --git a/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php b/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php index d1bc4216a3852..5cd271c29c485 100644 --- a/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php +++ b/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\SpeechToText; /** diff --git a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php index 54a88041b520d..935ed8ca95672 100644 --- a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php +++ b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\CrashReport; /** diff --git a/lib/public/Support/CrashReport/IMessageReporter.php b/lib/public/Support/CrashReport/IMessageReporter.php index dee6ee6112138..bdafd94133fa4 100644 --- a/lib/public/Support/CrashReport/IMessageReporter.php +++ b/lib/public/Support/CrashReport/IMessageReporter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\CrashReport; /** diff --git a/lib/public/Support/CrashReport/IRegistry.php b/lib/public/Support/CrashReport/IRegistry.php index 503a21038caf3..1c61b842b42dd 100644 --- a/lib/public/Support/CrashReport/IRegistry.php +++ b/lib/public/Support/CrashReport/IRegistry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\CrashReport; use Exception; diff --git a/lib/public/Support/CrashReport/IReporter.php b/lib/public/Support/CrashReport/IReporter.php index 1be8ba58c301f..f8107ca7485cd 100644 --- a/lib/public/Support/CrashReport/IReporter.php +++ b/lib/public/Support/CrashReport/IReporter.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\CrashReport; use Exception; diff --git a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php index 95179f0501a9d..f881801815c9d 100644 --- a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php +++ b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\Subscription\Exception; /** diff --git a/lib/public/Support/Subscription/IAssertion.php b/lib/public/Support/Subscription/IAssertion.php index 973800ba85467..e604d19174a5b 100644 --- a/lib/public/Support/Subscription/IAssertion.php +++ b/lib/public/Support/Subscription/IAssertion.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\Subscription; use OCP\HintException; diff --git a/lib/public/Support/Subscription/IRegistry.php b/lib/public/Support/Subscription/IRegistry.php index 5452430ceed96..3e2dbbc5d94dd 100644 --- a/lib/public/Support/Subscription/IRegistry.php +++ b/lib/public/Support/Subscription/IRegistry.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\Subscription; use OCP\Notification\IManager; diff --git a/lib/public/Support/Subscription/ISubscription.php b/lib/public/Support/Subscription/ISubscription.php index a785875d241b7..f542a326bac54 100644 --- a/lib/public/Support/Subscription/ISubscription.php +++ b/lib/public/Support/Subscription/ISubscription.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\Subscription; /** diff --git a/lib/public/Support/Subscription/ISupportedApps.php b/lib/public/Support/Subscription/ISupportedApps.php index d18870e827bad..4d5e335740ce6 100644 --- a/lib/public/Support/Subscription/ISupportedApps.php +++ b/lib/public/Support/Subscription/ISupportedApps.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\Support\Subscription; /** diff --git a/lib/public/SystemTag/ISystemTag.php b/lib/public/SystemTag/ISystemTag.php index df5506af69372..aa70f57ef0b25 100644 --- a/lib/public/SystemTag/ISystemTag.php +++ b/lib/public/SystemTag/ISystemTag.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; /** diff --git a/lib/public/SystemTag/ISystemTagManager.php b/lib/public/SystemTag/ISystemTagManager.php index bcfe98455f19c..7cf25351be289 100644 --- a/lib/public/SystemTag/ISystemTagManager.php +++ b/lib/public/SystemTag/ISystemTagManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\IUser; diff --git a/lib/public/SystemTag/ISystemTagManagerFactory.php b/lib/public/SystemTag/ISystemTagManagerFactory.php index 7c80624aaad99..11b5eaf4c1b99 100644 --- a/lib/public/SystemTag/ISystemTagManagerFactory.php +++ b/lib/public/SystemTag/ISystemTagManagerFactory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\IServerContainer; diff --git a/lib/public/SystemTag/ISystemTagObjectMapper.php b/lib/public/SystemTag/ISystemTagObjectMapper.php index 614f72ebc894f..11a675a90bc1d 100644 --- a/lib/public/SystemTag/ISystemTagObjectMapper.php +++ b/lib/public/SystemTag/ISystemTagObjectMapper.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\AppFramework\Attribute\Consumable; @@ -127,7 +128,6 @@ public function unassignTags(string $objId, string $objectType, $tagIds); */ public function haveTag($objIds, string $objectType, string $tagId, bool $all = true): bool; - /** * Get the list of object types that have objects assigned to them. * diff --git a/lib/public/SystemTag/ManagerEvent.php b/lib/public/SystemTag/ManagerEvent.php index adfe64f8658c9..92ea2bb703208 100644 --- a/lib/public/SystemTag/ManagerEvent.php +++ b/lib/public/SystemTag/ManagerEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/MapperEvent.php b/lib/public/SystemTag/MapperEvent.php index 8647ece01b730..d337f370fd8c7 100644 --- a/lib/public/SystemTag/MapperEvent.php +++ b/lib/public/SystemTag/MapperEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/SystemTagsEntityEvent.php b/lib/public/SystemTag/SystemTagsEntityEvent.php index d8f391d0dba9e..b3ed58e77d5a0 100644 --- a/lib/public/SystemTag/SystemTagsEntityEvent.php +++ b/lib/public/SystemTag/SystemTagsEntityEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/TagAlreadyExistsException.php b/lib/public/SystemTag/TagAlreadyExistsException.php index 9db94bc4124b4..7b7d52d8ca207 100644 --- a/lib/public/SystemTag/TagAlreadyExistsException.php +++ b/lib/public/SystemTag/TagAlreadyExistsException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; /** diff --git a/lib/public/SystemTag/TagAssignedEvent.php b/lib/public/SystemTag/TagAssignedEvent.php index 50503a6cbdd76..d82901aa7e3a7 100644 --- a/lib/public/SystemTag/TagAssignedEvent.php +++ b/lib/public/SystemTag/TagAssignedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/SystemTag/TagNotFoundException.php b/lib/public/SystemTag/TagNotFoundException.php index 8a143422fff83..fc1b594dee000 100644 --- a/lib/public/SystemTag/TagNotFoundException.php +++ b/lib/public/SystemTag/TagNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\SystemTag; /** diff --git a/lib/public/SystemTag/TagUnassignedEvent.php b/lib/public/SystemTag/TagUnassignedEvent.php index 5ed085ba87cf8..27fdfa07e3c2e 100644 --- a/lib/public/SystemTag/TagUnassignedEvent.php +++ b/lib/public/SystemTag/TagUnassignedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\SystemTag; use OCP\EventDispatcher\Event; diff --git a/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php b/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php index 55f33327e9f12..0f4918b1b922a 100644 --- a/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php +++ b/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php b/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php index 10c94d2040609..960696169e24d 100644 --- a/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php +++ b/lib/public/TaskProcessing/Events/GetTaskProcessingProvidersEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/TaskProcessing/Events/TaskFailedEvent.php b/lib/public/TaskProcessing/Events/TaskFailedEvent.php index df3de34c03677..de472694ed094 100644 --- a/lib/public/TaskProcessing/Events/TaskFailedEvent.php +++ b/lib/public/TaskProcessing/Events/TaskFailedEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Events; use OCP\TaskProcessing\Task; diff --git a/lib/public/TaskProcessing/Events/TaskSuccessfulEvent.php b/lib/public/TaskProcessing/Events/TaskSuccessfulEvent.php index d97c03f282aed..6efa661a776cb 100644 --- a/lib/public/TaskProcessing/Events/TaskSuccessfulEvent.php +++ b/lib/public/TaskProcessing/Events/TaskSuccessfulEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Events; /** diff --git a/lib/public/TaskProcessing/Exception/Exception.php b/lib/public/TaskProcessing/Exception/Exception.php index 257f4d72a32bf..0e412c642b039 100644 --- a/lib/public/TaskProcessing/Exception/Exception.php +++ b/lib/public/TaskProcessing/Exception/Exception.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing\Exception; /** diff --git a/lib/public/TaskProcessing/Exception/NotFoundException.php b/lib/public/TaskProcessing/Exception/NotFoundException.php index 07ef4c613944b..362ca97a4c7ff 100644 --- a/lib/public/TaskProcessing/Exception/NotFoundException.php +++ b/lib/public/TaskProcessing/Exception/NotFoundException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Exception; /** diff --git a/lib/public/TaskProcessing/Exception/PreConditionNotMetException.php b/lib/public/TaskProcessing/Exception/PreConditionNotMetException.php index 5276fb03d340f..c9610ce2a48f5 100644 --- a/lib/public/TaskProcessing/Exception/PreConditionNotMetException.php +++ b/lib/public/TaskProcessing/Exception/PreConditionNotMetException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Exception; /** diff --git a/lib/public/TaskProcessing/Exception/ProcessingException.php b/lib/public/TaskProcessing/Exception/ProcessingException.php index 3f332e77b9d8c..0716e8b7c7c07 100644 --- a/lib/public/TaskProcessing/Exception/ProcessingException.php +++ b/lib/public/TaskProcessing/Exception/ProcessingException.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing\Exception; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/TaskProcessing/Exception/UnauthorizedException.php b/lib/public/TaskProcessing/Exception/UnauthorizedException.php index 8b048c6a9ed86..341c9b72680b2 100644 --- a/lib/public/TaskProcessing/Exception/UnauthorizedException.php +++ b/lib/public/TaskProcessing/Exception/UnauthorizedException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Exception; /** diff --git a/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php b/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php index f2669a30e7175..50f32378e46a0 100644 --- a/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php +++ b/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing\Exception; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/TaskProcessing/Exception/ValidationException.php b/lib/public/TaskProcessing/Exception/ValidationException.php index 0b8da3218b712..6c5077cee9ea1 100644 --- a/lib/public/TaskProcessing/Exception/ValidationException.php +++ b/lib/public/TaskProcessing/Exception/ValidationException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing\Exception; /** diff --git a/lib/public/TaskProcessing/IManager.php b/lib/public/TaskProcessing/IManager.php index 2cd0244b52e8d..f15cecddc7b5b 100644 --- a/lib/public/TaskProcessing/IManager.php +++ b/lib/public/TaskProcessing/IManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/TaskProcessing/IProvider.php b/lib/public/TaskProcessing/IProvider.php index a4e752216c765..b79762d0583ee 100644 --- a/lib/public/TaskProcessing/IProvider.php +++ b/lib/public/TaskProcessing/IProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing; /** diff --git a/lib/public/TaskProcessing/ISynchronousProvider.php b/lib/public/TaskProcessing/ISynchronousProvider.php index d7e42684df51e..9184b2c26977b 100644 --- a/lib/public/TaskProcessing/ISynchronousProvider.php +++ b/lib/public/TaskProcessing/ISynchronousProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing; use OCP\Files\File; diff --git a/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php b/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php index 05b7c07ec6cfc..40814dc91a6f1 100644 --- a/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php +++ b/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing; use OCP\Files\File; diff --git a/lib/public/TaskProcessing/ITriggerableProvider.php b/lib/public/TaskProcessing/ITriggerableProvider.php index c837d953f0b6a..87f3195802ca9 100644 --- a/lib/public/TaskProcessing/ITriggerableProvider.php +++ b/lib/public/TaskProcessing/ITriggerableProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TaskProcessing; /** diff --git a/lib/public/TaskProcessing/ShapeDescriptor.php b/lib/public/TaskProcessing/ShapeDescriptor.php index 6cdb511e50c7b..af4bb1acbd47f 100644 --- a/lib/public/TaskProcessing/ShapeDescriptor.php +++ b/lib/public/TaskProcessing/ShapeDescriptor.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing; /** diff --git a/lib/public/TaskProcessing/ShapeEnumValue.php b/lib/public/TaskProcessing/ShapeEnumValue.php index 5afffecd2e65b..fddeab223f7a6 100644 --- a/lib/public/TaskProcessing/ShapeEnumValue.php +++ b/lib/public/TaskProcessing/ShapeEnumValue.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TaskProcessing; /** diff --git a/lib/public/TaskProcessing/Task.php b/lib/public/TaskProcessing/Task.php index 72edc9a17ce6f..d709df3632fb0 100644 --- a/lib/public/TaskProcessing/Task.php +++ b/lib/public/TaskProcessing/Task.php @@ -76,7 +76,6 @@ final class Task implements \JsonSerializable { */ public const STATUS_UNKNOWN = 0; - /** * @param string $taskTypeId * @param array|numeric|string> $input diff --git a/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php b/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php index 4cee99974085d..d93523b4e03f2 100644 --- a/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php +++ b/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 32.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/AudioToText.php b/lib/public/TaskProcessing/TaskTypes/AudioToText.php index 438fd52a9dfb2..07fee42d22dc7 100644 --- a/lib/public/TaskProcessing/TaskTypes/AudioToText.php +++ b/lib/public/TaskProcessing/TaskTypes/AudioToText.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/ContextWrite.php b/lib/public/TaskProcessing/TaskTypes/ContextWrite.php index 3634168a6bc45..7d3b649cfd13c 100644 --- a/lib/public/TaskProcessing/TaskTypes/ContextWrite.php +++ b/lib/public/TaskProcessing/TaskTypes/ContextWrite.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php b/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php index 56a0017e2e1cb..b6711edb2a442 100644 --- a/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php +++ b/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php b/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php index d342879b8e2a2..c2e77c3efa170 100644 --- a/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php +++ b/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php @@ -36,7 +36,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @since 33.0.0 */ diff --git a/lib/public/TaskProcessing/TaskTypes/TextToImage.php b/lib/public/TaskProcessing/TaskTypes/TextToImage.php index b5db195a47466..d43d27e8cef92 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToImage.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToImage.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php b/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php index bb5f3db96e97e..8eef6de6ea2ab 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 32.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToText.php b/lib/public/TaskProcessing/TaskTypes/TextToText.php index 639e99d0cea87..dc50cc79b06d7 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToText.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToText.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php b/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php index 9af9283a7a940..d6188c18be6d3 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php b/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php index 2502d0ef4a38f..0d8f6aba82d08 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php b/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php index 6dbe165486dd6..c76732255deb4 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php b/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php index 14c08710f81eb..f8d09e37f49f0 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php @@ -36,7 +36,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 31.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php b/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php index 92ce7ad2e862b..7a5b8588eb12f 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php b/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php index b4d88501f7bec..0ea747dad8e7b 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php b/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php index 6b16b0d1c5326..14d7788e08bd6 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php @@ -36,7 +36,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php b/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php index 7aa9aecf36d82..bd532f2417a66 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php b/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php index 0de8a7e1ada5a..8f9dc91bc27c6 100644 --- a/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php +++ b/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php @@ -37,7 +37,6 @@ public function __construct( $this->l = $l10nFactory->get('lib'); } - /** * @inheritDoc * @since 30.0.0 diff --git a/lib/public/Template.php b/lib/public/Template.php index c29de52db4f3b..f625dcf4a87df 100644 --- a/lib/public/Template.php +++ b/lib/public/Template.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP; use OCP\Template\ITemplate; @@ -37,7 +38,6 @@ public static function image_path($app, $image) { return \image_path($app, $image); } - /** * Make IMimeTypeDetector->mimeTypeIcon available as a simple function * diff --git a/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php b/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php index 8b94425402017..eedbb83e90393 100644 --- a/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php +++ b/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TextProcessing\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/TextProcessing/Events/TaskFailedEvent.php b/lib/public/TextProcessing/Events/TaskFailedEvent.php index dfdb9137f95ac..5105cc96c15c0 100644 --- a/lib/public/TextProcessing/Events/TaskFailedEvent.php +++ b/lib/public/TextProcessing/Events/TaskFailedEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TextProcessing\Events; use OCP\TextProcessing\Task; diff --git a/lib/public/TextProcessing/Events/TaskSuccessfulEvent.php b/lib/public/TextProcessing/Events/TaskSuccessfulEvent.php index 0716f4d45c6b1..40d137f734303 100644 --- a/lib/public/TextProcessing/Events/TaskSuccessfulEvent.php +++ b/lib/public/TextProcessing/Events/TaskSuccessfulEvent.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TextProcessing\Events; /** diff --git a/lib/public/TextProcessing/Exception/TaskFailureException.php b/lib/public/TextProcessing/Exception/TaskFailureException.php index 06fbdf5e76559..31fc3c4a74db0 100644 --- a/lib/public/TextProcessing/Exception/TaskFailureException.php +++ b/lib/public/TextProcessing/Exception/TaskFailureException.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TextProcessing\Exception; /** diff --git a/lib/public/TextProcessing/FreePromptTaskType.php b/lib/public/TextProcessing/FreePromptTaskType.php index d5af0fc8ffa10..3b2d37a03c403 100644 --- a/lib/public/TextProcessing/FreePromptTaskType.php +++ b/lib/public/TextProcessing/FreePromptTaskType.php @@ -32,7 +32,6 @@ public function __construct( $this->l = $l10nFactory->get('core'); } - /** * @inheritDoc * @since 27.1.0 diff --git a/lib/public/TextProcessing/HeadlineTaskType.php b/lib/public/TextProcessing/HeadlineTaskType.php index f7fea210a6fce..3d6da1274d68b 100644 --- a/lib/public/TextProcessing/HeadlineTaskType.php +++ b/lib/public/TextProcessing/HeadlineTaskType.php @@ -32,7 +32,6 @@ public function __construct( $this->l = $l10nFactory->get('core'); } - /** * @inheritDoc * @since 27.1.0 diff --git a/lib/public/TextProcessing/IManager.php b/lib/public/TextProcessing/IManager.php index 701ad18940f61..c2f40e449e724 100644 --- a/lib/public/TextProcessing/IManager.php +++ b/lib/public/TextProcessing/IManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TextProcessing; use OCP\Common\Exception\NotFoundException; diff --git a/lib/public/TextProcessing/IProvider.php b/lib/public/TextProcessing/IProvider.php index 24efbc1ec8c43..b8905543920a5 100644 --- a/lib/public/TextProcessing/IProvider.php +++ b/lib/public/TextProcessing/IProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TextProcessing; use RuntimeException; diff --git a/lib/public/TextProcessing/IProviderWithExpectedRuntime.php b/lib/public/TextProcessing/IProviderWithExpectedRuntime.php index b3986e8b3a823..3ab51ff1f7447 100644 --- a/lib/public/TextProcessing/IProviderWithExpectedRuntime.php +++ b/lib/public/TextProcessing/IProviderWithExpectedRuntime.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TextProcessing; /** diff --git a/lib/public/TextProcessing/IProviderWithUserId.php b/lib/public/TextProcessing/IProviderWithUserId.php index 197dd3d97407b..5e44500310fd9 100644 --- a/lib/public/TextProcessing/IProviderWithUserId.php +++ b/lib/public/TextProcessing/IProviderWithUserId.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TextProcessing; /** diff --git a/lib/public/TextProcessing/SummaryTaskType.php b/lib/public/TextProcessing/SummaryTaskType.php index d3580ca15d6d4..0f3cc9ebc6c04 100644 --- a/lib/public/TextProcessing/SummaryTaskType.php +++ b/lib/public/TextProcessing/SummaryTaskType.php @@ -32,7 +32,6 @@ public function __construct( $this->l = $l10nFactory->get('core'); } - /** * @inheritDoc * @since 27.1.0 diff --git a/lib/public/TextProcessing/TopicsTaskType.php b/lib/public/TextProcessing/TopicsTaskType.php index ef47ad7c7af02..888fad38cdc9d 100644 --- a/lib/public/TextProcessing/TopicsTaskType.php +++ b/lib/public/TextProcessing/TopicsTaskType.php @@ -32,7 +32,6 @@ public function __construct( $this->l = $l10nFactory->get('core'); } - /** * @inheritDoc * @since 27.1.0 diff --git a/lib/public/TextToImage/IManager.php b/lib/public/TextToImage/IManager.php index df8adfc39f451..3d4abf7fccd2c 100644 --- a/lib/public/TextToImage/IManager.php +++ b/lib/public/TextToImage/IManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\TextToImage; use OCP\DB\Exception; diff --git a/lib/public/TextToImage/IProviderWithUserId.php b/lib/public/TextToImage/IProviderWithUserId.php index a3eedbd9dc0ff..ebec04130bf36 100644 --- a/lib/public/TextToImage/IProviderWithUserId.php +++ b/lib/public/TextToImage/IProviderWithUserId.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\TextToImage; /** diff --git a/lib/public/Translation/IDetectLanguageProvider.php b/lib/public/Translation/IDetectLanguageProvider.php index 18f40b1aa52c3..dfd85f7801924 100644 --- a/lib/public/Translation/IDetectLanguageProvider.php +++ b/lib/public/Translation/IDetectLanguageProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; /** diff --git a/lib/public/Translation/ITranslationManager.php b/lib/public/Translation/ITranslationManager.php index efeaa2de1e2e5..c93d53272398c 100644 --- a/lib/public/Translation/ITranslationManager.php +++ b/lib/public/Translation/ITranslationManager.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; use InvalidArgumentException; diff --git a/lib/public/Translation/ITranslationProvider.php b/lib/public/Translation/ITranslationProvider.php index 39267ab9ca536..c6cb5745f314a 100644 --- a/lib/public/Translation/ITranslationProvider.php +++ b/lib/public/Translation/ITranslationProvider.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; use RuntimeException; diff --git a/lib/public/Translation/ITranslationProviderWithId.php b/lib/public/Translation/ITranslationProviderWithId.php index 93fc641ee0248..4224d6cf759fd 100644 --- a/lib/public/Translation/ITranslationProviderWithId.php +++ b/lib/public/Translation/ITranslationProviderWithId.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; /** diff --git a/lib/public/Translation/ITranslationProviderWithUserId.php b/lib/public/Translation/ITranslationProviderWithUserId.php index 5bc2255f21fad..841c294968c2d 100644 --- a/lib/public/Translation/ITranslationProviderWithUserId.php +++ b/lib/public/Translation/ITranslationProviderWithUserId.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; /** diff --git a/lib/public/Translation/LanguageTuple.php b/lib/public/Translation/LanguageTuple.php index e30a37a8b1180..f159e64c95c33 100644 --- a/lib/public/Translation/LanguageTuple.php +++ b/lib/public/Translation/LanguageTuple.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCP\Translation; use JsonSerializable; diff --git a/lib/public/User/Backend/ABackend.php b/lib/public/User/Backend/ABackend.php index 90be168e235a0..31844ee01d7a8 100644 --- a/lib/public/User/Backend/ABackend.php +++ b/lib/public/User/Backend/ABackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; use OC\User\Backend; diff --git a/lib/public/User/Backend/ICheckPasswordBackend.php b/lib/public/User/Backend/ICheckPasswordBackend.php index db5d7d08cb57b..1324f955e1010 100644 --- a/lib/public/User/Backend/ICheckPasswordBackend.php +++ b/lib/public/User/Backend/ICheckPasswordBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICountUsersBackend.php b/lib/public/User/Backend/ICountUsersBackend.php index 194cf465cbe72..99d0a32f9e0c7 100644 --- a/lib/public/User/Backend/ICountUsersBackend.php +++ b/lib/public/User/Backend/ICountUsersBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICreateUserBackend.php b/lib/public/User/Backend/ICreateUserBackend.php index f273c6d7f8bad..d89b5d41ea408 100644 --- a/lib/public/User/Backend/ICreateUserBackend.php +++ b/lib/public/User/Backend/ICreateUserBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ICustomLogout.php b/lib/public/User/Backend/ICustomLogout.php index 6d0f03387cee5..72571e91a78b5 100644 --- a/lib/public/User/Backend/ICustomLogout.php +++ b/lib/public/User/Backend/ICustomLogout.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetDisplayNameBackend.php b/lib/public/User/Backend/IGetDisplayNameBackend.php index a9c92b8b1461c..b2229d4298656 100644 --- a/lib/public/User/Backend/IGetDisplayNameBackend.php +++ b/lib/public/User/Backend/IGetDisplayNameBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetHomeBackend.php b/lib/public/User/Backend/IGetHomeBackend.php index f280f4c93706d..bdd32781e8c3e 100644 --- a/lib/public/User/Backend/IGetHomeBackend.php +++ b/lib/public/User/Backend/IGetHomeBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IGetRealUIDBackend.php b/lib/public/User/Backend/IGetRealUIDBackend.php index 8041043f7d594..96fd4053ca2a7 100644 --- a/lib/public/User/Backend/IGetRealUIDBackend.php +++ b/lib/public/User/Backend/IGetRealUIDBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IPasswordConfirmationBackend.php b/lib/public/User/Backend/IPasswordConfirmationBackend.php index 856f65ada0089..4dcdf45f192b3 100644 --- a/lib/public/User/Backend/IPasswordConfirmationBackend.php +++ b/lib/public/User/Backend/IPasswordConfirmationBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/IProvideAvatarBackend.php b/lib/public/User/Backend/IProvideAvatarBackend.php index 6a694a4de9575..a4ab960f3b055 100644 --- a/lib/public/User/Backend/IProvideAvatarBackend.php +++ b/lib/public/User/Backend/IProvideAvatarBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISearchKnownUsersBackend.php b/lib/public/User/Backend/ISearchKnownUsersBackend.php index 4b3eef6005f5a..c09b82eeb0297 100644 --- a/lib/public/User/Backend/ISearchKnownUsersBackend.php +++ b/lib/public/User/Backend/ISearchKnownUsersBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISetDisplayNameBackend.php b/lib/public/User/Backend/ISetDisplayNameBackend.php index 617f1735021ed..52ed8cc2b56c5 100644 --- a/lib/public/User/Backend/ISetDisplayNameBackend.php +++ b/lib/public/User/Backend/ISetDisplayNameBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Backend/ISetPasswordBackend.php b/lib/public/User/Backend/ISetPasswordBackend.php index 571349df58f67..fe74247dfbb50 100644 --- a/lib/public/User/Backend/ISetPasswordBackend.php +++ b/lib/public/User/Backend/ISetPasswordBackend.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Backend; /** diff --git a/lib/public/User/Events/BeforePasswordUpdatedEvent.php b/lib/public/User/Events/BeforePasswordUpdatedEvent.php index 489878442b89c..0197095ce0042 100644 --- a/lib/public/User/Events/BeforePasswordUpdatedEvent.php +++ b/lib/public/User/Events/BeforePasswordUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserCreatedEvent.php b/lib/public/User/Events/BeforeUserCreatedEvent.php index 62ee32003cea1..de71772822655 100644 --- a/lib/public/User/Events/BeforeUserCreatedEvent.php +++ b/lib/public/User/Events/BeforeUserCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserDeletedEvent.php b/lib/public/User/Events/BeforeUserDeletedEvent.php index 27bc26a125f60..e876e4764e4af 100644 --- a/lib/public/User/Events/BeforeUserDeletedEvent.php +++ b/lib/public/User/Events/BeforeUserDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php b/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php index 4e76e0aa36f51..630692c34ec3e 100644 --- a/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/BeforeUserLoggedOutEvent.php b/lib/public/User/Events/BeforeUserLoggedOutEvent.php index 9b6eb81ab104c..c34d23dedd8ad 100644 --- a/lib/public/User/Events/BeforeUserLoggedOutEvent.php +++ b/lib/public/User/Events/BeforeUserLoggedOutEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/OutOfOfficeEndedEvent.php b/lib/public/User/Events/OutOfOfficeEndedEvent.php index 0817994f0698a..654b6fa7f9b16 100644 --- a/lib/public/User/Events/OutOfOfficeEndedEvent.php +++ b/lib/public/User/Events/OutOfOfficeEndedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/OutOfOfficeStartedEvent.php b/lib/public/User/Events/OutOfOfficeStartedEvent.php index 1b5c69b3cfbe3..2bba621e94d8b 100644 --- a/lib/public/User/Events/OutOfOfficeStartedEvent.php +++ b/lib/public/User/Events/OutOfOfficeStartedEvent.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/PasswordUpdatedEvent.php b/lib/public/User/Events/PasswordUpdatedEvent.php index d3fd8f078fed2..47952e252a365 100644 --- a/lib/public/User/Events/PasswordUpdatedEvent.php +++ b/lib/public/User/Events/PasswordUpdatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/PostLoginEvent.php b/lib/public/User/Events/PostLoginEvent.php index 0a552ef755b52..af12ee0a0403f 100644 --- a/lib/public/User/Events/PostLoginEvent.php +++ b/lib/public/User/Events/PostLoginEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserChangedEvent.php b/lib/public/User/Events/UserChangedEvent.php index f71fb17fff0c9..3606bbda9dae3 100644 --- a/lib/public/User/Events/UserChangedEvent.php +++ b/lib/public/User/Events/UserChangedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserCreatedEvent.php b/lib/public/User/Events/UserCreatedEvent.php index 46b990206c0ed..7d524c46dd398 100644 --- a/lib/public/User/Events/UserCreatedEvent.php +++ b/lib/public/User/Events/UserCreatedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserDeletedEvent.php b/lib/public/User/Events/UserDeletedEvent.php index 9b74ff960630c..37aad2e83c3f5 100644 --- a/lib/public/User/Events/UserDeletedEvent.php +++ b/lib/public/User/Events/UserDeletedEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserFirstTimeLoggedInEvent.php b/lib/public/User/Events/UserFirstTimeLoggedInEvent.php index 08f7aacb1c20a..8abfc781885e4 100644 --- a/lib/public/User/Events/UserFirstTimeLoggedInEvent.php +++ b/lib/public/User/Events/UserFirstTimeLoggedInEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLiveStatusEvent.php b/lib/public/User/Events/UserLiveStatusEvent.php index b1f4c9c1d7525..bf918da7cec0a 100644 --- a/lib/public/User/Events/UserLiveStatusEvent.php +++ b/lib/public/User/Events/UserLiveStatusEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLoggedInEvent.php b/lib/public/User/Events/UserLoggedInEvent.php index 53f61073a5966..aa3da7a18b647 100644 --- a/lib/public/User/Events/UserLoggedInEvent.php +++ b/lib/public/User/Events/UserLoggedInEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLoggedInWithCookieEvent.php b/lib/public/User/Events/UserLoggedInWithCookieEvent.php index 6f9def0df7e12..dcaa042be5acc 100644 --- a/lib/public/User/Events/UserLoggedInWithCookieEvent.php +++ b/lib/public/User/Events/UserLoggedInWithCookieEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/Events/UserLoggedOutEvent.php b/lib/public/User/Events/UserLoggedOutEvent.php index dbdd6d787031b..b1195d218f568 100644 --- a/lib/public/User/Events/UserLoggedOutEvent.php +++ b/lib/public/User/Events/UserLoggedOutEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/User/GetQuotaEvent.php b/lib/public/User/GetQuotaEvent.php index c3b6c018fd8f6..30134f9c387bb 100644 --- a/lib/public/User/GetQuotaEvent.php +++ b/lib/public/User/GetQuotaEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\User; use OCP\EventDispatcher\Event; diff --git a/lib/public/UserStatus/IManager.php b/lib/public/UserStatus/IManager.php index d291ee0a5406e..d0c5f947b5814 100644 --- a/lib/public/UserStatus/IManager.php +++ b/lib/public/UserStatus/IManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\UserStatus; /** @@ -27,7 +28,6 @@ interface IManager { */ public function getUserStatuses(array $userIds): array; - /** * Set a new status for the selected user. * diff --git a/lib/public/UserStatus/IProvider.php b/lib/public/UserStatus/IProvider.php index ef0dc8310851c..3bcf7375fe1ac 100644 --- a/lib/public/UserStatus/IProvider.php +++ b/lib/public/UserStatus/IProvider.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\UserStatus; /** diff --git a/lib/public/UserStatus/IUserStatus.php b/lib/public/UserStatus/IUserStatus.php index 48eecfec24a31..b66beb72b1b3c 100644 --- a/lib/public/UserStatus/IUserStatus.php +++ b/lib/public/UserStatus/IUserStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\UserStatus; use DateTimeImmutable; diff --git a/lib/public/WorkflowEngine/EntityContext/IContextPortation.php b/lib/public/WorkflowEngine/EntityContext/IContextPortation.php index 1cafe3f5b52da..e2be7f215bdd8 100644 --- a/lib/public/WorkflowEngine/EntityContext/IContextPortation.php +++ b/lib/public/WorkflowEngine/EntityContext/IContextPortation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IDisplayName.php b/lib/public/WorkflowEngine/EntityContext/IDisplayName.php index c2677e4805e12..78bcb26ee2d41 100644 --- a/lib/public/WorkflowEngine/EntityContext/IDisplayName.php +++ b/lib/public/WorkflowEngine/EntityContext/IDisplayName.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IDisplayText.php b/lib/public/WorkflowEngine/EntityContext/IDisplayText.php index 4bfb454bf4795..335610ca956d5 100644 --- a/lib/public/WorkflowEngine/EntityContext/IDisplayText.php +++ b/lib/public/WorkflowEngine/EntityContext/IDisplayText.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IIcon.php b/lib/public/WorkflowEngine/EntityContext/IIcon.php index c019cda3cf641..66ac09b8637ca 100644 --- a/lib/public/WorkflowEngine/EntityContext/IIcon.php +++ b/lib/public/WorkflowEngine/EntityContext/IIcon.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/EntityContext/IUrl.php b/lib/public/WorkflowEngine/EntityContext/IUrl.php index 25e8ecb5a0e07..b5d9d75fe0af6 100644 --- a/lib/public/WorkflowEngine/EntityContext/IUrl.php +++ b/lib/public/WorkflowEngine/EntityContext/IUrl.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\EntityContext; /** diff --git a/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php b/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php index 666a9ef703962..fadeb485b285c 100644 --- a/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php +++ b/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php b/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php index 0c43758d66078..c5908a1576386 100644 --- a/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php b/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php index 4f53292557861..da2c1e83cf439 100644 --- a/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php b/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php index 5a22975a9a820..f167b4acfaeb4 100644 --- a/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php +++ b/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine\Events; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/GenericEntityEvent.php b/lib/public/WorkflowEngine/GenericEntityEvent.php index 7e1b20370df84..8f24629f12dbd 100644 --- a/lib/public/WorkflowEngine/GenericEntityEvent.php +++ b/lib/public/WorkflowEngine/GenericEntityEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/ICheck.php b/lib/public/WorkflowEngine/ICheck.php index 4671eb84c3eab..8e71f1ceb9ea9 100644 --- a/lib/public/WorkflowEngine/ICheck.php +++ b/lib/public/WorkflowEngine/ICheck.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IComplexOperation.php b/lib/public/WorkflowEngine/IComplexOperation.php index 45e30029d7d0d..e654f627a9897 100644 --- a/lib/public/WorkflowEngine/IComplexOperation.php +++ b/lib/public/WorkflowEngine/IComplexOperation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IEntity.php b/lib/public/WorkflowEngine/IEntity.php index 0b469b479e682..fa5bdefb5f7dc 100644 --- a/lib/public/WorkflowEngine/IEntity.php +++ b/lib/public/WorkflowEngine/IEntity.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/IEntityCheck.php b/lib/public/WorkflowEngine/IEntityCheck.php index ccfeb2ece0bbc..2c2aba057397a 100644 --- a/lib/public/WorkflowEngine/IEntityCheck.php +++ b/lib/public/WorkflowEngine/IEntityCheck.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IEntityEvent.php b/lib/public/WorkflowEngine/IEntityEvent.php index 66088c26b4784..e6162e8770d83 100644 --- a/lib/public/WorkflowEngine/IEntityEvent.php +++ b/lib/public/WorkflowEngine/IEntityEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/public/WorkflowEngine/IFileCheck.php b/lib/public/WorkflowEngine/IFileCheck.php index c26c4d9fcefdd..14d065e6b7f9e 100644 --- a/lib/public/WorkflowEngine/IFileCheck.php +++ b/lib/public/WorkflowEngine/IFileCheck.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; use OCP\Files\Storage\IStorage; diff --git a/lib/public/WorkflowEngine/IManager.php b/lib/public/WorkflowEngine/IManager.php index f9655dfa35b49..c0174c95a259f 100644 --- a/lib/public/WorkflowEngine/IManager.php +++ b/lib/public/WorkflowEngine/IManager.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; use OCP\AppFramework\Attribute\Consumable; diff --git a/lib/public/WorkflowEngine/IOperation.php b/lib/public/WorkflowEngine/IOperation.php index ac519d33c25af..1a880f37d03a8 100644 --- a/lib/public/WorkflowEngine/IOperation.php +++ b/lib/public/WorkflowEngine/IOperation.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; use OCP\EventDispatcher\Event; diff --git a/lib/public/WorkflowEngine/IRuleMatcher.php b/lib/public/WorkflowEngine/IRuleMatcher.php index 323c579e6a340..d9264215617ef 100644 --- a/lib/public/WorkflowEngine/IRuleMatcher.php +++ b/lib/public/WorkflowEngine/IRuleMatcher.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; use RuntimeException; diff --git a/lib/public/WorkflowEngine/ISpecificOperation.php b/lib/public/WorkflowEngine/ISpecificOperation.php index aa8c4eeb0c2f7..8df1b7f8cc5ea 100644 --- a/lib/public/WorkflowEngine/ISpecificOperation.php +++ b/lib/public/WorkflowEngine/ISpecificOperation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCP\WorkflowEngine; /** diff --git a/lib/unstable/Config/IUserConfig.php b/lib/unstable/Config/IUserConfig.php index bffd6a96ebde8..7a215b8104697 100644 --- a/lib/unstable/Config/IUserConfig.php +++ b/lib/unstable/Config/IUserConfig.php @@ -665,7 +665,6 @@ public function updateSensitive(string $userId, string $app, string $key, bool $ */ public function updateGlobalSensitive(string $app, string $key, bool $sensitive): void; - /** * switch indexed status of a config value * diff --git a/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php b/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php index f97de0f5d3942..57103fa5cada3 100644 --- a/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php +++ b/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Enum; /** diff --git a/lib/unstable/Security/Signature/Enum/SignatoryStatus.php b/lib/unstable/Security/Signature/Enum/SignatoryStatus.php index a46e5449cf06f..ea85128e89d15 100644 --- a/lib/unstable/Security/Signature/Enum/SignatoryStatus.php +++ b/lib/unstable/Security/Signature/Enum/SignatoryStatus.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Enum; /** diff --git a/lib/unstable/Security/Signature/Enum/SignatoryType.php b/lib/unstable/Security/Signature/Enum/SignatoryType.php index c3bec63d79ad0..5b2061693caff 100644 --- a/lib/unstable/Security/Signature/Enum/SignatoryType.php +++ b/lib/unstable/Security/Signature/Enum/SignatoryType.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Enum; /** diff --git a/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php b/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php index 7614147bc70cb..89d33f440c2ce 100644 --- a/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php +++ b/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Enum; /** diff --git a/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php b/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php index 5549c41c1e52e..08f1ed98a89cb 100644 --- a/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php +++ b/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Exceptions; /** diff --git a/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php b/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php index 9967fb3f11e9e..7d07fc1a82db6 100644 --- a/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php +++ b/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Exceptions; /** diff --git a/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php b/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php index 3301973224bfd..5f4a3878aaf0c 100644 --- a/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php +++ b/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Exceptions; /** diff --git a/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php b/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php index dbf23feb4e9d4..ea3aa191564d8 100644 --- a/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php +++ b/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Exceptions; /** diff --git a/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php b/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php index 761b04ae228a0..f3ce9c82eeb7f 100644 --- a/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php +++ b/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Exceptions; /** diff --git a/lib/unstable/Security/Signature/IIncomingSignedRequest.php b/lib/unstable/Security/Signature/IIncomingSignedRequest.php index bed64ef140445..15e56a5eea92c 100644 --- a/lib/unstable/Security/Signature/IIncomingSignedRequest.php +++ b/lib/unstable/Security/Signature/IIncomingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature; use NCU\Security\Signature\Exceptions\SignatoryNotFoundException; diff --git a/lib/unstable/Security/Signature/IOutgoingSignedRequest.php b/lib/unstable/Security/Signature/IOutgoingSignedRequest.php index ac99c5e4a5028..f4110da2463a3 100644 --- a/lib/unstable/Security/Signature/IOutgoingSignedRequest.php +++ b/lib/unstable/Security/Signature/IOutgoingSignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature; use NCU\Security\Signature\Enum\SignatureAlgorithm; diff --git a/lib/unstable/Security/Signature/ISignatoryManager.php b/lib/unstable/Security/Signature/ISignatoryManager.php index 69b7c3022fac9..bad1f58bfd2ad 100644 --- a/lib/unstable/Security/Signature/ISignatoryManager.php +++ b/lib/unstable/Security/Signature/ISignatoryManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature; use NCU\Security\Signature\Model\Signatory; diff --git a/lib/unstable/Security/Signature/ISignatureManager.php b/lib/unstable/Security/Signature/ISignatureManager.php index 3cd51d1558290..d0f29c296301e 100644 --- a/lib/unstable/Security/Signature/ISignatureManager.php +++ b/lib/unstable/Security/Signature/ISignatureManager.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature; use NCU\Security\Signature\Exceptions\IdentityNotFoundException; diff --git a/lib/unstable/Security/Signature/ISignedRequest.php b/lib/unstable/Security/Signature/ISignedRequest.php index 28a9fc87b445e..aa02728463eb9 100644 --- a/lib/unstable/Security/Signature/ISignedRequest.php +++ b/lib/unstable/Security/Signature/ISignedRequest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature; use NCU\Security\Signature\Enum\DigestAlgorithm; diff --git a/lib/unstable/Security/Signature/Model/Signatory.php b/lib/unstable/Security/Signature/Model/Signatory.php index de0aeebc9dbdb..1befe25685414 100644 --- a/lib/unstable/Security/Signature/Model/Signatory.php +++ b/lib/unstable/Security/Signature/Model/Signatory.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\Security\Signature\Model; use JsonSerializable; diff --git a/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php b/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php index e66ba433c4baa..769d3a9e0d3ed 100644 --- a/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php +++ b/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\WorkflowEngine\Events; use OCP\EventDispatcher\Event; @@ -16,11 +17,6 @@ */ final class RegisterRuntimeOperationsEvent extends Event { - - - - - /** * @experimental 34.0.0 */ diff --git a/lib/unstable/WorkflowEngine/RuntimeOperation.php b/lib/unstable/WorkflowEngine/RuntimeOperation.php index 84764c0fe04b6..ea33e9a3926c5 100644 --- a/lib/unstable/WorkflowEngine/RuntimeOperation.php +++ b/lib/unstable/WorkflowEngine/RuntimeOperation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\WorkflowEngine; use OCP\WorkflowEngine\IEntity; diff --git a/lib/unstable/WorkflowEngine/RuntimeScope.php b/lib/unstable/WorkflowEngine/RuntimeScope.php index cc149f0dd7281..695f1bb9eaa5c 100644 --- a/lib/unstable/WorkflowEngine/RuntimeScope.php +++ b/lib/unstable/WorkflowEngine/RuntimeScope.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace NCU\WorkflowEngine; /** diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index fced4e4b8a2df..219ead209a524 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -37,7 +37,6 @@ protected function setUp(): void { $this->command = new DeleteConfig($this->appConfig, $this->configManager); } - public static function dataDelete(): array { return [ [ diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index 1e68f76d86f59..36f96803dc35b 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -38,7 +38,6 @@ protected function setUp(): void { $this->command = new GetConfig($this->appConfig, $this->configManager); } - public static function dataGet(): array { return [ // String output as json @@ -77,7 +76,6 @@ public static function dataGet(): array { // Associative array output as json/plain ['name', ['a' => 1, 'b' => 2], true, null, false, 'json', 0, json_encode(['a' => 1, 'b' => 2])], ['name', ['a' => 1, 'b' => 2], true, null, false, 'plain', 0, "a: 1\nb: 2"], - ]; } diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index 6a6f03f6125db..25cd1c5be738a 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -39,7 +39,6 @@ protected function setUp(): void { $this->command = new SetConfig($this->appConfig, $this->configManager); } - public static function dataSet(): array { return [ [ diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index 2718d6f38da00..c8133f648f77a 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -40,7 +40,6 @@ protected function setUp(): void { $this->command = new GetConfig($systemConfig); } - public static function getData(): array { return [ // String output as json @@ -85,7 +84,6 @@ public static function getData(): array { [['name', 'a'], ['a' => 1, 'b' => 2], true, null, false, 'plain', 0, '1'], [['name', 'c'], ['a' => 1, 'b' => 2], true, true, true, 'json', 0, json_encode(true)], [['name', 'c'], ['a' => 1, 'b' => 2], true, true, false, 'json', 1, null], - ]; } diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index 78ea61e42e4d8..6ed1350ea9c86 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -41,7 +41,6 @@ protected function setUp(): void { $this->command = new SetConfig($systemConfig, new CastHelper()); } - public static function dataTest() { return [ [['name'], 'newvalue', null, 'newvalue'], diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 38878c871bdbb..f831a6e181fa0 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -231,7 +231,6 @@ public static function dataTestMoveSystemKeys(): array { ]; } - public function testMoveUserKeys(): void { $changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot') ->setConstructorArgs( @@ -306,7 +305,6 @@ public static function dataTestMoveUserEncryptionFolder(): array { ]; } - #[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareParentFolder')] public function testPrepareParentFolder($path, $pathExists): void { $this->view->expects($this->any())->method('file_exists') @@ -349,7 +347,6 @@ public function testTargetExists(): void { ); } - public function testTargetExistsException(): void { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 009eb36eb7fe2..a3c761d8da466 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -150,7 +150,6 @@ public static function dataTestExecute(): array { ]; } - public function testExecuteFailure(): void { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index 96310a6c75ba3..3c6fc8d2b95f2 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -39,7 +39,6 @@ protected function setUp(): void { $this->command = new Disable($config); } - public static function dataDisable(): array { return [ ['yes', true, 'Encryption disabled'], diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index 234984b1c0954..e90d7b4e66f93 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -46,7 +46,6 @@ protected function setUp(): void { $this->command = new Enable($config, $manager); } - public static function dataEnable(): array { return [ ['no', '', [], true, 'Encryption enabled', 'No encryption module is loaded'], diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 2787c61c38312..d16dcf9074c5f 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -82,7 +82,6 @@ public static function dataTestExecute(): array { ]; } - public function testExecuteException(): void { $this->expectException(\Exception::class); diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index af68e5e5b4b7e..a3be945d5b9a7 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -44,7 +44,6 @@ protected function setUp(): void { $this->command = new SetDefaultModule($this->manager, $this->config); } - public static function dataSetDefaultModule(): array { return [ ['ID0', 'ID0', null, null, 'already'], diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 66131f9e3b610..a431e33cf81a8 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -74,14 +74,12 @@ public function testChangeTimezone(): void { self::invokePrivate($this->command, 'execute', [$this->consoleInput, $this->consoleOutput]); } - public function testValidateBackend(): void { $this->expectException(\InvalidArgumentException::class); self::invokePrivate($this->command, 'validateBackend', ['notabackend']); } - public function testValidateTimezone(): void { $this->expectException(\Exception::class); @@ -108,7 +106,6 @@ public function testConvertLevelString(string $levelString, int $expectedInt): v ); } - public function testConvertLevelStringInvalid(): void { $this->expectException(\InvalidArgumentException::class); @@ -132,7 +129,6 @@ public function testConvertLevelNumber(int $levelNum, string $expectedString): v ); } - public function testConvertLevelNumberInvalid(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Core/Command/Maintenance/ModeTest.php b/tests/Core/Command/Maintenance/ModeTest.php index ec44a770ad662..669a77ea0797c 100644 --- a/tests/Core/Command/Maintenance/ModeTest.php +++ b/tests/Core/Command/Maintenance/ModeTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Tests\Core\Command\Maintenance; use OC\Core\Command\Maintenance\Mode; diff --git a/tests/Core/Command/Maintenance/UpdateTheme.php b/tests/Core/Command/Maintenance/UpdateTheme.php index 626b51d0a205b..8774412b8ec24 100644 --- a/tests/Core/Command/Maintenance/UpdateTheme.php +++ b/tests/Core/Command/Maintenance/UpdateTheme.php @@ -22,7 +22,6 @@ class UpdateThemeTest extends TestCase { /** @var ICacheFactory */ protected $cacheFactory; - /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $consoleInput; /** @var \PHPUnit\Framework\MockObject\MockObject */ diff --git a/tests/Core/Command/Preview/CleanupTest.php b/tests/Core/Command/Preview/CleanupTest.php index 5d9d51026a2b6..84b0068842f6d 100644 --- a/tests/Core/Command/Preview/CleanupTest.php +++ b/tests/Core/Command/Preview/CleanupTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Core\Command\Preview; use OC\Core\Command\Preview\Cleanup; diff --git a/tests/Core/Command/User/AuthTokens/DeleteTest.php b/tests/Core/Command/User/AuthTokens/DeleteTest.php index c7b7f2ce43c95..01d64f878cbd7 100644 --- a/tests/Core/Command/User/AuthTokens/DeleteTest.php +++ b/tests/Core/Command/User/AuthTokens/DeleteTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Tests\Core\Command\User\AuthTokens; use OC\Authentication\Token\IProvider; diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index ae9694435fb44..f3958750b2d59 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -40,7 +40,6 @@ protected function setUp(): void { $this->command = new Delete($userManager); } - public static function validUserLastSeen(): array { return [ [true, 'The specified user was deleted'], diff --git a/tests/Core/Command/User/ProfileTest.php b/tests/Core/Command/User/ProfileTest.php index 259a0d99b9236..5ebbd9182a3a2 100644 --- a/tests/Core/Command/User/ProfileTest.php +++ b/tests/Core/Command/User/ProfileTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Core\Command\User; use OC\Core\Command\User\Profile; @@ -399,7 +400,6 @@ public function testExecuteList(): void { ->method('writeArrayInOutputFormat') ->with($this->consoleInput, $this->consoleOutput, $profileData); - $this->assertEquals(0, $this->invokePrivate($command, 'execute', [$this->consoleInput, $this->consoleOutput])); } diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index dac504093575c..75c70a9994995 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -447,7 +447,6 @@ public function testExecuteList(): void { ->method('writeArrayInOutputFormat') ->with($this->consoleInput, $this->consoleOutput, ['settings']); - $this->assertEquals(0, $this->invokePrivate($command, 'execute', [$this->consoleInput, $this->consoleOutput])); } } diff --git a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php index 6931c9bd70dfc..d20dde5fe29a8 100644 --- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php +++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php @@ -280,7 +280,6 @@ public function testGrantPageValid(): void { $this->assertSame(Http::STATUS_OK, $result->getStatus()); } - public function testGenerateAppPasswordInvalidStateToken(): void { $this->session->method('get') ->willReturnCallback(function ($name) { diff --git a/tests/Core/Controller/CssControllerTest.php b/tests/Core/Controller/CssControllerTest.php index 7f967bf5d6fb7..b5afd3a1728b1 100644 --- a/tests/Core/Controller/CssControllerTest.php +++ b/tests/Core/Controller/CssControllerTest.php @@ -68,7 +68,6 @@ public function testNoCssFolderForApp(): void { $this->assertInstanceOf(NotFoundResponse::class, $result); } - public function testNoCssFile(): void { $folder = $this->createMock(ISimpleFolder::class); $this->appData->method('getFolder') diff --git a/tests/Core/Controller/GuestAvatarControllerTest.php b/tests/Core/Controller/GuestAvatarControllerTest.php index 2d7c1de246099..0626f0198fdaf 100644 --- a/tests/Core/Controller/GuestAvatarControllerTest.php +++ b/tests/Core/Controller/GuestAvatarControllerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Core\Controller; use OC\Core\Controller\GuestAvatarController; diff --git a/tests/Core/Controller/JsControllerTest.php b/tests/Core/Controller/JsControllerTest.php index 11ad58b4dfdcb..d15d0c938b7c8 100644 --- a/tests/Core/Controller/JsControllerTest.php +++ b/tests/Core/Controller/JsControllerTest.php @@ -68,7 +68,6 @@ public function testNoCssFolderForApp(): void { $this->assertInstanceOf(NotFoundResponse::class, $result); } - public function testNoCssFile(): void { $folder = $this->createMock(ISimpleFolder::class); $this->appData->method('getFolder') diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index 7f3333172ff86..05bea87717407 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -105,7 +105,6 @@ protected function setUp(): void { return vsprintf($text, $parameters); }); - $this->request->method('getRemoteAddress') ->willReturn('1.2.3.4'); $this->request->method('getHeader') diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index 37b9272695d5e..26c9b4942221c 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -676,7 +676,6 @@ public function testTwoUsersWithSameEmail(): void { $this->assertEquals($expectedResponse, $response); } - /** * @return array */ diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 2101dea06a9e5..46b4afaff0a44 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -153,7 +153,6 @@ public function testBeforeControllerNoTwoFactorCheckNeeded(): void { $this->middleware->beforeController($controller, 'index'); } - public function testBeforeControllerTwoFactorAuthRequired(): void { $this->expectException(TwoFactorAuthRequiredException::class); @@ -180,7 +179,6 @@ public function testBeforeControllerTwoFactorAuthRequired(): void { $this->middleware->beforeController($controller, 'index'); } - public function testBeforeControllerUserAlreadyLoggedIn(): void { $this->expectException(UserAlreadyLoggedInException::class); @@ -279,7 +277,6 @@ public function testRequires2FASetupDone(bool $hasProvider, bool $missingProvide $providers = []; } - $user = $this->createMock(IUser::class); $this->userSession diff --git a/tests/lib/Accounts/AccountTest.php b/tests/lib/Accounts/AccountTest.php index d7d4ada081290..6c1b04dc34a81 100644 --- a/tests/lib/Accounts/AccountTest.php +++ b/tests/lib/Accounts/AccountTest.php @@ -101,7 +101,6 @@ public function testGetFilteredProperties(): void { $col->addProperty($additionalProperty2); $account->setPropertyCollection($col); - $this->assertEquals( [ IAccountManager::PROPERTY_WEBSITE => $properties[IAccountManager::PROPERTY_WEBSITE], diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index dcf37db5c7e45..d90d66dcee34d 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -72,7 +72,6 @@ public function testGetConsumers(): void { $this->assertNotEmpty($consumers); } - public function testGetConsumersInvalidConsumer(): void { $this->expectException(\InvalidArgumentException::class); @@ -161,7 +160,6 @@ protected function mockUserSession($user) { ->willReturn($mockUser); } - public function testPublishExceptionNoApp(): void { $this->expectException(IncompleteActivityException::class); @@ -169,7 +167,6 @@ public function testPublishExceptionNoApp(): void { $this->activityManager->publish($event); } - public function testPublishExceptionNoType(): void { $this->expectException(IncompleteActivityException::class); @@ -178,7 +175,6 @@ public function testPublishExceptionNoType(): void { $this->activityManager->publish($event); } - public function testPublishExceptionNoAffectedUser(): void { $this->expectException(IncompleteActivityException::class); @@ -188,7 +184,6 @@ public function testPublishExceptionNoAffectedUser(): void { $this->activityManager->publish($event); } - public function testPublishExceptionNoSubject(): void { $this->expectException(IncompleteActivityException::class); diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php index 798e23423a6f9..df4e8ca26f389 100644 --- a/tests/lib/AllConfigTest.php +++ b/tests/lib/AllConfigTest.php @@ -167,7 +167,6 @@ public function testSetUserValueUnexpectedValue($value): void { $config->setUserValue('userSetBool', 'appSetBool', 'keySetBool', $value); } - public function testSetUserValueWithPreConditionFailure(): void { $this->expectException(PreConditionNotMetException::class); diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index a7f552535a929..9d554dcfeba07 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -52,7 +52,6 @@ public function testGetBundleByIdentifier(): void { $this->assertEquals(new GroupwareBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('GroupwareBundle')); } - public function testGetBundleByIdentifierWithException(): void { $this->expectException(\BadMethodCallException::class); $this->expectExceptionMessage('Bundle with specified identifier does not exist'); diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php index 913fb9fb2c030..c212356125082 100644 --- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php +++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php @@ -1817,7 +1817,6 @@ class AppFetcherTest extends TestCase { 'ETag' => '"myETag"', ]; - #[\Override] protected function setUp(): void { parent::setUp(); @@ -1962,7 +1961,6 @@ public function testAppstoreDisabled(): void { $this->assertEquals([], $this->fetcher->get()); } - public function testNoInternet(): void { $this->config ->method('getSystemValueString') diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php index dd220c44b36fb..3a0d30a32653a 100644 --- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php +++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php @@ -601,7 +601,6 @@ public function testGetNoMatchingETag(): void { $this->assertSame($expected, $this->fetcher->get()); } - public function testFetchAfterUpgradeNoETag(): void { $this->config->method('getSystemValueString') ->willReturnCallback(function ($key, $default) { diff --git a/tests/lib/App/AppStore/Version/VersionParserTest.php b/tests/lib/App/AppStore/Version/VersionParserTest.php index de50723870b98..7bd158870b644 100644 --- a/tests/lib/App/AppStore/Version/VersionParserTest.php +++ b/tests/lib/App/AppStore/Version/VersionParserTest.php @@ -69,7 +69,6 @@ public function testGetVersion($input, $this->assertEquals($expected, $this->versionParser->getVersion($input)); } - public function testGetVersionException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Version cannot be parsed: BogusVersion'); @@ -77,7 +76,6 @@ public function testGetVersionException(): void { $this->versionParser->getVersion('BogusVersion'); } - public function testGetVersionExceptionWithMultiple(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Version cannot be parsed: >=8.2 <=9.1a'); diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index ec3b55835ba91..d4e68f10a23ed 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\App; use OC\App\DependencyAnalyzer; diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index 09169801ff420..adc135af650ec 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\App; use OC; diff --git a/tests/lib/App/PlatformRepositoryTest.php b/tests/lib/App/PlatformRepositoryTest.php index 4fc718bb97ac0..0045c0209e54d 100644 --- a/tests/lib/App/PlatformRepositoryTest.php +++ b/tests/lib/App/PlatformRepositoryTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\App; use OC\App\PlatformRepository; diff --git a/tests/lib/AppConfigIntegrationTest.php b/tests/lib/AppConfigIntegrationTest.php index 2064ccf4fbc30..b9b84065d2249 100644 --- a/tests/lib/AppConfigIntegrationTest.php +++ b/tests/lib/AppConfigIntegrationTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test; use InvalidArgumentException; @@ -558,7 +559,6 @@ public function testGetValueArrayOnWrongType(): void { $config->getValueArray('typed', 'string'); } - /** * @return array * @see testGetValueType @@ -804,7 +804,6 @@ public function testSetValueBoolIsUpdatedDatabase(): void { $this->assertSame(false, $config->getValueBool('feed', 'bool', true)); } - public function testSetValueArray(): void { $config = $this->generateAppConfig(); $config->setValueArray('feed', 'array', ['test' => 1]); @@ -1155,7 +1154,6 @@ public function testSetNonLazyValueArrayAsLazy(): void { $this->assertSame(['test' => 1], $config->getValueArray('feed', 'array', [], true)); } - public function testSetSensitiveValueArray(): void { $config = $this->generateAppConfig(); $config->setValueArray('feed', 'array', ['test' => 1], sensitive: true); diff --git a/tests/lib/AppConfigMigrationFallbackTest.php b/tests/lib/AppConfigMigrationFallbackTest.php index 63e7a96bca27c..7e21a2a07306a 100644 --- a/tests/lib/AppConfigMigrationFallbackTest.php +++ b/tests/lib/AppConfigMigrationFallbackTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test; use Doctrine\DBAL\Exception\InvalidFieldNameException; diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 4c75d6637b384..ec739d863c158 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test; use OC\AppConfig; @@ -95,7 +96,6 @@ public function testCachedRead(): void { $this->connection->expects(self::never())->method('getQueryBuilder'); $config = $this->getAppConfig(true); - $this->assertSame('some-value', $config->getValueString('appid', 'some-key')); $this->assertSame('other value', $config->getValueString('appid', 'other-key')); $this->assertSame(AppConfig::VALUE_STRING, $config->getValueType('appid', 'some-key', false)); @@ -127,7 +127,6 @@ public function testCachedLazyRead(): void { $this->connection->expects(self::never())->method('getQueryBuilder'); $config = $this->getAppConfig(true); - $this->assertSame('fast value', $config->getValueString('appid', 'fast-key')); $this->assertSame('lazy value', $config->getValueString('appid', 'lazy-key', '', true)); } @@ -162,7 +161,6 @@ public function testOnlyFastKeyCached(): void { $this->connection->expects(self::once())->method('getQueryBuilder')->willReturn($queryBuilder); $config = $this->getAppConfig(true); - $this->assertSame('fast value', $config->getValueString('appid', 'fast-key')); $this->assertSame('lazy value', $config->getValueString('appid', 'lazy-key', '', true)); } diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index 7e76c655e6ae1..334eeefdab6c2 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -27,7 +27,6 @@ function rrmdir($directory) { return rmdir($directory); } - class AppTest extends \Test\TestCase { private DIContainer $container; private $io; @@ -72,7 +71,6 @@ protected function setUp(): void { file_put_contents($infoXmlPath, $xml); } - public function testControllerNameAndMethodAreBeingPassed(): void { $return = ['HTTP/2.0 200 OK', [], [], null, new Response()]; $this->dispatcher->expects($this->once()) @@ -88,32 +86,27 @@ public function testControllerNameAndMethodAreBeingPassed(): void { $this->container); } - public function testBuildAppNamespace(): void { $ns = App::buildAppNamespace('someapp'); $this->assertEquals('OCA\Someapp', $ns); } - public function testBuildAppNamespaceCore(): void { $ns = App::buildAppNamespace('someapp', 'OC\\'); $this->assertEquals('OC\Someapp', $ns); } - public function testBuildAppNamespaceInfoXml(): void { $ns = App::buildAppNamespace('namespacetestapp', 'OCA\\'); $this->assertEquals('OCA\NameSpaceTestApp', $ns); } - #[\Override] protected function tearDown(): void { rrmdir($this->appPath); parent::tearDown(); } - public function testOutputIsPrinted(): void { $return = ['HTTP/2.0 200 OK', [], [], $this->output, new Response()]; $this->dispatcher->expects($this->once()) @@ -150,7 +143,6 @@ public function testNoOutput(string $statusCode): void { App::main($this->controllerName, $this->controllerMethod, $this->container, []); } - public function testCallbackIsCalled(): void { $mock = $this->getMockBuilder('OCP\AppFramework\Http\ICallbackResponse') ->getMock(); diff --git a/tests/lib/AppFramework/Controller/ApiControllerTest.php b/tests/lib/AppFramework/Controller/ApiControllerTest.php index d7e4b1ad3665a..e598ab71ed5fe 100644 --- a/tests/lib/AppFramework/Controller/ApiControllerTest.php +++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php @@ -18,7 +18,6 @@ class ChildApiController extends ApiController { }; - class ApiControllerTest extends \Test\TestCase { protected ChildApiController $controller; diff --git a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php index 22caf7537492c..eeda485844c76 100644 --- a/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php +++ b/tests/lib/AppFramework/Controller/AuthPublicShareControllerTest.php @@ -23,7 +23,6 @@ class AuthPublicShareControllerTest extends \Test\TestCase { private IURLGenerator&MockObject $urlGenerator; private AuthPublicShareController&MockObject $controller; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index 39f7213ef9e67..4a638ddd792f9 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -66,21 +66,18 @@ protected function setUp(): void { $this->request = $request; } - public function testFormatResonseInvalidFormat(): void { $this->expectException(\DomainException::class); $this->controller->buildResponse(null, 'test'); } - public function testFormat(): void { $response = $this->controller->buildResponse(['hi'], 'json'); $this->assertEquals(['hi'], $response->getData()); } - public function testFormatDataResponseJSON(): void { $expectedHeaders = [ 'test' => 'something', @@ -100,7 +97,6 @@ public function testFormatDataResponseJSON(): void { $this->assertEquals($expectedHeaders, $response->getHeaders()); } - public function testCustomFormatter(): void { $response = $this->controller->custom('hi'); $response = $this->controller->buildResponse($response, 'json'); @@ -108,14 +104,12 @@ public function testCustomFormatter(): void { $this->assertEquals([2], $response->getData()); } - public function testDefaultResponderToJSON(): void { $responder = $this->controller->getResponderByHTTPHeader('*/*'); $this->assertEquals('json', $responder); } - public function testResponderAcceptHeaderParsed(): void { $responder = $this->controller->getResponderByHTTPHeader( '*/*, application/tom, application/json' @@ -124,7 +118,6 @@ public function testResponderAcceptHeaderParsed(): void { $this->assertEquals('tom', $responder); } - public function testResponderAcceptHeaderParsedUpperCase(): void { $responder = $this->controller->getResponderByHTTPHeader( '*/*, apPlication/ToM, application/json' diff --git a/tests/lib/AppFramework/Controller/OCSControllerTest.php b/tests/lib/AppFramework/Controller/OCSControllerTest.php index 48b62d5cf8698..3602b9e20d5c1 100644 --- a/tests/lib/AppFramework/Controller/OCSControllerTest.php +++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php @@ -20,7 +20,6 @@ class ChildOCSController extends OCSController { } - class OCSControllerTest extends \Test\TestCase { public function testCors(): void { $request = new Request( @@ -46,7 +45,6 @@ public function testCors(): void { $this->assertEquals(100, $headers['Access-Control-Max-Age']); } - public function testXML(): void { $controller = new ChildOCSController('app', new Request( [], diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index 1e67e98680277..f3a1b6b040c9b 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -71,7 +71,6 @@ public function setAnotherBool(bool $anotherBool): void { } } - class EntityTest extends \Test\TestCase { private TestEntity $entity; @@ -81,7 +80,6 @@ protected function setUp(): void { $this->entity = new TestEntity(); } - public function testResetUpdatedFields(): void { $entity = new TestEntity(); $entity->setId(3); @@ -90,7 +88,6 @@ public function testResetUpdatedFields(): void { $this->assertEquals([], $entity->getUpdatedFields()); } - public function testFromRow(): void { $row = [ 'pre_name' => 'john', @@ -104,7 +101,6 @@ public function testFromRow(): void { $this->assertEquals($row['another_bool'], $this->entity->getAnotherBool()); } - public function testGetSetId(): void { $id = 3; $this->entity->setId(3); @@ -112,58 +108,48 @@ public function testGetSetId(): void { $this->assertEquals($id, $this->entity->getId()); } - public function testColumnToPropertyNoReplacement(): void { $column = 'my'; $this->assertEquals('my', $this->entity->columnToProperty($column)); } - public function testColumnToProperty(): void { $column = 'my_attribute'; $this->assertEquals('myAttribute', $this->entity->columnToProperty($column)); } - public function testPropertyToColumnNoReplacement(): void { $property = 'my'; $this->assertEquals('my', $this->entity->propertyToColumn($property)); } - public function testSetterMarksFieldUpdated(): void { $this->entity->setId(3); $this->assertContains('id', array_keys($this->entity->getUpdatedFields())); } - - public function testCallShouldOnlyWorkForGetterSetter(): void { $this->expectException(\BadFunctionCallException::class); $this->entity->something(); } - - public function testGetterShouldFailIfAttributeNotDefined(): void { $this->expectException(\BadFunctionCallException::class); $this->entity->getTest(); } - public function testSetterShouldFailIfAttributeNotDefined(): void { $this->expectException(\BadFunctionCallException::class); $this->entity->setTest(); } - public function testFromRowShouldNotAssignEmptyArray(): void { $row = []; $entity2 = new TestEntity(); @@ -172,7 +158,6 @@ public function testFromRowShouldNotAssignEmptyArray(): void { $this->assertEquals($entity2, $this->entity); } - public function testIdGetsConvertedToInt(): void { $row = ['id' => '4']; @@ -180,7 +165,6 @@ public function testIdGetsConvertedToInt(): void { $this->assertSame(4, $this->entity->getId()); } - public function testSetType(): void { $row = ['testId' => '4']; @@ -188,7 +172,6 @@ public function testSetType(): void { $this->assertSame(4, $this->entity->getTestId()); } - public function testFromParams(): void { $params = [ 'testId' => 4, @@ -210,7 +193,6 @@ public function testSlugify(): void { $this->assertEquals('slugify-this', $entity->slugify('name')); } - public static function dataSetterCasts(): array { return [ ['Id', '3', 3], @@ -225,7 +207,6 @@ public static function dataSetterCasts(): array { ]; } - #[\PHPUnit\Framework\Attributes\DataProvider('dataSetterCasts')] public function testSetterCasts(string $field, mixed $in, mixed $out): void { $entity = new TestEntity(); @@ -233,7 +214,6 @@ public function testSetterCasts(string $field, mixed $in, mixed $out): void { $this->assertSame($out, $entity->{'get' . $field}()); } - public function testSetterDoesNotCastOnNull(): void { $entity = new TestEntity(); $entity->setId(null); @@ -288,14 +268,12 @@ public function testGetFieldTypes(): void { ], $entity->getFieldTypes()); } - public function testGetItInt(): void { $entity = new TestEntity(); $entity->setId(3); $this->assertEquals(Types::INTEGER, gettype($entity->getId())); } - public function testFieldsNotMarkedUpdatedIfNothingChanges(): void { $entity = new TestEntity('hey'); $entity->setName('hey'); @@ -310,7 +288,6 @@ public function testIsGetter(): void { $this->assertThat($entity->isAnotherBool(), new IsType(IsType::TYPE_BOOL)); } - public function testIsGetterShoudFailForOtherType(): void { $this->expectException(\BadFunctionCallException::class); diff --git a/tests/lib/AppFramework/Db/QBMapperTest.php b/tests/lib/AppFramework/Db/QBMapperTest.php index f598b53e25027..e64d1fbe414ff 100644 --- a/tests/lib/AppFramework/Db/QBMapperTest.php +++ b/tests/lib/AppFramework/Db/QBMapperTest.php @@ -93,15 +93,12 @@ protected function setUp(): void { ->disableOriginalConstructor() ->getMock(); - $this->qb->method('expr')->willReturn($this->expr); $this->db->method('getQueryBuilder')->willReturn($this->qb); - $this->mapper = new QBTestMapper($this->db); } - public function testInsertEntityParameterTypeMapping(): void { $datetime = new \DateTimeImmutable(); $entity = new QBTestEntity(); @@ -152,7 +149,6 @@ public function testInsertEntityParameterTypeMapping(): void { $this->mapper->insert($entity); } - public function testUpdateEntityParameterTypeMapping(): void { $datetime = new \DateTimeImmutable(); $entity = new QBTestEntity(); @@ -211,11 +207,9 @@ public function testUpdateEntityParameterTypeMapping(): void { ->method('eq') ->with($this->equalTo('id'), $this->equalTo($idParam)); - $this->mapper->update($entity); } - public function testGetParameterTypeForProperty(): void { $entity = new QBTestEntity(); diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index b7f7352e3dde9..128059d275559 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -35,7 +35,6 @@ protected function setUp(): void { ->getMock(); } - public function testProvidesRequest(): void { $this->assertTrue(isset($this->container['Request'])); } @@ -49,7 +48,6 @@ public function testProvidesAppName(): void { $this->assertTrue(isset($this->container['appName'])); } - public function testAppNameIsSetCorrectly(): void { $this->assertEquals('name', $this->container['AppName']); $this->assertEquals('name', $this->container['appName']); diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index a5e5dd25ee9af..b2b49ed97195b 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -24,7 +24,6 @@ protected function setUp(): void { $this->response = new DataResponse(); } - public function testSetData(): void { $params = ['hi', 'yo']; $this->response->setData($params); @@ -32,7 +31,6 @@ public function testSetData(): void { $this->assertEquals(['hi', 'yo'], $this->response->getData()); } - public function testConstructorAllowsToSetData(): void { $data = ['hi']; $code = 300; @@ -42,7 +40,6 @@ public function testConstructorAllowsToSetData(): void { $this->assertEquals($code, $response->getStatus()); } - public function testConstructorAllowsToSetHeaders(): void { $data = ['hi']; $code = 300; @@ -63,7 +60,6 @@ public function testConstructorAllowsToSetHeaders(): void { $this->assertEquals($expectedHeaders, $response->getHeaders()); } - public function testChainability(): void { $params = ['hi', 'yo']; $this->response->setData($params) diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index cfd0bc9821e8c..3e90108c60e2a 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -53,7 +53,6 @@ public function exec($int, $bool, $foo, $test = 4, $test2 = 1) { return [$int, $bool, $test, $test2]; } - /** * @param int $int * @param bool $bool @@ -144,7 +143,6 @@ protected function setUp(): void { $this->etag = 'hi'; } - /** * @param string $out * @param string $httpHeaders @@ -221,7 +219,6 @@ private function setMiddlewareExpectations($out = null, ->willReturn($out); } - public function testDispatcherReturnsArrayWith2Entries(): void { $this->setMiddlewareExpectations(''); @@ -231,7 +228,6 @@ public function testDispatcherReturnsArrayWith2Entries(): void { $this->assertNull($response[2]); } - public function testHeadersAndOutputAreReturned(): void { $out = 'yo'; $httpHeaders = 'Http'; @@ -246,7 +242,6 @@ public function testHeadersAndOutputAreReturned(): void { $this->assertEquals($out, $response[3]); } - public function testExceptionCallsAfterException(): void { $out = 'yo'; $httpHeaders = 'Http'; @@ -261,7 +256,6 @@ public function testExceptionCallsAfterException(): void { $this->assertEquals($out, $response[3]); } - public function testExceptionThrowsIfCanNotBeHandledByAfterException(): void { $out = 'yo'; $httpHeaders = 'Http'; @@ -275,7 +269,6 @@ public function testExceptionThrowsIfCanNotBeHandledByAfterException(): void { ); } - private function dispatcherPassthrough() { $this->middlewareDispatcher->expects($this->once()) ->method('beforeController'); @@ -291,7 +284,6 @@ private function dispatcherPassthrough() { }); } - public function testControllerParametersInjected(): void { $this->request = new Request( [ @@ -323,7 +315,6 @@ public function testControllerParametersInjected(): void { $this->assertEquals('[3,false,4,1]', $response[3]); } - public function testControllerParametersInjectedDefaultOverwritten(): void { $this->request = new Request( [ @@ -356,8 +347,6 @@ public function testControllerParametersInjectedDefaultOverwritten(): void { $this->assertEquals('[3,false,4,7]', $response[3]); } - - public function testResponseTransformedByUrlFormat(): void { $this->request = new Request( [ @@ -392,7 +381,6 @@ public function testResponseTransformedByUrlFormat(): void { $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } - public function testResponseTransformsDataResponse(): void { $this->request = new Request( [ @@ -427,7 +415,6 @@ public function testResponseTransformsDataResponse(): void { $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } - public function testResponseTransformedByAcceptHeader(): void { $this->request = new Request( [ @@ -498,7 +485,6 @@ public function testResponseTransformedBySendingMultipartFormData(): void { $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } - public function testResponsePrimarilyTransformedByParameterFormat(): void { $this->request = new Request( [ @@ -536,7 +522,6 @@ public function testResponsePrimarilyTransformedByParameterFormat(): void { $this->assertEquals('{"text":[3,false,4,1]}', $response[3]); } - public static function rangeDataProvider(): array { return [ [PHP_INT_MIN, PHP_INT_MAX, 42, false], diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index 4472b3b2dd3b0..a28aa38824dd8 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -13,7 +13,6 @@ class ChildDownloadResponse extends DownloadResponse { }; - class DownloadResponseTest extends \Test\TestCase { #[\Override] protected function setUp(): void { diff --git a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php index e58237657f750..82b8263616e70 100644 --- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php +++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php @@ -70,7 +70,6 @@ public function test304(): void { $this->response->callback($output); } - public function testNon304(): void { $resource = fopen('php://memory', 'w+b'); fwrite($resource, 'my data'); diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php index b5566c66318d2..f838dd18e716f 100644 --- a/tests/lib/AppFramework/Http/HttpTest.php +++ b/tests/lib/AppFramework/Http/HttpTest.php @@ -26,13 +26,11 @@ protected function setUp(): void { $this->http = new Http($this->server); } - public function testProtocol(): void { $header = $this->http->getStatusHeader(Http::STATUS_TEMPORARY_REDIRECT); $this->assertEquals('HTTP/1.1 307 Temporary Redirect', $header); } - public function testProtocol10(): void { $this->http = new Http($this->server, 'HTTP/1.0'); $header = $this->http->getStatusHeader(Http::STATUS_OK); diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index d0509a403332f..d68998825b377 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -23,13 +23,11 @@ protected function setUp(): void { $this->json = new JSONResponse(); } - public function testHeader(): void { $headers = $this->json->getHeaders(); $this->assertEquals('application/json; charset=utf-8', $headers['Content-Type']); } - public function testSetData(): void { $params = ['hi', 'yo']; $this->json->setData($params); @@ -37,7 +35,6 @@ public function testSetData(): void { $this->assertEquals(['hi', 'yo'], $this->json->getData()); } - public function testSetRender(): void { $params = ['test' => 'hi']; $this->json->setData($params); @@ -68,7 +65,6 @@ public function testRender(array $input, $expected): void { $this->assertEquals($expected, $this->json->render()); } - public function testRenderWithNonUtf8Encoding(): void { $this->expectException(\JsonException::class); $this->expectExceptionMessage('Malformed UTF-8 characters, possibly incorrectly encoded'); diff --git a/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php b/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php index cb7bd97f5da61..37c540b33207a 100644 --- a/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php @@ -38,7 +38,6 @@ public function testActionSingle(): void { $this->assertEquals([], $template->getOtherActions()); } - public function testActionMultiple(): void { $actions = [ new SimpleMenuAction('link1', 'Download1', 'download1', 'downloadLink1', 100), @@ -53,7 +52,6 @@ public function testActionMultiple(): void { $this->assertEquals([$actions[1], $actions[0]], $template->getOtherActions()); } - public function testGetRenderAs(): void { $template = new PublicTemplateResponse('app', 'home', ['key' => 'value']); $this->assertEquals(['key' => 'value'], $template->getParams()); diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php index 90127b917572c..44a1968903ce4 100644 --- a/tests/lib/AppFramework/Http/RedirectResponseTest.php +++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php @@ -23,7 +23,6 @@ protected function setUp(): void { $this->response = new RedirectResponse('/url'); } - public function testHeaders(): void { $headers = $this->response->getHeaders(); $this->assertEquals('/url', $headers['Location']); @@ -31,7 +30,6 @@ public function testHeaders(): void { $this->response->getStatus()); } - public function testGetRedirectUrl(): void { $this->assertEquals('/url', $this->response->getRedirectUrl()); } diff --git a/tests/lib/AppFramework/Http/RequestStream.php b/tests/lib/AppFramework/Http/RequestStream.php index 7340391b2d50d..4a2670f9df126 100644 --- a/tests/lib/AppFramework/Http/RequestStream.php +++ b/tests/lib/AppFramework/Http/RequestStream.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\AppFramework\Http; /** diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index ec67ddeb0add2..306bdc956726f 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\AppFramework\Http; use OC\AppFramework\Http\Request; @@ -101,8 +102,6 @@ public function testPrecedence(): void { $this->assertSame('Johnny Weissmüller', $request->{'name'}); } - - public function testImmutableArrayAccess(): void { $this->expectException(\RuntimeException::class); @@ -122,7 +121,6 @@ public function testImmutableArrayAccess(): void { $request['nickname'] = 'Janey'; } - public function testImmutableMagicAccess(): void { $this->expectException(\RuntimeException::class); @@ -142,7 +140,6 @@ public function testImmutableMagicAccess(): void { $request->{'nickname'} = 'Janey'; } - public function testGetTheMethodRight(): void { $this->expectException(\LogicException::class); @@ -522,7 +519,6 @@ public function testPutStream(): void { $this->fail('Expected LogicException.'); } - public function testSetUrlParameters(): void { $vars = [ 'post' => [], @@ -753,7 +749,6 @@ public static function dataHttpProtocol(): array { ['InvalidProvider/1.1', 'HTTP/1.1'], [null, 'HTTP/1.1'], ['', 'HTTP/1.1'], - ]; } @@ -855,7 +850,6 @@ public function testGetServerProtocolWithProtoValid(): void { $this->stream ); - $this->assertSame('https', $requestHttps->getServerProtocol()); $this->assertSame('http', $requestHttp->getServerProtocol()); } @@ -1458,7 +1452,6 @@ public function testGetOverwriteHostWithOverwrite(): void { $this->assertSame('www.owncloud.org', self::invokePrivate($request, 'getOverwriteHost')); } - public function testGetPathInfoNotProcessible(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); @@ -1479,7 +1472,6 @@ public function testGetPathInfoNotProcessible(): void { $request->getPathInfo(); } - public function testGetRawPathInfoNotProcessible(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 57adc0cf3f4cb..4af5cb2443fcb 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -26,14 +26,12 @@ protected function setUp(): void { $this->childResponse = new Response(); } - public function testAddHeader(): void { $this->childResponse->addHeader(' hello ', 'world'); $headers = $this->childResponse->getHeaders(); $this->assertEquals('world', $headers['hello']); } - public function testSetHeaders(): void { $expected = [ 'Last-Modified' => 1, @@ -82,13 +80,11 @@ public function testAddHeaderValueNullDeletesIt(): void { $this->assertEquals(5, count($this->childResponse->getHeaders())); } - public function testCacheHeadersAreDisabledByDefault(): void { $headers = $this->childResponse->getHeaders(); $this->assertEquals('no-cache, no-store, must-revalidate', $headers['Cache-Control']); } - public function testAddCookie(): void { $this->childResponse->addCookie('foo', 'bar'); $this->childResponse->addCookie('bar', 'foo', new \DateTime('1970-01-01')); @@ -108,7 +104,6 @@ public function testAddCookie(): void { $this->assertEquals($expectedResponse, $this->childResponse->getCookies()); } - public function testSetCookies(): void { $expected = [ 'foo' => [ @@ -127,7 +122,6 @@ public function testSetCookies(): void { $this->assertEquals($expected, $cookies); } - public function testInvalidateCookie(): void { $this->childResponse->addCookie('foo', 'bar'); $this->childResponse->invalidateCookie('foo'); @@ -144,7 +138,6 @@ public function testInvalidateCookie(): void { $this->assertEquals($expected, $cookies); } - public function testInvalidateCookies(): void { $this->childResponse->addCookie('foo', 'bar'); $this->childResponse->addCookie('bar', 'foo'); @@ -181,12 +174,10 @@ public function testInvalidateCookies(): void { $this->assertEquals($expected, $cookies); } - public function testRenderReturnNullByDefault(): void { $this->assertEquals(null, $this->childResponse->render()); } - public function testGetStatus(): void { $default = $this->childResponse->getStatus(); @@ -196,13 +187,11 @@ public function testGetStatus(): void { $this->assertEquals(Http::STATUS_NOT_FOUND, $this->childResponse->getStatus()); } - public function testGetEtag(): void { $this->childResponse->setEtag('hi'); $this->assertSame('hi', $this->childResponse->getEtag()); } - public function testGetLastModified(): void { $lastModified = new \DateTime('now', new \DateTimeZone('GMT')); $lastModified->setTimestamp(1); @@ -210,8 +199,6 @@ public function testGetLastModified(): void { $this->assertEquals($lastModified, $this->childResponse->getLastModified()); } - - public function testCacheSecondsZero(): void { $this->childResponse->cacheFor(0); @@ -220,7 +207,6 @@ public function testCacheSecondsZero(): void { $this->assertFalse(isset($headers['Expires'])); } - public function testCacheSeconds(): void { $time = $this->createMock(ITimeFactory::class); $time->method('getTime') @@ -235,8 +221,6 @@ public function testCacheSeconds(): void { $this->assertEquals('Thu, 15 Jan 1970 06:56:40 GMT', $headers['Expires']); } - - public function testEtagLastModifiedHeaders(): void { $lastModified = new \DateTime('now', new \DateTimeZone('GMT')); $lastModified->setTimestamp(1); diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index d95eb043ae5c9..fae253db88bb3 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -24,7 +24,6 @@ protected function setUp(): void { $this->tpl = new TemplateResponse('app', 'home'); } - public function testSetParamsConstructor(): void { $params = ['hi' => 'yo']; $this->tpl = new TemplateResponse('app', 'home', $params); @@ -32,7 +31,6 @@ public function testSetParamsConstructor(): void { $this->assertEquals(['hi' => 'yo'], $this->tpl->getParams()); } - public function testSetRenderAsConstructor(): void { $renderAs = 'myrender'; $this->tpl = new TemplateResponse('app', 'home', [], $renderAs); @@ -40,7 +38,6 @@ public function testSetRenderAsConstructor(): void { $this->assertEquals($renderAs, $this->tpl->getRenderAs()); } - public function testSetParams(): void { $params = ['hi' => 'yo']; $this->tpl->setParams($params); @@ -48,7 +45,6 @@ public function testSetParams(): void { $this->assertEquals(['hi' => 'yo'], $this->tpl->getParams()); } - public function testGetTemplateName(): void { $this->assertEquals('home', $this->tpl->getTemplateName()); } diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index 3d22106563b11..52f4ff8c120a9 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -117,7 +117,6 @@ protected function setUp(): void { $this->exception = new \Exception(); } - private function getControllerMock() { return $this->getMockBuilder(TestController::class) ->onlyMethods(['controllerMethod']) @@ -130,14 +129,12 @@ private function getControllerMock() { ])->getMock(); } - private function getMiddleware($beforeControllerThrowsEx = false) { $m1 = new TestMiddleware($beforeControllerThrowsEx); $this->dispatcher->registerMiddleware($m1); return $m1; } - public function testAfterExceptionShouldReturnResponseOfMiddleware(): void { $response = new Response(); $m1 = $this->getMockBuilder(Middleware::class) @@ -160,7 +157,6 @@ public function testAfterExceptionShouldReturnResponseOfMiddleware(): void { $this->assertEquals($response, $this->dispatcher->afterException($this->controller, $this->method, $this->exception)); } - public function testAfterExceptionShouldThrowAgainWhenNotHandled(): void { $m1 = new TestMiddleware(false); $m2 = new TestMiddleware(true); @@ -173,7 +169,6 @@ public function testAfterExceptionShouldThrowAgainWhenNotHandled(): void { $this->dispatcher->afterException($this->controller, $this->method, $this->exception); } - public function testBeforeControllerCorrectArguments(): void { $m1 = $this->getMiddleware(); $this->dispatcher->beforeController($this->controller, $this->method); @@ -182,7 +177,6 @@ public function testBeforeControllerCorrectArguments(): void { $this->assertEquals($this->method, $m1->methodName); } - public function testAfterControllerCorrectArguments(): void { $m1 = $this->getMiddleware(); @@ -193,7 +187,6 @@ public function testAfterControllerCorrectArguments(): void { $this->assertEquals($this->response, $m1->response); } - public function testAfterExceptionCorrectArguments(): void { $m1 = $this->getMiddleware(); @@ -207,7 +200,6 @@ public function testAfterExceptionCorrectArguments(): void { $this->assertEquals($this->exception, $m1->exception); } - public function testBeforeOutputCorrectArguments(): void { $m1 = $this->getMiddleware(); @@ -218,7 +210,6 @@ public function testBeforeOutputCorrectArguments(): void { $this->assertEquals($this->out, $m1->output); } - public function testBeforeControllerOrder(): void { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -239,7 +230,6 @@ public function testAfterControllerOrder(): void { $this->assertEquals(1, $m2->afterControllerOrder); } - public function testAfterExceptionOrder(): void { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -252,7 +242,6 @@ public function testAfterExceptionOrder(): void { $this->assertEquals(1, $m2->afterExceptionOrder); } - public function testBeforeOutputOrder(): void { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(); @@ -263,7 +252,6 @@ public function testBeforeOutputOrder(): void { $this->assertEquals(1, $m2->beforeOutputOrder); } - public function testExceptionShouldRunAfterExceptionOfOnlyPreviouslyExecutedMiddlewares(): void { $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(true); diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php index e5619dcda6d61..a4712dbe86e0f 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php @@ -19,7 +19,6 @@ class ChildMiddleware extends Middleware { }; - class MiddlewareTest extends \Test\TestCase { /** * @var Middleware @@ -52,26 +51,22 @@ protected function setUp(): void { $this->response = $this->createMock(Response::class); } - public function testBeforeController(): void { $this->middleware->beforeController($this->controller, ''); $this->assertNull(null); } - public function testAfterExceptionRaiseAgainWhenUnhandled(): void { $this->expectException(\Exception::class); $this->middleware->afterException($this->controller, '', $this->exception); } - public function testAfterControllerReturnResponseWhenUnhandled(): void { $response = $this->middleware->afterController($this->controller, '', $this->response); $this->assertEquals($this->response, $response); } - public function testBeforeOutputReturnOutputhenUnhandled(): void { $output = $this->middleware->beforeOutput($this->controller, '', 'test'); diff --git a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php index e4d366ebdaaf6..a5ef02646bc66 100644 --- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php @@ -158,7 +158,6 @@ public static function dataAfterController(): array { [Controller::class, new JSONResponse(['message' => 'foo']), false], [Controller::class, new JSONResponse(['message' => 'foo'], Http::STATUS_UNAUTHORIZED), false], [Controller::class, new JSONResponse(['message' => 'foo'], Http::STATUS_FORBIDDEN), false], - ]; } diff --git a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php index f40bdb94014dc..2468c45df1c4d 100644 --- a/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/PublicShare/PublicShareMiddlewareTest.php @@ -35,7 +35,6 @@ class PublicShareMiddlewareTest extends \Test\TestCase { /** @var PublicShareMiddleware */ private $middleware; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index aaf798198b012..702b0c3260775 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\AppFramework\Middleware\Security; use OC\AppFramework\Http\Request; diff --git a/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php b/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php index 8ab3a48b62ec9..9d4a8279e3e18 100644 --- a/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php +++ b/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php @@ -139,7 +139,6 @@ public function testAfterExceptionWithSecurityExceptionNoStatus() { public function testAfterExceptionWithSecurityExceptionWithStatus() { } - public function testAfterExceptionWithRegularException() { } } diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index c1c7e587fd256..e33f65fa68249 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -159,8 +159,6 @@ public function testAttribute($backend, $lastConfirm, $currentTime, $exception): $this->assertSame($exception, $thrown); } - - public static function dataProvider(): array { return [ ['foo', 2000, 4000, true], diff --git a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php index 1427d9475419a..da04778fa2a06 100644 --- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php @@ -150,7 +150,6 @@ public function testBeforeControllerForLoggedIn(): void { ->method('registerUserRequest') ->with(get_class($controller) . '::testMethodWithAnnotation', '20', '200', $user); - $this->reflector->reflect($controller, 'testMethodWithAnnotation'); $this->rateLimitingMiddleware->beforeController($controller, 'testMethodWithAnnotation'); } @@ -167,7 +166,6 @@ public function testBeforeControllerAnonWithFallback(): void { ->method('isLoggedIn') ->willReturn(true); - $this->limiter ->expects($this->never()) ->method('registerUserRequest'); @@ -226,7 +224,6 @@ public function testBeforeControllerAttributesForLoggedIn(): void { ->method('registerUserRequest') ->with(get_class($controller) . '::testMethodWithAttributes', '20', '200', $user); - $this->reflector->reflect($controller, 'testMethodWithAttributes'); $this->rateLimitingMiddleware->beforeController($controller, 'testMethodWithAttributes'); } @@ -243,7 +240,6 @@ public function testBeforeControllerAttributesAnonWithFallback(): void { ->method('isLoggedIn') ->willReturn(true); - $this->limiter ->expects($this->never()) ->method('registerUserRequest'); diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index f59d5d4c00482..c34248411fb92 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -196,7 +196,6 @@ public function testSetNavigationEntry(string $method): void { $this->middleware->beforeController($this->controller, $method); } - /** * @param string $method * @param string $test @@ -309,7 +308,6 @@ private function securityCheck($method, $expects, $shouldFail = false) { $sec->beforeController($this->controller, $method); } - #[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')] public function testCsrfCheck(string $method): void { $this->expectException(CrossSiteRequestForgeryException::class); @@ -537,7 +535,6 @@ public function testRestrictedAppLoggedIn(string $method): void { $middleware->beforeController($this->controller, $method); } - public function testAfterExceptionNotCaughtThrowsItAgain(): void { $ex = new \Exception(); $this->expectException(\Exception::class); @@ -602,7 +599,6 @@ public function testAfterExceptionRedirectsToWebRootAfterStrictCookieFail(): voi $this->assertEquals($expected, $response); } - /** * @return array */ diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php index c4fd461943def..b9706a16c76a8 100644 --- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\AppFramework\Middleware; use OC\AppFramework\Middleware\SessionMiddleware; diff --git a/tests/lib/AppFramework/Routing/RouteParserTest.php b/tests/lib/AppFramework/Routing/RouteParserTest.php index 53fe7370040ed..fb09bcd36221b 100644 --- a/tests/lib/AppFramework/Routing/RouteParserTest.php +++ b/tests/lib/AppFramework/Routing/RouteParserTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\AppFramework\Routing; use OC\AppFramework\Routing\RouteParser; diff --git a/tests/lib/AppFramework/Services/AppConfigTest.php b/tests/lib/AppFramework/Services/AppConfigTest.php index 48ef39a7db159..e75b9acaec423 100644 --- a/tests/lib/AppFramework/Services/AppConfigTest.php +++ b/tests/lib/AppFramework/Services/AppConfigTest.php @@ -42,7 +42,6 @@ public function testGetAppKeys(): void { $this->assertSame($expected, $this->appConfig->getAppKeys()); } - /** * @return array * @see testHasAppKey @@ -72,7 +71,6 @@ public function testHasAppKey(bool $lazy, bool $expected): void { $this->assertSame($expected, $this->appConfig->hasAppKey($key, $lazy)); } - /** * @return array * @see testIsSensitive diff --git a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php index 4bbe825cfb244..1fd890398073e 100644 --- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php +++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php @@ -125,7 +125,6 @@ public function testReadAnnotationNoLowercase(): void { $this->assertFalse($reader->hasAnnotation('param')); } - /** * @Annotation * @param int $test @@ -161,7 +160,6 @@ public function testReadTypeIntAnnotationsScalarTypes(): void { $this->assertNull($reader->getType('d')); } - /** * @Annotation * @param double $test something special @@ -190,7 +188,6 @@ public function testReadTypeWhitespaceAnnotations(): void { $this->assertEquals('string', $reader->getType('foo')); } - public function arguments($arg, $arg2 = 'hi') { } public function testReflectParameters(): void { @@ -203,7 +200,6 @@ public function testReflectParameters(): void { $this->assertEquals(['arg' => null, 'arg2' => 'hi'], $reader->getParameters()); } - public function arguments2($arg) { } public function testReflectParameters2(): void { @@ -216,7 +212,6 @@ public function testReflectParameters2(): void { $this->assertEquals(['arg' => null], $reader->getParameters()); } - public function testInheritance(): void { $reader = new ControllerMethodReflector(Server::get(LoggerInterface::class)); $reader->reflect('Test\AppFramework\Utility\EndController', 'test'); @@ -224,7 +219,6 @@ public function testInheritance(): void { $this->assertTrue($reader->hasAnnotation('Annotation')); } - public function testInheritanceOverride(): void { $reader = new ControllerMethodReflector(Server::get(LoggerInterface::class)); $reader->reflect('Test\AppFramework\Utility\EndController', 'test2'); @@ -233,7 +227,6 @@ public function testInheritanceOverride(): void { $this->assertFalse($reader->hasAnnotation('Annotation')); } - public function testInheritanceOverrideNoDocblock(): void { $reader = new ControllerMethodReflector(Server::get(LoggerInterface::class)); $reader->reflect('Test\AppFramework\Utility\EndController', 'test3'); diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index ad0e0233af92c..03e31cbb19dce 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -58,7 +58,6 @@ public function __construct( } } - class SimpleContainerTest extends \Test\TestCase { private $container; @@ -67,14 +66,11 @@ protected function setUp(): void { $this->container = new SimpleContainer(); } - - public function testRegister(): void { $this->container->registerParameter('test', 'abc'); $this->assertEquals('abc', $this->container->query('test')); } - /** * Test querying a class that is not registered without autoload enabled */ @@ -88,7 +84,6 @@ public function testNothingRegistered(): void { } } - /** * Test querying a class that is not registered with autoload enabled */ @@ -102,21 +97,17 @@ public function testNothingRegistered_autoload(): void { } } - - public function testNotAClass(): void { $this->expectException(QueryException::class); $this->container->query('Test\AppFramework\Utility\TestInterface'); } - public function testNoConstructorClass(): void { $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); $this->assertTrue($object instanceof ClassEmptyConstructor); } - public function testInstancesOnlyOnce(): void { $object = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); $object2 = $this->container->query('Test\AppFramework\Utility\ClassEmptyConstructor'); @@ -132,7 +123,6 @@ public function testConstructorSimple(): void { $this->assertEquals('abc', $object->test); } - public function testConstructorComplex(): void { $this->container->registerParameter('test', 'abc'); $object = $this->container->query( @@ -143,7 +133,6 @@ public function testConstructorComplex(): void { $this->assertEquals('abc', $object->test); } - public function testConstructorComplexInterface(): void { $this->container->registerParameter('test', 'abc'); $this->container->registerService( @@ -158,7 +147,6 @@ public function testConstructorComplexInterface(): void { $this->assertEquals('abc', $object->test); } - public function testOverrideService(): void { $this->container->registerService( 'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) { @@ -210,7 +198,6 @@ public function testSanitizeName($register, $query): void { $this->assertEquals('abc', $this->container->query($query)); } - public function testConstructorComplexNoTestParameterFound(): void { $this->expectException(QueryException::class); diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php index c8aeb5ec2d721..83aaa65564cf4 100644 --- a/tests/lib/AppTest.php +++ b/tests/lib/AppTest.php @@ -266,7 +266,6 @@ public function testEnabledAppsCache(): void { $user1->delete(); } - private function setupAppConfigMock() { /** @var AppConfig|MockObject */ $appConfig = $this->getMockBuilder(AppConfig::class) diff --git a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php index 28e17e1158696..aa268151178e3 100644 --- a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php +++ b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php @@ -66,7 +66,6 @@ protected function setUp(): void { ); } - public function testHandleUnrelated(): void { $event = new Event(); $this->mailer->expects($this->never())->method('send'); diff --git a/tests/lib/Authentication/LoginCredentials/StoreTest.php b/tests/lib/Authentication/LoginCredentials/StoreTest.php index f7c06f709a9d7..a0695ef1a4bce 100644 --- a/tests/lib/Authentication/LoginCredentials/StoreTest.php +++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php @@ -270,7 +270,6 @@ public function testAuthenticatePasswordlessToken(): void { ->method('set') ->with($this->equalTo('login_credentials'), $this->equalTo(json_encode($params))); - $this->session->expects($this->once()) ->method('getId') ->willReturn('sess2233'); diff --git a/tests/lib/Authentication/Token/ManagerTest.php b/tests/lib/Authentication/Token/ManagerTest.php index d2714cc1925ea..8511ccf578897 100644 --- a/tests/lib/Authentication/Token/ManagerTest.php +++ b/tests/lib/Authentication/Token/ManagerTest.php @@ -104,7 +104,6 @@ public function testGenerateTokenTooLongName(): void { $token->method('getName') ->willReturn(str_repeat('a', 120) . '…'); - $this->publicKeyTokenProvider->expects($this->once()) ->method('generateToken') ->with( diff --git a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php index e1e0fc007403d..e577f2951b0eb 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php @@ -176,7 +176,6 @@ public function testGetToken(): void { $this->assertEquals($token, $dbToken); } - public function testGetInvalidToken(): void { $this->expectException(DoesNotExistException::class); @@ -208,14 +207,12 @@ public function testGetTokenById(): void { $this->assertEquals($token, $dbToken); } - public function testGetTokenByIdNotFound(): void { $this->expectException(DoesNotExistException::class); $this->mapper->getTokenById(-1); } - public function testGetInvalidTokenById(): void { $this->expectException(DoesNotExistException::class); diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php index 1c9dc02f8f17a..1c4bfba202d29 100644 --- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php +++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php @@ -237,7 +237,6 @@ public function testGetPassword(): void { $this->assertSame($password, $this->tokenProvider->getPassword($actual, $token)); } - public function testGetPasswordPasswordLessToken(): void { $this->expectException(PasswordlessTokenException::class); @@ -248,7 +247,6 @@ public function testGetPasswordPasswordLessToken(): void { $this->tokenProvider->getPassword($tk, $token); } - public function testGetPasswordInvalidToken(): void { $this->expectException(InvalidTokenException::class); @@ -293,13 +291,11 @@ public function testSetPassword(): void { return $newpass === $this->tokenProvider->getPassword($token, 'tokentokentokentokentoken'); })); - $this->tokenProvider->setPassword($actual, $token, $newpass); $this->assertSame($newpass, $this->tokenProvider->getPassword($actual, 'tokentokentokentokentoken')); } - public function testSetPasswordInvalidToken(): void { $this->expectException(InvalidTokenException::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index 26ed14ac0c9d6..e919d0991322c 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -588,7 +588,6 @@ public function testPrepareTwoFactorLogin(): void { $this->config->method('setUserValue') ->with('ferdinand', 'login_token_2fa', '42', '1337'); - $this->manager->prepareTwoFactorLogin($this->user, true); } diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php index b7d934c6a6d7a..ddc70a263ca33 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php @@ -47,7 +47,6 @@ protected function setUp(): void { $this->loader = new ProviderLoader($this->appManager, $coordinator); } - public function testFailHardIfProviderCanNotBeLoaded(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Could not load two-factor auth provider \\OCA\\MyFaulty2faApp\\DoesNotExist'); diff --git a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php index 0a060d19b81b8..0418e277ada6d 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { ); } - public function testTryEnableInvalidProvider(): void { $this->expectException(InvalidProviderException::class); @@ -89,7 +88,6 @@ public function testTryEnableProvider(): void { $this->assertTrue($res); } - public function testTryDisableInvalidProvider(): void { $this->expectException(InvalidProviderException::class); diff --git a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php index 9751b9120a830..31b07d1bde22b 100644 --- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php @@ -85,7 +85,6 @@ public function testDisableProvider(): void { $this->dao->expects($this->once())->method('persist')->with('p1', 'user123', false); - $this->dispatcher->expects($this->once()) ->method('dispatch') ->with( diff --git a/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php b/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php index 5ace218a02073..e74ba90c96532 100644 --- a/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php +++ b/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php @@ -150,10 +150,8 @@ public function testUpdateBoth(): void { switch ($key) { case 'meta99': return 'value99-new'; - case 'meta123': return 'meta456'; - default: return null; } @@ -169,7 +167,6 @@ public function testUpdateBoth(): void { switch ($key) { case 'meta1': return 'value1'; - default: return null; } @@ -185,7 +182,6 @@ public function testUpdateBoth(): void { switch ($key) { case 'meta2': return 'value2'; - default: return null; } diff --git a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php index 5fc218dc6d80e..7f70c3ba3d734 100644 --- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php +++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php @@ -65,7 +65,6 @@ protected function setUp(): void { return new CloudId('user@someNextcloud.net', 'user', 'someNextcloud.net'); }); - $this->plugin = new LookupPlugin( $this->config, $this->clientService, @@ -180,7 +179,6 @@ public function testSearch(array $searchParams): void { $this->assertFalse($moreResults); } - /** * @param array $searchParams * @param bool $GSEnabled @@ -249,7 +247,6 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab $this->assertFalse($moreResults); } - public function testSearchGSDisabled(): void { $this->config->expects($this->atLeastOnce()) ->method('getSystemValueBool') diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php index 4d495b6a3aa63..d2afc5b36897c 100644 --- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php +++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php @@ -63,7 +63,6 @@ public static function dataHasResult(): array { [['users' => ['exact' => [$result], 'loose' => []]], 'users', 'l1', true], [['users' => ['exact' => [$result], 'loose' => []]], 'users', 'l2', false], [['users' => ['exact' => [$result], 'loose' => []]], 'groups', 'l1', false], - ]; } diff --git a/tests/lib/Command/AsyncBusTestCase.php b/tests/lib/Command/AsyncBusTestCase.php index 0a7f6f39c902f..2b8decabe931e 100644 --- a/tests/lib/Command/AsyncBusTestCase.php +++ b/tests/lib/Command/AsyncBusTestCase.php @@ -108,6 +108,5 @@ public function testFileFileAccessCommandSync(): void { $this->assertEquals('', self::$lastCommand); } - abstract protected function runJobs(); } diff --git a/tests/lib/Command/BackgroundModeTest.php b/tests/lib/Command/BackgroundModeTest.php index efd49ab42738d..32ab2598ae9b1 100644 --- a/tests/lib/Command/BackgroundModeTest.php +++ b/tests/lib/Command/BackgroundModeTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2015 Christian Kampka * SPDX-License-Identifier: MIT */ + namespace Test\Command; use OC\Core\Command\Background\Mode; diff --git a/tests/lib/Command/CronBusTest.php b/tests/lib/Command/CronBusTest.php index 8205a6b95c745..352d995ce284b 100644 --- a/tests/lib/Command/CronBusTest.php +++ b/tests/lib/Command/CronBusTest.php @@ -18,7 +18,6 @@ class CronBusTest extends AsyncBusTestCase { */ private $jobList; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index 65b8273930300..a98cea6374f8c 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -158,7 +158,6 @@ public function testExecuteWithNotExistingPrivateKey(): void { ['privateKey', false], ]); - $outputInterface ->expects($this->any()) ->method('writeln') diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 80bc5d7818fce..011ae43ccfb78 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Comments; use OC\Comments\Comment; @@ -64,7 +65,6 @@ public function testSettersValidInput(): void { $this->assertSame($metaData, $comment->getMetaData()); } - public function testSetIdIllegalInput(): void { $this->expectException(IllegalIDChangeException::class); @@ -129,7 +129,6 @@ public function testSetRoleInvalidInput($role, $type, $id): void { $comment->$setter($type, $id); } - public function testSetUberlongMessage(): void { $this->expectException(MessageTooLongException::class); diff --git a/tests/lib/Comments/FakeFactory.php b/tests/lib/Comments/FakeFactory.php index 029d3461a22fa..8b4f3b75e21d9 100644 --- a/tests/lib/Comments/FakeFactory.php +++ b/tests/lib/Comments/FakeFactory.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Comments; use OCP\Comments\ICommentsManagerFactory; diff --git a/tests/lib/Comments/FakeManager.php b/tests/lib/Comments/FakeManager.php index 7ee58b2246a72..09a9e338dda8f 100644 --- a/tests/lib/Comments/FakeManager.php +++ b/tests/lib/Comments/FakeManager.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Comments; use OC\Comments\Comment; diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 40f9846e077a3..585397d39875a 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Comments; use OC\Comments\Comment; @@ -98,7 +99,6 @@ protected function getManager(): Manager { ); } - public function testGetCommentNotFound(): void { $this->expectException(NotFoundException::class); @@ -106,7 +106,6 @@ public function testGetCommentNotFound(): void { $manager->get('22'); } - public function testGetCommentNotFoundInvalidInput(): void { $this->expectException(\InvalidArgumentException::class); @@ -446,7 +445,6 @@ public function testCreateComment(): void { $this->assertSame($objectId, $comment->getObjectId()); } - public function testDelete(): void { $this->expectException(NotFoundException::class); @@ -545,7 +543,6 @@ public function testSaveUpdate(): void { ); } - public function testSaveUpdateException(): void { $manager = $this->getManager(); $comment = new Comment(); @@ -564,7 +561,6 @@ public function testSaveUpdateException(): void { $manager->save($comment); } - public function testSaveIncomplete(): void { $manager = $this->getManager(); @@ -931,7 +927,6 @@ public function testResolveDisplayName(): void { $this->assertSame('SOMBRERO', $manager->resolveDisplayName('galaxy', 'sombrero')); } - public function testRegisterResolverDuplicate(): void { $this->expectException(\OutOfBoundsException::class); @@ -942,7 +937,6 @@ public function testRegisterResolverDuplicate(): void { $manager->registerDisplayNameResolver('planet', $planetClosure); } - public function testResolveDisplayNameUnregisteredType(): void { $this->expectException(\OutOfBoundsException::class); @@ -2468,7 +2462,6 @@ public function testReactionsSummarizeOrdered(array $comments, array $expected, $this->skipIfNotSupport4ByteUTF(); $manager = $this->getManager(); - $processedComments = $this->proccessComments($comments); $comment = end($processedComments); $actual = $manager->get($comment->getParentId()); diff --git a/tests/lib/Config/LexiconTest.php b/tests/lib/Config/LexiconTest.php index b540d5b428135..c3ead6240b5f4 100644 --- a/tests/lib/Config/LexiconTest.php +++ b/tests/lib/Config/LexiconTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Tests\lib\Config; use OC\AppConfig; diff --git a/tests/lib/Config/TestLexicon_W.php b/tests/lib/Config/TestLexicon_W.php index 12833288cb3b1..f945bd4bba510 100644 --- a/tests/lib/Config/TestLexicon_W.php +++ b/tests/lib/Config/TestLexicon_W.php @@ -28,7 +28,6 @@ public function getAppConfigs(): array { return [ new Entry('key1', ValueType::STRING, 'abcde', 'test key', true, IAppConfig::FLAG_SENSITIVE), new Entry('key2', ValueType::INT, 12345, 'test key', false) - ]; } diff --git a/tests/lib/Config/UserConfigMigrationFallbackTest.php b/tests/lib/Config/UserConfigMigrationFallbackTest.php index 4d1ec8850cf8d..c31c547bd5e4b 100644 --- a/tests/lib/Config/UserConfigMigrationFallbackTest.php +++ b/tests/lib/Config/UserConfigMigrationFallbackTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\lib\Config; use Doctrine\DBAL\Exception\InvalidFieldNameException; diff --git a/tests/lib/Config/UserConfigTest.php b/tests/lib/Config/UserConfigTest.php index 95e0c958e2321..6327f02e4b5a3 100644 --- a/tests/lib/Config/UserConfigTest.php +++ b/tests/lib/Config/UserConfigTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\lib\Config; use OC\Config\ConfigManager; @@ -171,7 +172,6 @@ class UserConfigTest extends TestCase { 'key1' => ['key1', 'value1', ValueType::STRING, true, 0, true] ] ], - ]; #[\Override] @@ -1427,7 +1427,6 @@ public function testSetValueFloat( } } - public static function providerSetValueArray(): array { return [ [null, 'user1', 'app1', 'key1', [], false, false, true], @@ -1694,7 +1693,6 @@ public function testGetDetails(string $userId, string $app, string $key, array $ $this->assertEqualsCanonicalizing($result, $userConfig->getDetails($userId, $app, $key)); } - public static function providerDeletePreference(): array { return [ [null, 'user1', 'app1', 'key22'], diff --git a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php index c31903dff1086..08afc6e930786 100644 --- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php @@ -103,7 +103,6 @@ public function testGetProvidersOfAppWithIncompleInfo(): void { $this->assertInstanceOf(EMailProvider::class, $providers[2]); } - public function testGetProvidersWithQueryException(): void { $this->expectException(\Exception::class); diff --git a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php index 977d837c6a286..f8faa2b17f966 100644 --- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php +++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php @@ -267,7 +267,6 @@ public function testGetContactsWhenUserIsInExcludeGroups(string $excludeGroups, ], ]); - $entries = $this->contactsStore->getContacts($currentUser, ''); $this->assertCount(count($expectedUids), $entries); @@ -300,7 +299,6 @@ public function testGetContactsOnlyShareIfInTheSameGroupWhenUserIsInExcludeGroup ->with($this->equalTo($currentUser)) ->willReturn(['group1', 'group2', 'group3']); - $this->contactsManager->expects($this->once()) ->method('search') ->with($this->equalTo(''), $this->equalTo(['FN', 'EMAIL'])) @@ -315,7 +313,6 @@ public function testGetContactsOnlyShareIfInTheSameGroupWhenUserIsInExcludeGroup ], ]); - $entries = $this->contactsStore->getContacts($currentUser, ''); $this->assertCount(0, $entries); diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index cd0c5d7ed8fa0..630ac18260617 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test; use OC\ContactsManager; @@ -100,7 +101,6 @@ public function testSearch($search1, $search2, $expectedResult): void { ->method('getKey') ->willReturn('simple:2'); - $this->cm->registerAddressBook($addressbook1); $this->cm->registerAddressBook($addressbook2); $result = $this->cm->search(''); @@ -143,7 +143,6 @@ public function testSearchDisabledAb($search1): void { $this->assertEquals($search1, $result); } - public function testDeleteHavePermission(): void { /** @var \PHPUnit\Framework\MockObject\MockObject|IAddressBookEnabled $addressbook */ $addressbook = $this->getMockBuilder('\OCP\IAddressBookEnabled') diff --git a/tests/lib/DB/AdapterTest.php b/tests/lib/DB/AdapterTest.php index 4ed4fdbd00388..f5ca19c1ce9e7 100644 --- a/tests/lib/DB/AdapterTest.php +++ b/tests/lib/DB/AdapterTest.php @@ -49,7 +49,6 @@ public function testInsertIgnoreOnConflictDuplicate(): void { $rows = $this->getRows($configKey); $this->assertSame($expected, $rows); - $result = $this->connection->insertIgnoreConflict('appconfig', [ 'appid' => $this->appId, 'configkey' => $configKey, diff --git a/tests/lib/DB/Exception/DbalExceptionTest.php b/tests/lib/DB/Exception/DbalExceptionTest.php index 8a1aa2adf5337..35ab838f4be26 100644 --- a/tests/lib/DB/Exception/DbalExceptionTest.php +++ b/tests/lib/DB/Exception/DbalExceptionTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\DB\Exception; use Doctrine\DBAL\ConnectionException; diff --git a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php index f363b129e60d6..dff6aeb10c668 100644 --- a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php +++ b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\DB\Middleware; use OC\DB\Connection; diff --git a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php index 43632d2e1ea4d..514ed2dfb826d 100644 --- a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php +++ b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\DB\Middleware; use OC\DB\Middleware\UtcTimezoneMiddleware; diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 78d28401383f1..099419884e072 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -123,7 +123,6 @@ private function getChangedTypeSchema($from, $to) { return [$startSchema, $endSchema]; } - private function getSchemaConfig() { $config = new SchemaConfig(); $config->setName($this->connection->getDatabase()); @@ -261,7 +260,6 @@ public function testAddingForeignKey(): void { $migrator = $this->getMigrator(); $migrator->migrate($startSchema); - $this->assertTrue($startSchema->getTable($this->tableNameTmp)->hasForeignKey($fkName)); } diff --git a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php index 2082701f61047..c0867e42aedaa 100644 --- a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php @@ -47,7 +47,6 @@ protected function tearDown(): void { parent::tearDown(); } - private function getQueryBuilder(): PartitionedQueryBuilder { $builder = $this->connection->getQueryBuilder(); if ($builder instanceof PartitionedQueryBuilder) { diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index 0014ce86420dc..1b54a8c946f13 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -545,7 +545,6 @@ public static function dataJoin(): array { ['`d1`' => [['joinType' => 'inner', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => '`d2`', 'joinCondition' => '`d1`.`field1` = `d2`.`field2`']]], '`*PREFIX*data1` `d1` INNER JOIN `*PREFIX*data2` `d2` ON `d1`.`field1` = `d2`.`field2`' ], - ]; } diff --git a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php index bbcaa713e111b..6a7555cdcd0eb 100644 --- a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php @@ -33,7 +33,6 @@ protected function setUp(): void { $this->autoIncrementHandler = Server::get(AutoIncrementHandler::class); } - private function getQueryBuilder(string $table, string $shardColumn, string $primaryColumn, array $companionTables = []): ShardedQueryBuilder { return new ShardedQueryBuilder( $this->connection->getQueryBuilder(), diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index e4fcd07abf835..fa7225c2e728f 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -76,7 +76,6 @@ public static function formatTimeSpanData(): array { [$deL10N->n('%n hour ago', '%n hours ago', 1), new \DateTime('Wed, 02 Oct 2013 22:59:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N], [$deL10N->n('%n hour ago', '%n hours ago', 3), new \DateTime('Wed, 02 Oct 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N], [$deL10N->n('%n day ago', '%n days ago', 2), new \DateTime('Mon, 30 Sep 2013 20:39:59 +0000'), new \DateTime('Wed, 02 Oct 2013 23:59:59 +0000'), $deL10N], - ]; } @@ -172,7 +171,6 @@ public function testFormatDateTime($timestamp, $timeZone, $expected): void { $this->assertEquals($expected, (string)$this->formatter->formatDateTime($timestamp, 'long', 'long', $timeZone)); } - public function testFormatDateWithInvalidTZ(): void { $this->expectException(\Exception::class); diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php index 2c9b74eb0cf8b..1853e7d254a9d 100644 --- a/tests/lib/DirectEditing/ManagerTest.php +++ b/tests/lib/DirectEditing/ManagerTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\DirectEditing; use OC\DirectEditing\Manager; @@ -65,7 +66,6 @@ public function getMimetypes(): array { return [ 'text/plain' ]; } - #[\Override] public function getMimetypesOptional(): array { return []; @@ -83,7 +83,6 @@ public function isSecure(): bool { return false; } - #[\Override] public function open(IToken $token): Response { return new DataResponse('edit page'); @@ -150,7 +149,6 @@ protected function setUp(): void { ->method('get') ->willReturn($this->l10n); - $this->rootFolder->expects($this->any()) ->method('getUserFolder') ->willReturn($this->userFolder); @@ -174,7 +172,6 @@ public function testEditorRegistration(): void { $this->assertEquals($this->manager->getEditors(), ['testeditor' => $this->editor]); } - public function testCreateToken(): void { $expectedToken = 'TOKEN' . time(); $file = $this->createMock(File::class); diff --git a/tests/lib/EmojiHelperTest.php b/tests/lib/EmojiHelperTest.php index 692dff143ee60..27f731325f81c 100644 --- a/tests/lib/EmojiHelperTest.php +++ b/tests/lib/EmojiHelperTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test; use OC\EmojiHelper; diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index 1434adf6bc5c0..27b13b7da3b5c 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -236,7 +236,6 @@ public function testDecryptUsersFiles(): void { $storage = $this->getMockBuilder(IStorage::class) ->disableOriginalConstructor()->getMock(); - $sharedStorage = $this->getMockBuilder(IStorage::class) ->disableOriginalConstructor()->getMock(); @@ -286,7 +285,6 @@ function ($path) { return true; }); - /* We need format method to return a string */ $outputFormatter = $this->createMock(OutputFormatterInterface::class); $outputFormatter->method('isDecorated')->willReturn(false); @@ -357,7 +355,6 @@ public function testDecryptFileFailure(): void { ->onlyMethods(['getTimestamp']) ->getMock(); - $fileInfo = $this->createMock(FileInfo::class); $fileInfo->expects($this->any())->method('isEncrypted') ->willReturn(true); diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index b80d1a08af64e..20485c97fc083 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -42,7 +42,6 @@ protected function setUp(): void { $this->instance = new EncryptionWrapper($this->arrayCache, $this->manager, $this->logger); } - #[\PHPUnit\Framework\Attributes\DataProvider('provideWrapStorage')] public function testWrapStorage($expectedWrapped, $wrappedStorages): void { $storage = $this->getMockBuilder(Storage::class) diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index cf0aa4fc04b92..8b3ede87408e5 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -555,7 +555,6 @@ public function mkdirCallback() { $this->assertSame($expected, $args[0]); } - /** * @param bool $createBackupDir */ diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index 5f3d1987dc3dc..bb2acf222a4cd 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Encryption; use OC\Encryption\Exceptions\ModuleAlreadyExistsException; @@ -105,7 +106,6 @@ public function testModuleUnRegistration(): void { $this->assertEmpty($this->manager->getEncryptionModules()); } - public function testGetEncryptionModuleUnknown(): void { $this->expectException(ModuleDoesNotExistsException::class); $this->expectExceptionMessage('Module with ID: unknown does not exist.'); diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index e272978862edb..c0d15598ef470 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Encryption; use OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException; @@ -88,11 +89,9 @@ public static function providesHeaders(): array { ]; } - public function testCreateHeaderFailed(): void { $this->expectException(EncryptionHeaderKeyExistsException::class); - $header = ['header1' => 1, 'header2' => 2, 'oc_encryption_module' => 'foo']; $em = $this->createMock(IEncryptionModule::class); @@ -127,7 +126,6 @@ public static function providePathsForTestIsExcluded(): array { ['/keyStorage/user1/files/foo.txt', 'keyStorage', true], ['/keyStorage/files_encryption', '/keyStorage', true], ['keyStorage/user1/files_encryption', '/keyStorage/', true], - ]; } diff --git a/tests/lib/Federation/CloudIdManagerTest.php b/tests/lib/Federation/CloudIdManagerTest.php index 6f927a12e0033..d15218a533d1d 100644 --- a/tests/lib/Federation/CloudIdManagerTest.php +++ b/tests/lib/Federation/CloudIdManagerTest.php @@ -32,7 +32,6 @@ class CloudIdManagerTest extends TestCase { /** @var ICacheFactory|\PHPUnit\Framework\MockObject\MockObject */ private $cacheFactory; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 8d62e449306c1..23b1eca682e1f 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -495,7 +495,6 @@ public function testMove($sourceFolder, $targetFolder, $children): void { $this->cache->move($sourceFolder, $targetFolder); - $this->assertFalse($this->cache->inCache($sourceFolder)); $this->assertTrue($this->cache2->inCache($sourceFolder)); $this->assertTrue($this->cache->inCache($targetFolder)); @@ -515,7 +514,6 @@ public function testMoveFromCache(): void { $this->cache2->put('folder', $folderData); $this->cache2->put('folder/sub', $data); - $this->cache->moveFromCache($this->cache2, 'folder', 'targetfolder'); $this->assertFalse($this->cache2->inCache('folder')); diff --git a/tests/lib/Files/Cache/FileAccessTest.php b/tests/lib/Files/Cache/FileAccessTest.php index a6d5661d409aa..169a07180eeca 100644 --- a/tests/lib/Files/Cache/FileAccessTest.php +++ b/tests/lib/Files/Cache/FileAccessTest.php @@ -48,7 +48,6 @@ protected function setUp(): void { $queryBuilder = $this->dbConnection->getQueryBuilder(); $queryBuilder->delete('mounts')->executeStatement(); - $this->setUpTestDatabaseForGetDistinctMounts(); $this->setUpTestDatabaseForGetByAncestorInStorage(); } diff --git a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php index 547e48a196312..62915d411cf76 100644 --- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php +++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Cache; use OC\Files\Cache\Cache; diff --git a/tests/lib/Files/Cache/SearchBuilderTest.php b/tests/lib/Files/Cache/SearchBuilderTest.php index a956de8326273..a8eea342e7d5b 100644 --- a/tests/lib/Files/Cache/SearchBuilderTest.php +++ b/tests/lib/Files/Cache/SearchBuilderTest.php @@ -173,7 +173,6 @@ public static function comparisonProvider(): array { [new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_NOT, [ new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', '%bar'), ]), [1]], - ]; } diff --git a/tests/lib/Files/Cache/WatcherTest.php b/tests/lib/Files/Cache/WatcherTest.php index 61b78ab1b74ac..4431b31372ab8 100644 --- a/tests/lib/Files/Cache/WatcherTest.php +++ b/tests/lib/Files/Cache/WatcherTest.php @@ -86,7 +86,6 @@ public function testWatcher(): void { $this->assertFalse($cache->inCache('folder/bar2.txt')); } - public function testFileToFolder(): void { $storage = $this->getTestStorage(); $cache = $storage->getCache(); diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php index 5ec3810497562..7af6e0663b4f1 100644 --- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php +++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php @@ -89,7 +89,6 @@ public function testSearchQueryOutsideJail(): void { $file2 = 'folder/foobar'; $data1 = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/folder']; - $this->sourceCache->insert('folder', ['size' => 0, 'mtime' => 0, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $this->sourceCache->put($file1, $data1); $this->sourceCache->put($file2, $data1); diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index c9cfccc5ee615..d0550e3c3471e 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -481,7 +481,6 @@ public function testGetMountsForFileIdSubFolderMount(): void { $folderId = $this->createCacheEntry('/foo', 2); $fileId = $this->createCacheEntry('/foo/bar', 2); - $mount1 = $this->getMockBuilder(MountPoint::class) ->setConstructorArgs([$storage1, '/']) ->onlyMethods(['getStorageRootId']) @@ -535,7 +534,6 @@ public function testGetMountsForFileIdSubFolderMountOutside(): void { $this->assertCount(0, $cachedMounts); } - public function testGetMountsForFileIdDeletedUser(): void { $user1 = $this->userManager->get('u1'); @@ -581,7 +579,6 @@ public function testGetUsedSpaceForUsers(): void { $this->assertEquals(['u1' => 100], $result); } - public function testMigrateMountProvider(): void { $user1 = $this->userManager->get('u1'); diff --git a/tests/lib/Files/FilenameValidatorTest.php b/tests/lib/Files/FilenameValidatorTest.php index 0a3e3dacbab60..d01c8c0cfe698 100644 --- a/tests/lib/Files/FilenameValidatorTest.php +++ b/tests/lib/Files/FilenameValidatorTest.php @@ -114,7 +114,6 @@ public function testIsFilenameValid( $validator->method('getForbiddenFilenames') ->willReturn($forbiddenNames); - $this->assertEquals($exception === null, $validator->isFilenameValid($filename)); } diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 56af53584f27a..eeaf8c71add69 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -337,7 +337,6 @@ public function testLocalMountWhenUserDoesNotExist(): void { Filesystem::initMountPoints($userId); } - public function testNullUserThrows(): void { $this->expectException(NoUserException::class); diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php index f5bba611f46d6..a0afb6750b17c 100644 --- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php +++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Files\Mount; use OC\Files\Mount\ObjectHomeMountProvider; diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php index f5d79cc03d77d..e869765d9aef2 100644 --- a/tests/lib/Files/Node/FileTest.php +++ b/tests/lib/Files/Node/FileTest.php @@ -77,7 +77,6 @@ public function testGetContent(): void { $this->assertEquals('bar', $node->getContent()); } - public function testGetContentNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -123,7 +122,6 @@ public function testPutContent(): void { $node->putContent('bar'); } - public function testPutContentNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -237,7 +235,6 @@ public function testFOpenWrite(): void { $this->assertEquals(2, $hooksCalled); } - public function testFOpenReadNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -265,7 +262,6 @@ public function testFOpenReadNotPermitted(): void { $node->fopen('r'); } - public function testFOpenReadWriteNoReadPermissions(): void { $this->expectException(NotPermittedException::class); @@ -293,7 +289,6 @@ public function testFOpenReadWriteNoReadPermissions(): void { $node->fopen('w'); } - public function testFOpenReadWriteNoWritePermissions(): void { $this->expectException(NotPermittedException::class); diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index d3ef1f298c60d..d67f25f622b7e 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -214,7 +214,6 @@ public function testNewFolderDeepParent(): void { $this->assertEquals($child, $result); } - public function testNewFolderNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -258,7 +257,6 @@ public function testNewFile(): void { $this->assertEquals($child, $result); } - public function testNewFileNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -412,7 +410,6 @@ public function testSearchInStorageRoot(): void { $cache->insert('foo', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('foo/qwerty', ['size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']); - $root->method('getMountsIn') ->with('/bar') ->willReturn([]); @@ -475,7 +472,6 @@ public function testSearchSubStorages(): void { $subCache->insert('asd', ['size' => 200, 'mtime' => 55, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $subCache->insert('asd/qwerty', ['size' => 200, 'mtime' => 55, 'mimetype' => 'text/plain']); - $root->method('getMountsIn') ->with('/bar/foo') ->willReturn([$subMount]); @@ -484,7 +480,6 @@ public function testSearchSubStorages(): void { ->with('/bar/foo') ->willReturn($mount); - $node = new Folder($root, $view, '/bar/foo'); $result = $node->search('qw'); $cache->clear(); @@ -809,7 +804,6 @@ public function testRecent(): void { $node = new Folder($root, $view, $folderPath, $folderInfo); - $nodes = $node->getRecent(5); $ids = array_map(function (Node $node) { return (int)$node->getId(); @@ -874,7 +868,6 @@ public function testRecentFolder(): void { $node = new Folder($root, $view, $folderPath, $folderInfo); - $nodes = $node->getRecent(5); $ids = array_map(function (Node $node) { return (int)$node->getId(); @@ -1028,7 +1021,6 @@ public function testSearchSubStoragesLimitOffset(int $offset, int $limit, array $subStorage2->method('getOwner') ->willReturn('owner'); - $cache->insert('', ['size' => 0, 'mtime' => 10, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('foo', ['size' => 0, 'mtime' => 10, 'mimetype' => ICacheEntry::DIRECTORY_MIMETYPE]); $cache->insert('foo/foo1', ['size' => 200, 'mtime' => 10, 'mimetype' => 'text/plain']); diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php index a32b4ae1980ff..9b09bb66ce287 100644 --- a/tests/lib/Files/Node/IntegrationTest.php +++ b/tests/lib/Files/Node/IntegrationTest.php @@ -131,7 +131,6 @@ public function testBasicFolder(): void { $this->assertEquals($file->getId(), $listing[0]->getId()); $this->assertEquals($file->getStorage(), $listing[0]->getStorage()); - $rootListing = $this->root->getDirectoryListing(); $this->assertEquals(2, count($rootListing)); diff --git a/tests/lib/Files/Node/NodeTestCase.php b/tests/lib/Files/Node/NodeTestCase.php index 4605b8c648792..050c3dc642c3e 100644 --- a/tests/lib/Files/Node/NodeTestCase.php +++ b/tests/lib/Files/Node/NodeTestCase.php @@ -205,7 +205,6 @@ public function testDeleteHooks(): void { $this->assertEquals(2, $hooksRun); } - public function testDeleteNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -222,7 +221,6 @@ public function testDeleteNotPermitted(): void { $node->delete(); } - public function testStat(): void { $this->root->expects($this->any()) ->method('getUser') @@ -271,7 +269,6 @@ public function testGetSize(): void { ->method('getUser') ->willReturn($this->user); - $stat = $this->getFileInfo([ 'fileid' => 1, 'size' => 100, @@ -370,7 +367,6 @@ public function testGetInternalPath(): void { ->with('/bar/foo') ->willReturn($this->getFileInfo([], 'foo')); - $node = $this->createTestNode($this->root, $this->view, '/bar/foo'); $this->assertEquals('foo', $node->getInternalPath()); } @@ -454,7 +450,6 @@ public function testTouchHooks(): void { $this->assertEquals(2, $hooksRun); } - public function testTouchNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -471,7 +466,6 @@ public function testTouchNotPermitted(): void { $node->touch(100); } - public function testInvalidPath(): void { $this->expectException(InvalidPathException::class); @@ -504,7 +498,6 @@ public function testCopySameStorage(): void { $this->assertEquals(3, $target->getId()); } - public function testCopyNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -535,7 +528,6 @@ public function testCopyNotPermitted(): void { $node->copy('/bar/asd'); } - public function testCopyNoParent(): void { $this->expectException(NotFoundException::class); @@ -552,7 +544,6 @@ public function testCopyNoParent(): void { $node->copy('/bar/asd/foo'); } - public function testCopyParentIsFile(): void { $this->expectException(NotPermittedException::class); @@ -675,7 +666,6 @@ public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $ $this->assertEquals(4, $hooksRun); } - public function testMoveNotPermitted(): void { $this->expectException(NotPermittedException::class); @@ -697,7 +687,6 @@ public function testMoveNotPermitted(): void { $node->move('/bar/asd'); } - public function testMoveNoParent(): void { $this->expectException(NotFoundException::class); @@ -719,7 +708,6 @@ public function testMoveNoParent(): void { $node->move('/bar/asd'); } - public function testMoveParentIsFile(): void { $this->expectException(NotPermittedException::class); @@ -737,7 +725,6 @@ public function testMoveParentIsFile(): void { $node->move('/bar/asd'); } - public function testMoveFailed(): void { $this->expectException(NotPermittedException::class); @@ -760,7 +747,6 @@ public function testMoveFailed(): void { $node->move('/bar/asd'); } - public function testCopyFailed(): void { $this->expectException(NotPermittedException::class); diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index c69b74c08c18d..584adddad3225 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -111,7 +111,6 @@ public function testGet(): void { $this->assertInstanceOf('\OC\Files\Node\File', $node); } - public function testGetNotFound(): void { $this->expectException(NotFoundException::class); @@ -143,7 +142,6 @@ public function testGetNotFound(): void { $root->get('/bar/foo'); } - public function testGetInvalidPath(): void { $this->expectException(NotPermittedException::class); @@ -163,7 +161,6 @@ public function testGetInvalidPath(): void { $root->get('/../foo'); } - public function testGetNoStorages(): void { $this->expectException(NotFoundException::class); @@ -222,7 +219,6 @@ public function testGetUserFolder(): void { $this->assertEquals($folder, $root->getUserFolder('MyUserId')); } - public function testGetUserFolderWithNoUserObj(): void { $this->expectException(NoUserException::class); $this->expectExceptionMessage('Backends provided no user object'); diff --git a/tests/lib/Files/ObjectStore/LocalTest.php b/tests/lib/Files/ObjectStore/LocalTest.php index 7b3632204bc03..7782699c9ffb2 100644 --- a/tests/lib/Files/ObjectStore/LocalTest.php +++ b/tests/lib/Files/ObjectStore/LocalTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php index 145e09b86da55..5b5de24b0305b 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php index b10d3503311f7..a920de80f542a 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\ObjectStore; use OC\Files\ObjectStore\StorageObjectStore; diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 4e318de209cac..2bf25e380182e 100644 --- a/tests/lib/Files/PathVerificationTest.php +++ b/tests/lib/Files/PathVerificationTest.php @@ -33,7 +33,6 @@ protected function setUp(): void { $this->view = new View(); } - public function testPathVerificationFileNameTooLong(): void { $this->expectException(InvalidPathException::class); $this->expectExceptionMessage('Filename is too long'); @@ -42,7 +41,6 @@ public function testPathVerificationFileNameTooLong(): void { $this->view->verifyPath('', $fileName); } - #[\PHPUnit\Framework\Attributes\DataProvider('providesEmptyFiles')] public function testPathVerificationEmptyFileName($fileName): void { $this->expectException(InvalidPathException::class); diff --git a/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php b/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php index 2f6589707912e..e270b047bd057 100644 --- a/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php +++ b/tests/lib/Files/Search/QueryOptimizer/CombinedTests.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Search\QueryOptimizer; use OC\Files\Search\QueryOptimizer\QueryOptimizer; diff --git a/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php b/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php index 47bef83772ba2..0b12f234b1894 100644 --- a/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/FlattenNestedBoolTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Search\QueryOptimizer; use OC\Files\Search\QueryOptimizer\FlattenNestedBool; diff --git a/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php b/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php index 3b50d1aadbf6b..99709565b1c14 100644 --- a/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/MergeDistributiveOperationsTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Search\QueryOptimizer; use OC\Files\Search\QueryOptimizer\FlattenSingleArgumentBinaryOperation; diff --git a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php index 0687bbe1e8088..2d67a175991a2 100644 --- a/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php +++ b/tests/lib/Files/Search/QueryOptimizer/OrEqualsToInTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Search\QueryOptimizer; use OC\Files\Search\QueryOptimizer\FlattenSingleArgumentBinaryOperation; diff --git a/tests/lib/Files/Search/SearchIntegrationTest.php b/tests/lib/Files/Search/SearchIntegrationTest.php index 8c0ab15b6baec..80397c4272dda 100644 --- a/tests/lib/Files/Search/SearchIntegrationTest.php +++ b/tests/lib/Files/Search/SearchIntegrationTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Files\Search; use OC\Files\Search\SearchBinaryOperator; @@ -28,7 +29,6 @@ protected function setUp(): void { $this->storage->getScanner()->scan(''); } - public function testThousandAndOneFilters(): void { $id = $this->cache->put('file10', ['size' => 1, 'mtime' => 50, 'mimetype' => 'foo/folder']); diff --git a/tests/lib/Files/SetupManagerTest.php b/tests/lib/Files/SetupManagerTest.php index 33795fc564a50..f26de639c1225 100644 --- a/tests/lib/Files/SetupManagerTest.php +++ b/tests/lib/Files/SetupManagerTest.php @@ -549,7 +549,6 @@ public function testSetupForUserResetsUserPaths(): void { ->willReturnCallback($this->getAddMountCheckCallback($invokedCount, $addMountExpectations)); - // setting up for $path but then for user should remove the setup path $this->setupManager->setupForPath($this->path, false); diff --git a/tests/lib/Files/SimpleFS/InMemoryFileTest.php b/tests/lib/Files/SimpleFS/InMemoryFileTest.php index c5e0f2c0989c9..c9c2874c697aa 100644 --- a/tests/lib/Files/SimpleFS/InMemoryFileTest.php +++ b/tests/lib/Files/SimpleFS/InMemoryFileTest.php @@ -98,7 +98,6 @@ public function testGetMimeType(): void { self::assertEquals('application/pdf', $this->testPdf->getMimeType()); } - /** * Ensure that read() returns a stream with the same contents than the original file. */ diff --git a/tests/lib/Files/Storage/CopyDirectoryTest.php b/tests/lib/Files/Storage/CopyDirectoryTest.php index 6454fe014f258..78786eed51e1b 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Files\Storage; use OC\Files\Storage\PolyFill\CopyDirectory; diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index d55ac6a888b31..5bfc6ed060c42 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -59,21 +59,18 @@ public function testEtagChange(): void { $this->assertNotEquals($etag1, $etag2); } - public function testInvalidArgumentsEmptyArray(): void { $this->expectException(\InvalidArgumentException::class); new Local([]); } - public function testInvalidArgumentsNoArray(): void { $this->expectException(\InvalidArgumentException::class); new Local([]); } - public function testDisallowSymlinksOutsideDatadir(): void { $this->expectException(ForbiddenException::class); diff --git a/tests/lib/Files/Storage/Storage.php b/tests/lib/Files/Storage/Storage.php index 091f8b69a6e2e..d0a793ca88e4f 100644 --- a/tests/lib/Files/Storage/Storage.php +++ b/tests/lib/Files/Storage/Storage.php @@ -185,7 +185,6 @@ public function testMimeType(): void { $this->assertEquals('image/svg+xml', $this->instance->getMimeType('/desktopapp.svg')); } - public static function copyAndMoveProvider(): array { return [ ['/source.txt', '/target.txt'], diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index cfdf25a590c84..79392780da288 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -322,7 +322,6 @@ public function testFilesize(): void { $this->instance->expects($this->any())->method('verifyUnencryptedSize') ->willReturn(42); - $this->assertSame(42, $this->instance->filesize('/test.txt') ); @@ -488,7 +487,6 @@ public function testRmdir($path, $rmdirResult, $isExcluded, $encryptionEnabled): $this->arrayCache, ); - if ($rmdirResult === true && $isExcluded === false && $encryptionEnabled === true) { $this->keyStore->expects($this->once())->method('deleteAllFileKeys')->with('/mountPoint' . $path); } else { @@ -911,7 +909,6 @@ public static function dataTestCopyBetweenStorageVersions(): array { ['/files_versions/foo.txt.6487634', '/files/foo.txt', true, false], ['/files_versions/foo.txt.6487634', '/files/foo.txt', false, true], ['/files_versions/foo.txt.6487634', '/files/foo.txt', false, false], - ]; } diff --git a/tests/lib/Files/Stream/DummyEncryptionWrapper.php b/tests/lib/Files/Stream/DummyEncryptionWrapper.php index cd7cbea492062..b7dc7b553ac3b 100644 --- a/tests/lib/Files/Stream/DummyEncryptionWrapper.php +++ b/tests/lib/Files/Stream/DummyEncryptionWrapper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Files\Stream; use OC\Files\Stream\Encryption; diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php index 62eaab3cc7ecc..13f14bbc3248b 100644 --- a/tests/lib/Files/Stream/EncryptionTest.php +++ b/tests/lib/Files/Stream/EncryptionTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Files\Stream; use OC\Encryption\File; diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 49fe565b3b495..3d555fbcef46c 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -213,7 +213,6 @@ public function testMimeTypeIcon(): void { //Empty alias file $mimetypealiases_dist->setContent(json_encode([], JSON_FORCE_OBJECT)); - /* * Test dir mimetype */ @@ -236,7 +235,6 @@ public function testMimeTypeIcon(): void { $mimeType = $detection->mimeTypeIcon('dir'); $this->assertEquals('folder.svg', $mimeType); - /* * Test dir-shareed mimetype */ @@ -255,7 +253,6 @@ public function testMimeTypeIcon(): void { $mimeType = $detection->mimeTypeIcon('dir-shared'); $this->assertEquals('folder-shared.svg', $mimeType); - /* * Test dir external */ @@ -275,7 +272,6 @@ public function testMimeTypeIcon(): void { $mimeType = $detection->mimeTypeIcon('dir-external'); $this->assertEquals('folder-external.svg', $mimeType); - /* * Test complete mimetype */ @@ -295,7 +291,6 @@ public function testMimeTypeIcon(): void { $mimeType = $detection->mimeTypeIcon('my-type'); $this->assertEquals('my-type.svg', $mimeType); - /* * Test subtype */ @@ -327,7 +322,6 @@ function ($appName, $file) use (&$calls) { $mimeType = $detection->mimeTypeIcon('my-type'); $this->assertEquals('my.svg', $mimeType); - /* * Test default mimetype */ @@ -381,8 +375,6 @@ function ($appName, $file) use (&$calls) { $mimeType = $detection->mimeTypeIcon('foo-bar'); $this->assertEquals('foo-bar.svg', $mimeType); - - /* * Test aliases */ diff --git a/tests/lib/Files/Type/LoaderTest.php b/tests/lib/Files/Type/LoaderTest.php index 2aaf4c5067c50..e5c7e00f59bf3 100644 --- a/tests/lib/Files/Type/LoaderTest.php +++ b/tests/lib/Files/Type/LoaderTest.php @@ -34,7 +34,6 @@ protected function tearDown(): void { parent::tearDown(); } - public function testGetMimetype(): void { $qb = $this->db->getQueryBuilder(); $qb->insert('mimetypes') diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index feb7800c12845..09bd68db1a015 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -282,7 +282,6 @@ public function testGetPath(): void { $rootView = new View('/test/files'); - $cachedData = $rootView->getFileInfo('/foo.txt'); $id1 = $cachedData->getId(); $this->assertEquals('/foo.txt', $rootView->getPath($id1)); @@ -295,7 +294,6 @@ public function testGetPath(): void { $this->assertEquals('/foo.txt', $folderView->getPath($id2)); } - public function testGetPathNotExisting(): void { $this->expectException(NotFoundException::class); @@ -1029,7 +1027,6 @@ public function testFileView(): void { public function testTooLongPath($operation, $param0 = null): void { $this->expectException(InvalidPathException::class); - $longPath = ''; // 4000 is the maximum path length in file_cache.path $folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789'; @@ -1263,7 +1260,6 @@ public function testGetRelativePathOnNull(): void { $this->assertNull($view->getRelativePath(null)); } - public function testNullAsRoot(): void { $this->expectException(\TypeError::class); @@ -2563,7 +2559,6 @@ private function getFileLockType(View $view, $path, $onMountPoint = false) { return null; } - public function testRemoveMoveableMountPoint(): void { $mountPoint = '/' . $this->user . '/files/mount/'; diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index 926b666e4b58e..b1a3c793e6f50 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -47,7 +47,6 @@ public function testIsGlobalScaleEnabled(): void { $this->assertTrue($result); } - /** * * @param bool $gsEnabled diff --git a/tests/lib/Group/HideFromCollaborationTest.php b/tests/lib/Group/HideFromCollaborationTest.php index f23660ead2b8e..0eaff528c1110 100644 --- a/tests/lib/Group/HideFromCollaborationTest.php +++ b/tests/lib/Group/HideFromCollaborationTest.php @@ -34,7 +34,6 @@ protected function setUp(): void { $this->dispatcher = $this->createMock(IEventDispatcher::class); } - public function testHideFromCollaboration(): void { // Arrange $backend1 = $this->createMock(HideFromCollaborationBackendTest::class); diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index 9db0bee3ceb7e..8151ff92e186c 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -52,7 +52,6 @@ private function getGroupMock($countCallCount = 0) { return $group; } - public function testGet(): void { $group = $this->getGroupMock(); $groups = array_fill(0, 3, $group); diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php index 6facd9218780c..a124b47cec26f 100644 --- a/tests/lib/HelperStorageTest.php +++ b/tests/lib/HelperStorageTest.php @@ -187,7 +187,6 @@ public function testGetStorageInfoIncludingExtStorageWithNoUserQuota(): void { $this->assertEquals(34, $storageInfo['total'], '5 bytes used and 12 bytes free in home storage as well as 17 bytes used in temporary storage'); } - /** * Test getting the storage info with quota enabled */ diff --git a/tests/lib/HookHelper.php b/tests/lib/HookHelper.php index 321d69aa9963e..c07ccfa452762 100644 --- a/tests/lib/HookHelper.php +++ b/tests/lib/HookHelper.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test; use OC\Files\Filesystem; diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php index 7657f7eca9f20..48c9ac9f3ae6e 100644 --- a/tests/lib/Hooks/BasicEmitterTest.php +++ b/tests/lib/Hooks/BasicEmitterTest.php @@ -54,7 +54,6 @@ public static function staticCallBack() { throw new EmittedException; } - public function testAnonymousFunction(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -64,7 +63,6 @@ public function testAnonymousFunction(): void { $this->emitter->emitEvent('Test', 'test'); } - public function testStaticCallback(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -72,7 +70,6 @@ public function testStaticCallback(): void { $this->emitter->emitEvent('Test', 'test'); } - public function testNonStaticCallback(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -129,7 +126,6 @@ public function testDifferentCallbacks(): void { $this->assertEquals(2, $count, 'Listener called an invalid number of times (' . $count . ') expected 2'); } - public function testArguments(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -141,7 +137,6 @@ public function testArguments(): void { $this->emitter->emitEvent('Test', 'test', ['foo', 'bar']); } - public function testNamedArguments(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -220,7 +215,6 @@ public function testRemoveWildcardScopeAndMethod(): void { $this->addToAssertionCount(1); } - public function testRemoveKeepOtherCallback(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -238,7 +232,6 @@ public function testRemoveKeepOtherCallback(): void { $this->addToAssertionCount(1); } - public function testRemoveKeepOtherMethod(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -253,7 +246,6 @@ public function testRemoveKeepOtherMethod(): void { $this->addToAssertionCount(1); } - public function testRemoveKeepOtherScope(): void { $this->expectException(\Test\Hooks\EmittedException::class); @@ -268,7 +260,6 @@ public function testRemoveKeepOtherScope(): void { $this->addToAssertionCount(1); } - public function testRemoveNonExistingName(): void { $this->expectException(\Test\Hooks\EmittedException::class); diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php index 8bf90ea95bda0..b2cecfdb0fff7 100644 --- a/tests/lib/Http/Client/ClientTest.php +++ b/tests/lib/Http/Client/ClientTest.php @@ -296,10 +296,8 @@ private function setUpDefaultRequestOptions(): void { 'https' => 'foo' ], 'headers' => [ - 'User-Agent' => 'Nextcloud-Server-Crawler/123.45.6', 'Accept-Encoding' => $acceptEnc, - ], 'timeout' => 30, 'nextcloud' => [ diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index 5852a11437254..8bd9178514357 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -153,7 +153,6 @@ public function testIsUpdateAvailable(array $appArray, $updateAvailable): void { $this->assertSame($updateAvailable, $installer->isUpdateAvailable('files'), 'Cached result should be returned and fetcher should be only called once'); } - public function testDownloadAppWithRevokedCertificate(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Certificate "4112" has been revoked'); @@ -192,12 +191,10 @@ public function testDownloadAppWithRevokedCertificate(): void { ->method('get') ->willReturn($appArray); - $installer = $this->getInstaller(); $installer->downloadApp('news'); } - public function testDownloadAppWithNotNextcloudCertificate(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('App with id news has a certificate not issued by a trusted Code Signing Authority'); @@ -240,7 +237,6 @@ public function testDownloadAppWithNotNextcloudCertificate(): void { $installer->downloadApp('news'); } - public function testDownloadAppWithDifferentCN(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('App with id news has a cert issued to passman'); @@ -283,7 +279,6 @@ public function testDownloadAppWithDifferentCN(): void { $installer->downloadApp('news'); } - public function testDownloadAppWithInvalidSignature(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('App with id passman has invalid signature'); @@ -351,7 +346,6 @@ public function testDownloadAppWithInvalidSignature(): void { $installer->downloadApp('passman'); } - public function testDownloadAppWithMoreThanOneFolderDownloaded(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Extracted app testapp has more than 1 folder'); @@ -435,7 +429,6 @@ public function testDownloadAppWithMoreThanOneFolderDownloaded(): void { $installer->downloadApp('testapp'); } - public function testDownloadAppWithMismatchingIdentifier(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('App for id testapp has a wrong app ID in info.xml: testapp1'); @@ -600,7 +593,6 @@ public function testDownloadAppSuccessful(): void { $this->assertEquals('0.9', \OC_App::getAppVersionByPath(__DIR__ . '/../../apps/testapp/')); } - public function testDownloadAppWithDowngrade(): void { // Use previous test to download the application in version 0.9 $this->testDownloadAppSuccessful(); diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index b9270bc885e64..6579c34c9b9e2 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -76,7 +76,6 @@ protected function setUp(): void { ); } - public function testWriteAppSignatureOfNotExistingApp(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Exception message'); @@ -101,7 +100,6 @@ public function testWriteAppSignatureOfNotExistingApp(): void { $this->checker->writeAppSignature('NotExistingApp', $x509, $rsa); } - public function testWriteAppSignatureWrongPermissions(): void { $this->expectException(\Exception::class); $this->expectExceptionMessageMatches('/[a-zA-Z\\/_-]+ is not writable/'); @@ -279,7 +277,6 @@ public function testVerifyAppSignatureWithTamperedFiles(): void { ['/resources/codesigning/root.crt', file_get_contents(__DIR__ . '/../../data/integritycheck/root.crt')], ]); - $expected = [ 'INVALID_HASH' => [ 'AnotherFile.txt' => [ @@ -299,7 +296,6 @@ public function testVerifyAppSignatureWithTamperedFiles(): void { 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], ], - ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp')); } @@ -354,7 +350,6 @@ public function testVerifyAppSignatureWithTamperedFilesAndAlternatePath(): void 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], ], - ]; $this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp', \OC::$SERVERROOT . '/tests/data/integritycheck/appWithInvalidData/')); } @@ -435,7 +430,6 @@ public function testVerifyAppWithDifferentScopeAndAlwaysTrustedCore(): void { $this->assertSame([], $this->checker->verifyAppSignature('SomeApp')); } - public function testWriteCoreSignatureWithException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Exception message'); @@ -459,7 +453,6 @@ public function testWriteCoreSignatureWithException(): void { $this->checker->writeCoreSignature($x509, $rsa, __DIR__); } - public function testWriteCoreSignatureWrongPermissions(): void { $this->expectException(\Exception::class); $this->expectExceptionMessageMatches('/[a-zA-Z\\/_-]+ is not writable/'); @@ -898,7 +891,6 @@ public function testVerifyCoreSignatureWithTamperedFiles(): void { 'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', ], ], - ]; $this->assertSame($expected, $this->checker->verifyCoreSignature()); } diff --git a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php index 53bd83d0e509f..5c324a4085e88 100644 --- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php @@ -32,7 +32,6 @@ public function testReadAndWrite(): void { $this->assertSame($data, $this->fileAccessHelper->file_get_contents($filePath)); } - public function testFile_put_contentsWithException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Failed to write into /anabsolutelynotexistingfolder/on/the/system.txt'); @@ -45,7 +44,6 @@ public function testIs_writable(): void { $this->assertTrue($this->fileAccessHelper->is_writable(Server::get(ITempManager::class)->getTemporaryFile('MyFile'))); } - public function testAssertDirectoryExistsWithException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Directory /anabsolutelynotexistingfolder/on/the/system does not exist.'); diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index 02e9afd142b0f..395d53d28d8f8 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -5,6 +5,7 @@ * SPDX-FileCopyrightText: 2015 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\IntegrityCheck\Iterator; use OC\IntegrityCheck\Iterator\ExcludeFileByNameFilterIterator; diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index 11744e6f5dbd9..b114d42ea35bd 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -275,7 +275,6 @@ public function testFindLanguageWithNotExistingRequestLanguageAndNotExistingStor ->method('setUserValue') ->with('MyUserUid', 'core', 'lang', 'en'); - self::assertSame('en', $factory->findLanguage('MyApp')); } diff --git a/tests/lib/L10N/LanguageIteratorTest.php b/tests/lib/L10N/LanguageIteratorTest.php index 42161a5b1e6e0..d01d656fbcce3 100644 --- a/tests/lib/L10N/LanguageIteratorTest.php +++ b/tests/lib/L10N/LanguageIteratorTest.php @@ -55,7 +55,6 @@ public static function languageSettingsProvider(): array { [ 'de', null, 'en', ['de', 'en', 'en']], // nothing is set [ false, null, 'en', ['en', 'en']], - ]; } diff --git a/tests/lib/LargeFileHelperTest.php b/tests/lib/LargeFileHelperTest.php index f599b78ccb809..170d5750aaedb 100644 --- a/tests/lib/LargeFileHelperTest.php +++ b/tests/lib/LargeFileHelperTest.php @@ -40,7 +40,6 @@ public function testFormatUnsignedIntegerString(): void { ); } - public function testFormatUnsignedIntegerStringException(): void { $this->expectException(\UnexpectedValueException::class); diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index ee897ae5cfb93..74172889e4d0b 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -61,7 +61,6 @@ public function testReleaseSharedLock(): void { $this->assertFalse($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); } - public function testDoubleExclusiveLock(): void { $this->expectException(LockedException::class); @@ -78,7 +77,6 @@ public function testReleaseExclusiveLock(): void { $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - public function testExclusiveLockAfterShared(): void { $this->expectException(LockedException::class); @@ -151,8 +149,6 @@ public function testReleaseAfterReleaseAll(): void { $this->instance->releaseLock('foo', ILockingProvider::LOCK_SHARED); } - - public function testSharedLockAfterExclusive(): void { $this->expectException(LockedException::class); @@ -199,7 +195,6 @@ public function testChangeLockToShared(): void { $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); } - public function testChangeLockToExclusiveDoubleShared(): void { $this->expectException(LockedException::class); @@ -208,14 +203,12 @@ public function testChangeLockToExclusiveDoubleShared(): void { $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - public function testChangeLockToExclusiveNoShared(): void { $this->expectException(LockedException::class); $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - public function testChangeLockToExclusiveFromExclusive(): void { $this->expectException(LockedException::class); @@ -223,14 +216,12 @@ public function testChangeLockToExclusiveFromExclusive(): void { $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } - public function testChangeLockToSharedNoExclusive(): void { $this->expectException(LockedException::class); $this->instance->changeLock('foo', ILockingProvider::LOCK_SHARED); } - public function testChangeLockToSharedFromShared(): void { $this->expectException(LockedException::class); diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 1757446c6e361..6bf225a4778a3 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -174,8 +174,6 @@ public function testEMailTemplateSingleButton(): void { $this->assertSame($expectedTXT, $this->emailTemplate->renderText()); } - - public function testEMailTemplateAlternativePlainTexts(): void { $this->defaults ->expects($this->atLeastOnce()) diff --git a/tests/lib/Mail/EmailValidatorTest.php b/tests/lib/Mail/EmailValidatorTest.php index 6d27b71fe4f3a..497c7007a68d1 100644 --- a/tests/lib/Mail/EmailValidatorTest.php +++ b/tests/lib/Mail/EmailValidatorTest.php @@ -19,7 +19,6 @@ class EmailValidatorTest extends TestCase { private IAppConfig&MockObject $appConfig; private EmailValidator $emailValidator; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 87c4702f181f1..81589aab4491c 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -45,7 +45,6 @@ class MailerTest extends TestCase { /** @var IEventDispatcher&MockObject */ private $dispatcher; - #[\Override] protected function setUp(): void { parent::setUp(); @@ -209,7 +208,6 @@ public function testCreateMessage(): void { $this->assertInstanceOf('\OC\Mail\Message', $this->mailer->createMessage()); } - public function testSendInvalidMailException(): void { $this->config ->method('getSystemValue') diff --git a/tests/lib/Mail/Provider/AddressTest.php b/tests/lib/Mail/Provider/AddressTest.php index 7cc4dbb96f05c..4f03825149ac9 100644 --- a/tests/lib/Mail/Provider/AddressTest.php +++ b/tests/lib/Mail/Provider/AddressTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Mail\Provider; use OCP\Mail\Provider\Address; diff --git a/tests/lib/Mail/Provider/AttachmentTest.php b/tests/lib/Mail/Provider/AttachmentTest.php index 00e819527428d..42ff76e142e0d 100644 --- a/tests/lib/Mail/Provider/AttachmentTest.php +++ b/tests/lib/Mail/Provider/AttachmentTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Mail\Provider; use OCP\Mail\Provider\Attachment; diff --git a/tests/lib/Mail/Provider/ManagerTest.php b/tests/lib/Mail/Provider/ManagerTest.php index 95f8501b510f2..451281159ff97 100644 --- a/tests/lib/Mail/Provider/ManagerTest.php +++ b/tests/lib/Mail/Provider/ManagerTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Mail\Provider; use OC\AppFramework\Bootstrap\Coordinator; diff --git a/tests/lib/Mail/Provider/MessageTest.php b/tests/lib/Mail/Provider/MessageTest.php index 5998b070fd681..81f99cc6d553a 100644 --- a/tests/lib/Mail/Provider/MessageTest.php +++ b/tests/lib/Mail/Provider/MessageTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Mail\Provider; use OCP\Mail\Provider\Address; diff --git a/tests/lib/Memcache/ArrayCacheTest.php b/tests/lib/Memcache/ArrayCacheTest.php index 347a2cb5546f9..b733155372a1d 100644 --- a/tests/lib/Memcache/ArrayCacheTest.php +++ b/tests/lib/Memcache/ArrayCacheTest.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Memcache; use OC\Memcache\ArrayCache; diff --git a/tests/lib/Memcache/CasTraitTestClass.php b/tests/lib/Memcache/CasTraitTestClass.php index 42cb2e193fdf8..565dfbc5a2c1f 100644 --- a/tests/lib/Memcache/CasTraitTestClass.php +++ b/tests/lib/Memcache/CasTraitTestClass.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Memcache; use OC\Memcache\CASTrait; diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 95591db6a12e1..bf6629afec4b9 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -164,7 +164,6 @@ public function testNotify(): void { $manager->notify($notification); } - public function testNotifyInvalid(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index 434ac37e3d7b0..d684f3876f8a0 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -82,7 +82,6 @@ public function testSetAppInvalid($app): void { $this->notification->setApp($app); } - public static function dataSetUser(): array { return self::dataValidString(64); } @@ -416,7 +415,6 @@ public function testAddAction(): void { $this->assertEquals([], $this->notification->getParsedActions()); } - public function testAddActionInvalid(): void { $this->expectException(\InvalidArgumentException::class); @@ -462,7 +460,6 @@ public function testAddParsedAction(): void { $this->assertEquals([], $this->notification->getActions()); } - public function testAddParsedActionInvalid(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/lib/OCM/DiscoveryServiceTest.php b/tests/lib/OCM/DiscoveryServiceTest.php index 58a22a07bd166..8ab77e28b97a9 100644 --- a/tests/lib/OCM/DiscoveryServiceTest.php +++ b/tests/lib/OCM/DiscoveryServiceTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\OCM; use OC\AppFramework\Bootstrap\RegistrationContext; @@ -122,7 +123,6 @@ public function testOCMRequest(string $path, int $expectedStatus, ?array $expect } } - public function testLocalBaseCapability(): void { $local = $this->discoveryService->getLocalOCMProvider(); $this->assertEmpty(array_diff(['notifications', 'shares'], $local->getCapabilities())); diff --git a/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php b/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php index 9c7f0618acdae..e815ba59a9600 100644 --- a/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php +++ b/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\OCM\Listeners; use OCP\EventDispatcher\Event; diff --git a/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php b/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php index e23d71cf8f194..facb30dddd31c 100644 --- a/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php +++ b/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\OCM\Listeners; use OCP\AppFramework\Http\DataResponse; diff --git a/tests/lib/OpenMetrics/Exporters/UsersByBackendTest.php b/tests/lib/OpenMetrics/Exporters/UsersByBackendTest.php index c2499443f0528..0eef487bf572d 100644 --- a/tests/lib/OpenMetrics/Exporters/UsersByBackendTest.php +++ b/tests/lib/OpenMetrics/Exporters/UsersByBackendTest.php @@ -22,7 +22,6 @@ class UsersByBackendTest extends ExporterTestCase { 'backend C' => 0, ]; - #[\Override] protected function getExporter():IMetricFamily { $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php index 7e1c64e65561c..9024d2d0b6887 100644 --- a/tests/lib/Preview/GeneratorTest.php +++ b/tests/lib/Preview/GeneratorTest.php @@ -257,7 +257,6 @@ public function testGetNewPreview(bool $hasVersion): void { $this->assertSame(1000, $result->getSize()); } - public function testMigrateOldPreview(): void { $file = $this->getFile(42, 'myMimeType', false); @@ -437,7 +436,6 @@ public static function dataSize(): array { [1024, 2048, 4096, 2048, false, IPreview::MODE_FILL, 1024, 2048], [1024, 2048, 4096, 2048, false, IPreview::MODE_COVER, 1024, 2048], - [2048, 1024, 512, 512, false, IPreview::MODE_FILL, 512, 256], [2048, 1024, 512, 512, false, IPreview::MODE_COVER, 1024, 512], [2048, 1024, 512, 512, true, IPreview::MODE_FILL, 1024, 1024], diff --git a/tests/lib/Remote/Api/OCSTest.php b/tests/lib/Remote/Api/OCSTest.php index e89bba912386c..ecfa2eb526706 100644 --- a/tests/lib/Remote/Api/OCSTest.php +++ b/tests/lib/Remote/Api/OCSTest.php @@ -55,7 +55,6 @@ public function testGetUser(): void { $this->assertEquals('user', $user->getUserId()); } - public function testGetUserInvalidResponse(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Invalid user response, expected field email not found'); @@ -69,7 +68,6 @@ public function testGetUserInvalidResponse(): void { $client->getUser('user'); } - public function testInvalidPassword(): void { $this->expectException(ForbiddenException::class); diff --git a/tests/lib/Remote/InstanceTest.php b/tests/lib/Remote/InstanceTest.php index edf0ff0fa3f45..2173bc3c6b655 100644 --- a/tests/lib/Remote/InstanceTest.php +++ b/tests/lib/Remote/InstanceTest.php @@ -59,7 +59,6 @@ public function testRerequestHttps(): void { $this->assertEquals(false, $instance2->isActive()); } - public function testPreventDowngradeAttach(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('refusing to connect to remote instance(example.com) over http that was previously accessible over https'); diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 2a535f854e5f3..54b3c4e18e43e 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -95,7 +95,6 @@ public function testRun(): void { $this->assertEntryCount('vcategory_to_object', 2, 'Assert tag entries count after cleaning category entries'); $this->assertEntryCount('vcategory', 2, 'Assert tag categories count after cleaning category entries'); - $this->addTagCategory('TestRepairCleanTags', 'contacts', 'userExists'); // Retained $this->assertEntryCount('vcategory', 3, 'Assert tag categories count before cleaning categories by users'); diff --git a/tests/lib/Repair/ClearFrontendCachesTest.php b/tests/lib/Repair/ClearFrontendCachesTest.php index 7e02c07d099cd..509c04ee52cbe 100644 --- a/tests/lib/Repair/ClearFrontendCachesTest.php +++ b/tests/lib/Repair/ClearFrontendCachesTest.php @@ -34,7 +34,6 @@ protected function setUp(): void { $this->repair = new ClearFrontendCaches($this->cacheFactory, $this->jsCombiner); } - public function testRun(): void { $imagePathCache = $this->createMock(ICache::class); $imagePathCache->expects($this->once()) diff --git a/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php b/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php index 2d62601a190b8..8c03c29afc8f3 100644 --- a/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php +++ b/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC29; use InvalidArgumentException; diff --git a/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php b/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php index 652873a299f1b..924dc241149cc 100644 --- a/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php +++ b/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Repair\NC29; use OCP\BackgroundJob\IJobList; diff --git a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php index 77036dc73c35c..9b51da4de01be 100644 --- a/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php +++ b/tests/lib/Repair/Owncloud/CleanPreviewsBackgroundJobTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Repair\Owncloud; use OC\Repair\Owncloud\CleanPreviewsBackgroundJob; @@ -141,7 +142,6 @@ public function testCleanupPreviewsFinished(): void { ], $loggerCalls); } - public function testNoUserFolder(): void { $this->rootFolder->method('getUserFolder') ->with($this->equalTo('myuid')) diff --git a/tests/lib/Repair/Owncloud/CleanPreviewsTest.php b/tests/lib/Repair/Owncloud/CleanPreviewsTest.php index 243e04149d226..7b064228b2518 100644 --- a/tests/lib/Repair/Owncloud/CleanPreviewsTest.php +++ b/tests/lib/Repair/Owncloud/CleanPreviewsTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\Repair\Owncloud; use OC\Repair\Owncloud\CleanPreviews; @@ -84,7 +85,6 @@ public function testRun(): void { ], $jobListCalls); } - public function testRunAlreadyDone(): void { $this->userManager->expects($this->never()) ->method($this->anything()); diff --git a/tests/lib/RichObjectStrings/DefinitionsTest.php b/tests/lib/RichObjectStrings/DefinitionsTest.php index 60ea820e84442..ecfc493e1fa20 100644 --- a/tests/lib/RichObjectStrings/DefinitionsTest.php +++ b/tests/lib/RichObjectStrings/DefinitionsTest.php @@ -21,7 +21,6 @@ public static function dataGetDefinition() { return $testsuite; } - public function testGetDefinitionNotExisting(): void { $this->expectException(InvalidObjectExeption::class); $this->expectExceptionMessage('Object type is undefined'); @@ -50,7 +49,6 @@ public function testGetDefinition($type, array $expected): void { $this->assertTrue(is_array($definition['parameters']), 'Parameters of definition must be of type array'); $this->assertNotEmpty($definition['parameters'], 'Parameters of definition must not be empty'); - $this->assertArrayHasKey('id', $definition['parameters'], 'Parameter ID must be defined'); $this->assertArrayHasKey('name', $definition['parameters'], 'Parameter name must be defined'); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 50911cab3f1ae..61a14e2351e1a 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -103,7 +103,6 @@ public function testListCertificates(): void { $this->assertEqualsArrays($certificateStore, $this->certificateManager->listCertificates()); } - public function testAddInvalidCertificate(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Certificate could not get parsed.'); @@ -174,7 +173,6 @@ public function testNeedRebundling($CaBundleMtime, ->with('targetBundlePath') ->willReturn($targetBundleExists); - $view->expects($this->any())->method('filemtime') ->willReturnCallback(function ($path) use ($targetBundleMtime) { if ($path === 'targetBundlePath') { @@ -183,7 +181,6 @@ public function testNeedRebundling($CaBundleMtime, throw new \Exception('unexpected path'); }); - $this->assertSame($expected, $this->invokePrivate($certificateManager, 'needsRebundling') ); diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 02b67e14a6842..f7e245611700d 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -32,7 +32,6 @@ protected function setUp(): void { $this->expiredCertificate = new Certificate($expiredCertificate, 'ExpiredCertificate'); } - public function testBogusData(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Certificate could not get parsed.'); diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index d9898e4090e2c..6e5312d67a0cd 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -38,7 +38,6 @@ public function testDefaultEncrypt($stringToEncrypt): void { $this->assertEquals($stringToEncrypt, $this->crypto->decrypt($ciphertext)); } - public function testWrongPassword(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('HMAC does not match.'); @@ -54,7 +53,6 @@ public function testLaterDecryption(): void { $this->assertEquals($stringToEncrypt, $this->crypto->decrypt($encryptedString, 'ThisIsAVeryS3cur3P4ssw0rd')); } - public function testWrongIV(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('HMAC does not match.'); @@ -63,7 +61,6 @@ public function testWrongIV(): void { $this->crypto->decrypt($encryptedString, 'ThisIsAVeryS3cur3P4ssw0rd'); } - public function testWrongParameters(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Authenticated ciphertext could not be decoded.'); diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php index b1dd182269002..f6dcf22116aea 100644 --- a/tests/lib/Security/HasherTest.php +++ b/tests/lib/Security/HasherTest.php @@ -94,12 +94,9 @@ public static function hashProviders73(): array { ['password', '2|$argon2id$v=19$m=65536,t=4,p=1$V3ovTHlvc0Eyb24xenVRNQ$iY/A0Yf24c2DToedj2rj9+KeoJBGsJYQOlJMoa0SFXk', false], ['password', '2|$argon2id$v=19$m=65536,t=4,p=1$NlYuMlQ0ODIudTRkZDhYUw$/Z71ckOIuydujedUGK73iXC9vbLzlH/iXkG9+gGgn+c', false], ['password', '2|$argon2id$v=19$m=65536,t=4,p=1$b09kNFZTZWFjS05aTkl6ZA$llE4TnIYYrC0H7wkTL1JsIwAAgoMJERlqtFcHHQcXTs', false], - ]; } - - /** @var Hasher */ protected $hasher; @@ -131,7 +128,6 @@ public function testSplitHash($hash, $expected): void { $this->assertSame($expected, $relativePath); } - #[\PHPUnit\Framework\Attributes\DataProvider('hashProviders70_71')] public function testVerify($password, $hash, $expected): void { $this->config @@ -184,7 +180,6 @@ public function testUpgradeHashBlowFishToArgon2(): void { $argon2 = 2 . '|' . password_hash($message, PASSWORD_ARGON2ID, []); } - $this->assertTrue($this->hasher->verify($message, $blowfish, $newHash)); $this->assertTrue($this->hasher->verify($message, $argon2)); diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index db75252d1928e..ff10b34a67730 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -227,7 +227,6 @@ public function testGetKeyWithNotExistingKey(): void { $folder ); - $expected = new Key('MyNewPublicKey', 'MyNewPrivateKey'); $this->assertEquals($expected, $this->manager->getKey($user)); } @@ -259,8 +258,6 @@ public function testGetSystemKey(): void { $this->assertSame($key, $manager->getSystemKey()); } - - public function testGetSystemKeyFailure(): void { $this->expectException(\RuntimeException::class); diff --git a/tests/lib/Security/RateLimiting/LimiterTest.php b/tests/lib/Security/RateLimiting/LimiterTest.php index 88ad895cd4f25..76a3a3a27a906 100644 --- a/tests/lib/Security/RateLimiting/LimiterTest.php +++ b/tests/lib/Security/RateLimiting/LimiterTest.php @@ -37,7 +37,6 @@ protected function setUp(): void { ); } - public function testRegisterAnonRequestExceeded(): void { $this->expectException(RateLimitExceededException::class); $this->expectExceptionMessage('Rate limit exceeded'); @@ -79,7 +78,6 @@ public function testRegisterAnonRequestSuccess(): void { $this->limiter->registerAnonRequest('MyIdentifier', 100, 100, '127.0.0.1'); } - public function testRegisterUserRequestExceeded(): void { $this->expectException(RateLimitExceededException::class); $this->expectExceptionMessage('Rate limit exceeded'); diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index 965dbb57f9677..a715890d3c149 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -25,7 +25,6 @@ class ServerTest extends \Test\TestCase { /** @var Server */ protected $server; - #[\Override] protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Session/MemoryTest.php b/tests/lib/Session/MemoryTest.php index d5691a541cdf2..3d3e45bb81881 100644 --- a/tests/lib/Session/MemoryTest.php +++ b/tests/lib/Session/MemoryTest.php @@ -18,7 +18,6 @@ protected function setUp(): void { $this->instance = new Memory(); } - public function testThrowsExceptionOnGetId(): void { $this->expectException(SessionNotAvailableException::class); diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 2fe7838e71bf6..fde656b4491d3 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -200,7 +200,6 @@ public function testSameSectionAsPersonalAndAdmin(): void { $this->manager->registerSection('personal', Section::class); $this->manager->registerSection('admin', Section::class); - $section = Server::get(Section::class); $this->container->method('get') ->with(Section::class) diff --git a/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php b/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php index 1119c5ed0d986..76fa765163b52 100644 --- a/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php +++ b/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\SetupCheck; use OCP\Http\Client\IClientService; diff --git a/tests/lib/SetupCheck/CheckServerResponseTraitTest.php b/tests/lib/SetupCheck/CheckServerResponseTraitTest.php index 64e1b499c4ba8..46fe78d2d6b25 100644 --- a/tests/lib/SetupCheck/CheckServerResponseTraitTest.php +++ b/tests/lib/SetupCheck/CheckServerResponseTraitTest.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\SetupCheck; use OCP\Http\Client\IClientService; diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index a5a867c1288d5..3def0ff69e1b3 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -120,7 +120,6 @@ public function testGetSupportedDatabasesWithAllWorking(): void { $this->assertSame($expectedResult, $result); } - public function testGetSupportedDatabaseException(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Supported databases are not properly configured.'); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 1881c02c83d2d..5cc71a9f53667 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -187,9 +187,6 @@ private function addShareToDB($shareType, $sharedWith, $sharedBy, $shareOwner, return $qb->getLastInsertId(); } - - - public function testGetShareByIdNotExist(): void { $this->expectException(ShareNotFound::class); @@ -1639,7 +1636,6 @@ public function testDeleteFromSelfGroupAlreadyCustomShare(): void { $this->assertEquals('user2', $share2['share_with']); } - public function testDeleteFromSelfGroupUserNotInGroup(): void { $qb = $this->dbConn->getQueryBuilder(); $stmt = $qb->insert('share') @@ -1682,7 +1678,6 @@ public function testDeleteFromSelfGroupUserNotInGroup(): void { $this->provider->deleteFromSelf($share, 'user2'); } - public function testDeleteFromSelfGroupDoesNotExist(): void { $this->expectException(ProviderException::class); $this->expectExceptionMessage('Group "group" does not exist'); @@ -1773,7 +1768,6 @@ public function testDeleteFromSelfUser(): void { $this->assertCount(0, $shares); } - public function testDeleteFromSelfUserNotRecipient(): void { $this->expectException(ProviderException::class); $this->expectExceptionMessage('Recipient does not match'); @@ -1816,7 +1810,6 @@ public function testDeleteFromSelfUserNotRecipient(): void { $this->provider->deleteFromSelf($share, $user3); } - public function testDeleteFromSelfLink(): void { $this->expectException(ProviderException::class); $this->expectExceptionMessage('Invalid shareType'); @@ -2204,7 +2197,6 @@ function ($groupId) use ($groups) { $this->assertSame('user5', $shares[1]['uid_owner']); $this->assertSame(0, (int)$shares[1]['permissions']); - $stmt->closeCursor(); } @@ -3033,7 +3025,6 @@ public function testGetAllShares(): void { $this->assertEquals('myTarget5', $share->getTarget()); } - public function testGetSharesByPath(): void { $qb = $this->dbConn->getQueryBuilder(); diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php index 5987cb960202f..15c0dbc2f0ab3 100644 --- a/tests/lib/Share20/LegacyHooksTest.php +++ b/tests/lib/Share20/LegacyHooksTest.php @@ -225,7 +225,6 @@ public function testPreShare(): void { ->setPassword('password') ->setToken('token'); - $hookListner = $this->getMockBuilder(Dummy::class)->onlyMethods(['preShare'])->getMock(); Util::connectHook('OCP\Share', 'pre_shared', $hookListner, 'preShare'); @@ -273,7 +272,6 @@ public function testPreShareError(): void { ->setPassword('password') ->setToken('token'); - $hookListner = $this->getMockBuilder(Dummy::class)->onlyMethods(['preShare'])->getMock(); Util::connectHook('OCP\Share', 'pre_shared', $hookListner, 'preShare'); @@ -329,7 +327,6 @@ public function testPostShare(): void { ->setPassword('password') ->setToken('token'); - $hookListner = $this->getMockBuilder(Dummy::class)->onlyMethods(['postShare'])->getMock(); Util::connectHook('OCP\Share', 'post_shared', $hookListner, 'postShare'); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 21098e7f38af9..b29638856b810 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -787,7 +787,6 @@ public function testGetShareById(): void { $this->assertEquals($share, $this->manager->getShareById('default:42')); } - public function testGetExpiredShareById(): void { $this->expectException(ShareNotFound::class); @@ -814,7 +813,6 @@ public function testGetExpiredShareById(): void { $manager->getShareById('default:42'); } - public function testVerifyPasswordNullButEnforced(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Passwords are enforced for link and mail shares'); @@ -888,7 +886,6 @@ public function testVerifyPasswordHook(): void { $this->assertNull($result); } - public function testVerifyPasswordHookFails(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('password not accepted'); @@ -1199,7 +1196,6 @@ public function testGeneralChecks(array $shareParams, ?string $exceptionMessage, ->willReturnArgument(0); $this->rootFolder->method('getUserFolder')->willReturn($userFolder); - try { self::invokePrivate($this->manager, 'generalCreateChecks', [$share]); $thrown = false; @@ -1214,7 +1210,6 @@ public function testGeneralChecks(array $shareParams, ?string $exceptionMessage, $this->assertSame($exception, $thrown); } - public function testGeneralCheckShareRoot(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('You cannot share your root folder'); @@ -2061,7 +2056,6 @@ public function testUserCreateChecksShareWithGroupMembersOnlySharedGroup(): void self::invokePrivate($this->manager, 'userCreateChecks', [$share]); } - public function testUserCreateChecksIdenticalShareExists(): void { $this->expectException(AlreadySharedException::class); $this->expectExceptionMessage('Sharing name.txt failed, because this item is already shared with the account user'); @@ -2090,7 +2084,6 @@ public function testUserCreateChecksIdenticalShareExists(): void { self::invokePrivate($this->manager, 'userCreateChecks', [$share]); } - public function testUserCreateChecksIdenticalPathSharedViaGroup(): void { $this->expectException(AlreadySharedException::class); $this->expectExceptionMessage('Sharing name2.txt failed, because this item is already shared with the account userName'); @@ -2204,7 +2197,6 @@ public function testUserCreateChecksIdenticalPathNotSharedWithUser(): void { self::invokePrivate($this->manager, 'userCreateChecks', [$share]); } - public function testGroupCreateChecksShareWithGroupMembersGroupSharingNotAllowed(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Group sharing is now allowed'); @@ -2220,7 +2212,6 @@ public function testGroupCreateChecksShareWithGroupMembersGroupSharingNotAllowed self::invokePrivate($this->manager, 'groupCreateChecks', [$share]); } - public function testGroupCreateChecksShareWithGroupMembersOnlyNotInGroup(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Sharing is only allowed within your own groups'); @@ -2247,7 +2238,6 @@ public function testGroupCreateChecksShareWithGroupMembersOnlyNotInGroup(): void self::invokePrivate($this->manager, 'groupCreateChecks', [$share]); } - public function testGroupCreateChecksShareWithGroupMembersOnlyNullGroup(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Sharing is only allowed within your own groups'); @@ -2301,7 +2291,6 @@ public function testGroupCreateChecksShareWithGroupMembersOnlyInGroup(): void { self::invokePrivate($this->manager, 'groupCreateChecks', [$share]); } - public function testGroupCreateChecksPathAlreadySharedWithSameGroup(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Path is already shared with this group'); @@ -2356,7 +2345,6 @@ public function testGroupCreateChecksPathAlreadySharedWithDifferentGroup(): void self::invokePrivate($this->manager, 'groupCreateChecks', [$share]); } - public function testLinkCreateChecksNoLinkSharesAllowed(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Link sharing is not allowed'); @@ -2372,7 +2360,6 @@ public function testLinkCreateChecksNoLinkSharesAllowed(): void { self::invokePrivate($this->manager, 'linkCreateChecks', [$share]); } - #[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions] public function testFileLinkCreateChecksNoPublicUpload(): void { $share = $this->manager->newShare(); @@ -2447,7 +2434,6 @@ public function testLinkCreateChecksReadOnly(): void { self::invokePrivate($this->manager, 'linkCreateChecks', [$share]); } - public function testPathCreateChecksContainsSharedMount(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('You cannot share a folder that contains other shares'); @@ -2929,7 +2915,6 @@ public function testCreateShareMail(): void { $this->assertEquals('token', $share->getToken()); } - public function testCreateShareHookError(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('I won\'t let you share'); @@ -3311,7 +3296,6 @@ public function testGetShareByTokenWithException(): void { $this->assertSame($share, $ret); } - public function testGetShareByTokenHideDisabledUser(): void { $this->expectException(ShareNotFound::class); $this->expectExceptionMessage('The requested share does not exist anymore'); @@ -3366,7 +3350,6 @@ public function testGetShareByTokenHideDisabledUser(): void { $manager->getShareByToken('expiredToken'); } - public function testGetShareByTokenExpired(): void { $this->expectException(ShareNotFound::class); $this->expectExceptionMessage('The requested share does not exist anymore'); @@ -3427,7 +3410,6 @@ public function testGetShareByTokenNotExpired(): void { $this->assertSame($share, $res); } - public function testGetShareByTokenWithPublicLinksDisabled(): void { $this->expectException(ShareNotFound::class); @@ -3611,7 +3593,6 @@ public function testCheckPasswordUpdateShare(): void { $this->assertTrue($this->manager->checkPassword($share, 'password')); } - public function testUpdateShareCantChangeShareType(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Cannot change share type'); @@ -3639,7 +3620,6 @@ public function testUpdateShareCantChangeShareType(): void { $manager->updateShare($share); } - public function testUpdateShareCantChangeRecipientForGroupShare(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Can only update recipient on user shares'); @@ -3667,7 +3647,6 @@ public function testUpdateShareCantChangeRecipientForGroupShare(): void { $manager->updateShare($share); } - public function testUpdateShareCantShareWithOwner(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Cannot share with the share owner'); @@ -3882,7 +3861,6 @@ public function testUpdateShareLink(): void { Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post'); $hookListener3->expects($this->never())->method('post'); - $manager->updateShare($share); } @@ -4278,7 +4256,6 @@ public function testUpdateShareMailEnableSendPasswordByTalkWithNoPassword(): voi $manager->updateShare($share); } - public function testUpdateShareMailEnableSendPasswordByTalkRemovingPassword(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password'); @@ -4351,7 +4328,6 @@ public function testUpdateShareMailEnableSendPasswordByTalkRemovingPassword(): v $manager->updateShare($share); } - public function testUpdateShareMailEnableSendPasswordByTalkRemovingPasswordWithEmptyString(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Cannot enable sending the password by Talk with an empty password'); @@ -4424,7 +4400,6 @@ public function testUpdateShareMailEnableSendPasswordByTalkRemovingPasswordWithE $manager->updateShare($share); } - public function testUpdateShareMailEnableSendPasswordByTalkWithPreviousPassword(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Cannot enable sending the password by Talk without setting a new password'); @@ -4657,7 +4632,6 @@ public function testMoveShareLink(): void { $this->manager->moveShare($share, 'recipient'); } - public function testMoveShareUserNotRecipient(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid share recipient'); @@ -4686,7 +4660,6 @@ public function testMoveShareUser(): void { $this->manager->moveShare($share, 'recipient'); } - public function testMoveShareGroupNotRecipient(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid share recipient'); @@ -4706,7 +4679,6 @@ public function testMoveShareGroupNotRecipient(): void { $this->manager->moveShare($share, 'recipient'); } - public function testMoveShareGroupNull(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Group "shareWith" does not exist'); @@ -4848,7 +4820,6 @@ public function testGetSharesInFolderOwnerless(): void { ], $manager->getSharesInFolder('user', $folder)); } - public function testGetAccessList(): void { $factory = new DummyFactory2($this->createMock(ContainerInterface::class)); diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php index 0be3d3501427d..9bf39bd90be1b 100644 --- a/tests/lib/Support/Subscription/RegistryTest.php +++ b/tests/lib/Support/Subscription/RegistryTest.php @@ -57,7 +57,6 @@ public function testDelegateToNone(): void { $this->addToAssertionCount(1); } - public function testDoubleRegistration(): void { $this->expectException(AlreadyRegisteredException::class); @@ -106,7 +105,6 @@ public function testDelegateHasExtendedSupport(): void { $this->assertSame(true, $this->registry->delegateHasExtendedSupport()); } - public function testDelegateGetSupportedApps(): void { /* @var ISupportedApps|\PHPUnit\Framework\MockObject\MockObject $subscription */ $subscription = $this->createMock(ISupportedApps::class); diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index ad9e0a81abda1..80f327fafb9ba 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -271,14 +271,12 @@ public function testGetExistingTagById(): void { $this->assertSameTag($tag2, $tagList[$tag2->getId()]); } - public function testGetNonExistingTag(): void { $this->expectException(TagNotFoundException::class); $this->tagManager->getTag('nonexist', false, false); } - public function testGetNonExistingTagsById(): void { $this->expectException(TagNotFoundException::class); @@ -286,7 +284,6 @@ public function testGetNonExistingTagsById(): void { $this->tagManager->getTagsByIds([$tag1->getId(), 100, 101]); } - public function testGetInvalidTagIdFormat(): void { $this->expectException(\InvalidArgumentException::class); @@ -373,7 +370,6 @@ public function testDeleteTags(): void { $this->assertEmpty($this->tagManager->getAllTags()); } - public function testDeleteNonExistingTag(): void { $this->expectException(TagNotFoundException::class); @@ -577,7 +573,6 @@ public function testDisallowedToCreateTag(?bool $isAdmin): void { \OC::$CLI = $oldCli; } - /** * @param ISystemTag $tag1 * @param ISystemTag $tag2 diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php index d0efd4197701d..b28e69b1c1c79 100644 --- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php +++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php @@ -178,7 +178,6 @@ public function testGetObjectsForTagsLimit(): void { ], $objectIds); } - public function testGetObjectsForTagsLimitWithMultipleTags(): void { $this->expectException(\InvalidArgumentException::class); @@ -202,7 +201,6 @@ public function testGetObjectsForTagsLimitOffset(): void { ], $objectIds); } - public function testGetObjectsForNonExistingTag(): void { $this->expectException(TagNotFoundException::class); @@ -270,7 +268,6 @@ public function testReAssignUnassignTags(): void { $this->assertTrue(true, 'No error when reassigning/unassigning'); } - public function testAssignNonExistingTags(): void { $this->expectException(TagNotFoundException::class); @@ -297,7 +294,6 @@ public function testAssignNonExistingTagInArray(): void { ], $tagIdMapping, 'None of the tags got assigned'); } - public function testUnassignNonExistingTags(): void { $this->expectException(TagNotFoundException::class); @@ -428,7 +424,6 @@ public function testHaveTagAtLeastOneMatch(): void { ); } - public function testHaveTagNonExisting(): void { $this->expectException(TagNotFoundException::class); diff --git a/tests/lib/TaskProcessing/TaskProcessingTest.php b/tests/lib/TaskProcessing/TaskProcessingTest.php index d557bcbed0963..3bfc586240c9e 100644 --- a/tests/lib/TaskProcessing/TaskProcessingTest.php +++ b/tests/lib/TaskProcessing/TaskProcessingTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\TaskProcessing; use OC\AppFramework\Bootstrap\Coordinator; @@ -231,8 +232,6 @@ public function getOptionalOutputShapeEnumValues(): array { } } - - class FailingSyncProvider implements IProvider, ISynchronousProvider { public const ERROR_MESSAGE = 'Failure'; #[\Override] @@ -305,7 +304,6 @@ public function getOptionalOutputShapeEnumValues(): array { } } - class FailingSyncProviderWithUserFacingError implements IProvider, ISynchronousProvider { public const ERROR_MESSAGE = 'Failure'; public const USER_FACING_ERROR_MESSAGE = 'User-facing Failure'; @@ -596,7 +594,6 @@ public function getOptionalOutputShapeEnumValues(): array { } } - class ExternalTriggerableProvider implements ITriggerableProvider { public const ID = 'event:external:provider:triggerable'; public const TASK_TYPE_ID = TextToText::ID; @@ -893,7 +890,6 @@ public function testProviderShouldBeRegisteredAndTaskTypeDisabled(): void { $this->manager->scheduleTask(new Task(TextToText::ID, ['input' => 'Hello'], 'test', null)); } - public function testProviderShouldBeRegisteredAndTaskFailValidation(): void { $this->appConfig->setValueString('core', 'ai.taskprocessing_type_preferences', '', lazy: true); $this->registrationContext->expects($this->any())->method('getTaskProcessingProviders')->willReturn([ @@ -1426,7 +1422,6 @@ public function testGetProvidersIncludesExternalViaEvent() { $this->registrationContext->expects($this->any())->method('getTextToImageProviders')->willReturn([]); $this->registrationContext->expects($this->any())->method('getSpeechToTextProviders')->willReturn([]); - $externalProvider = new ExternalProvider(); $this->configureEventDispatcherMock(providersToAdd: [$externalProvider]); $this->manager = $this->createManagerInstance(); // Create manager with configured mocks diff --git a/tests/lib/Template/JSCombinerTest.php b/tests/lib/Template/JSCombinerTest.php index 3d0b6bc445a40..d3fd8444e115f 100644 --- a/tests/lib/Template/JSCombinerTest.php +++ b/tests/lib/Template/JSCombinerTest.php @@ -416,7 +416,6 @@ public function testCacheSuccess(): void { $path = __DIR__ . '/data/'; - $folder->method('getFile')->willReturnCallback( function ($filename) use ($file, $depsFile, $gzFile) { if ($filename === 'combine.js') { diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index 4b4497a070bfa..653aab8e61115 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -97,7 +97,6 @@ public function restoreService(string $name): bool { unset($container[$oldService]); } - unset($this->services[$name]); return true; } diff --git a/tests/lib/TestMoveableMountPoint.php b/tests/lib/TestMoveableMountPoint.php index 728be5ef1179b..7469857b7058b 100644 --- a/tests/lib/TestMoveableMountPoint.php +++ b/tests/lib/TestMoveableMountPoint.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test; use OC\Files\Mount\MountPoint; diff --git a/tests/lib/Updater/ReleaseMetadataTest.php b/tests/lib/Updater/ReleaseMetadataTest.php index 8fd744c5749cf..5b27927f522e8 100644 --- a/tests/lib/Updater/ReleaseMetadataTest.php +++ b/tests/lib/Updater/ReleaseMetadataTest.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-only */ + namespace Test\Updater; use OC\Updater\ReleaseMetadata; @@ -36,7 +37,6 @@ public function testDownloadMetadata(): void { ->with() ->willReturn($this->resultRequest()); - $releaseMetadata = new ReleaseMetadata($this->clientService); $this->assertSame(self::resultRequestArray(), $releaseMetadata->downloadMetadata('ouila')); } diff --git a/tests/lib/User/AvatarUserDummy.php b/tests/lib/User/AvatarUserDummy.php index 77ca868da4bf1..734825c9aa7f8 100644 --- a/tests/lib/User/AvatarUserDummy.php +++ b/tests/lib/User/AvatarUserDummy.php @@ -7,6 +7,7 @@ * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace Test\User; class AvatarUserDummy extends \Test\Util\User\Dummy { diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index aed21e0582514..4f70b642b7e38 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -73,7 +73,6 @@ function (Event $event): void { $this->assertSame($user, $this->backend->checkPassword($user, 'newpass')); } - public function testVerifyPasswordEventFail(): void { $this->expectException(HintException::class); $this->expectExceptionMessage('password change failed'); diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index acb35bf7cf7c1..66fea97fbda18 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -60,7 +60,6 @@ public function testGetBackends(): void { $this->assertEquals([$userDummyBackend, $dummyDatabaseBackend], $this->manager->getBackends()); } - public function testUserExistsSingleBackendExists(): void { $backend = $this->createMock(\Test\Util\User\Dummy::class); $backend->expects($this->once()) @@ -312,7 +311,6 @@ public function testCreateUserInvalid($uid, $password, $exception): void { ->with(\OC\User\Backend::CREATE_USER) ->willReturn(true); - $this->manager->registerBackend($backend); $this->expectException(\InvalidArgumentException::class, $exception); @@ -343,7 +341,6 @@ public function testCreateUserSingleBackendNotExists(): void { $this->assertEquals('foo', $user->getUID()); } - public function testCreateUserSingleBackendExists(): void { $this->expectException(\Exception::class); @@ -386,7 +383,6 @@ public function testCreateUserNoBackends(): void { $this->assertFalse($this->manager->createUser('foo', 'bar')); } - public function testCreateUserFromBackendWithBackendError(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Could not create account'); @@ -402,7 +398,6 @@ public function testCreateUserFromBackendWithBackendError(): void { $this->manager->createUserFromBackend('MyUid', 'MyPassword', $backend); } - public function testCreateUserTwoBackendExists(): void { $this->expectException(\Exception::class); diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index d21522f0c2a1e..721d93e122fb0 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -226,7 +226,6 @@ public function testLoginValidPasswordEnabled(): void { $this->assertEquals($user, $userSession->getUser()); } - public function testLoginValidPasswordDisabled(): void { $this->expectException(LoginException::class); @@ -518,7 +517,6 @@ public function testLogClientInWithTokenPassword(): void { $this->assertTrue($userSession->logClientIn('john', 'I-AM-AN-APP-PASSWORD', $request, $this->throttler)); } - public function testLogClientInNoTokenPasswordNo2fa(): void { $this->expectException(PasswordLoginForbiddenException::class); diff --git a/themes/example/defaults.php b/themes/example/defaults.php index 6bf93e62681f8..d12e230c5dc9a 100644 --- a/themes/example/defaults.php +++ b/themes/example/defaults.php @@ -102,7 +102,6 @@ public function buildDocLinkToKey($key): string { return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key; } - /** * Returns mail header color * @return string diff --git a/vendor-bin/cs-fixer/composer.lock b/vendor-bin/cs-fixer/composer.lock index 8d492f58961cc..fe0fb585d0f39 100644 --- a/vendor-bin/cs-fixer/composer.lock +++ b/vendor-bin/cs-fixer/composer.lock @@ -8,26 +8,26 @@ "packages": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.27.0", + "version": "v3.37.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "d860473d16b906c7945206177edc7d112357a706" + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/d860473d16b906c7945206177edc7d112357a706", - "reference": "d860473d16b906c7945206177edc7d112357a706", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/678df979ce743466b42ddb6eea46b3f4c9a7bade", + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade", "shasum": "" }, "require": { "ext-filter": "*", "ext-tokenizer": "*", - "friendsofphp/php-cs-fixer": "^3.61.1", + "friendsofphp/php-cs-fixer": "^3.87", "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.22 || 10.5.45 || ^11.5.7" + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55" }, "type": "library", "autoload": { @@ -48,7 +48,7 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.27.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.37.2" }, "funding": [ { @@ -56,20 +56,20 @@ "type": "github" } ], - "time": "2025-06-10T20:53:07+00:00" + "time": "2026-05-12T16:22:19+00:00" }, { "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": { @@ -99,22 +99,22 @@ ], "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", - "version": "v3.75.0", + "version": "v3.95.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "eea219a577085bd13ff0cb644a422c20798316c7" + "reference": "319bd80c8db64ab5f7b79a19178299045bdb9957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/eea219a577085bd13ff0cb644a422c20798316c7", - "reference": "eea219a577085bd13ff0cb644a422c20798316c7", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/319bd80c8db64ab5f7b79a19178299045bdb9957", + "reference": "319bd80c8db64ab5f7b79a19178299045bdb9957", "shasum": "" }, "require": { @@ -151,9 +151,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.75.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.95.2" }, - "time": "2025-03-31T18:45:02+00:00" + "time": "2026-05-15T09:21:09+00:00" } ], "packages-dev": [], @@ -167,5 +167,5 @@ "platform-overrides": { "php": "8.2" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" }