diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php
index acd415d82ea..d44b9ca179b 100644
--- a/apps/admin_audit/lib/Actions/Action.php
+++ b/apps/admin_audit/lib/Actions/Action.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7be4a7cd581..4ba96b8d70a 100644
--- a/apps/admin_audit/lib/Actions/Files.php
+++ b/apps/admin_audit/lib/Actions/Files.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class Files extends Action {
);
}
-
/**
* Logs creation of files
*/
diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php
index 8f021d5f210..424fe63757c 100644
--- a/apps/admin_audit/lib/Actions/Sharing.php
+++ b/apps/admin_audit/lib/Actions/Sharing.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 77a94de3df3..2f79bb44269 100644
--- a/apps/admin_audit/lib/Actions/TagManagement.php
+++ b/apps/admin_audit/lib/Actions/TagManagement.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1e994da3a5..c7503ed1bec 100644
--- a/apps/admin_audit/lib/Actions/Trashbin.php
+++ b/apps/admin_audit/lib/Actions/Trashbin.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b3fdefd011d..a7b18119ea2 100644
--- a/apps/admin_audit/lib/Actions/Versions.php
+++ b/apps/admin_audit/lib/Actions/Versions.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 bfc1b1d8a0d..85133c009ad 100644
--- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php
+++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 635c063753f..cfc3e223862 100644
--- a/apps/admin_audit/lib/IAuditLogger.php
+++ b/apps/admin_audit/lib/IAuditLogger.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8cb0281113..feb67ad0166 100644
--- a/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php
+++ b/apps/admin_audit/tests/Listener/UserManagementEventListenerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9eed4437e5f..f3f05f675b5 100644
--- a/apps/appstore/lib/AppInfo/Application.php
+++ b/apps/appstore/lib/AppInfo/Application.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 61040d666bb..97a7dfa6ddc 100644
--- a/apps/appstore/lib/Search/AppSearch.php
+++ b/apps/appstore/lib/Search/AppSearch.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf964d8786e..711042dffc8 100644
--- a/apps/appstore/tests/Controller/ApiControllerTest.php
+++ b/apps/appstore/tests/Controller/ApiControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1e5edfe061f..43e1e4811f5 100644
--- a/apps/appstore/tests/Controller/PageControllerTest.php
+++ b/apps/appstore/tests/Controller/PageControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 39238b3dae7..67f55d66637 100644
--- a/apps/cloud_federation_api/lib/AppInfo/Application.php
+++ b/apps/cloud_federation_api/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 23788c26dc9..7fa14528e6d 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 d2df7da8e92..f89b2ba5f96 100644
--- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
+++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
@@ -426,7 +426,6 @@ class RequestHandlerController extends Controller {
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 7f0b6c760d5..18d9fe3af1f 100644
--- a/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php
+++ b/apps/cloud_federation_api/lib/Migration/Version1016Date202502262004.php
@@ -41,7 +41,6 @@ class Version1016Date202502262004 extends SimpleMigrationStep {
$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 fe72acd3e6e..7bc690ca790 100644
--- a/apps/comments/lib/Activity/Filter.php
+++ b/apps/comments/lib/Activity/Filter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2cde51a7b9b..acf48f21ecf 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 5ed94a50aa5..d56b90dae54 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 @@ class Provider implements IProvider {
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 46bf8d8790a..c590a54cfd7 100644
--- a/apps/comments/lib/Activity/Setting.php
+++ b/apps/comments/lib/Activity/Setting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 843383ac1ec..224a22dfb69 100644
--- a/apps/comments/lib/AppInfo/Application.php
+++ b/apps/comments/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 148b1db9ee4..579d2e27177 100644
--- a/apps/comments/lib/Capabilities.php
+++ b/apps/comments/lib/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f0ecc7fb80b..3956423a50b 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 53a88f54075..66192eeaf63 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 b2ce7491211..3c5900f220a 100644
--- a/apps/comments/lib/Listener/CommentsEntityEventListener.php
+++ b/apps/comments/lib/Listener/CommentsEntityEventListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d47526e759c..d420933c862 100644
--- a/apps/comments/lib/Listener/CommentsEventListener.php
+++ b/apps/comments/lib/Listener/CommentsEventListener.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 c0bb998c757..4525dbea438 100644
--- a/apps/comments/lib/Listener/LoadAdditionalScripts.php
+++ b/apps/comments/lib/Listener/LoadAdditionalScripts.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c111a62ad6b..3d10acc93bf 100644
--- a/apps/comments/lib/Listener/LoadSidebarScripts.php
+++ b/apps/comments/lib/Listener/LoadSidebarScripts.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d9852f538aa..37b6a4eb919 100644
--- a/apps/comments/lib/MaxAutoCompleteResultsInitialState.php
+++ b/apps/comments/lib/MaxAutoCompleteResultsInitialState.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 43922f85e59..eda60becb64 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 ef442305e95..c6fbe743054 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 c22f0679898..39132a4ca74 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 ce62d0760f7..210be879865 100644
--- a/apps/comments/lib/Search/CommentsSearchProvider.php
+++ b/apps/comments/lib/Search/CommentsSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CommentsSearchProvider implements IProvider {
$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 fbb1a3ef152..5280dc77a65 100644
--- a/apps/comments/tests/Unit/Activity/ListenerTest.php
+++ b/apps/comments/tests/Unit/Activity/ListenerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a2af64b6cfb..35fd151e239 100644
--- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
+++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c83bd283a08..769027387fc 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 0150884f1cc..46746091c7a 100644
--- a/apps/comments/tests/Unit/Controller/NotificationsTest.php
+++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 ff7496c7e7d..b52d0d1764c 100644
--- a/apps/comments/tests/Unit/EventHandlerTest.php
+++ b/apps/comments/tests/Unit/EventHandlerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eac83c74855..1858253796e 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 03ebc87c950..b26e183e53c 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
public function testPrepareDifferentApp(): void {
$this->expectException(UnknownNotificationException::class);
@@ -333,7 +333,6 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
public function testPrepareNotFound(): void {
$this->expectException(UnknownNotificationException::class);
@@ -371,7 +370,6 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
public function testPrepareDifferentSubject(): void {
$this->expectException(UnknownNotificationException::class);
@@ -428,7 +426,6 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
public function testPrepareNotFiles(): void {
$this->expectException(UnknownNotificationException::class);
@@ -486,7 +483,6 @@ class NotifierTest extends TestCase {
$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 6ec6ba5f12d..6a3fc754f0f 100644
--- a/apps/contactsinteraction/lib/AddressBook.php
+++ b/apps/contactsinteraction/lib/AddressBook.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5e4154ae7f0..6ca7e188c4c 100644
--- a/apps/contactsinteraction/lib/AddressBookProvider.php
+++ b/apps/contactsinteraction/lib/AddressBookProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e9f6fe49400..5824bbd4051 100644
--- a/apps/contactsinteraction/lib/AppInfo/Application.php
+++ b/apps/contactsinteraction/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 218c7dec1c3..216340d225a 100644
--- a/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
+++ b/apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 813195c0bc9..7a1ac19beb0 100644
--- a/apps/contactsinteraction/lib/Card.php
+++ b/apps/contactsinteraction/lib/Card.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b1dadd6cfbc..11ec273d64a 100644
--- a/apps/contactsinteraction/lib/Db/CardSearchDao.php
+++ b/apps/contactsinteraction/lib/Db/CardSearchDao.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fc6ec3cc249..82083f68f1d 100644
--- a/apps/contactsinteraction/lib/Db/RecentContact.php
+++ b/apps/contactsinteraction/lib/Db/RecentContact.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12af1cbd9e3..f5e73e9b2f7 100644
--- a/apps/contactsinteraction/lib/Db/RecentContactMapper.php
+++ b/apps/contactsinteraction/lib/Db/RecentContactMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e61f23a7b18..9c8b0b0512d 100644
--- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
+++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4757635db9a..9c9718711a8 100644
--- a/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php
+++ b/apps/contactsinteraction/lib/Migration/Version010000Date20200304152605.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4876f5b84f0..a5facb8e75d 100644
--- a/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php
+++ b/apps/contactsinteraction/tests/Db/RecentContactMapperTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0fd6130d9c4..c0768935dfe 100644
--- a/apps/dashboard/lib/Controller/DashboardApiController.php
+++ b/apps/dashboard/lib/Controller/DashboardApiController.php
@@ -29,7 +29,6 @@ use OCP\Dashboard\IReloadableWidget;
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 d9b8afec231..533fd1cf1f9 100644
--- a/apps/dashboard/lib/Controller/DashboardController.php
+++ b/apps/dashboard/lib/Controller/DashboardController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c94617d6941..b995099fc38 100644
--- a/apps/dashboard/lib/Service/DashboardService.php
+++ b/apps/dashboard/lib/Service/DashboardService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 03b8fb21f85..22f1fdd4908 100644
--- a/apps/dav/appinfo/v2/publicremote.php
+++ b/apps/dav/appinfo/v2/publicremote.php
@@ -81,7 +81,6 @@ $serverFactory = new ServerFactory(
$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 6b0f22a5022..4f6bfbd474d 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class Application extends App implements IBootstrap {
$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 a740962fb47..9814e2138ca 100644
--- a/apps/dav/lib/AppInfo/PluginManager.php
+++ b/apps/dav/lib/AppInfo/PluginManager.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud GmbH.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\DAV\AppInfo;
use OC\ServerContainer;
@@ -238,7 +239,6 @@ class PluginManager {
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 a804969ab56..58bb3b01825 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 951262f3a59..eb5604cf96f 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 c9c9b14ef5c..e1bf75d1d4e 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 db2dc48f20e..b98a095c019 100644
--- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c80844297cd..98cecc3ab5c 100644
--- a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php
+++ b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c84c8d0b2a8..8d24df646e6 100644
--- a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php
+++ b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 daceb0ad165..e514082fcad 100644
--- a/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php
+++ b/apps/dav/lib/BackgroundJob/CleanupInvitationTokenJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c943f58115e..158cd2b5610 100644
--- a/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php
+++ b/apps/dav/lib/BackgroundJob/DeleteOutdatedSchedulingObjects.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 76617a30c42..57e7e12a04d 100644
--- a/apps/dav/lib/BackgroundJob/EventReminderJob.php
+++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b32759ac527..84d290337ca 100644
--- a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b522ebb5b32..d82716aed8c 100644
--- a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php
+++ b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7e24a96df2f..a3027e74bba 100644
--- a/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php
+++ b/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7ce7494aa19..897ce135f7c 100644
--- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php
+++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 836b60e1b48..713b1910df0 100644
--- a/apps/dav/lib/BackgroundJob/UploadCleanup.php
+++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 50f8cff76ba..aa0f67e6b0e 100644
--- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php
+++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php
@@ -109,7 +109,6 @@ class MultipartRequestParser {
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 f0c49e6e28c..e2721f8b03e 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 @@ class Backend {
$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 f2f5e6a731c..7a5ff4df2e5 100644
--- a/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Filter/Calendar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb0f0cbec69..d797f24118c 100644
--- a/apps/dav/lib/CalDAV/Activity/Filter/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Filter/Todo.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 558abe0ca1a..4d57bbdd12b 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 2cf52d3784c..90a638f5626 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 f24379ef4b5..dec14b8e5e4 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 f51bc0af67c..bfd3c1a02b2 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 5e128103e92..f02da23efb6 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 874f24a310c..29745ee1149 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d6899e0fc1d..feb4397cad8 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Event.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 76339678811..33ee98ca782 100644
--- a/apps/dav/lib/CalDAV/Activity/Setting/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Setting/Todo.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 454afa79b22..b26bb619a3d 100644
--- a/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php
+++ b/apps/dav/lib/CalDAV/Auth/PublicPrincipalPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 621f642bd21..8dcea77cdbb 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 06c5e9c78cc..01174ff11d3 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c8a1a23102d..7b5a809c61e 100644
--- a/apps/dav/lib/CalDAV/CachedSubscription.php
+++ b/apps/dav/lib/CalDAV/CachedSubscription.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar {
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 3e72f9194ab..20b4634752a 100644
--- a/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php
+++ b/apps/dav/lib/CalDAV/CachedSubscriptionImpl.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4be1c30f0f1..7e9a7609d61 100644
--- a/apps/dav/lib/CalDAV/CachedSubscriptionObject.php
+++ b/apps/dav/lib/CalDAV/CachedSubscriptionObject.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 efd46b4cfad..145203d4f39 100644
--- a/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php
+++ b/apps/dav/lib/CalDAV/CachedSubscriptionProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 66d216c1f5a..e961b3415f5 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 0f2a12f7f75..f7de4cbdaef 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 @@ class EventReader {
}
return null;
-
}
/**
diff --git a/apps/dav/lib/CalDAV/Export/ExportService.php b/apps/dav/lib/CalDAV/Export/ExportService.php
index 552b9e2b675..c1a2ed7230b 100644
--- a/apps/dav/lib/CalDAV/Export/ExportService.php
+++ b/apps/dav/lib/CalDAV/Export/ExportService.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 89255de2895..6e21f7cc805 100644
--- a/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php
+++ b/apps/dav/lib/CalDAV/Federation/FederatedCalendar.php
@@ -180,7 +180,6 @@ class FederatedCalendar implements ICalendar, IProperties, IMultiGet {
}
}
-
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 310db9a3088..3f5babd4459 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 5850e0a5645..66c4f2c056a 100644
--- a/apps/dav/lib/CalDAV/IRestorable.php
+++ b/apps/dav/lib/CalDAV/IRestorable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 052451ef192..579fb4fe2ad 100644
--- a/apps/dav/lib/CalDAV/Import/ImportService.php
+++ b/apps/dav/lib/CalDAV/Import/ImportService.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7871c783bb8..6ffcc02b831 100644
--- a/apps/dav/lib/CalDAV/Import/TextImporter.php
+++ b/apps/dav/lib/CalDAV/Import/TextImporter.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b37e65170eb..1c9032d0f9e 100644
--- a/apps/dav/lib/CalDAV/Import/XmlImporter.php
+++ b/apps/dav/lib/CalDAV/Import/XmlImporter.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a985ff5e861..6f993bd3061 100644
--- a/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php
+++ b/apps/dav/lib/CalDAV/Integration/ExternalCalendar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d913b91f1f0..437685908a2 100644
--- a/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php
+++ b/apps/dav/lib/CalDAV/Integration/ICalendarProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8a7109abde..de7815c68f2 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 22907fad07f..363a5584d47 100644
--- a/apps/dav/lib/CalDAV/Outbox.php
+++ b/apps/dav/lib/CalDAV/Outbox.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 328e27f428e..d950669d61f 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 56805371168..b7c01be0895 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 65b55befbed..28c2d55770c 100644
--- a/apps/dav/lib/CalDAV/Principal/User.php
+++ b/apps/dav/lib/CalDAV/Principal/User.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ef1ad8c634f..9711ceeef72 100644
--- a/apps/dav/lib/CalDAV/Proxy/Proxy.php
+++ b/apps/dav/lib/CalDAV/Proxy/Proxy.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3b9b9c3d9eb..7348b9d040e 100644
--- a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
+++ b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5decc50f823..a37b9fa7a8e 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 f98a3652d23..e6da729f15d 100644
--- a/apps/dav/lib/CalDAV/PublicCalendarObject.php
+++ b/apps/dav/lib/CalDAV/PublicCalendarObject.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3d7a97cedab..aec3f7b6224 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 5ba76dd418e..619d0fc2931 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 @@ class PublishPlugin extends ServerPlugin {
$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 @@ class PublishPlugin extends ServerPlugin {
// Breaking the event chain
return false;
-
case '{' . self::NS_CALENDARSERVER . '}unpublish-calendar':
// We can only deal with IShareableCalendar objects
@@ -242,7 +241,6 @@ class PublishPlugin extends ServerPlugin {
// 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 d5d0bc45603..651b0fa6101 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 eca7081928e..5ea4566fa4c 100644
--- a/apps/dav/lib/CalDAV/Reminder/Backend.php
+++ b/apps/dav/lib/CalDAV/Reminder/Backend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 31d60f1531d..aa13276a33b 100644
--- a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c558c2a0547..17fc82bde9b 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01d51489a3b..5d8b3b39837 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 22a1fa48fdd..430617617ad 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 15994bacf49..5cd05574149 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cfea7e1fc45..a7f0aa44810 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d474017e608..91b5b4cebcf 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6fd2a29ede5..0446efecdbe 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cefbc0ce548..8422830a7bc 100644
--- a/apps/dav/lib/CalDAV/Reminder/Notifier.php
+++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Notifier implements INotifier {
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 c75090e1560..ef480a310b2 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 993f460b7f3..462bc637e72 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 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
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 adeb8939c88..327674067ac 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1cc8770739f..16208645c71 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 399d1a46639..56bfbcd7eaa 100644
--- a/apps/dav/lib/CalDAV/RetentionService.php
+++ b/apps/dav/lib/CalDAV/RetentionService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01e4eb1f393..18d7559f1a7 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 5fd20a76843..156d5967fcf 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipService.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php
@@ -438,7 +438,9 @@ class IMipService {
$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 @@ class IMipService {
$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 @@ class IMipService {
$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 0bfcb17cb89..3cc0d190d3b 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 @@ EOF;
'{' . 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 b695276f7a8..ca569692691 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 485fd33be2c..55ea5f2dd16 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 @@ declare(strict_types=1);
* 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 4ff684913b7..caf80352cb4 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 @@ declare(strict_types=1);
* 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 7e36bf65b3a..e6e67049d05 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 @@ declare(strict_types=1);
* 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 fb69479c75b..f24edd5dbf6 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 @@ declare(strict_types=1);
* 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 e6a0151ae29..25f7ea1df62 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 @@ declare(strict_types=1);
* 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 a6e6846a206..ef7eb90ca2f 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 @@ declare(strict_types=1);
* 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 e00b7095a57..0385f26405f 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 @@ class CalendarSearchReport implements XmlDeserializable {
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 9ee0e9bf356..fbe8d277327 100644
--- a/apps/dav/lib/CalDAV/Status/StatusService.php
+++ b/apps/dav/lib/CalDAV/Status/StatusService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e23d81f44c5..e8311133032 100644
--- a/apps/dav/lib/CalDAV/TipBroker.php
+++ b/apps/dav/lib/CalDAV/TipBroker.php
@@ -464,7 +464,6 @@ class TipBroker extends Broker {
$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 f622cb43995..b1f9b445aa9 100644
--- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php
+++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d853ed773f3..ccef08ca554 100644
--- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
+++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 14c33956225..ccc87409d0c 100644
--- a/apps/dav/lib/CalDAV/Trashbin/Plugin.php
+++ b/apps/dav/lib/CalDAV/Trashbin/Plugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a7b1d5915b..ff8e5728c90 100644
--- a/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php
+++ b/apps/dav/lib/CalDAV/Trashbin/RestoreTarget.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bd4bdfda763..aa42c5355b1 100644
--- a/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php
+++ b/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dd5d9cb6c15..87f7b1be7fc 100644
--- a/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php
+++ b/apps/dav/lib/CalDAV/Validation/CalDavValidatePlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 559cff141b6..1728b9c2114 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/Connection.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/Connection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d0727076125..2f8da0b4f6c 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b22adc889e..0ed3a219579 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c437df76a82..e710ea3b3d1 100644
--- a/apps/dav/lib/Capabilities.php
+++ b/apps/dav/lib/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b08414d3b02..0f3588c0cfd 100644
--- a/apps/dav/lib/CardDAV/Activity/Backend.php
+++ b/apps/dav/lib/CardDAV/Activity/Backend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Backend {
],
];
-
$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 cee7092bff4..e839f7496f8 100644
--- a/apps/dav/lib/CardDAV/Activity/Filter.php
+++ b/apps/dav/lib/CardDAV/Activity/Filter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b505583d236..8a06d808f20 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea7680aed60..1fa007eaa46 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Base.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Base.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f1434e75eb9..695261cb665 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Card.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Card.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b498ebd3374..55f7072cb25 100644
--- a/apps/dav/lib/CardDAV/Activity/Setting.php
+++ b/apps/dav/lib/CardDAV/Activity/Setting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b02edb145a7..18451f17e54 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 f22e38a41b4..0668d8fdb73 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 7f713f85e0f..655974cb586 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 0cd307b4f5c..53e60b8ab69 100644
--- a/apps/dav/lib/CardDAV/Card.php
+++ b/apps/dav/lib/CardDAV/Card.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 14f03e6ce8f..140a1b44fa1 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 @@ class CardDavBackend implements BackendInterface, SyncSupport {
->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 @@ class CardDavBackend implements BackendInterface, SyncSupport {
'{' . 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 89f1dbb39bd..feca586d946 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 30dba99839e..fd35a5cf351 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 07217901da9..19c926dfcf6 100644
--- a/apps/dav/lib/CardDAV/HasPhotoPlugin.php
+++ b/apps/dav/lib/CardDAV/HasPhotoPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 42c15e94a7f..61bc6a8f7cb 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 46eb6e2a625..3db90a6bb08 100644
--- a/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php
+++ b/apps/dav/lib/CardDAV/Integration/ExternalAddressBook.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a8fa074f635..4bf74b98804 100644
--- a/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php
+++ b/apps/dav/lib/CardDAV/Integration/IAddressBookProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4759bd33563..d3883631c96 100644
--- a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php
+++ b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d9e6a259f50..1c7a1427058 100644
--- a/apps/dav/lib/CardDAV/Notification/Notifier.php
+++ b/apps/dav/lib/CardDAV/Notification/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 09123790c2e..fd9e5af381d 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 5ba0a1e529d..6e76cae30b4 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 @@ class Directory extends Node implements
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 6a092f35cef..f72e4f3308d 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 12a93188632..78f9e1355c0 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/BadGateway.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12c451f5579..2571ea5c9e5 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/EntityTooLarge.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 9e02d0d1949..c288a187aeb 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 9ad510d39b1..42568659adb 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 7a4a67ee778..e32bda94edb 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 a9afce3e71e..2fdad94eebe 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 cd468023391..31ed78aa941 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/UnsupportedMediaType.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1909a2c4305..42d4f8ee426 100644
--- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 5ce2613dab1..5a46f216d33 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 f2bb588cbc4..be6ee18c738 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 51c3845adc4..d4e14a11a4b 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 @@ class FilesPlugin extends ServerPlugin {
});
}
-
/**
* 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 510ef678f78..025b8470fc6 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 @@ class FilesReportPlugin extends ServerPlugin {
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 338c2528d07..1634af44be2 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 1f05b2c8ae4..1a831a4b658 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 @@ class MaintenancePlugin extends ServerPlugin {
$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 7b26a76c2aa..ab33325d686 100644
--- a/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php
+++ b/apps/dav/lib/Connector/Sabre/MtimeSanitizer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b2ecf9b2f6a..5bbe1990117 100644
--- a/apps/dav/lib/Connector/Sabre/Node.php
+++ b/apps/dav/lib/Connector/Sabre/Node.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 afff6c0fe39..0feb7032b85 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 @@ class ObjectTree extends CachingTree {
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 31395f61ae9..6d406b1739a 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 @@ class Principal implements BackendInterface {
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 @@ class Principal implements BackendInterface {
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 78ca10d5eb4..a9bc79f6d7b 100644
--- a/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/PropFindMonitorPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types = 1);
* 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 94328b8be96..bfe1f92e6e9 100644
--- a/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/PropFindPreloadNotifyPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types = 1);
* 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 bbdb66df4ed..c2724e38ac5 100644
--- a/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/PropfindCompressionPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 912e5800aec..4f41b95c220 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 ca756a34174..22e67e734f2 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 4226cc95796..7a1b6191014 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 9ab4117efdb..694c6432513 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 4074742408f..cf224f99e60 100644
--- a/apps/dav/lib/Connector/Sabre/ShareeList.php
+++ b/apps/dav/lib/Connector/Sabre/ShareeList.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d1837d3204d..bf0205f2565 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 87265763361..bd239370e36 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 9f9c3be24c5..5d9549e08a2 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 38ce71b0f2f..4b465ec255b 100644
--- a/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6bfb229a9c..5f43342a6d6 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 ea209168123..531b6bd2d00 100644
--- a/apps/dav/lib/Controller/DirectController.php
+++ b/apps/dav/lib/Controller/DirectController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 425f491adef..5a5105a4391 100644
--- a/apps/dav/lib/Controller/InvitationResponseController.php
+++ b/apps/dav/lib/Controller/InvitationResponseController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c95e1ea1a70..698fdee496e 100644
--- a/apps/dav/lib/DAV/CustomPropertiesBackend.php
+++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php
@@ -35,7 +35,6 @@ use Sabre\DAV\Xml\Property\Href;
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 ffd30794618..dbc90bd070a 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 @@ class GroupPrincipalBackend implements BackendInterface {
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 aeaa6113de9..34b9e20d09a 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 1405a481dc9..ba64cea69d8 100644
--- a/apps/dav/lib/DAV/Sharing/Backend.php
+++ b/apps/dav/lib/DAV/Sharing/Backend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 019559548ad..0affc36a96d 100644
--- a/apps/dav/lib/DAV/Sharing/IShareable.php
+++ b/apps/dav/lib/DAV/Sharing/IShareable.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 bdc5a552a8a..a5d9fad9aa9 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 @@ class Plugin extends ServerPlugin {
$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 cab45907077..2a2287b9353 100644
--- a/apps/dav/lib/DAV/Sharing/SharingMapper.php
+++ b/apps/dav/lib/DAV/Sharing/SharingMapper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 798ed26fbca..02e4ea0801d 100644
--- a/apps/dav/lib/DAV/Sharing/SharingService.php
+++ b/apps/dav/lib/DAV/Sharing/SharingService.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 bde3dee98da..588e9284418 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 75d7e98b009..e68df276ae7 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 @@ class ShareRequest implements XmlDeserializable {
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 4813f6d6ea3..fb9513f1d62 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 4e4a12d225f..8041c01b143 100644
--- a/apps/dav/lib/Db/Direct.php
+++ b/apps/dav/lib/Db/Direct.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4fedac35b72..061f0a09b79 100644
--- a/apps/dav/lib/Db/DirectMapper.php
+++ b/apps/dav/lib/Db/DirectMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12b5d317c9d..0dc4c5b8cb6 100644
--- a/apps/dav/lib/Direct/DirectFile.php
+++ b/apps/dav/lib/Direct/DirectFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 514576b29d9..e295615c2c9 100644
--- a/apps/dav/lib/Direct/DirectHome.php
+++ b/apps/dav/lib/Direct/DirectHome.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5b75b89c5ce..fe8bd1c0a06 100644
--- a/apps/dav/lib/Direct/Server.php
+++ b/apps/dav/lib/Direct/Server.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 473439361c2..be73afd01c4 100644
--- a/apps/dav/lib/Direct/ServerFactory.php
+++ b/apps/dav/lib/Direct/ServerFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a56bcbf63f..affabf482ba 100644
--- a/apps/dav/lib/Events/AddressBookCreatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b1ec4125513..d4f61e22080 100644
--- a/apps/dav/lib/Events/AddressBookDeletedEvent.php
+++ b/apps/dav/lib/Events/AddressBookDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9a574fb548e..f7772bd979d 100644
--- a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe6dc024cd2..122cf0b34dd 100644
--- a/apps/dav/lib/Events/AddressBookUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a79d730e8ff..da02b8bf434 100644
--- a/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php
+++ b/apps/dav/lib/Events/BeforeFileDirectDownloadedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea1c344ed27..378040e6f29 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8f8e55d32e5..a0e42d08963 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0adb4164dc9..bfeb60921ce 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 46d1194914e..73b1dc896c3 100644
--- a/apps/dav/lib/Events/CalendarCreatedEvent.php
+++ b/apps/dav/lib/Events/CalendarCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8ab4265b27..9613e94765a 100644
--- a/apps/dav/lib/Events/CalendarDeletedEvent.php
+++ b/apps/dav/lib/Events/CalendarDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8bb660a98c6..33756affb6c 100644
--- a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
+++ b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32fb1c36963..cd85c44a0d1 100644
--- a/apps/dav/lib/Events/CalendarPublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarPublishedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f404771dea2..2bb4bfa70bc 100644
--- a/apps/dav/lib/Events/CalendarRestoredEvent.php
+++ b/apps/dav/lib/Events/CalendarRestoredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0f8b23ad3ac..e200cdd45ff 100644
--- a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10d1712686d..7ab00904c3d 100644
--- a/apps/dav/lib/Events/CalendarUnpublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarUnpublishedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a603d3152f0..1e217d2aed2 100644
--- a/apps/dav/lib/Events/CalendarUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5a66d73e707..a2a6c4081d2 100644
--- a/apps/dav/lib/Events/CardCreatedEvent.php
+++ b/apps/dav/lib/Events/CardCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 237ffa7d623..537078507c2 100644
--- a/apps/dav/lib/Events/CardDeletedEvent.php
+++ b/apps/dav/lib/Events/CardDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 be69a046537..3a183b8cc89 100644
--- a/apps/dav/lib/Events/CardMovedEvent.php
+++ b/apps/dav/lib/Events/CardMovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10fc5b74594..a86319e7aaa 100644
--- a/apps/dav/lib/Events/CardUpdatedEvent.php
+++ b/apps/dav/lib/Events/CardUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 866fae2e224..76a34bdb8e8 100644
--- a/apps/dav/lib/Events/SabrePluginAddEvent.php
+++ b/apps/dav/lib/Events/SabrePluginAddEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d3d93770c74..d2fd9417578 100644
--- a/apps/dav/lib/Events/SabrePluginAuthInitEvent.php
+++ b/apps/dav/lib/Events/SabrePluginAuthInitEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 433b6db59b0..282c1bbda77 100644
--- a/apps/dav/lib/Events/SubscriptionCreatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 58d47ae98a4..7d88df64583 100644
--- a/apps/dav/lib/Events/SubscriptionDeletedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a1b2804663..ab895278877 100644
--- a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8f621588fdc..7fd72b1bc3c 100644
--- a/apps/dav/lib/Exception/ServerMaintenanceMode.php
+++ b/apps/dav/lib/Exception/ServerMaintenanceMode.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 264c034423d..811b8c363be 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 8f77946f9b3..5d72ba0bbf5 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 206d812bd43..05e495ff51f 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 @@ class FileSearchBackend implements ISearchBackend {
return array_merge($props, $this->getPropertyDefinitionsForMetadata());
}
-
private function getPropertyDefinitionsForMetadata(): array {
$metadataProps = [];
$metadata = $this->filesMetadataManager->getKnownMetadata();
@@ -249,7 +249,6 @@ class FileSearchBackend implements ISearchBackend {
$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 391df3e4cca..d9179ece731 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 f9cdbf289cc..94e2f271d4b 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 c18cd1e7a1b..358d9eaa57e 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 b3871474afe..35879c50911 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 548a04f4fed..2ed87d0ef72 100644
--- a/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php
+++ b/apps/dav/lib/Files/Sharing/PublicLinkCheckPlugin.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 26170803436..debd278526e 100644
--- a/apps/dav/lib/Listener/ActivityUpdaterListener.php
+++ b/apps/dav/lib/Listener/ActivityUpdaterListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2370dffa350..96b4e38c501 100644
--- a/apps/dav/lib/Listener/AddMissingIndicesListener.php
+++ b/apps/dav/lib/Listener/AddMissingIndicesListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fe91aae65c9..2491fab29e9 100644
--- a/apps/dav/lib/Listener/AddressbookListener.php
+++ b/apps/dav/lib/Listener/AddressbookListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 68a31667400..5d7ef3a7348 100644
--- a/apps/dav/lib/Listener/BirthdayListener.php
+++ b/apps/dav/lib/Listener/BirthdayListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1f7556a361e..5e3dac1e835 100644
--- a/apps/dav/lib/Listener/CalendarContactInteractionListener.php
+++ b/apps/dav/lib/Listener/CalendarContactInteractionListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3b67774107d..3b7ccafac37 100644
--- a/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php
+++ b/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c87c157484b..3104c48b3b1 100644
--- a/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php
+++ b/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e2a3c705892..5745f6a40f8 100644
--- a/apps/dav/lib/Listener/CalendarPublicationListener.php
+++ b/apps/dav/lib/Listener/CalendarPublicationListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6ff42798f32..8756d359ae2 100644
--- a/apps/dav/lib/Listener/CalendarShareUpdateListener.php
+++ b/apps/dav/lib/Listener/CalendarShareUpdateListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 73c0b1979df..74711214363 100644
--- a/apps/dav/lib/Listener/CardListener.php
+++ b/apps/dav/lib/Listener/CardListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b467d556dc5..f78776eebd8 100644
--- a/apps/dav/lib/Listener/ClearPhotoCacheListener.php
+++ b/apps/dav/lib/Listener/ClearPhotoCacheListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb7fb93287e..99d63c74564 100644
--- a/apps/dav/lib/Listener/DavAdminSettingsListener.php
+++ b/apps/dav/lib/Listener/DavAdminSettingsListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8a8779f6100..53ac6fcf57e 100644
--- a/apps/dav/lib/Listener/SubscriptionListener.php
+++ b/apps/dav/lib/Listener/SubscriptionListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 028297d2189..e596f2cc239 100644
--- a/apps/dav/lib/Listener/TrustedServerRemovedListener.php
+++ b/apps/dav/lib/Listener/TrustedServerRemovedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 93085d163ca..bc7da82fe48 100644
--- a/apps/dav/lib/Listener/UserPreferenceListener.php
+++ b/apps/dav/lib/Listener/UserPreferenceListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 2a40e18e720..36760716365 100644
--- a/apps/dav/lib/Migration/BuildCalendarSearchIndex.php
+++ b/apps/dav/lib/Migration/BuildCalendarSearchIndex.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 06ac9ec222a..fc6680fb113 100644
--- a/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48e2a6bde57..ced2125d384 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndex.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndex.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1ae5704ad19..e6a2a7e24d0 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4826f730397..161d8248bc8 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 5ba45a1516a..d4ca079c3f0 100644
--- a/apps/dav/lib/Migration/ChunkCleanup.php
+++ b/apps/dav/lib/Migration/ChunkCleanup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ChunkCleanup implements IRepairStep {
});
$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 1a08d086921..b431bab57b4 100644
--- a/apps/dav/lib/Migration/DeleteSchedulingObjects.php
+++ b/apps/dav/lib/Migration/DeleteSchedulingObjects.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df1c1c0eeda..17005a6dd4c 100644
--- a/apps/dav/lib/Migration/DisableSystemAddressBook.php
+++ b/apps/dav/lib/Migration/DisableSystemAddressBook.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6264a5e81ce..2fb33b5f8fc 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 a15cf95f2ae..2d67ea4d1d6 100644
--- a/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php
+++ b/apps/dav/lib/Migration/RefreshWebcalJobRegistrar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3a1a5ac5e3f..bf414a4a74f 100644
--- a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
+++ b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ccae2deb254..6db597b7213 100644
--- a/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0bfa00483e5..8d487b48aba 100644
--- a/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php
+++ b/apps/dav/lib/Migration/RemoveClassifiedEventActivity.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 db5a8f5c7d9..76c678d0615 100644
--- a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php
+++ b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c5a7daeea82..e976ee4f0f8 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 39fd8f246d9..89974b7d30e 100644
--- a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
+++ b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 153db25ae83..77c8af234f9 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 929b4c39373..47ccd80a8e1 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 04daf171a59..91f8a737656 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 0a48ceeac7b..1e403e4da4b 100644
--- a/apps/dav/lib/Migration/Version1004Date20170926103422.php
+++ b/apps/dav/lib/Migration/Version1004Date20170926103422.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 41d4d0c8389..57d60a90c87 100644
--- a/apps/dav/lib/Migration/Version1005Date20180413093149.php
+++ b/apps/dav/lib/Migration/Version1005Date20180413093149.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 26c8589431b..37a77d9b7e0 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 23d2a691875..ea3d39bfa60 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 3d657969ca0..0047e48acc5 100644
--- a/apps/dav/lib/Migration/Version1006Date20180628111625.php
+++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Version1006Date20180628111625 extends SimpleMigrationStep {
'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 a63485d3153..d8a42f09219 100644
--- a/apps/dav/lib/Migration/Version1008Date20181030113700.php
+++ b/apps/dav/lib/Migration/Version1008Date20181030113700.php
@@ -6,10 +6,10 @@ declare(strict_types=1);
* 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 b899e4c6541..77267997172 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105104826.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c81e2b45012..f9c145b52c5 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105104833.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105104833.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 093094baa8e..45a2ab82f16 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105110300.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e67deb09ce4..554921e2aa0 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105112049.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105112049.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd6aafc4b40..49d178a36c3 100644
--- a/apps/dav/lib/Migration/Version1008Date20181114084440.php
+++ b/apps/dav/lib/Migration/Version1008Date20181114084440.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ use OCP\Migration\SimpleMigrationStep;
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 5420c7ebf9d..384d93b3fd2 100644
--- a/apps/dav/lib/Migration/Version1011Date20190725113607.php
+++ b/apps/dav/lib/Migration/Version1011Date20190725113607.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f1503f7940c..484494ee9f7 100644
--- a/apps/dav/lib/Migration/Version1011Date20190806104428.php
+++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 47f64bb9767..73a1560267a 100644
--- a/apps/dav/lib/Migration/Version1012Date20190808122342.php
+++ b/apps/dav/lib/Migration/Version1012Date20190808122342.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d27b03b0bf7..0a490f243cf 100644
--- a/apps/dav/lib/Migration/Version1016Date20201109085907.php
+++ b/apps/dav/lib/Migration/Version1016Date20201109085907.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2bff85746bc..1602d9ca619 100644
--- a/apps/dav/lib/Migration/Version1017Date20210216083742.php
+++ b/apps/dav/lib/Migration/Version1017Date20210216083742.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 697952bf984..aceddc924ae 100644
--- a/apps/dav/lib/Migration/Version1018Date20210312100735.php
+++ b/apps/dav/lib/Migration/Version1018Date20210312100735.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6715c6b25ae..9cf01cc6862 100644
--- a/apps/dav/lib/Migration/Version1024Date20211221144219.php
+++ b/apps/dav/lib/Migration/Version1024Date20211221144219.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f67724e011b..ca0739016de 100644
--- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
+++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningNode.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class AppleProvisioningNode implements INode, IProperties {
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 8c99ba437d7..586b5a99fa3 100644
--- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php
+++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 08e945f47ad..ce9ad59e819 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 331d05cb500..489b07aad57 100644
--- a/apps/dav/lib/Search/ACalendarSearchProvider.php
+++ b/apps/dav/lib/Search/ACalendarSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0e75611f936..f179d83ea89 100644
--- a/apps/dav/lib/Search/ContactsSearchProvider.php
+++ b/apps/dav/lib/Search/ContactsSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 efe12bc54e2..92c32f3de8c 100644
--- a/apps/dav/lib/Search/EventsSearchProvider.php
+++ b/apps/dav/lib/Search/EventsSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fcdaf385df3..622e564d136 100644
--- a/apps/dav/lib/Search/TasksSearchProvider.php
+++ b/apps/dav/lib/Search/TasksSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86768176536..ea4350bc152 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 abc69ad29fb..9b96314238b 100644
--- a/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php
+++ b/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9bf9154a569..a8d8c2f830f 100644
--- a/apps/dav/lib/Settings/CalDAVSettings.php
+++ b/apps/dav/lib/Settings/CalDAVSettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 79f29aeb7a0..057a07fb651 100644
--- a/apps/dav/lib/Settings/ExampleContentSettings.php
+++ b/apps/dav/lib/Settings/ExampleContentSettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 23c7aca944c..cd4f52fb54b 100644
--- a/apps/dav/lib/Storage/PublicOwnerWrapper.php
+++ b/apps/dav/lib/Storage/PublicOwnerWrapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 61bb7d0d1ac..cfa828b842d 100644
--- a/apps/dav/lib/Storage/PublicShareWrapper.php
+++ b/apps/dav/lib/Storage/PublicShareWrapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5013f992f20..029728fe3e0 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 bb01f92171a..649134082eb 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 3416442d220..fe551335e3a 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 f36e3cb4460..37a6ff3ef19 100644
--- a/apps/dav/lib/SystemTag/SystemTagObjectType.php
+++ b/apps/dav/lib/SystemTag/SystemTagObjectType.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d9652436adc..db506e9b720 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 b49ee269b6d..991d174e4bd 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 c3f9e86f832..6292702c95e 100644
--- a/apps/dav/lib/SystemTag/SystemTagsObjectList.php
+++ b/apps/dav/lib/SystemTag/SystemTagsObjectList.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c047c5d7c7..a8047ee296b 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 37c00f46eef..f7ef08a42d6 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 1d794a143ab..757d65ac229 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 feec485fe5c..bbcd77737ea 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 bf6ee16bc9d..3761e777b49 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 @@ class AssemblyStream implements \Icewind\Streams\File {
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 d23b2374b76..0f71f3437f0 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 a0b059abfb8..117bdb835d2 100644
--- a/apps/dav/lib/Upload/ChunkingV2Plugin.php
+++ b/apps/dav/lib/Upload/ChunkingV2Plugin.php
@@ -202,7 +202,6 @@ class ChunkingV2Plugin extends ServerPlugin {
$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 ffa6bad533c..51373bb5a52 100644
--- a/apps/dav/lib/Upload/CleanupService.php
+++ b/apps/dav/lib/Upload/CleanupService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8375db2488..034b757d8f6 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 1c8d4aabf55..4a0ea48b25e 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 9f722dc98a7..9292d409276 100644
--- a/apps/dav/lib/Upload/RootCollection.php
+++ b/apps/dav/lib/Upload/RootCollection.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b217430d4da..83b54c41a9b 100644
--- a/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php
+++ b/apps/dav/lib/Upload/UploadAutoMkcolPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9d2f3654abf..0605f7f025d 100644
--- a/apps/dav/lib/Upload/UploadFile.php
+++ b/apps/dav/lib/Upload/UploadFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 44c790d186c..74512640a8f 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 4fbba0ad91b..eb60430e6c6 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 59e7a74640d..14bf89fb93b 100644
--- a/apps/dav/tests/unit/AppInfo/ApplicationTest.php
+++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0082aa45286..23cc408edb2 100644
--- a/apps/dav/tests/unit/AppInfo/PluginManagerTest.php
+++ b/apps/dav/tests/unit/AppInfo/PluginManagerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5b613091ed4..87183592a7d 100644
--- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php
+++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ca147a1f3b..86f5c8d8600 100644
--- a/apps/dav/tests/unit/Avatars/AvatarNodeTest.php
+++ b/apps/dav/tests/unit/Avatars/AvatarNodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 61f39e0a8d9..e396732a68c 100644
--- a/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6cb4f220e07..5030f4d01c0 100644
--- a/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/EventReminderJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 88a76ae1332..c37f5c1fc2b 100644
--- a/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/GenerateBirthdayCalendarBackgroundJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32b24377d06..4232c84e785 100644
--- a/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/PruneOutdatedSyncTokensJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 14cc1bce72c..f715dc60504 100644
--- a/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/RefreshWebcalJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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\BackgroundJob\IJobList;
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 6c9214d0268..29103c317e2 100644
--- a/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/RegisterRegenerateBirthdayCalendarsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 38a981787cd..d9173d3a49a 100644
--- a/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php
+++ b/apps/dav/tests/unit/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJobTest.php
@@ -6,10 +6,10 @@ declare(strict_types=1);
* 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 f8d29fdd418..dc59eb82205 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 @@ use Test\TestCase;
#[\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 037aa19f917..020546c7a1f 100644
--- a/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/Activity/BackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 10f089fd989..b4dfe802246 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 @@ declare(strict_types=1);
* 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 ea47c64048c..501d8391fab 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 @@ declare(strict_types=1);
* 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 7236e7c11b1..858a0a6620e 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 @@ declare(strict_types=1);
* 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 0abe0915ac0..6bd72bf6dc7 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 @@ declare(strict_types=1);
* 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 f0e75e0a170..287bbf6f965 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 @@ declare(strict_types=1);
* 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 14d44a33528..a0a8b825cc1 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 @@ declare(strict_types=1);
* 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 84879e87238..457081fb418 100644
--- a/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/AppCalendar/AppCalendarTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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\Calendar\ICreateFromString;
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 3d72d5c97b8..36ff7280e53 100644
--- a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php
+++ b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a5811271ce2..2921eeba0e4 100644
--- a/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/BirthdayCalendar/EnablePluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class EnablePluginTest extends TestCase {
$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 03a2c9f20ee..70310e4e528 100644
--- a/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php
+++ b/apps/dav/tests/unit/CalDAV/CachedSubscriptionObjectTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class CachedSubscriptionObjectTest extends \Test\TestCase {
$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 @@ class CachedSubscriptionObjectTest extends \Test\TestCase {
$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 ba0da422290..18fe0521436 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 @@ class CachedSubscriptionTest extends \Test\TestCase {
$calendar->propPatch($propPatch);
}
-
public function testGetChild(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
$this->expectExceptionMessage('Calendar object not found');
@@ -227,7 +227,6 @@ class CachedSubscriptionTest extends \Test\TestCase {
$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 985fc3d67a5..e0f507fbe35 100644
--- a/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalDavBackendTest.php
@@ -107,7 +107,6 @@ class CalDavBackendTest extends AbstractCalDavBackend {
], [
self::UNIT_TEST_USER1,
]],
-
];
}
@@ -264,7 +263,6 @@ EOD;
$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 @@ END:VEVENT
END:VCALENDAR
EOD;
-
$this->backend->createCalendarObject($calendarId, $uri, $calData);
$co = $this->backend->getCalendarObjectByUID(self::UNIT_TEST_USER, '47d15e3ec8');
@@ -777,7 +774,6 @@ EOD;
]);
$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 e515e6fbea0..25150ddcca1 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarHomeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5df78b02d8f..03978ad6cfc 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarImplTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class CalendarImplTest extends \Test\TestCase {
]);
}
-
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 e8159ffe07c..4224fbd104f 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarManagerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fedc339d910..2509996dd17 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CalendarTest extends TestCase {
$c->delete();
}
-
public function testDeleteFromGroup(): void {
/** @var CalDavBackend&MockObject $backend */
$backend = $this->createMock(CalDavBackend::class);
@@ -537,8 +537,6 @@ END:VCALENDAR
EOD;
-
-
$publicObject = ['uri' => 'event-0',
'classification' => CalDavBackend::CLASSIFICATION_PUBLIC,
'calendardata' => $publicObjectData];
@@ -564,10 +562,8 @@ EOD;
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 90b6f9ec0db..37bab8c5fe0 100644
--- a/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php
@@ -184,5 +184,4 @@ class EventComparisonServiceTest extends TestCase {
$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 838dfc18f2f..0fd9dce9ca2 100644
--- a/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Export/ExportServiceTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 0cfafae22bc..27db3ff9d84 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 ed95db84822..3862560b930 100644
--- a/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/Integration/ExternalCalendarTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3ba0b832593..5cd473d816a 100644
--- a/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php
+++ b/apps/dav/tests/unit/CalDAV/Listener/CalendarPublicationListenerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d5697a862db..e78d371dfc6 100644
--- a/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php
+++ b/apps/dav/tests/unit/CalDAV/Listener/CalendarShareUpdateListenerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cbfdfd6b9b7..4885bb27453 100644
--- a/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php
+++ b/apps/dav/tests/unit/CalDAV/Listener/SubscriptionListenerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cc0a3f0405f..e8f9770a97c 100644
--- a/apps/dav/tests/unit/CalDAV/OutboxTest.php
+++ b/apps/dav/tests/unit/CalDAV/OutboxTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a9e868c688f..00c80e17858 100644
--- a/apps/dav/tests/unit/CalDAV/PluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/PluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7d1f9eaf801..71d5b1233e3 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 34ad5ab9702..bb4552cc8cf 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5344ec5d7cd..e1979325c55 100644
--- a/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
+++ b/apps/dav/tests/unit/CalDAV/Publishing/PublisherTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class PublisherTest extends TestCase {
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 ec2ae37a929..8c8059e8fea 100644
--- a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php
+++ b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 29d4e11ea34..f29b88c5085 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class BackendTest extends TestCase {
parent::tearDown();
}
-
public function testCleanRemindersForEvent(): void {
$query = self::$realDatabase->getQueryBuilder();
$rows = $query->select('*')
@@ -252,7 +252,6 @@ class BackendTest extends TestCase {
$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 70b374298ea..9fa2e265ca4 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 @@ declare(strict_types=1);
* 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 d03205eaeb9..1cee7c67fc8 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 @@ declare(strict_types=1);
* 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 d9978a76fd8..f0fb9e25c98 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 @@ declare(strict_types=1);
* 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 5034af49cae..498dc3ccfeb 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 @@ declare(strict_types=1);
* 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 4b50185b619..7726e4ee5ce 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProviderManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 078f892121a..7558d304cbc 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class NotifierTest extends TestCase {
$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 @@ class NotifierTest extends TestCase {
$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 c18901c5f58..bb5fa5ec538 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ EOD;
$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 80a5a90ad23..d13443c8c66 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/AbstractPrincipalBackendTestCase.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 168e21c3a91..1e3068cdfc4 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/ResourcePrincipalBackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8a53b0ee25e..845ff74dc10 100644
--- a/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php
+++ b/apps/dav/tests/unit/CalDAV/ResourceBooking/RoomPrincipalBackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1f11e8bd7fd..048dcd13b67 100644
--- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1fab03b517..ac3aa178737 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 bb0b3070f9e..6f765ab21c8 100644
--- a/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/PluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 02ae504bce0..1e9fbb84808 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 @@ declare(strict_types=1);
* 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 @@ XML;
);
}
-
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 @@ XML;
$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 @@ XML;
$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 @@ XML;
$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 e576fbae34c..cfdabd99aad 100644
--- a/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/Search/SearchPluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ee0ef2334ec..0dec2b887eb 100644
--- a/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Status/StatusServiceTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class StatusServiceTest extends TestCase {
$this->userStatusService->expects(self::never())
->method('setUserStatus');
-
$this->service->processCalendarStatus('admin');
}
@@ -298,7 +298,6 @@ class StatusServiceTest extends TestCase {
$this->userStatusService->expects(self::once())
->method('setUserStatus');
-
$this->service->processCalendarStatus('admin');
}
@@ -345,7 +344,6 @@ class StatusServiceTest extends TestCase {
$this->userStatusService->expects(self::never())
->method('setUserStatus');
-
$this->service->processCalendarStatus('admin');
}
@@ -392,7 +390,6 @@ class StatusServiceTest extends TestCase {
$this->userStatusService->expects(self::never())
->method('setUserStatus');
-
$this->service->processCalendarStatus('admin');
}
@@ -439,7 +436,6 @@ class StatusServiceTest extends TestCase {
$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 2d6d0e86358..41c9ff55bd0 100644
--- a/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php
+++ b/apps/dav/tests/unit/CalDAV/TimeZoneFactoryTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9d4c27c9bfb..0af95782378 100644
--- a/apps/dav/tests/unit/CalDAV/TipBrokerTest.php
+++ b/apps/dav/tests/unit/CalDAV/TipBrokerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class TipBrokerTest extends TestCase {
$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 1a0eade56f7..271fbece99e 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/ConnectionTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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\Http\Client\LocalServerException;
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 804af021d5a..4cd3de9dd3e 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/PluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 06f04019d8e..b4792ca2567 100644
--- a/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/WebcalCaching/RefreshWebcalServiceTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 Psr\Log\LoggerInterface;
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 cfbcb2155fd..1c8edd250ca 100644
--- a/apps/dav/tests/unit/CapabilitiesTest.php
+++ b/apps/dav/tests/unit/CapabilitiesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b5b5e9799ec..389d5a01c6d 100644
--- a/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php
+++ b/apps/dav/tests/unit/CardDAV/Activity/BackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1c346bf9846..c5b95e006af 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 e89232297d3..4ca1a8a63ba 100644
--- a/apps/dav/tests/unit/CardDAV/AddressBookTest.php
+++ b/apps/dav/tests/unit/CardDAV/AddressBookTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class AddressBookTest extends TestCase {
$addressBook->delete();
}
-
public function testDeleteFromGroup(): void {
$this->expectException(Forbidden::class);
@@ -83,7 +83,6 @@ class AddressBookTest extends TestCase {
$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 14a21dd7a77..51e6f18296c 100644
--- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 195eb755457..5fb84bd0e3d 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 @@ class CardDavBackendTest extends TestCase {
$this->invokePrivate($this->backend, 'getCardId', [1, 'uri']));
}
-
public function testGetCardIdFailed(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -802,7 +802,6 @@ class CardDavBackendTest extends TestCase {
$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 90caeed6668..00cb16aada4 100644
--- a/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
+++ b/apps/dav/tests/unit/CardDAV/ContactsManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 96cf8993de6..ddbb6ffc6be 100644
--- a/apps/dav/tests/unit/CardDAV/ConverterTest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d996845a61e..d1e9082f710 100644
--- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php
+++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e76d5d929f8..13e05c6156b 100644
--- a/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
+++ b/apps/dav/tests/unit/CardDAV/SyncServiceTest.php
@@ -125,7 +125,6 @@ class SyncServiceTest extends TestCase {
$this->backend->method('getCard')
->willReturn(false);
-
$body = '
@@ -196,7 +195,6 @@ END:VCARD';
$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 d78e020aa03..49674dae46a 100644
--- a/apps/dav/tests/unit/Command/ListAddressbooksTest.php
+++ b/apps/dav/tests/unit/Command/ListAddressbooksTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fde5e8b4103..6255e84ef97 100644
--- a/apps/dav/tests/unit/Command/ListCalendarsTest.php
+++ b/apps/dav/tests/unit/Command/ListCalendarsTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 391624ae1ca..800718b8e11 100644
--- a/apps/dav/tests/unit/Command/MoveCalendarTest.php
+++ b/apps/dav/tests/unit/Command/MoveCalendarTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class MoveCalendarTest extends TestCase {
]);
}
-
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 @@ class MoveCalendarTest extends TestCase {
]);
}
-
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 57462535438..d685553e58b 100644
--- a/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php
+++ b/apps/dav/tests/unit/Command/RemoveInvalidSharesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a1bbfe816f6..240c621268a 100644
--- a/apps/dav/tests/unit/Comments/CommentsNodeTest.php
+++ b/apps/dav/tests/unit/Comments/CommentsNodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CommentsNodeTest extends \Test\TestCase {
$this->node->delete();
}
-
public function testDeleteForbidden(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -113,7 +113,6 @@ class CommentsNodeTest extends \Test\TestCase {
$this->assertSame($this->node->getName(), $id);
}
-
public function testSetName(): void {
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
@@ -155,7 +154,6 @@ class CommentsNodeTest extends \Test\TestCase {
$this->assertTrue($this->node->updateComment($msg));
}
-
public function testUpdateCommentLogException(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('buh!');
@@ -193,7 +191,6 @@ class CommentsNodeTest extends \Test\TestCase {
$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 @@ class CommentsNodeTest extends \Test\TestCase {
$this->node->updateComment('foo');
}
-
public function testUpdateForbiddenByUser(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -261,7 +257,6 @@ class CommentsNodeTest extends \Test\TestCase {
$this->node->updateComment($msg);
}
-
public function testUpdateForbiddenByType(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -288,7 +283,6 @@ class CommentsNodeTest extends \Test\TestCase {
$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 18d32772f7b..4849404467d 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 @@ class CommentsPluginTest extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
-
public function testCreateCommentInvalidObject(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -219,7 +219,6 @@ class CommentsPluginTest extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
-
public function testCreateCommentInvalidActor(): void {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
@@ -307,7 +306,6 @@ class CommentsPluginTest extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
-
public function testCreateCommentUnsupportedMediaType(): void {
$this->expectException(\Sabre\DAV\Exception\UnsupportedMediaType::class);
@@ -395,7 +393,6 @@ class CommentsPluginTest extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
-
public function testCreateCommentInvalidPayload(): void {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
@@ -489,7 +486,6 @@ class CommentsPluginTest extends \Test\TestCase {
$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 @@ class CommentsPluginTest extends \Test\TestCase {
$this->plugin->httpPost($request, $response);
}
-
public function testOnReportInvalidNode(): void {
$this->expectException(\Sabre\DAV\Exception\ReportNotSupported::class);
@@ -606,7 +601,6 @@ class CommentsPluginTest extends \Test\TestCase {
$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 2c31b56268f..1501789bca1 100644
--- a/apps/dav/tests/unit/Comments/EntityCollectionTest.php
+++ b/apps/dav/tests/unit/Comments/EntityCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class EntityCollectionTest extends \Test\TestCase {
$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 e5178a3e786..fa10d2e66f9 100644
--- a/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php
+++ b/apps/dav/tests/unit/Comments/EntityTypeCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class EntityTypeCollectionTest extends \Test\TestCase {
$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 9a05d996c8c..666dd7b1e0d 100644
--- a/apps/dav/tests/unit/Comments/RootCollectionTest.php
+++ b/apps/dav/tests/unit/Comments/RootCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class RootCollectionTest extends \Test\TestCase {
});
}
-
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 @@ class RootCollectionTest extends \Test\TestCase {
$this->assertInstanceOf(EntityTypeCollectionImplementation::class, $etc);
}
-
public function testGetChildInvalid(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -97,7 +95,6 @@ class RootCollectionTest extends \Test\TestCase {
$this->collection->getChild('robots');
}
-
public function testGetChildNoAuth(): void {
$this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class);
@@ -113,7 +110,6 @@ class RootCollectionTest extends \Test\TestCase {
}
}
-
public function testGetChildrenNoAuth(): void {
$this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class);
@@ -130,14 +126,12 @@ class RootCollectionTest extends \Test\TestCase {
$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 @@ class RootCollectionTest extends \Test\TestCase {
$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 8fc54de645a..f72869015fc 100644
--- a/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php
+++ b/apps/dav/tests/unit/Connector/LegacyPublicAuthTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class LegacyPublicAuthTest extends TestCase {
$this->assertFalse($result);
}
-
public function testSharePasswordRemote(): void {
$share = $this->createMock(IShare::class);
$share->method('getPassword')->willReturn('password');
@@ -199,7 +199,6 @@ class LegacyPublicAuthTest extends TestCase {
$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 fc19ed590a0..2906afea7d8 100644
--- a/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/AddExtraHeadersPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e05c4670565..e5b51fc974b 100644
--- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class AuthTest extends TestCase {
$this->assertFalse(self::invokePrivate($this->auth, 'validateUserPass', ['MyTestUser', 'MyTestPassword']));
}
-
public function testValidateUserPassWithPasswordLoginForbidden(): void {
$this->expectException(PasswordLoginForbidden::class);
@@ -278,7 +278,6 @@ class AuthTest extends TestCase {
$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 @@ class AuthTest extends TestCase {
$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 @@ class AuthTest extends TestCase {
$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 e85158db083..4b8255efa31 100644
--- a/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/BearerAuthTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fc177034c03..4f1a369676b 100644
--- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e3f296353e3..ab8ec5becb4 100644
--- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 907825e4237..2e074b0bf16 100644
--- a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 af72d1cfc4c..cdf4bda8d98 100644
--- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4fe6dd88ad9..b45ee17a0ba 100644
--- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class TestViewDirectory extends View {
}
}
-
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
class DirectoryTest extends \Test\TestCase {
use UserTrait;
@@ -98,7 +98,6 @@ class DirectoryTest extends \Test\TestCase {
return new Directory($this->view, $this->info);
}
-
public function testDeleteRootFolderFails(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -111,7 +110,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->delete();
}
-
public function testDeleteForbidden(): void {
$this->expectException(Forbidden::class);
@@ -130,7 +128,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->delete();
}
-
public function testDeleteFolderWhenAllowed(): void {
// deletion allowed
$this->info->expects($this->once())
@@ -147,7 +144,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->delete();
}
-
public function testDeleteFolderFailsWhenNotAllowed(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -159,7 +155,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->delete();
}
-
public function testDeleteFolderThrowsWhenDeletionFailed(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -222,7 +217,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->getChildren();
}
-
public function testGetChildrenNoPermission(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -239,7 +233,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->getChildren();
}
-
public function testGetChildNoPermission(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -255,7 +248,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->getChild('test');
}
-
public function testGetChildThrowStorageNotAvailableException(): void {
$this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class);
@@ -271,7 +263,6 @@ class DirectoryTest extends \Test\TestCase {
$dir->getChild('.');
}
-
public function testGetChildThrowInvalidPath(): void {
$this->expectException(InvalidPath::class);
@@ -601,7 +592,6 @@ class DirectoryTest extends \Test\TestCase {
$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 4dd8dc9409f..40b16ea93c4 100644
--- a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DummyGetResponsePluginTest extends TestCase {
$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 2f9e0ae9196..02ddbbf8b0a 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 @@ declare(strict_types=1);
* 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 6f62bef86a3..6cb47547f32 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 @@ declare(strict_types=1);
* 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 4539dd998d2..c805d2b9fbe 100644
--- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4de8642e41a..6407f1afe4e 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FakeLockerPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 25b09db1c54..7708eefef44 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FileTest extends TestCase {
return $stream;
}
-
public static function fopenFailuresProvider(): array {
return [
[
@@ -625,7 +625,6 @@ class FileTest extends TestCase {
$file->setName("/i\nvalid");
}
-
public function testUploadAbort(): void {
// setup
/** @var View&MockObject */
@@ -675,7 +674,6 @@ class FileTest extends TestCase {
$this->assertEmpty($this->listPartFiles($view, ''), 'No stray part files');
}
-
public function testDeleteWhenAllowed(): void {
// setup
/** @var View&MockObject */
@@ -701,7 +699,6 @@ class FileTest extends TestCase {
$file->delete();
}
-
public function testDeleteThrowsWhenDeletionNotAllowed(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -725,7 +722,6 @@ class FileTest extends TestCase {
$file->delete();
}
-
public function testDeleteThrowsWhenDeletionFailed(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -754,7 +750,6 @@ class FileTest extends TestCase {
$file->delete();
}
-
public function testDeleteThrowsWhenDeletionThrows(): void {
$this->expectException(Forbidden::class);
@@ -931,7 +926,6 @@ class FileTest extends TestCase {
];
}
-
public function testGetFopenFails(): void {
$this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class);
@@ -953,7 +947,6 @@ class FileTest extends TestCase {
$file->get();
}
-
public function testGetFopenThrows(): void {
$this->expectException(Forbidden::class);
@@ -975,7 +968,6 @@ class FileTest extends TestCase {
$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 2e2be008829..a67181bb9a2 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FilesPluginTest extends TestCase {
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 717cecda758..cb05fe3c30d 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FilesReportPluginTest extends \Test\TestCase {
->method('getPath')
->willReturn('/sub1/sub2');
-
$subNode = $this->createMock(Folder::class);
$this->userFolder->expects($this->once())
@@ -714,7 +714,6 @@ class FilesReportPluginTest extends \Test\TestCase {
$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 bc1d50ac41f..72712f4f162 100644
--- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class MaintenancePluginTest extends TestCase {
$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 d46232e34ad..919f6e9b6b6 100644
--- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ObjectTreeTest extends \Test\TestCase {
];
}
-
public function testGetNodeForPathInvalidPath(): void {
$this->expectException(InvalidPath::class);
$path = '/foo\bar';
-
$storage = new Temporary([]);
$view = $this->getMockBuilder(View::class)
@@ -232,7 +231,6 @@ class ObjectTreeTest extends \Test\TestCase {
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 1be48b85c3b..8699903e1ec 100644
--- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class PrincipalTest extends TestCase {
$this->assertSame([], $response);
}
-
public function testGetGroupMemberSetEmpty(): void {
$this->expectException(Exception::class);
$this->expectExceptionMessage('Principal not found');
@@ -384,7 +384,6 @@ class PrincipalTest extends TestCase {
$this->assertSame($expectedResponse, $response);
}
-
public function testGetGroupMembershipEmpty(): void {
$this->expectException(Exception::class);
$this->expectExceptionMessage('Principal not found');
@@ -398,7 +397,6 @@ class PrincipalTest extends TestCase {
$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 @@ class PrincipalTest extends TestCase {
->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 @@ class PrincipalTest extends TestCase {
->method('allowEnumerationFullMatch')
->willReturn(false);
-
$this->assertEquals([], $this->connector->searchPrincipals('principals/users',
['{http://sabredav.org/ns}email-address' => 'user2@foo.bar']));
}
@@ -734,7 +730,6 @@ class PrincipalTest extends TestCase {
$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 @@ class PrincipalTest extends TestCase {
->with('User')
->willReturn([$user2, $user3, $user4]);
-
$this->assertEquals([
'principals/users/user2',
'principals/users/user3',
@@ -790,7 +784,6 @@ class PrincipalTest extends TestCase {
$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 @@ class PrincipalTest extends TestCase {
->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 261f916badf..097eb22ece8 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 52fe3eba5bf..42c5ddc4b4a 100644
--- a/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PropFindPreloadNotifyPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e6f696ed160..a94ba73af18 100644
--- a/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PropfindCompressionPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class PropfindCompressionPluginTest extends TestCase {
$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 2f18b430508..b853358569c 100644
--- a/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/PublicAuthTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class PublicAuthTest extends \Test\TestCase {
$this->assertFalse($result);
}
-
public function testSharePasswordRemote(): void {
$this->request->method('getPathInfo')
->willReturn('/dav/files/GX9HSGQrGE');
@@ -352,7 +352,6 @@ class PublicAuthTest extends \Test\TestCase {
$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 45bb058ca7d..d355ee87f6f 100644
--- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b01807d5bbb..2fd56172549 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 @@ declare(strict_types=1);
* 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 1cc0ec711cb..84426987c19 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 @@ declare(strict_types=1);
* 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 70bff8c0430..91f7c046bd8 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 @@ declare(strict_types=1);
* 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 abdabb1cb7a..64ab7bfbeaf 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 @@ declare(strict_types=1);
* 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 c1ae71ac28f..4baab8927d0 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 @@ declare(strict_types=1);
* 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 0c53e4b1009..0e2142e9fbc 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 @@ declare(strict_types=1);
* 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 0962c9516fb..0a67bf53073 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 404dc7fa5d7..b4f08f77c25 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 @@ declare(strict_types=1);
* 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 08d774e56b8..f75c0ae228c 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 @@ declare(strict_types=1);
* 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 ff6d7f3c3dd..30b192fe4d9 100644
--- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c4f10463e5..e50cc928084 100644
--- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 768db1a85cb..8c3e5afa8b6 100644
--- a/apps/dav/tests/unit/Connector/ServerTest.php
+++ b/apps/dav/tests/unit/Connector/ServerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9aa0ef3a2a7..04157adc8d0 100644
--- a/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php
+++ b/apps/dav/tests/unit/Controller/BirthdayCalendarControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 837adde1da7..dcaa3c4a3a5 100644
--- a/apps/dav/tests/unit/Controller/DirectControllerTest.php
+++ b/apps/dav/tests/unit/Controller/DirectControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3b535ceed22..6f60e0c3620 100644
--- a/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
+++ b/apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php
@@ -396,7 +396,6 @@ EOF;
->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 c99ebf327c8..9fc3370c9d8 100644
--- a/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
+++ b/apps/dav/tests/unit/DAV/AnonymousOptionsTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cb8d8f0169e..b5a4973088b 100644
--- a/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php
+++ b/apps/dav/tests/unit/DAV/BrowserErrorPagePluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4d48e70af57..4a6e7d4430b 100644
--- a/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php
+++ b/apps/dav/tests/unit/DAV/CustomPropertiesBackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 068dd28eafb..d0f06f4e752 100644
--- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php
+++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class GroupPrincipalTest extends \Test\TestCase {
$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 d4104ee8593..cd33522b24d 100644
--- a/apps/dav/tests/unit/DAV/Sharing/BackendTest.php
+++ b/apps/dav/tests/unit/DAV/Sharing/BackendTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class BackendTest extends TestCase {
]
];
-
$this->shareCache->expects(self::once())
->method('clear');
$this->principalBackend->expects(self::once())
@@ -294,7 +294,6 @@ class BackendTest extends TestCase {
]
];
-
$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 5f4b9f00b74..526b81b51a4 100644
--- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
+++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 275aa1782f7..e323230ee0f 100644
--- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
+++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c9da767d3b5..f859d10d6ab 100644
--- a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php
+++ b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6f0f49fa8c..a40b04bfc5f 100644
--- a/apps/dav/tests/unit/Direct/DirectFileTest.php
+++ b/apps/dav/tests/unit/Direct/DirectFileTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 94c82c2b7c5..cb3c1733358 100644
--- a/apps/dav/tests/unit/Direct/DirectHomeTest.php
+++ b/apps/dav/tests/unit/Direct/DirectHomeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DirectHomeTest extends TestCase {
$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 df98df60e98..5d57ca4bd03 100644
--- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php
+++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php
@@ -229,7 +229,6 @@ class FileSearchBackendTest extends TestCase {
$this->assertEquals('/files/test/test/path', $result[0]->href);
}
-
public function testSearchInvalidProp(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -266,7 +265,6 @@ class FileSearchBackendTest extends TestCase {
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 dc0e884f07c..78b1cc557e2 100644
--- a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
+++ b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
@@ -75,7 +75,6 @@ class MultipartRequestParserTest extends TestCase {
return new MultipartRequestParser($request, $this->logger);
}
-
/**
* Test validation of the request's body type
*/
@@ -316,7 +315,6 @@ class MultipartRequestParserTest extends TestCase {
$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 a9c03e67a9c..070902ffe42 100644
--- a/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
+++ b/apps/dav/tests/unit/Files/Sharing/FilesDropPluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5b2b8c66ac0..774ab642233 100644
--- a/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php
+++ b/apps/dav/tests/unit/Listener/ActivityUpdaterListenerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ee641006a2..1e18745cfff 100644
--- a/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php
+++ b/apps/dav/tests/unit/Listener/CalendarContactInteractionListenerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86535af18da..10e0864478e 100644
--- a/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php
+++ b/apps/dav/tests/unit/Migration/CalDAVRemoveEmptyValueTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ END:VCALENDAR';
$this->output->expects($this->once())
->method('finishProgress');
-
$this->backend->expects($this->exactly(1))
->method('getCalendarObject')
->with(42, 'myuri')
@@ -207,7 +207,6 @@ END:VCALENDAR';
$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 54162df72d2..9823e70d482 100644
--- a/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php
+++ b/apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 6f681badb8b..9693de06cce 100644
--- a/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php
+++ b/apps/dav/tests/unit/Migration/RegenerateBirthdayCalendarsTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 619549a6c34..cb0df5604e0 100644
--- a/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php
+++ b/apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class RemoveDeletedUsersCalendarSubscriptionsTest extends TestCase {
$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 4f04aebb3e8..c9a25af04d3 100644
--- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php
+++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningNodeTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class AppleProvisioningNodeTest extends TestCase {
$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 @@ class AppleProvisioningNodeTest extends TestCase {
], $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 9c0b2cefa39..93cdc127204 100644
--- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php
+++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f4dc13a5c06..87570145f44 100644
--- a/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/ContactsSearchProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 63139fbd9ac..561eb3e21b0 100644
--- a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fda96b5b229..1424f8c4dbb 100644
--- a/apps/dav/tests/unit/Search/TasksSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/TasksSearchProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2233feb3988..62713b223a0 100644
--- a/apps/dav/tests/unit/ServerTest.php
+++ b/apps/dav/tests/unit/ServerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 032759d64b7..6da45cde4f3 100644
--- a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
+++ b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b626c2474d2..599eadd4d73 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagMappingNodeTest extends \Test\TestCase {
$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 9c476ec735e..14ebae7772e 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagNodeTest extends \Test\TestCase {
$this->assertEquals($tag, $node->getSystemTag());
}
-
public function testSetName(): void {
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
@@ -170,7 +170,6 @@ class SystemTagNodeTest extends \Test\TestCase {
$this->assertInstanceOf($expectedException, $thrown);
}
-
public function testUpdateTagAlreadyExists(): void {
$this->expectException(\Sabre\DAV\Exception\Conflict::class);
@@ -190,7 +189,6 @@ class SystemTagNodeTest extends \Test\TestCase {
$this->getTagNode(false, $tag)->update('Renamed', true, true, null);
}
-
public function testUpdateTagNotFound(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -254,7 +252,6 @@ class SystemTagNodeTest extends \Test\TestCase {
$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 f46450cf045..ae15fa6166b 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagPluginTest extends \Test\TestCase {
$this->assertEquals($expectedProperties, $result[200]);
}
-
public function testGetPropertiesForbidden(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -287,7 +287,6 @@ class SystemTagPluginTest extends \Test\TestCase {
$this->assertEquals(200, $result[self::USERVISIBLE_PROPERTYNAME]);
}
-
public function testUpdatePropertiesForbidden(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -587,7 +586,6 @@ class SystemTagPluginTest extends \Test\TestCase {
$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 53173c66d6e..2f600b63228 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
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 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->assertEquals($tag, $childNode->getSystemTag());
}
-
public function testGetChildInvalidName(): void {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
@@ -106,7 +104,6 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('invalid');
}
-
public function testGetChildNotFound(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -118,7 +115,6 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('444');
}
-
public function testGetChildUserNotVisible(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -210,7 +206,6 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase {
$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 84674ee57c5..fd98e45a2ec 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->assertInstanceOf($expectedException, $thrown);
}
-
public function testAssignTagNotFound(): void {
$this->expectException(\Sabre\DAV\Exception\PreconditionFailed::class);
@@ -134,7 +134,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->getNode()->createFile('555');
}
-
public function testForbiddenCreateDirectory(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -164,7 +163,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->assertEquals('555', $childNode->getName());
}
-
public function testGetChildNonVisible(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -187,7 +185,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('555');
}
-
public function testGetChildRelationNotFound(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -199,7 +196,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('777');
}
-
public function testGetChildInvalidId(): void {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
@@ -211,7 +207,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->getNode()->getChild('badid');
}
-
public function testGetChildTagDoesNotExist(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -315,7 +310,6 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$this->assertFalse($this->getNode()->childExists('555'));
}
-
public function testChildExistsInvalidId(): void {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
@@ -327,14 +321,12 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase {
$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 301eb528436..e21083f4f6f 100644
--- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php
+++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
);
}
-
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 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
$this->assertEquals('555', $childNode->getName());
}
-
public function testGetChildWithoutAccess(): void {
$this->expectException(\Sabre\DAV\Exception\NotFound::class);
@@ -108,7 +106,6 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
$this->node->getChild('555');
}
-
public function testGetChildren(): void {
$this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class);
@@ -131,14 +128,12 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase {
$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 ee4d0b605bb..bd41c3f8962 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 00ed7657dd3..62f2d5e9c98 100644
--- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
+++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ChunkingPluginTest extends TestCase {
$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 1409df937c0..8ab086516ac 100644
--- a/apps/dav/tests/unit/Upload/FutureFileTest.php
+++ b/apps/dav/tests/unit/Upload/FutureFileTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FutureFileTest extends \Test\TestCase {
$f->delete();
}
-
public function testPut(): void {
$this->expectException(\Sabre\DAV\Exception\Forbidden::class);
@@ -64,7 +64,6 @@ class FutureFileTest extends \Test\TestCase {
$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 1cef4f0e470..79ce7f87aa6 100644
--- a/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php
+++ b/apps/dav/tests/unit/Upload/UploadAutoMkcolPluginTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7497f56fcf4..f75bf289e4a 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 526f5ea5742..dad49775f6f 100644
--- a/apps/encryption/lib/Command/CleanOrphanedKeys.php
+++ b/apps/encryption/lib/Command/CleanOrphanedKeys.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ff12ff9b93d..1829ff385ef 100644
--- a/apps/encryption/lib/Command/DisableMasterKey.php
+++ b/apps/encryption/lib/Command/DisableMasterKey.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 20b425c83f1..d7c6c2e72d9 100644
--- a/apps/encryption/lib/Command/EnableMasterKey.php
+++ b/apps/encryption/lib/Command/EnableMasterKey.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 fb64db93f06..a869f967277 100644
--- a/apps/encryption/lib/Command/FixKeyLocation.php
+++ b/apps/encryption/lib/Command/FixKeyLocation.php
@@ -51,7 +51,6 @@ class FixKeyLocation extends Command {
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 63fa4dfcd2b..3834549f40c 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 36a3a0d4588..a79ea2220c5 100644
--- a/apps/encryption/lib/Command/ScanLegacyFormat.php
+++ b/apps/encryption/lib/Command/ScanLegacyFormat.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc172d18b30..66e5d6308c8 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 fd3637e0d79..f36ed60b56e 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 @@ class SettingsController extends Controller {
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 582401502a1..b221dc4b0a7 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 0aadd64eaec..806b6b954b7 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 @@ class Crypt {
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 @@ class Crypt {
return ($signaturePosition !== false);
}
-
/**
* @throws DecryptionFailedException
*/
diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php
index 7123d0f9a64..707fa971e3a 100644
--- a/apps/encryption/lib/Crypto/DecryptAll.php
+++ b/apps/encryption/lib/Crypto/DecryptAll.php
@@ -79,7 +79,6 @@ class DecryptAll {
$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 e44c7fd8b56..5cbd105d9a9 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -84,7 +84,6 @@ class EncryptAll {
$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 f28d31d6dd5..1ae615822a5 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 @@ class Encryption implements IEncryptionModule {
$this->writeCache = '';
$this->useLegacyBase64Encoding = true;
-
if (isset($header['encoding'])) {
$this->useLegacyBase64Encoding = $header['encoding'] !== Crypt::BINARY_ENCODING_FORMAT;
}
@@ -243,8 +243,6 @@ class Encryption implements IEncryptionModule {
return $result ?: '';
}
-
-
/**
* encrypt data
*
@@ -492,7 +490,6 @@ class Encryption implements IEncryptionModule {
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 77cef173f32..f672a34b841 100644
--- a/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php
+++ b/apps/encryption/lib/Exceptions/MultiKeyDecryptException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b3eb441d7fc..49c2b11ea88 100644
--- a/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php
+++ b/apps/encryption/lib/Exceptions/MultiKeyEncryptException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 784ba0b0885..842d02a51a9 100644
--- a/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php
+++ b/apps/encryption/lib/Exceptions/PrivateKeyMissingException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 41209106fa3..670cee33b23 100644
--- a/apps/encryption/lib/Exceptions/PublicKeyMissingException.php
+++ b/apps/encryption/lib/Exceptions/PublicKeyMissingException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b74b9a73028..1f65dfe0936 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 @@ class KeyManager {
Encryption::ID);
}
-
/**
* @param $path
* @param $uid
diff --git a/apps/encryption/lib/Migration/SetMasterKeyStatus.php b/apps/encryption/lib/Migration/SetMasterKeyStatus.php
index e3b90e9ff90..64931685cfe 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 @@ use OCP\Migration\IRepairStep;
*/
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 38d0c48ad89..7dcd2ca330e 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 422d338d45e..e9302e19963 100644
--- a/apps/encryption/lib/Settings/Admin.php
+++ b/apps/encryption/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f047850bd33..e6bb1ed192f 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 7f50fd8b23e..a20f13b92e1 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 ccbdcdcb242..fbe98767f47 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 460e3c59aeb..4cfa5894e89 100644
--- a/apps/encryption/tests/Command/TestEnableMasterKey.php
+++ b/apps/encryption/tests/Command/TestEnableMasterKey.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c1a3fdf9a92..5bbe60ddce8 100644
--- a/apps/encryption/tests/Controller/RecoveryControllerTest.php
+++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class RecoveryControllerTest extends TestCase {
$passConfirm,
$enableRecovery);
-
$this->assertEquals($expectedMessage, $response->getData()['data']['message']);
$this->assertEquals($expectedStatus, $response->getStatus());
}
@@ -120,7 +120,6 @@ class RecoveryControllerTest extends TestCase {
['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 bee20f67cec..6f1e0bb935d 100644
--- a/apps/encryption/tests/Controller/SettingsControllerTest.php
+++ b/apps/encryption/tests/Controller/SettingsControllerTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 369f0e8f9b2..2202e76d9f6 100644
--- a/apps/encryption/tests/Controller/StatusControllerTest.php
+++ b/apps/encryption/tests/Controller/StatusControllerTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3221fcb4ed3..da51ebe83bf 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class CryptTest extends TestCase {
$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 f2a56bc2fbc..b0d50bd7513 100644
--- a/apps/encryption/tests/Crypto/DecryptAllTest.php
+++ b/apps/encryption/tests/Crypto/DecryptAllTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 91d3559c70a..3267cc964e5 100644
--- a/apps/encryption/tests/Crypto/EncryptAllTest.php
+++ b/apps/encryption/tests/Crypto/EncryptAllTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class EncryptAllTest extends TestCase {
$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 @@ class EncryptAllTest extends TestCase {
->onlyMethods(['generateOneTimePassword', 'setupUserFileSystem'])
->getMock();
-
// set protected property $output
$this->invokePrivate($encryptAll, 'output', [$this->outputInterface]);
@@ -390,7 +389,6 @@ class EncryptAllTest extends TestCase {
->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 bea53f9efa8..c0cfeb4d2b1 100644
--- a/apps/encryption/tests/Crypto/EncryptionTest.php
+++ b/apps/encryption/tests/Crypto/EncryptionTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class EncryptionTest extends TestCase {
$this->instance->end('/foo/bar');
}
-
public function getPublicKeyCallback($uid) {
if ($uid === 'user2') {
throw new PublicKeyMissingException($uid);
@@ -219,7 +219,6 @@ class EncryptionTest extends TestCase {
];
}
-
/**
* test begin() if decryptAll mode was activated
*/
@@ -384,7 +383,6 @@ class EncryptionTest extends TestCase {
];
}
-
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 ac8238ddd00..4ab727a56f1 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\Encryption\Tests;
use OC\Files\FileInfo;
@@ -96,7 +97,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo($this->userId), $this->equalTo('privateKey'))
->willReturn('privateKey');
-
$this->assertSame('privateKey',
$this->instance->getPrivateKey($this->userId)
);
@@ -108,7 +108,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo($this->userId), $this->equalTo('publicKey'))
->willReturn('publicKey');
-
$this->assertSame('publicKey',
$this->instance->getPublicKey($this->userId)
);
@@ -120,7 +119,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo($this->systemKeyId . '.publicKey'))
->willReturn('recoveryKey');
-
$this->assertTrue($this->instance->recoveryKeyExists());
}
@@ -146,7 +144,6 @@ class KeyManagerTest extends TestCase {
$this->equalTo('key'))
->willReturn(true);
-
$this->assertTrue(
$this->instance->setPublicKey($this->userId, 'key')
);
@@ -161,7 +158,6 @@ class KeyManagerTest extends TestCase {
$this->equalTo('key'))
->willReturn(true);
-
$this->assertTrue(
$this->instance->setPrivateKey($this->userId, 'key')
);
@@ -174,7 +170,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo($this->userId), $this->anything())
->willReturn($key);
-
$this->assertSame($expected,
$this->instance->userHasKeys($this->userId)
);
@@ -187,7 +182,6 @@ class KeyManagerTest extends TestCase {
];
}
-
public function testUserHasKeysMissingPrivateKey(): void {
$this->expectException(PrivateKeyMissingException::class);
@@ -203,7 +197,6 @@ class KeyManagerTest extends TestCase {
$this->instance->userHasKeys($this->userId);
}
-
public function testUserHasKeysMissingPublicKey(): void {
$this->expectException(PublicKeyMissingException::class);
@@ -282,7 +275,6 @@ class KeyManagerTest extends TestCase {
];
}
-
public function testSetRecoveryKey(): void {
$this->keyStorageMock->expects($this->exactly(2))
->method('setSystemUserKey')
@@ -292,7 +284,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo('privateKey'), $this->equalTo('pass'))
->willReturn('decryptedPrivateKey');
-
$this->assertTrue(
$this->instance->setRecoveryKey('pass',
['publicKey' => 'publicKey', 'privateKey' => 'privateKey'])
@@ -305,7 +296,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo('keyId.privateKey'), $this->equalTo('key'))
->willReturn(true);
-
$this->assertTrue(
$this->instance->setSystemPrivateKey('keyId', 'key')
);
@@ -317,7 +307,6 @@ class KeyManagerTest extends TestCase {
->with($this->equalTo('keyId.privateKey'))
->willReturn('systemPrivateKey');
-
$this->assertSame('systemPrivateKey',
$this->instance->getSystemPrivateKey('keyId')
);
@@ -529,7 +518,6 @@ class KeyManagerTest extends TestCase {
);
}
-
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 08a7f40035b..ebd9238b25b 100644
--- a/apps/encryption/tests/Listeners/UserEventsListenersTest.php
+++ b/apps/encryption/tests/Listeners/UserEventsListenersTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 29a800f3a8a..bffcd7d95a6 100644
--- a/apps/encryption/tests/PassphraseServiceTest.php
+++ b/apps/encryption/tests/PassphraseServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 74d472adeec..19d7a5ecd63 100644
--- a/apps/encryption/tests/RecoveryTest.php
+++ b/apps/encryption/tests/RecoveryTest.php
@@ -206,7 +206,6 @@ class RecoveryTest extends TestCase {
->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 @@ class RecoveryTest extends TestCase {
$this->viewMock);
}
-
/**
* @param $app
* @param $key
diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php
index 7769b1949d8..21768332c9c 100644
--- a/apps/encryption/tests/SessionTest.php
+++ b/apps/encryption/tests/SessionTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class SessionTest extends TestCase {
$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 @@ class SessionTest extends TestCase {
return null;
}
-
public function testClearWillRemoveValues(): void {
$this->instance->setPrivateKey('privateKey');
$this->instance->setStatus('initStatus');
@@ -173,7 +172,6 @@ class SessionTest extends TestCase {
$this->assertEmpty(self::$tempStorage);
}
-
protected function setUp(): void {
parent::setUp();
$this->sessionMock = $this->createMock(ISession::class);
@@ -190,7 +188,6 @@ class SessionTest extends TestCase {
->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 10d2a61c527..f82d9fce119 100644
--- a/apps/encryption/tests/Settings/AdminTest.php
+++ b/apps/encryption/tests/Settings/AdminTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1f954258844..aecdfd51392 100644
--- a/apps/encryption/tests/Users/SetupTest.php
+++ b/apps/encryption/tests/Users/SetupTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class SetupTest extends TestCase {
);
}
-
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 ed274f74ab5..757a1b092b4 100644
--- a/apps/encryption/tests/UtilTest.php
+++ b/apps/encryption/tests/UtilTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4588e6da288..a4502c939f8 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 a46644a2485..b8ea5dcad59 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 25a2f0e5ce1..42a82176242 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 cf755610dca..ceac2388f7b 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 2fc262a1e67..3ecbee61080 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 @@ class RequestHandlerController extends OCSController {
throw new OCSBadRequestException();
}
-
/**
* accept server-to-server share
*
@@ -274,7 +274,6 @@ class RequestHandlerController extends OCSController {
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 2a79f434b8c..8320acf7957 100644
--- a/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php
+++ b/apps/federatedfilesharing/lib/Events/FederatedShareAddedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd72ec3e32c..0957b1c0ef2 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 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
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 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
$this->notifications->sendPermissionChange($remote, $remoteId, $share->getToken(), $share->getPermissions());
}
-
/**
* Update successful reShare with the correct token.
*/
@@ -500,7 +499,6 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
throw new GenericShareException('not implemented');
}
-
#[\Override]
public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) {
if (!$shallow) {
@@ -708,7 +706,6 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
}
$cursor->closeCursor();
-
return $shares;
}
@@ -926,7 +923,6 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
return $result === 'yes';
}
-
/**
* Check if users from other Nextcloud instances are allowed to send federated group shares
*/
@@ -970,7 +966,6 @@ class FederatedShareProvider implements IShareProvider, IShareProviderSupportsAl
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 b936f462e88..dcc8737f75f 100644
--- a/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php
+++ b/apps/federatedfilesharing/lib/Listeners/LoadAdditionalScriptsListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 be002fe7952..f621dddd304 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 133b2a1da80..43e84ed1795 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a909048a95..d96c171d8af 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 @@ class Notifications {
return false;
}
-
/**
* return current timestamp
*
diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php
index 7bf90e33650..207d040a61b 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 @@ class Notifier implements INotifier {
$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 d2761289585..419d9ebd7c6 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 @@ class CloudFederationProviderFiles implements ISignedCloudFederationProvider {
'sharedSecret' => $token,
'message' => 'Recipient accepted the re-share'
]
-
);
$this->cloudFederationProviderManager->sendNotification($remote, $notification);
}
@@ -618,8 +618,6 @@ class CloudFederationProviderFiles implements ISignedCloudFederationProvider {
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 79c17467873..facfc4d16b6 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 07895cfbba3..270b1a0af8c 100644
--- a/apps/federatedfilesharing/lib/Settings/Personal.php
+++ b/apps/federatedfilesharing/lib/Settings/Personal.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b5170e6d8e4..678afb099b8 100644
--- a/apps/federatedfilesharing/lib/Settings/PersonalSection.php
+++ b/apps/federatedfilesharing/lib/Settings/PersonalSection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f3fdaead8cd..c1260706906 100644
--- a/apps/federatedfilesharing/lib/TokenHandler.php
+++ b/apps/federatedfilesharing/lib/TokenHandler.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 40557eeb07d..1d31ea07d4e 100644
--- a/apps/federatedfilesharing/tests/AddressHandlerTest.php
+++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 83df8002255..cee2af40a88 100644
--- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0e4e75a3316..86d7eb11d97 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class RequestHandlerControllerTest extends \Test\TestCase {
$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 deb0938578a..2aa6f8790cd 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 @@ class FederatedShareProviderReshareRemoteTest extends \Test\TestCase {
$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 da37617c121..ddf16bb4e06 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\FederatedFileSharing\Tests;
use LogicException;
@@ -353,7 +354,6 @@ class FederatedShareProviderTest extends \Test\TestCase {
$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 @@ class FederatedShareProviderTest extends \Test\TestCase {
);
}
-
public static function dataTestIsLookupServerQueriesEnabled(): array {
return [
[true, 'yes', true],
diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php
index 761dbcce3bf..462def25eef 100644
--- a/apps/federatedfilesharing/tests/NotificationsTest.php
+++ b/apps/federatedfilesharing/tests/NotificationsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\FederatedFileSharing\Tests;
use OCA\FederatedFileSharing\AddressHandler;
@@ -77,7 +78,6 @@ class NotificationsTest extends \Test\TestCase {
->getMock();
}
-
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'dataTestSendUpdateToRemote')]
public function testSendUpdateToRemote(int $try, array $httpRequestResult, bool $expected): void {
$remote = 'http://remote';
@@ -117,7 +117,6 @@ class NotificationsTest extends \Test\TestCase {
);
}
-
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 54b36f1dea2..033d98e222e 100644
--- a/apps/federatedfilesharing/tests/Settings/AdminTest.php
+++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5132a2c8fd0..ade1eb1facb 100644
--- a/apps/federatedfilesharing/tests/TestCase.php
+++ b/apps/federatedfilesharing/tests/TestCase.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7a210274013..7105c56711a 100644
--- a/apps/federatedfilesharing/tests/TokenHandlerTest.php
+++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 375cfcdd55d..7dde4b30055 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 fdfa24fb566..04abd4614c3 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 3818f9e1462..2d1a02b4e5a 100644
--- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\Federation\BackgroundJob;
use GuzzleHttp\Exception\ClientException;
@@ -54,7 +55,6 @@ class RequestSharedSecret extends Job {
$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 f50147274a9..38a0e9fc500 100644
--- a/apps/federation/lib/Command/SyncFederationAddressBooks.php
+++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1a4cc5d5817..026cc2fc7b4 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 @@ class OCSAuthAPIController extends OCSController {
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 541c821d569..9d9ceec1a8c 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 @@ class SettingsController extends OCSController {
parent::__construct($appName, $request);
}
-
/**
* Add server to the list of trusted Nextcloud servers
*
@@ -108,7 +108,6 @@ class SettingsController extends OCSController {
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 76af6e3e187..beec4b6d512 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 1dac5a2f45f..13cee661ba2 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 efc6d4b2e42..9a186ed02f4 100644
--- a/apps/federation/lib/Listener/SabrePluginAuthInitListener.php
+++ b/apps/federation/lib/Listener/SabrePluginAuthInitListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 27a0efd0cfb..bd019bc2fa0 100644
--- a/apps/federation/lib/Migration/Version1010Date20200630191302.php
+++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 449db1f07c0..73be43ec887 100644
--- a/apps/federation/lib/Settings/Admin.php
+++ b/apps/federation/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5ad64708bb7..f61cde8e10d 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 c73e9ea2b3e..c4b1dd8bbd8 100644
--- a/apps/federation/lib/SyncJob.php
+++ b/apps/federation/lib/SyncJob.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0b4f004add2..93add0541d2 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 21dbf61a5bb..f73fe5888cf 100644
--- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1108731625..7326692596f 100644
--- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 68a8525c769..c3294f6a1ff 100644
--- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
+++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class OCSAuthAPIControllerTest extends TestCase {
}
}
-
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 aa465594316..bb7df0fa25a 100644
--- a/apps/federation/tests/Controller/SettingsControllerTest.php
+++ b/apps/federation/tests/Controller/SettingsControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f68bfe9297e..b8520801d8e 100644
--- a/apps/federation/tests/DAV/FedAuthTest.php
+++ b/apps/federation/tests/DAV/FedAuthTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a812c28b634..149841367f9 100644
--- a/apps/federation/tests/DbHandlerTest.php
+++ b/apps/federation/tests/DbHandlerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\Federation\Tests;
use OCA\Federation\DbHandler;
@@ -105,7 +106,6 @@ class DbHandlerTest extends TestCase {
$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 44c8b8ae3c4..ee9d4fd484d 100644
--- a/apps/federation/tests/Settings/AdminTest.php
+++ b/apps/federation/tests/Settings/AdminTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ff03f5cf442..1dacbb288ba 100644
--- a/apps/federation/tests/SyncFederationAddressbooksTest.php
+++ b/apps/federation/tests/SyncFederationAddressbooksTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e08736a26d5..5f10a5f1cf8 100644
--- a/apps/federation/tests/TrustedServersTest.php
+++ b/apps/federation/tests/TrustedServersTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 04afe578c47..d3c74bd424c 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a2529b17874..b6bd740ab25 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 5aed2dd22e7..417d93d1bf0 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 fa726bf414d..9df09982133 100644
--- a/apps/files/lib/Activity/Filter/FileChanges.php
+++ b/apps/files/lib/Activity/Filter/FileChanges.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b8ad9cd442..8c97a3e44e8 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 7344cf2b06c..c7803921404 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 6dd6b62cb9c..56033025d07 100644
--- a/apps/files/lib/Activity/Settings/FavoriteAction.php
+++ b/apps/files/lib/Activity/Settings/FavoriteAction.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a7d0db4bddf..3fb78ee2ba7 100644
--- a/apps/files/lib/Activity/Settings/FileActivitySettings.php
+++ b/apps/files/lib/Activity/Settings/FileActivitySettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 72b46798ebb..d1d888b8106 100644
--- a/apps/files/lib/Activity/Settings/FileChanged.php
+++ b/apps/files/lib/Activity/Settings/FileChanged.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a743cb5ac67..73adec3e12e 100644
--- a/apps/files/lib/Activity/Settings/FileFavoriteChanged.php
+++ b/apps/files/lib/Activity/Settings/FileFavoriteChanged.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7ecc1d89cb6..01b585b79c8 100644
--- a/apps/files/lib/AdvancedCapabilities.php
+++ b/apps/files/lib/AdvancedCapabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0326b670608..844c92a7ef8 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 54e6b2c678a..fdf0f0cf9c0 100644
--- a/apps/files/lib/AppInfo/Application.php
+++ b/apps/files/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 193c4051c92..8a61e7d7b94 100644
--- a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
+++ b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 81ed3a0c1fd..f2c77699b1d 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 55a3dfe80f4..e99fa85856a 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 a0c54687bf0..b4c69098867 100644
--- a/apps/files/lib/BackgroundJob/SanitizeFilenames.php
+++ b/apps/files/lib/BackgroundJob/SanitizeFilenames.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SanitizeFilenames extends QueuedJob {
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 8b7bd7e553f..9960d10d3a0 100644
--- a/apps/files/lib/BackgroundJob/TransferOwnership.php
+++ b/apps/files/lib/BackgroundJob/TransferOwnership.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 04c60de0ff8..1b6a3695dce 100644
--- a/apps/files/lib/Capabilities.php
+++ b/apps/files/lib/Capabilities.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e4ff5d83b7a..cb129c7fb63 100644
--- a/apps/files/lib/Collaboration/Resources/Listener.php
+++ b/apps/files/lib/Collaboration/Resources/Listener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 38c6aebbbb2..521cd891f4c 100644
--- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php
+++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7d8012ea157..c5a15c304a6 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 3964cfb012f..b7134d02a4d 100644
--- a/apps/files/lib/Command/RepairTree.php
+++ b/apps/files/lib/Command/RepairTree.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a7475f1dae1..3432cc835a9 100644
--- a/apps/files/lib/Command/SanitizeFilenames.php
+++ b/apps/files/lib/Command/SanitizeFilenames.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 16830f1806b..8e17671e2ef 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 @@ class Scan extends Base {
$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 1399229c294..eab0237486c 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 @@ class ScanAppData extends Base {
return self::SUCCESS;
}
-
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
# restrict the verbosity level to VERBOSITY_VERBOSE
@@ -231,7 +231,6 @@ class ScanAppData extends Base {
$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 9d8e17d4e0f..d595d5731b6 100644
--- a/apps/files/lib/Command/WindowsCompatibleFilenames.php
+++ b/apps/files/lib/Command/WindowsCompatibleFilenames.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 20eb7dba5de..3a96b7e178c 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 @@ class ApiController extends Controller {
return new JSONResponse(['message' => 'ok', 'data' => $this->viewConfig->getConfig($view)]);
}
-
/**
* Get the user view config
*
@@ -422,7 +422,6 @@ class ApiController extends Controller {
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 c8addc33e98..6159de22407 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 @@ class DirectEditingController extends OCSController {
}
}
-
-
/**
* Get the templates for direct editing
*
diff --git a/apps/files/lib/Controller/DirectEditingViewController.php b/apps/files/lib/Controller/DirectEditingViewController.php
index b13e68f7766..76f2acd112e 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 5b9ee17fd51..d76759b8b04 100644
--- a/apps/files/lib/Controller/FilenamesController.php
+++ b/apps/files/lib/Controller/FilenamesController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ee4c86941c7..4b4ea3c1569 100644
--- a/apps/files/lib/Controller/TemplateController.php
+++ b/apps/files/lib/Controller/TemplateController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 51a25400efb..93039e6b7c9 100644
--- a/apps/files/lib/Controller/TransferOwnershipController.php
+++ b/apps/files/lib/Controller/TransferOwnershipController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class TransferOwnershipController extends OCSController {
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 d9a5b24b641..87aa4377ea8 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 @@ class ViewController extends Controller {
}
}
-
/**
* @param string $dir
* @param string $view
diff --git a/apps/files/lib/Db/TransferOwnership.php b/apps/files/lib/Db/TransferOwnership.php
index ae78c19b76d..f1e89d5fcb8 100644
--- a/apps/files/lib/Db/TransferOwnership.php
+++ b/apps/files/lib/Db/TransferOwnership.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8b29399f768..dc7b01ee4ba 100644
--- a/apps/files/lib/Db/TransferOwnershipMapper.php
+++ b/apps/files/lib/Db/TransferOwnershipMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b51cabc583c..c48b8998dc8 100644
--- a/apps/files/lib/DirectEditingCapabilities.php
+++ b/apps/files/lib/DirectEditingCapabilities.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d1cf7f4016e..6f50ea71410 100644
--- a/apps/files/lib/Event/LoadAdditionalScriptsEvent.php
+++ b/apps/files/lib/Event/LoadAdditionalScriptsEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9c6c81fcca5..f0aeb96ba2d 100644
--- a/apps/files/lib/Event/LoadSearchPlugins.php
+++ b/apps/files/lib/Event/LoadSearchPlugins.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01db57bb562..e52459ed263 100644
--- a/apps/files/lib/Event/LoadSidebar.php
+++ b/apps/files/lib/Event/LoadSidebar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 531c5d513da..91acb93172a 100644
--- a/apps/files/lib/Exception/TransferOwnershipException.php
+++ b/apps/files/lib/Exception/TransferOwnershipException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f738dc9be7..be8f2229495 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 397e1974bd6..c543819702d 100644
--- a/apps/files/lib/Listener/LoadSidebarListener.php
+++ b/apps/files/lib/Listener/LoadSidebarListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86b98669c22..5eab65daaa5 100644
--- a/apps/files/lib/Listener/NodeAddedToFavoriteListener.php
+++ b/apps/files/lib/Listener/NodeAddedToFavoriteListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5decf02f5d8..dc204c4e6e7 100644
--- a/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php
+++ b/apps/files/lib/Listener/NodeRemovedFromFavoriteListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a3213310b48..aa1d109b67b 100644
--- a/apps/files/lib/Listener/SyncLivePhotosListener.php
+++ b/apps/files/lib/Listener/SyncLivePhotosListener.php
@@ -163,7 +163,6 @@ class SyncLivePhotosListener implements IEventListener {
$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 ae47e85e3bc..4f49a4a141e 100644
--- a/apps/files/lib/Migration/Version11301Date20191205150729.php
+++ b/apps/files/lib/Migration/Version11301Date20191205150729.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9f32001707f..a041d3ab9ad 100644
--- a/apps/files/lib/Notification/Notifier.php
+++ b/apps/files/lib/Notification/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b171b2a7456..93af94db391 100644
--- a/apps/files/lib/Search/FilesSearchProvider.php
+++ b/apps/files/lib/Search/FilesSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3d756ee56fa..842ba43a66d 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 3864710ba3d..3b4a990c569 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -139,7 +139,6 @@ class OwnershipTransferService {
throw new TransferOwnershipException('Destination path does not exists or is not empty', 1);
}
-
// analyse source folder
$this->analyse(
$sourceUid,
@@ -435,7 +434,6 @@ class OwnershipTransferService {
$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 6afec4e6549..f37cac5263f 100644
--- a/apps/files/lib/Service/SettingsService.php
+++ b/apps/files/lib/Service/SettingsService.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9e5661eef6f..3040bc329e6 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 dcf30b7796d..d660449cb9b 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 cf8bebd5372..185328d39a8 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 f09b42912f1..573dff7a6bd 100644
--- a/apps/files/lib/Settings/AdminSettings.php
+++ b/apps/files/lib/Settings/AdminSettings.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d0a060d5d60..d3c616cddd6 100644
--- a/apps/files/lib/Settings/PersonalSettings.php
+++ b/apps/files/lib/Settings/PersonalSettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 af3419c8c67..fefa70a35f2 100644
--- a/apps/files/tests/Activity/Filter/GenericTest.php
+++ b/apps/files/tests/Activity/Filter/GenericTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1a7f25609a9..3542b2839bc 100644
--- a/apps/files/tests/Activity/ProviderTest.php
+++ b/apps/files/tests/Activity/ProviderTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ProviderTest extends TestCase {
$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 3b4584a8f1b..e351b8b3501 100644
--- a/apps/files/tests/Activity/Setting/GenericTest.php
+++ b/apps/files/tests/Activity/Setting/GenericTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 921f7a6b353..a9d545027f5 100644
--- a/apps/files/tests/AdvancedCapabilitiesTest.php
+++ b/apps/files/tests/AdvancedCapabilitiesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a0aaeafc4dc..8f3ec56c941 100644
--- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php
+++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d6f19ff7f0c..389bc3c0ca7 100644
--- a/apps/files/tests/BackgroundJob/ScanFilesTest.php
+++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 13c7a36785a..9b370b8fa5d 100644
--- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php
+++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DeleteOrphanedFilesTest extends TestCase {
$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 a0fc5b18afe..04e55804fbd 100644
--- a/apps/files/tests/Command/ScanAppDataTest.php
+++ b/apps/files/tests/Command/ScanAppDataTest.php
@@ -69,7 +69,8 @@ class ScanAppDataTest extends TestCase {
$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 @@ class ScanAppDataTest extends TestCase {
$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 1bc0af3de50..a3681ddf0e6 100644
--- a/apps/files/tests/Controller/ApiControllerTest.php
+++ b/apps/files/tests/Controller/ApiControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b049e8b7a9f..37b9a6602d9 100644
--- a/apps/files/tests/Controller/ViewControllerTest.php
+++ b/apps/files/tests/Controller/ViewControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b0f51f2d26..484dc970841 100644
--- a/apps/files/tests/Service/ChunkedUploadConfigTest.php
+++ b/apps/files/tests/Service/ChunkedUploadConfigTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b914489053f..6b88c999d48 100644
--- a/apps/files/tests/Service/TagServiceTest.php
+++ b/apps/files/tests/Service/TagServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 19160f5e9e5..be04c010504 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 1888b16fcfc..dbc25f6a1d0 100644
--- a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
+++ b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 43e42665a8a..ad7a9766984 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 5f610f8b367..52b05abc50e 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 0247beaba5f..62016d66c31 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 60a2df28dc8..fd63641f160 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 af2135ed064..97e1d380351 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 54107b3651f..acdc60d1304 100644
--- a/apps/files_external/lib/Command/Dependencies.php
+++ b/apps/files_external/lib/Command/Dependencies.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2bbf5b1237e..365884fb4b7 100644
--- a/apps/files_external/lib/Command/Export.php
+++ b/apps/files_external/lib/Command/Export.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b4aabf2d192..299e50ec2e5 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 3ca9c7725c1..e8979e40115 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 b5ea3e9fa5f..3c9e93f8826 100644
--- a/apps/files_external/lib/Command/Notify.php
+++ b/apps/files_external/lib/Command/Notify.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Notify extends StorageAuthBase {
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 6bf582543c7..618a6f8f26b 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 29efee44748..7d40d2d4cff 100644
--- a/apps/files_external/lib/Command/Scan.php
+++ b/apps/files_external/lib/Command/Scan.php
@@ -154,7 +154,6 @@ class Scan extends StorageAuthBase {
$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 c618291edf8..9826f3a71e5 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 ed65b0d8600..e7e11bd19c6 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 @@ class ConfigAdapter implements IMountProvider, IAuthoritativeMountProvider, IPar
}
}, $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 26e11446e6d..46ee871eae8 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 aa9709db600..a07ac85690f 100644
--- a/apps/files_external/lib/Config/IConfigHandler.php
+++ b/apps/files_external/lib/Config/IConfigHandler.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 85a76054fa8..9250a5b53d9 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 a6ba80a5da2..f655a69e666 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 7284bab00de..744c6172185 100644
--- a/apps/files_external/lib/Config/UserPlaceholderHandler.php
+++ b/apps/files_external/lib/Config/UserPlaceholderHandler.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6ec60406d0c..5e3ceb91842 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 49547357e6b..cd5c5c0e898 100644
--- a/apps/files_external/lib/Controller/ApiController.php
+++ b/apps/files_external/lib/Controller/ApiController.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 9712ed08743..bfefe6bc780 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 e216539ceb0..119c7527754 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 21fac9fccf0..7ef69108923 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 1cd2fa29186..76a2647ee9a 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 1bf479b4eac..8ce16a43afc 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 @@ declare(strict_types=1);
* 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 ae11760708d..e8521c6335c 100644
--- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php
+++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1fb16c14dcc..9a12aab5267 100644
--- a/apps/files_external/lib/Lib/Auth/Builtin.php
+++ b/apps/files_external/lib/Lib/Auth/Builtin.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 225c8c84d5f..793515e25c8 100644
--- a/apps/files_external/lib/Lib/Auth/IUserProvided.php
+++ b/apps/files_external/lib/Lib/Auth/IUserProvided.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2af24f1ea07..b5df2ff240d 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 00f75822c65..7cf733df541 100644
--- a/apps/files_external/lib/Lib/Auth/NullMechanism.php
+++ b/apps/files_external/lib/Lib/Auth/NullMechanism.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 aa3dc14c42d..a755d587c03 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 @@ declare(strict_types=1);
* 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 b5d185fd374..72ae1b76a5c 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 @@ declare(strict_types=1);
* 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 d64f5f8dc5b..0c72e546c78 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 @@ declare(strict_types=1);
* 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 c6b7f233aeb..104812736d6 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 fb00bbb0aaf..ad9a974f4ce 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 e3299e93669..32092f8132a 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 @@ declare(strict_types=1);
* 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 a5cf3710074..2dcda2da71a 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 @@ declare(strict_types=1);
* 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 d24106f8589..df61187fe90 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 @@ declare(strict_types=1);
* 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 4542c591dc2..1367719f9ca 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 3235759713c..807445f0e27 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 5fc56697d12..a954467ebe9 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 3eeec85ca13..59634dc1e7d 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 @@ declare(strict_types=1);
* 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 45b0b582509..8f5025fec07 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 @@ declare(strict_types=1);
* 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 5597289b1b8..06196e8216c 100644
--- a/apps/files_external/lib/Lib/Backend/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 af6111d8822..62cfa0f7e17 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 7c393393be8..0edabcb59d4 100644
--- a/apps/files_external/lib/Lib/Backend/DAV.php
+++ b/apps/files_external/lib/Lib/Backend/DAV.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3e8d34137d6..1a3c85b1e9a 100644
--- a/apps/files_external/lib/Lib/Backend/FTP.php
+++ b/apps/files_external/lib/Lib/Backend/FTP.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 ca4e3ddb4f7..2450def8f0f 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 87e362ecf25..11b5e686b49 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 ae1249ca4f2..ef674ea65a7 100644
--- a/apps/files_external/lib/Lib/Backend/Local.php
+++ b/apps/files_external/lib/Lib/Backend/Local.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 13c08e723e1..69ebee2afd7 100644
--- a/apps/files_external/lib/Lib/Backend/OwnCloud.php
+++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0168785872a..d9755fd690b 100644
--- a/apps/files_external/lib/Lib/Backend/SFTP.php
+++ b/apps/files_external/lib/Lib/Backend/SFTP.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b8559711dcd..987abc9911f 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 @@ declare(strict_types=1);
* 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 9e64cf0f0fa..207405c99d2 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 @@ declare(strict_types=1);
* 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 c771c6fa21b..24670a616a9 100644
--- a/apps/files_external/lib/Lib/Backend/Swift.php
+++ b/apps/files_external/lib/Lib/Backend/Swift.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c34c261ffd7..ceb85cfd60d 100644
--- a/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php
+++ b/apps/files_external/lib/Lib/Config/IAuthMechanismProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 9a88ff84556..55a2d7d9970 100644
--- a/apps/files_external/lib/Lib/Config/IBackendProvider.php
+++ b/apps/files_external/lib/Lib/Config/IBackendProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7dde725f529..34eac37aa20 100644
--- a/apps/files_external/lib/Lib/DefinitionParameter.php
+++ b/apps/files_external/lib/Lib/DefinitionParameter.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 745231255b2..1c26719a56e 100644
--- a/apps/files_external/lib/Lib/DependencyTrait.php
+++ b/apps/files_external/lib/Lib/DependencyTrait.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0f280d1d486..99888e9b723 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 7eb9a509c14..fab5da2d57f 100644
--- a/apps/files_external/lib/Lib/IFrontendDefinition.php
+++ b/apps/files_external/lib/Lib/IFrontendDefinition.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e17b908a0b1..41b1f2b929e 100644
--- a/apps/files_external/lib/Lib/IIdentifier.php
+++ b/apps/files_external/lib/Lib/IIdentifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f5ffde32307..e9b6dda6f07 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 1e872b35072..d541a958a00 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 f6311fae83e..08d5c45d802 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 c2da7fcadbf..c1ddd879dea 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 683c3d05151..5c77fe0f7b4 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 148825ffdaf..25073bc09d8 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 fad2c07e58c..9d47a31898e 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 881f9b3689c..eac98bf7706 100644
--- a/apps/files_external/lib/Lib/SessionStorageWrapper.php
+++ b/apps/files_external/lib/Lib/SessionStorageWrapper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a45019b98f9..31c8f70f3fc 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 @@ class AmazonS3 extends Common {
throw $e;
}
-
$this->directoryCache[$path] = false;
return false;
}
@@ -231,7 +231,6 @@ class AmazonS3 extends Common {
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 e7c818a6259..2761f0123b9 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 1d3e05f60ff..9250f27beb0 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 e9c0804c23a..f2b8924673a 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 e373dbdb433..5007c251a47 100644
--- a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php
+++ b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ececbf39bbf..46735735890 100644
--- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php
+++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b5387d31d68..542e35905d0 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 291e8bf3898..2c7e3c143cb 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 ee0f34406f4..a37cbaec1a6 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 21ddd6bf828..ae670c3f85d 100644
--- a/apps/files_external/lib/Lib/StorageModifierTrait.php
+++ b/apps/files_external/lib/Lib/StorageModifierTrait.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 62b26f3edb1..2fe36ec27be 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 42d93ae6c1e..eb9dd6d9827 100644
--- a/apps/files_external/lib/Listener/LoadAdditionalListener.php
+++ b/apps/files_external/lib/Listener/LoadAdditionalListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f8e964a1f19..7b6e48b37a1 100644
--- a/apps/files_external/lib/Listener/StorePasswordListener.php
+++ b/apps/files_external/lib/Listener/StorePasswordListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 19e070ef674..cfb8bf6796f 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 81fef2002ae..84af96d2d88 100644
--- a/apps/files_external/lib/Migration/Version1011Date20200630192246.php
+++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6fb1fb92a9e..51fed99a7a9 100644
--- a/apps/files_external/lib/Migration/Version1015Date20211104103506.php
+++ b/apps/files_external/lib/Migration/Version1015Date20211104103506.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4e359a5b704..16c92fd0f81 100644
--- a/apps/files_external/lib/Migration/Version22000Date20210216084416.php
+++ b/apps/files_external/lib/Migration/Version22000Date20210216084416.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c4534be6c19..0b5ea7858fe 100644
--- a/apps/files_external/lib/NotFoundException.php
+++ b/apps/files_external/lib/NotFoundException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c9fc5473acf..bb147f1d84b 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 d6bcd813065..a060f066836 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 a71aec79176..661ba66adc9 100644
--- a/apps/files_external/lib/Service/ImportLegacyStoragesService.php
+++ b/apps/files_external/lib/Service/ImportLegacyStoragesService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 08cef135bc7..feffd6f4385 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 828d91d2987..a0088f49503 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 70fbd8f198e..0d1a19aaad0 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 @@ class UserGlobalStoragesService extends GlobalStoragesService {
return false;
}
-
/**
* Gets all storages for the user, admin, personal, global, etc
*
@@ -160,7 +160,6 @@ class UserGlobalStoragesService extends GlobalStoragesService {
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 39f306219ae..1616b05e27c 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 679066283a5..9608ebcc7be 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 d91487a67e7..7f9e5cf2b20 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 03193374c05..466d6fe11c9 100644
--- a/apps/files_external/lib/Settings/CommonSettingsTrait.php
+++ b/apps/files_external/lib/Settings/CommonSettingsTrait.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7ee76bba77..7bd2ba03677 100644
--- a/apps/files_external/lib/Settings/Personal.php
+++ b/apps/files_external/lib/Settings/Personal.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fce0e99a67c..874d706733c 100644
--- a/apps/files_external/lib/Settings/PersonalSection.php
+++ b/apps/files_external/lib/Settings/PersonalSection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd18e3c105c..4445b6e6a3f 100644
--- a/apps/files_external/lib/Settings/Section.php
+++ b/apps/files_external/lib/Settings/Section.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5d859a66868..57c20dc2b9b 100644
--- a/apps/files_external/tests/Auth/AuthMechanismTest.php
+++ b/apps/files_external/tests/Auth/AuthMechanismTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6d83655403e..1d37032948e 100644
--- a/apps/files_external/tests/Auth/Password/GlobalAuthTest.php
+++ b/apps/files_external/tests/Auth/Password/GlobalAuthTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class GlobalAuthTest extends TestCase {
], $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 0fe119567ab..9572b8befa9 100644
--- a/apps/files_external/tests/Backend/BackendTest.php
+++ b/apps/files_external/tests/Backend/BackendTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c4ddfedf6e2..63580c4eb0f 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 59db18a42de..2bfa21010a2 100644
--- a/apps/files_external/tests/Command/ApplicableTest.php
+++ b/apps/files_external/tests/Command/ApplicableTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e42ad9cd68a..5c13c89e69c 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 5b84e500e3f..3b436a50b89 100644
--- a/apps/files_external/tests/Command/ListCommandTest.php
+++ b/apps/files_external/tests/Command/ListCommandTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 22d49cafe91..334cd91adbf 100644
--- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
+++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5a2e0981ebc..b186c48b29c 100644
--- a/apps/files_external/tests/Controller/AjaxControllerTest.php
+++ b/apps/files_external/tests/Controller/AjaxControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 21182010c95..b6527fde871 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 2370588193f..6c16589139c 100644
--- a/apps/files_external/tests/Controller/StoragesControllerTestCase.php
+++ b/apps/files_external/tests/Controller/StoragesControllerTestCase.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 138b5e1225d..981f8981198 100644
--- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7ccd3a6406c..b7dcb92c636 100644
--- a/apps/files_external/tests/DefinitionParameterTest.php
+++ b/apps/files_external/tests/DefinitionParameterTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df83814bbc7..fdf42f2687f 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 3edefe5188b..78e98c83cdc 100644
--- a/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php
+++ b/apps/files_external/tests/LegacyDependencyCheckPolyfillTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6ad0f5c91c..921e70969c7 100644
--- a/apps/files_external/tests/OwnCloudFunctionsTest.php
+++ b/apps/files_external/tests/OwnCloudFunctionsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 618048c3335..c5f959bf3c1 100644
--- a/apps/files_external/tests/PersonalMountTest.php
+++ b/apps/files_external/tests/PersonalMountTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6fca74124a5..7e00d0eab44 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 d41c2ee3181..989f8b918ad 100644
--- a/apps/files_external/tests/Service/DBConfigServiceTest.php
+++ b/apps/files_external/tests/Service/DBConfigServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9dd5ed590ad..59bab4d0444 100644
--- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
+++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php
@@ -6,11 +6,11 @@ declare(strict_types=1);
* 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 @@ class GlobalStoragesServiceTest extends StoragesServiceTestCase {
}
}
-
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 5eed8294b8f..7baa3a8e3d2 100644
--- a/apps/files_external/tests/Service/StoragesServiceTestCase.php
+++ b/apps/files_external/tests/Service/StoragesServiceTestCase.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ abstract class StoragesServiceTestCase extends \Test\TestCase {
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 ad068aef915..4a35796b97f 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 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
}
}
-
public function testAddStorage($storageParams = null): void {
$this->expectException(\DomainException::class);
@@ -144,7 +144,6 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
$this->service->addStorage($storage);
}
-
public function testUpdateStorage($storageParams = null): void {
$this->expectException(\DomainException::class);
@@ -164,7 +163,6 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
$this->service->updateStorage($retrievedStorage);
}
-
public function testNonExistingStorage(): void {
$this->expectException(\DomainException::class);
@@ -190,7 +188,6 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest {
$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 073b2093a84..287ccbf3778 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\Lib\StorageConfig;
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 @@ class UserStoragesServiceTest extends StoragesServiceTestCase {
);
}
-
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 0070b0ef224..72cfd1d9e50 100644
--- a/apps/files_external/tests/Settings/AdminTest.php
+++ b/apps/files_external/tests/Settings/AdminTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 c64849ff7ba..78ebe0a8fee 100644
--- a/apps/files_external/tests/Settings/SectionTest.php
+++ b/apps/files_external/tests/Settings/SectionTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b62030492a6..8a694e20956 100644
--- a/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
+++ b/apps/files_external/tests/Storage/Amazons3MultiPartTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 90e36d5fdbd..c07578b0ab8 100644
--- a/apps/files_external/tests/Storage/Amazons3Test.php
+++ b/apps/files_external/tests/Storage/Amazons3Test.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a6845ff71e2..6d756b1d977 100644
--- a/apps/files_external/tests/Storage/FtpTest.php
+++ b/apps/files_external/tests/Storage/FtpTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FtpTest extends \Test\Files\Storage\Storage {
});
}
-
/**
* 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 34b70b0483d..de88cbc739b 100644
--- a/apps/files_external/tests/Storage/OwncloudTest.php
+++ b/apps/files_external/tests/Storage/OwncloudTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c675445a245..20bb441c7e2 100644
--- a/apps/files_external/tests/Storage/SftpTest.php
+++ b/apps/files_external/tests/Storage/SftpTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6fd074cc35e..7384d13f05b 100644
--- a/apps/files_external/tests/Storage/SmbTest.php
+++ b/apps/files_external/tests/Storage/SmbTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a34b2e6b845..3a38c51d26a 100644
--- a/apps/files_external/tests/Storage/SwiftTest.php
+++ b/apps/files_external/tests/Storage/SwiftTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d73daa6fb69..ae4d23372b6 100644
--- a/apps/files_external/tests/Storage/WebdavTest.php
+++ b/apps/files_external/tests/Storage/WebdavTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b3024cb228c..fae6dbd1151 100644
--- a/apps/files_external/tests/StorageConfigTest.php
+++ b/apps/files_external/tests/StorageConfigTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6ee39562076..342997ff44a 100644
--- a/apps/files_reminders/lib/Service/ReminderService.php
+++ b/apps/files_reminders/lib/Service/ReminderService.php
@@ -203,7 +203,6 @@ class ReminderService {
$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 cc2d50ec8b3..71c4ca4b114 100644
--- a/apps/files_sharing/lib/Activity/Filter.php
+++ b/apps/files_sharing/lib/Activity/Filter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a558e73aabd..71fc956c186 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 3ed631531d3..f4541ddff54 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 06915298d4c..0e7fe415763 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 63822d8a5e3..c11f126f745 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 f19bae4b8f3..f342fa9093d 100644
--- a/apps/files_sharing/lib/Activity/Settings/PublicLinks.php
+++ b/apps/files_sharing/lib/Activity/Settings/PublicLinks.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1552fb496de..9510f22df77 100644
--- a/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php
+++ b/apps/files_sharing/lib/Activity/Settings/PublicLinksUpload.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b39b1d0b558..0ccf6d11cb0 100644
--- a/apps/files_sharing/lib/Activity/Settings/RemoteShare.php
+++ b/apps/files_sharing/lib/Activity/Settings/RemoteShare.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 34b0a19cedf..76eb2249574 100644
--- a/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
+++ b/apps/files_sharing/lib/Activity/Settings/ShareActivitySettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f558289d312..5f4654f6fd6 100644
--- a/apps/files_sharing/lib/Activity/Settings/Shared.php
+++ b/apps/files_sharing/lib/Activity/Settings/Shared.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 824a7f8b640..16e16d23dd0 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 @@ class Application extends App implements IBootstrap {
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 857052829d7..b2163bd46d1 100644
--- a/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php
+++ b/apps/files_sharing/lib/BackgroundJob/FederatedSharesDiscoverJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2b5e08f1e4..52664b9820f 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 6d4cf0a5045..9352213489c 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 5ce4f7dde7c..9395b0600c6 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 f3550fb6f09..32946a382eb 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 4b409230e74..a0b4570cfe1 100644
--- a/apps/files_sharing/lib/Command/ExiprationNotification.php
+++ b/apps/files_sharing/lib/Command/ExiprationNotification.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10a8a73cd3a..4ae8f7dfce5 100644
--- a/apps/files_sharing/lib/Controller/AcceptController.php
+++ b/apps/files_sharing/lib/Controller/AcceptController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 42105dca133..58d0cad8481 100644
--- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7f266ea53a3..201a460d32a 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 01a08a0674a..24a537e110d 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 @@ class PublicPreviewController extends PublicShareController {
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 d95ea251d89..eff56542928 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 67d9193be78..615b5faf1c8 100644
--- a/apps/files_sharing/lib/Controller/SettingsController.php
+++ b/apps/files_sharing/lib/Controller/SettingsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c6636a52603..ec7b0c51515 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -339,7 +339,6 @@ class ShareAPIController extends OCSController {
}
}
-
$result['mail_send'] = $share->getMailSend() ? 1 : 0;
$result['hide_download'] = $share->getHideDownload() ? 1 : 0;
@@ -390,7 +389,6 @@ class ShareAPIController extends OCSController {
return $query;
}
-
/**
* @param list $shares
* @param array|null $updatedDisplayName
@@ -432,7 +430,6 @@ class ShareAPIController extends OCSController {
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 @@ class ShareAPIController extends OCSController {
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 @@ class ShareAPIController extends OCSController {
return ($displayName === $userId) ? '' : $displayName;
}
-
-
/**
* Get a specific share by id
*
@@ -1138,7 +1132,6 @@ class ShareAPIController extends OCSController {
return $formatted;
}
-
/**
* Get all shares relative to a file, including parent folders shares rights
*
@@ -1881,7 +1874,6 @@ class ShareAPIController extends OCSController {
return $shares;
}
-
/**
* @param Node $node
*
@@ -1893,7 +1885,6 @@ class ShareAPIController extends OCSController {
}
}
-
/**
* @param string $viewer
* @param Node $node
@@ -1920,7 +1911,6 @@ class ShareAPIController extends OCSController {
return false;
}
-
/**
* Returns if we can find resharing rights in an IShare object for a specific user.
*
@@ -2020,7 +2010,6 @@ class ShareAPIController extends OCSController {
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 69db7337469..fe4b132392f 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 @@ class ShareController extends AuthPublicShareController {
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 b7e79aec830..e7e42e8b6c7 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 0645ef18484..72a8af5cd53 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\Files_Sharing\Controller;
use Generator;
@@ -361,7 +362,6 @@ class ShareesAPIController extends OCSController {
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 981a12625a4..af755fc0eb4 100644
--- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
+++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
@@ -257,7 +257,6 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
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 a212f4add28..c0828caca16 100644
--- a/apps/files_sharing/lib/DeleteOrphanedSharesJob.php
+++ b/apps/files_sharing/lib/DeleteOrphanedSharesJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 709d7bacd4a..232c981d314 100644
--- a/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php
+++ b/apps/files_sharing/lib/Event/BeforeTemplateRenderedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1bd0c9cc8ab..25e174e79b8 100644
--- a/apps/files_sharing/lib/Exceptions/BrokenPath.php
+++ b/apps/files_sharing/lib/Exceptions/BrokenPath.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 00c66a55655..e930359a3d9 100644
--- a/apps/files_sharing/lib/Exceptions/S2SException.php
+++ b/apps/files_sharing/lib/Exceptions/S2SException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e1144bc6a17..dd51751317c 100644
--- a/apps/files_sharing/lib/Exceptions/SharingRightsException.php
+++ b/apps/files_sharing/lib/Exceptions/SharingRightsException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c262f9e72c1..5c8c60b4598 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 @@ class ExpireSharesJob extends TimedJob {
$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 e004ed84d8b..7407b52ea23 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 9693e52439b..f40e5d4a349 100644
--- a/apps/files_sharing/lib/External/Manager.php
+++ b/apps/files_sharing/lib/External/Manager.php
@@ -376,7 +376,6 @@ class Manager {
'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 a83a0a25a2a..6f9a578fe6d 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 06191927e0c..e0cd7f7ec8a 100644
--- a/apps/files_sharing/lib/External/MountProvider.php
+++ b/apps/files_sharing/lib/External/MountProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0ed7aea9c81..ecf37729da8 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 f074d86d54f..90a50f785dd 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3c0d753ce8a..01ad3617aa0 100644
--- a/apps/files_sharing/lib/External/Watcher.php
+++ b/apps/files_sharing/lib/External/Watcher.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 9c690709fec..593c823eaba 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 9f00afa1079..1d2617d06aa 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 e611f0d918f..3ab5ca14ef3 100644
--- a/apps/files_sharing/lib/ISharedStorage.php
+++ b/apps/files_sharing/lib/ISharedStorage.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4ba3a0266ef..b897583a683 100644
--- a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php
+++ b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 840cb021195..d2f38224df1 100644
--- a/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php
+++ b/apps/files_sharing/lib/Listener/LoadPublicFileRequestAuthListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d57424fbd9f..b7270536e16 100644
--- a/apps/files_sharing/lib/Listener/ShareInteractionListener.php
+++ b/apps/files_sharing/lib/Listener/ShareInteractionListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 25433b58ba6..a8d29f0cc68 100644
--- a/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php
+++ b/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UserAddedToGroupListener implements IEventListener {
}
}
-
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 0ff1767893a..711bf6c856c 100644
--- a/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php
+++ b/apps/files_sharing/lib/Listener/UserShareAcceptanceListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2e3a936f159..46e4cf6cba1 100644
--- a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a05e9990476..5931f3d48fc 100644
--- a/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/ShareInfoMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 69339601ea7..b60297f1e82 100644
--- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cf68a41935f..8b3224ac3af 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 a51570e15fb..e6e69ad720b 100644
--- a/apps/files_sharing/lib/Migration/SetAcceptedStatus.php
+++ b/apps/files_sharing/lib/Migration/SetAcceptedStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3e466c225ba..e37f9e13e1a 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 29b7f423d81..78035d9ccda 100644
--- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php
+++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f5a0ae2dd45..74788c8fc08 100644
--- a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php
+++ b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 38f504c9d2f..8d767a9409d 100644
--- a/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php
+++ b/apps/files_sharing/lib/Migration/Version22000Date20210216084241.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4886fceb2b8..533f3dda970 100644
--- a/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
+++ b/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8047a0934a7..9a99eb849e9 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\IManager;
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 1cf0f845e7a..6894937a3a7 100644
--- a/apps/files_sharing/lib/Notification/Listener.php
+++ b/apps/files_sharing/lib/Notification/Listener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d43af278180..d4f53bebe4e 100644
--- a/apps/files_sharing/lib/Notification/Notifier.php
+++ b/apps/files_sharing/lib/Notification/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b31118746d4..16661d9628f 100644
--- a/apps/files_sharing/lib/Settings/Personal.php
+++ b/apps/files_sharing/lib/Settings/Personal.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e77dc5ddad0..a8149edcf13 100644
--- a/apps/files_sharing/lib/ShareTargetValidator.php
+++ b/apps/files_sharing/lib/ShareTargetValidator.php
@@ -110,7 +110,6 @@ class ShareTargetValidator {
return $newMountPoint;
}
-
/**
* @param callable(string):?ICachedMountInfo $getMountByPath
*/
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index c1e8faeae33..49a13995481 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 8cbf9351e02..1a1ee187390 100644
--- a/apps/files_sharing/lib/SharesReminderJob.php
+++ b/apps/files_sharing/lib/SharesReminderJob.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class SharesReminderJob extends TimedJob {
$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 019542fa6bf..e2c0eef8970 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 e0340b3ce00..a4d1b71e426 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 0e4736ff25c..a3c62db96b7 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 @@ class CacheTest extends TestCase {
$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 787a31c0626..99b1712e38e 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 2a2e1c29096..296132919c7 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 3650b812a3c..a1a3a2fe623 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 0fde61895b1..e5da2242710 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 620b770511e..e926cd51ba5 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 94ecd0bc23e..d8cbaed227f 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 @@ class PublicPreviewControllerTest extends TestCase {
$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 b6ca22329f6..55cf24d79d7 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -205,7 +205,6 @@ class ShareAPIControllerTest extends TestCase {
return Server::get(IManager::class)->newShare();
}
-
private function mockShareAttributes() {
$formattedShareAttributes = [
[
@@ -270,7 +269,6 @@ class ShareAPIControllerTest extends TestCase {
$this->assertEquals($expected->getData(), $result->getData());
}
-
public function testDeleteShareLocked(): void {
$this->expectException(OCSNotFoundException::class);
$this->expectExceptionMessage('Could not delete share');
@@ -974,7 +972,6 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$this->ocs->createShare();
}
-
public function testCreateShareInvalidPath(): void {
$this->expectException(OCSNotFoundException::class);
$this->expectExceptionMessage('Wrong path, file/folder does not exist');
@@ -1931,7 +1927,6 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$this->ocs->updateShare(42);
}
-
public function testUpdateNoParametersLink(): void {
$this->expectException(OCSBadRequestException::class);
$this->expectExceptionMessage('Wrong or no update parameter given');
@@ -2905,7 +2889,6 @@ class ShareAPIControllerTest extends TestCase {
$this->ocs->updateShare(42);
}
-
public function testUpdateNoParametersOther(): void {
$this->expectException(OCSBadRequestException::class);
$this->expectExceptionMessage('Wrong or no update parameter given');
@@ -3092,7 +3075,6 @@ class ShareAPIControllerTest extends TestCase {
$this->assertEquals($expected->getData(), $result->getData());
}
-
public static function publicLinkValidPermissionsProvider() {
return [
[Constants::PERMISSION_CREATE],
@@ -3251,7 +3233,6 @@ class ShareAPIControllerTest extends TestCase {
$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 @@ class ShareAPIControllerTest extends TestCase {
$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 4e724a45a90..2d73ea2da46 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 @@ class ShareControllerTest extends \Test\TestCase {
$this->publicShareTemplateFactory,
);
-
// Store current user
$this->oldUser = \OC_User::getUser();
@@ -206,7 +206,6 @@ class ShareControllerTest extends \Test\TestCase {
$this->shareController->showShare();
}
-
public function testShowShare(): void {
$note = 'personal note';
$filename = 'file1.txt';
@@ -646,7 +645,6 @@ class ShareControllerTest extends \Test\TestCase {
$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 1a678610805..e795ccba923 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 @@ class ShareInfoControllerTest extends TestCase {
$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 3426b4147b7..771c01ae12b 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 @@ class ShareesAPIControllerTest extends TestCase {
[[
'itemType' => 'folder',
], 'no', 'no', false, true, true, true, $allTypes, false, false, true],
-
];
}
@@ -284,7 +284,6 @@ class ShareesAPIControllerTest extends TestCase {
->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 bc67141f88d..5a434191132 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 92773bdc72d..fc3ff77f687 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 597e584fa2f..8c977cfe9db 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 50c490a7cea..22d2487005c 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 38aff257357..c2a5316ddc4 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 31ce7155704..44efcb34126 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 89e3d1a48b3..378ed646733 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 781961e55f7..b038d2c7349 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 9cabc52e14b..47357f20626 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 0377812679b..9ec54c2d47f 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 @@ class LockingTest extends TestCase {
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 631b6a0f51c..fa2c6518bd3 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 @@ class ShareInfoMiddlewareTest extends TestCase {
}
}
-
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 0169668130f..a5bfdaefb7c 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 @@ class SharingCheckMiddlewareTest extends \Test\TestCase {
$this->sharingCheckMiddleware->beforeController($controller, 'myMethod');
}
-
public function testBeforeControllerWithSharingDisabled(): void {
$this->expectException(NotFoundException::class);
$this->expectExceptionMessage('Sharing is disabled.');
@@ -187,7 +187,6 @@ class SharingCheckMiddlewareTest extends \Test\TestCase {
$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 610f3658e4b..c911ff92b12 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 b406c8af7b5..d6eae0f22b3 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 @@ class MountProviderTest extends \Test\TestCase {
$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 98bf5ad92fd..a3f71646008 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 aaa653135ce..e781a8ec72e 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 1c5b8b619c2..d1e0f5d122d 100644
--- a/apps/files_sharing/tests/ShareTargetValidatorTest.php
+++ b/apps/files_sharing/tests/ShareTargetValidatorTest.php
@@ -39,7 +39,6 @@ class ShareTargetValidatorTest extends TestCase {
$this->filename = '/share-api-storage.txt';
-
$this->view->mkdir($this->folder);
$this->view->mkdir($this->folder2);
@@ -63,7 +62,6 @@ class ShareTargetValidatorTest extends TestCase {
->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 @@ class ShareTargetValidatorTest extends TestCase {
$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 35568498542..1ed6bc9b3fe 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 020b6ec41c5..cc7d5058f5d 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 @@ class SharedMountTest extends TestCase {
$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 cd0a06f2436..26e1e0a5e81 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 @@ class SharedStorageTest extends TestCase {
$this->filename = '/share-api-storage.txt';
-
$this->view->mkdir($this->folder);
// save file with content
@@ -70,7 +70,6 @@ class SharedStorageTest extends TestCase {
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 @@ class SharedStorageTest extends TestCase {
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 @@ class SharedStorageTest extends TestCase {
Constants::PERMISSION_READ
);
-
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue(Filesystem::is_dir($this->folder));
@@ -156,7 +153,6 @@ class SharedStorageTest extends TestCase {
$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 641d9a5295f..c26122883d5 100644
--- a/apps/files_sharing/tests/SharesReminderJobTest.php
+++ b/apps/files_sharing/tests/SharesReminderJobTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9b2f82cc99e..c89667d3e42 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 02ee66d0961..e9732b5ff02 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 1174a3204aa..93378205ca1 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 6ca9801dc98..ae5a3f71eb9 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 8c3c3890c88..6bd58358083 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 f63015548d5..ff02450da35 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 7305c24cc57..f1e2bf75f1a 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 35d84dced1c..84e34a3f564 100644
--- a/apps/files_trashbin/lib/Capabilities.php
+++ b/apps/files_trashbin/lib/Capabilities.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 33e2c81eea8..9021b19ef86 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 233be4ee5f9..fad9bc57438 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 b4aa0a9e0a9..021bb54e9aa 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 05c327cb5cc..7855e668890 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 f28511cace7..90c9402c7b2 100644
--- a/apps/files_trashbin/lib/Command/Size.php
+++ b/apps/files_trashbin/lib/Command/Size.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a4e911d88ef..3ca66ec3047 100644
--- a/apps/files_trashbin/lib/Controller/PreviewController.php
+++ b/apps/files_trashbin/lib/Controller/PreviewController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 405d9b6396e..d0c4ef0de8a 100644
--- a/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php
+++ b/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9deba900201..0c43d469b14 100644
--- a/apps/files_trashbin/lib/Events/MoveToTrashEvent.php
+++ b/apps/files_trashbin/lib/Events/MoveToTrashEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4278d6cfe95..fd0b0f1bf6c 100644
--- a/apps/files_trashbin/lib/Events/NodeRestoredEvent.php
+++ b/apps/files_trashbin/lib/Events/NodeRestoredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cec6c92ce6f..6405c9b75de 100644
--- a/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php
+++ b/apps/files_trashbin/lib/Exceptions/CopyRecursiveException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0bbe39a9314..3a96270a86e 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 746832e9280..fc7e97ec8f8 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 652cd5226f3..5fd8ccfb7d1 100644
--- a/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php
+++ b/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8ca09036c8b..aaee97321eb 100644
--- a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php
+++ b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 acc872b34c7..72cbb74b31c 100644
--- a/apps/files_trashbin/lib/Sabre/AbstractTrash.php
+++ b/apps/files_trashbin/lib/Sabre/AbstractTrash.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 28749502e5c..4ed2b9e8254 100644
--- a/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php
+++ b/apps/files_trashbin/lib/Sabre/AbstractTrashFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 49f74f4cf57..d907a574cc1 100644
--- a/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php
+++ b/apps/files_trashbin/lib/Sabre/AbstractTrashFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f37e1ccd9c3..7b3abd2b5f7 100644
--- a/apps/files_trashbin/lib/Sabre/ITrash.php
+++ b/apps/files_trashbin/lib/Sabre/ITrash.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 766809d3f2b..992011c9bff 100644
--- a/apps/files_trashbin/lib/Sabre/RestoreFolder.php
+++ b/apps/files_trashbin/lib/Sabre/RestoreFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2e1e87134f8..f00c32cc22b 100644
--- a/apps/files_trashbin/lib/Sabre/RootCollection.php
+++ b/apps/files_trashbin/lib/Sabre/RootCollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fec435b2e15..fd0a9120ec8 100644
--- a/apps/files_trashbin/lib/Sabre/TrashFile.php
+++ b/apps/files_trashbin/lib/Sabre/TrashFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7906efb9ff1..c845839c70b 100644
--- a/apps/files_trashbin/lib/Sabre/TrashFolder.php
+++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b984e8a35b2..a11dbe60d66 100644
--- a/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
+++ b/apps/files_trashbin/lib/Sabre/TrashFolderFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a5cb98e114..6fed7951824 100644
--- a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php
+++ b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 174807541f9..1a0f1fafce6 100644
--- a/apps/files_trashbin/lib/Sabre/TrashHome.php
+++ b/apps/files_trashbin/lib/Sabre/TrashHome.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7a009afe62f..9c730c69d87 100644
--- a/apps/files_trashbin/lib/Sabre/TrashRoot.php
+++ b/apps/files_trashbin/lib/Sabre/TrashRoot.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6b722971beb..c3ca8a83238 100644
--- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
+++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class TrashbinPlugin extends ServerPlugin {
$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 39cd4f1c60b..0412bf7138c 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 2e275c3b376..57b5e1c7cc5 100644
--- a/apps/files_trashbin/lib/Trash/BackendNotFoundException.php
+++ b/apps/files_trashbin/lib/Trash/BackendNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0e30c5972bd..46685ab4e9f 100644
--- a/apps/files_trashbin/lib/Trash/ITrashBackend.php
+++ b/apps/files_trashbin/lib/Trash/ITrashBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c439ccee37e..0be06617fcf 100644
--- a/apps/files_trashbin/lib/Trash/ITrashItem.php
+++ b/apps/files_trashbin/lib/Trash/ITrashItem.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 af174bf45f3..25a07d66c8b 100644
--- a/apps/files_trashbin/lib/Trash/ITrashManager.php
+++ b/apps/files_trashbin/lib/Trash/ITrashManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 488dc79f541..54ffd6f4cab 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 9e1a28a5ee7..153625cfb4c 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 b82fbbc6da9..3706a6a2e80 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 e66045f03cb..b5edf37bf2f 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 @@ class Trashbin implements IEventListener {
}
}
-
/**
* copy file to owners trash
*
@@ -204,7 +204,6 @@ class Trashbin implements IEventListener {
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 @@ class Trashbin implements IEventListener {
}
}
-
/**
* move file to the trash bin
*
diff --git a/apps/files_trashbin/tests/CapabilitiesTest.php b/apps/files_trashbin/tests/CapabilitiesTest.php
index 1c460cc5665..850b87b4a54 100644
--- a/apps/files_trashbin/tests/CapabilitiesTest.php
+++ b/apps/files_trashbin/tests/CapabilitiesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 325643e7269..23ecc8c61a6 100644
--- a/apps/files_trashbin/tests/Command/CleanUpTest.php
+++ b/apps/files_trashbin/tests/Command/CleanUpTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e6d96c6d79e..9a6c0aaffbf 100644
--- a/apps/files_trashbin/tests/Command/ExpireTest.php
+++ b/apps/files_trashbin/tests/Command/ExpireTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 55859da0557..6318be24504 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 bb951c9c8c7..fd13f340322 100644
--- a/apps/files_trashbin/tests/Controller/PreviewControllerTest.php
+++ b/apps/files_trashbin/tests/Controller/PreviewControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fdc80977d79..9fa585e99b5 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ExpirationTest extends \Test\TestCase {
$this->assertEquals($expectedResult, $actualResult);
}
-
public static function timestampTestData(): array {
return [
[ 'disabled', false],
@@ -107,7 +107,6 @@ class ExpirationTest extends \Test\TestCase {
];
}
-
#[\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 14a0af0697b..0eb4997648f 100644
--- a/apps/files_trashbin/tests/StorageTest.php
+++ b/apps/files_trashbin/tests/StorageTest.php
@@ -157,7 +157,6 @@ class StorageTest extends \Test\TestCase {
$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 e34897330ed..7431db50fad 100644
--- a/apps/files_trashbin/tests/TrashbinTest.php
+++ b/apps/files_trashbin/tests/TrashbinTest.php
@@ -83,7 +83,6 @@ class TrashbinTest extends \Test\TestCase {
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 @@ class TrashbinTest extends \Test\TestCase {
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 @@ class TrashbinTest extends \Test\TestCase {
}
}
-
// 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 7eb9c821a25..b6ba8ddf31b 100644
--- a/apps/files_versions/appinfo/routes.php
+++ b/apps/files_versions/appinfo/routes.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 6d1aa6c21ba..c1f827af6e0 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 2d9d985b4b8..946dcc51f6c 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 88255f5e170..79f7625c618 100644
--- a/apps/files_versions/lib/Capabilities.php
+++ b/apps/files_versions/lib/Capabilities.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f3a71d3dbb2..47a946b5363 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 @@ class CleanUp extends Command {
);
}
-
#[\Override]
protected function execute(InputInterface $input, OutputInterface $output): int {
$users = $input->getArgument('user_id');
@@ -98,7 +98,6 @@ class CleanUp extends Command {
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 19960ecdb1b..995f9a59f0b 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 5413f897d2c..4c3c065e7c2 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 2c3ff8da70d..126506dbd58 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 530e6effedf..7fad605270c 100644
--- a/apps/files_versions/lib/Db/VersionEntity.php
+++ b/apps/files_versions/lib/Db/VersionEntity.php
@@ -10,7 +10,6 @@ declare(strict_types=1);
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 92ed26b2dd6..16d5fc454b3 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 @@ use OCP\Files\Node;
*/
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 4dc7a7cb505..b1bf18720e0 100644
--- a/apps/files_versions/lib/Events/VersionCreatedEvent.php
+++ b/apps/files_versions/lib/Events/VersionCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12e91bd258d..0d7ef010b48 100644
--- a/apps/files_versions/lib/Events/VersionRestoredEvent.php
+++ b/apps/files_versions/lib/Events/VersionRestoredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1e04d93379f..18c5f88eabf 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 @@ class Expiration {
$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 fc27e97eeaf..5a4b25f0ccd 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 9970279553b..7aaa9c08392 100644
--- a/apps/files_versions/lib/Listener/LegacyRollbackListener.php
+++ b/apps/files_versions/lib/Listener/LegacyRollbackListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 92b6c9c692a..d9b66b02ad6 100644
--- a/apps/files_versions/lib/Listener/LoadAdditionalListener.php
+++ b/apps/files_versions/lib/Listener/LoadAdditionalListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 249c11ca488..ba6c487a7a4 100644
--- a/apps/files_versions/lib/Listener/LoadSidebarListener.php
+++ b/apps/files_versions/lib/Listener/LoadSidebarListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32189608fc1..7a557ba8ddc 100644
--- a/apps/files_versions/lib/Listener/VersionAuthorListener.php
+++ b/apps/files_versions/lib/Listener/VersionAuthorListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 37755aab6b3..a26a9c87455 100644
--- a/apps/files_versions/lib/Sabre/Plugin.php
+++ b/apps/files_versions/lib/Sabre/Plugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c340b0ca02..36825216b95 100644
--- a/apps/files_versions/lib/Sabre/RestoreFolder.php
+++ b/apps/files_versions/lib/Sabre/RestoreFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0e97b346626..7a7d704311a 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 cc2d7f1b983..8a5d5e7b3a2 100644
--- a/apps/files_versions/lib/Sabre/VersionCollection.php
+++ b/apps/files_versions/lib/Sabre/VersionCollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e75b3031bad..7346c77f1f9 100644
--- a/apps/files_versions/lib/Sabre/VersionFile.php
+++ b/apps/files_versions/lib/Sabre/VersionFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c2f256ad32..f04685b18b7 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 665ff3cc197..9481b7a5a24 100644
--- a/apps/files_versions/lib/Sabre/VersionRoot.php
+++ b/apps/files_versions/lib/Sabre/VersionRoot.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe9f91534fa..1a5598b766f 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -216,7 +216,6 @@ class Storage {
$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 abed50a388b..50960a1e6d9 100644
--- a/apps/files_versions/lib/Versions/BackendNotFoundException.php
+++ b/apps/files_versions/lib/Versions/BackendNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fefc038864f..77c015b6fe7 100644
--- a/apps/files_versions/lib/Versions/IDeletableVersionBackend.php
+++ b/apps/files_versions/lib/Versions/IDeletableVersionBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 30b421d4174..2093bce1986 100644
--- a/apps/files_versions/lib/Versions/IMetadataVersion.php
+++ b/apps/files_versions/lib/Versions/IMetadataVersion.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 79db85e460b..9428dd431bc 100644
--- a/apps/files_versions/lib/Versions/IMetadataVersionBackend.php
+++ b/apps/files_versions/lib/Versions/IMetadataVersionBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a470239f128..9d1485a6926 100644
--- a/apps/files_versions/lib/Versions/INameableVersion.php
+++ b/apps/files_versions/lib/Versions/INameableVersion.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d2ab7ed8135..c7614561d59 100644
--- a/apps/files_versions/lib/Versions/INameableVersionBackend.php
+++ b/apps/files_versions/lib/Versions/INameableVersionBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e52e2f8e8bc..634a0b8e711 100644
--- a/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php
+++ b/apps/files_versions/lib/Versions/INeedSyncVersionBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e5fd53d0157..daa03e94722 100644
--- a/apps/files_versions/lib/Versions/IVersion.php
+++ b/apps/files_versions/lib/Versions/IVersion.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 18f8c17f0ac..1d64454cde1 100644
--- a/apps/files_versions/lib/Versions/IVersionBackend.php
+++ b/apps/files_versions/lib/Versions/IVersionBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ecd424d0cc1..6154af35255 100644
--- a/apps/files_versions/lib/Versions/IVersionManager.php
+++ b/apps/files_versions/lib/Versions/IVersionManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 db9349328e9..2af727cbaf8 100644
--- a/apps/files_versions/lib/Versions/IVersionsImporterBackend.php
+++ b/apps/files_versions/lib/Versions/IVersionsImporterBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3ae5d2742d..59a52a7f47a 100644
--- a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php
+++ b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php
@@ -331,7 +331,6 @@ class LegacyVersionsBackend implements IVersionBackend, IDeletableVersionBackend
$this->versionsMapper->update($versionEntity);
}
-
/**
* @inheritdoc
*/
diff --git a/apps/files_versions/lib/Versions/Version.php b/apps/files_versions/lib/Versions/Version.php
index 2d05e97af57..fee72cb3069 100644
--- a/apps/files_versions/lib/Versions/Version.php
+++ b/apps/files_versions/lib/Versions/Version.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a676268fda5..2e91a063b70 100644
--- a/apps/files_versions/lib/Versions/VersionManager.php
+++ b/apps/files_versions/lib/Versions/VersionManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 446b62f145d..d671b49cc6b 100644
--- a/apps/files_versions/tests/Command/CleanupTest.php
+++ b/apps/files_versions/tests/Command/CleanupTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CleanupTest extends TestCase {
];
}
-
/**
* 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 030e7a1b98a..4889ac9a5f2 100644
--- a/apps/files_versions/tests/Command/ExpireTest.php
+++ b/apps/files_versions/tests/Command/ExpireTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 252b7218b62..c9c815959cf 100644
--- a/apps/files_versions/tests/ExpirationTest.php
+++ b/apps/files_versions/tests/ExpirationTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ExpirationTest extends \Test\TestCase {
$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 d5720da9881..efe3f8ce7e2 100644
--- a/apps/files_versions/tests/GetAutoExpireListTest.php
+++ b/apps/files_versions/tests/GetAutoExpireListTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class GetAutoExpireListTest extends TestCase {
];
}
-
#[\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 f9ed28e16d9..35f60d4afe8 100644
--- a/apps/files_versions/tests/StorageTest.php
+++ b/apps/files_versions/tests/StorageTest.php
@@ -43,7 +43,6 @@ class StorageTest extends TestCase {
$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 fdc37016b55..d627eb48f37 100644
--- a/apps/files_versions/tests/VersioningTest.php
+++ b/apps/files_versions/tests/VersioningTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\Files_Versions\Tests;
use OC\AllConfig;
@@ -284,7 +285,6 @@ class VersioningTest extends \Test\TestCase {
[],
0
]
-
];
}
@@ -399,7 +399,6 @@ class VersioningTest extends \Test\TestCase {
$this->assertTrue($this->rootView->file_exists($v2Renamed));
}
-
public function testMoveFileIntoSharedFolderAsRecipient(): void {
Filesystem::mkdir('folder1');
$fileInfo = Filesystem::getFileInfo('folder1');
@@ -634,7 +633,6 @@ class VersioningTest extends \Test\TestCase {
$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 623b18c9044..4be522d5fa9 100644
--- a/apps/files_versions/tests/Versions/VersionManagerTest.php
+++ b/apps/files_versions/tests/Versions/VersionManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d09b36a70c4..18a5b518f43 100644
--- a/apps/lookup_server_connector/lib/AppInfo/Application.php
+++ b/apps/lookup_server_connector/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 981a58c1e94..233eb119713 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dac3e8a80fa..5d2d630fe61 100644
--- a/apps/lookup_server_connector/lib/UpdateLookupServer.php
+++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 876cbc36514..14d26c87381 100644
--- a/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php
+++ b/apps/oauth2/lib/BackgroundJob/CleanupExpiredAuthorizationCode.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 b41e3ebdbf8..69d65ea2dbf 100644
--- a/apps/oauth2/lib/Controller/LoginRedirectorController.php
+++ b/apps/oauth2/lib/Controller/LoginRedirectorController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b194674dfac..719f74b5b15 100644
--- a/apps/oauth2/lib/Controller/OauthApiController.php
+++ b/apps/oauth2/lib/Controller/OauthApiController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7cd8e8655dc..2bcc272be90 100644
--- a/apps/oauth2/lib/Controller/SettingsController.php
+++ b/apps/oauth2/lib/Controller/SettingsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 20273718925..e0cadbc0a47 100644
--- a/apps/oauth2/lib/Db/AccessToken.php
+++ b/apps/oauth2/lib/Db/AccessToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 39dc77cea6b..fa13d4fd7d2 100644
--- a/apps/oauth2/lib/Db/AccessTokenMapper.php
+++ b/apps/oauth2/lib/Db/AccessTokenMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b121951993c..e87266e7066 100644
--- a/apps/oauth2/lib/Db/Client.php
+++ b/apps/oauth2/lib/Db/Client.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c5ca2989d0f..c9c261aa1ee 100644
--- a/apps/oauth2/lib/Db/ClientMapper.php
+++ b/apps/oauth2/lib/Db/ClientMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 809598e258e..8dfa3e43d94 100644
--- a/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php
+++ b/apps/oauth2/lib/Exceptions/AccessTokenNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cec7a24e22d..7d6c48eda91 100644
--- a/apps/oauth2/lib/Exceptions/ClientNotFoundException.php
+++ b/apps/oauth2/lib/Exceptions/ClientNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb852c3ec42..edf36331376 100644
--- a/apps/oauth2/lib/Migration/SetTokenExpiration.php
+++ b/apps/oauth2/lib/Migration/SetTokenExpiration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eeecbd6001b..46ac0a40347 100644
--- a/apps/oauth2/lib/Migration/Version010401Date20181207190718.php
+++ b/apps/oauth2/lib/Migration/Version010401Date20181207190718.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a6d3849020f..ac203740ab5 100644
--- a/apps/oauth2/lib/Migration/Version010402Date20190107124745.php
+++ b/apps/oauth2/lib/Migration/Version010402Date20190107124745.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 465f72c352b..f667b23e607 100644
--- a/apps/oauth2/lib/Migration/Version011601Date20230522143227.php
+++ b/apps/oauth2/lib/Migration/Version011601Date20230522143227.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48492d79dd0..87233a09dfc 100644
--- a/apps/oauth2/lib/Migration/Version011602Date20230613160650.php
+++ b/apps/oauth2/lib/Migration/Version011602Date20230613160650.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 02c166ddac6..c2d1f2cab01 100644
--- a/apps/oauth2/lib/Migration/Version011603Date20230620111039.php
+++ b/apps/oauth2/lib/Migration/Version011603Date20230620111039.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1f5ce908a60..dd022c87451 100644
--- a/apps/oauth2/lib/Migration/Version011901Date20240829164356.php
+++ b/apps/oauth2/lib/Migration/Version011901Date20240829164356.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ac2f2418a66..68d580c79b2 100644
--- a/apps/oauth2/lib/Settings/Admin.php
+++ b/apps/oauth2/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 673c95ebcde..d3fd059b5a7 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 @@ class LoginRedirectorControllerTest extends TestCase {
->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 @@ class LoginRedirectorControllerTest extends TestCase {
$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 5ef86626cde..bc4275960d9 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 41db7fe595a..9a44f7e16f2 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 20765b7a701..6156cab095e 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 @@ class AccessTokenMapperTest extends TestCase {
$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 1b0a18710ec..ce1e31867a2 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 0f08bb30276..0060bc0dacf 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 ff2d3f86016..0e7ebace3b6 100644
--- a/apps/profile/lib/AppInfo/Application.php
+++ b/apps/profile/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 OCA\Profile\Reference\ProfilePickerReferenceProvider;
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 c43b9fe9d55..908bcdd28ce 100644
--- a/apps/profile/lib/Listener/ProfilePickerReferenceListener.php
+++ b/apps/profile/lib/Listener/ProfilePickerReferenceListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dbc34a28973..76c926176fc 100644
--- a/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php
+++ b/apps/profile/lib/Reference/ProfilePickerReferenceProvider.php
@@ -6,15 +6,14 @@ declare(strict_types=1);
* 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 dd56dcf80db..1ecee36806f 100644
--- a/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php
+++ b/apps/profile/tests/Reference/ProfilePickerReferenceProviderTest.php
@@ -16,7 +16,6 @@ use OCP\Collaboration\Reference\IReference;
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 deef1738c45..9efd66269cd 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 1297fcd2754..b2303d9261f 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 5f3f474ec7b..e5c9e13d0f9 100644
--- a/apps/provisioning_api/lib/Controller/AUserDataOCSController.php
+++ b/apps/provisioning_api/lib/Controller/AUserDataOCSController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c53e3c0091..ade9e8a73c8 100644
--- a/apps/provisioning_api/lib/Controller/AppConfigController.php
+++ b/apps/provisioning_api/lib/Controller/AppConfigController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 51d293aae04..aa37ee8ed45 100644
--- a/apps/provisioning_api/lib/Controller/AppsController.php
+++ b/apps/provisioning_api/lib/Controller/AppsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 62f639b48e4..b251610e67f 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8d668c64691..3697d6b36a2 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -343,8 +343,6 @@ class UsersController extends AUserDataOCSController {
]);
}
-
-
/**
* @NoSubAdminRequired
*
diff --git a/apps/provisioning_api/lib/Listener/UserDeletedListener.php b/apps/provisioning_api/lib/Listener/UserDeletedListener.php
index 2300ac19a60..dff12497f96 100644
--- a/apps/provisioning_api/lib/Listener/UserDeletedListener.php
+++ b/apps/provisioning_api/lib/Listener/UserDeletedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 771d29bbafb..3d4cfda5972 100644
--- a/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php
+++ b/apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 937590cde8e..f3184c48c11 100644
--- a/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
+++ b/apps/provisioning_api/lib/Middleware/ProvisioningApiMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 463d0f06498..9a1bfa874d9 100644
--- a/apps/provisioning_api/tests/CapabilitiesTest.php
+++ b/apps/provisioning_api/tests/CapabilitiesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 55885aabf0a..305eb29e88b 100644
--- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 aac589d9a15..2528138fd46 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 @@ class AppsControllerTest extends TestCase {
$this->assertEquals($expected, $result->getData());
}
-
public function testGetAppInfoOnBadAppID(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -100,7 +100,6 @@ class AppsControllerTest extends TestCase {
$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 129853d0c9b..2d5089ead80 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 @@ class GroupsControllerTest extends \Test\TestCase {
$this->assertEquals(['users' => ['user1', 'user2']], $result->getData());
}
-
public function testGetGroupAsIrrelevantSubadmin(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(403);
@@ -285,7 +284,6 @@ class GroupsControllerTest extends \Test\TestCase {
$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 @@ class GroupsControllerTest extends \Test\TestCase {
$this->api->getGroup($this->getUniqueID());
}
-
public function testGetSubAdminsOfGroupsNotExists(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Group does not exist');
@@ -343,7 +340,6 @@ class GroupsControllerTest extends \Test\TestCase {
$this->assertEquals([], $result->getData());
}
-
public function testAddGroupEmptyGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Invalid group name');
@@ -352,7 +348,6 @@ class GroupsControllerTest extends \Test\TestCase {
$this->api->addGroup('');
}
-
public function testAddGroupExistingGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(102);
@@ -397,7 +392,6 @@ class GroupsControllerTest extends \Test\TestCase {
$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 @@ class GroupsControllerTest extends \Test\TestCase {
$this->api->deleteGroup('NonExistingGroup');
}
-
public function testDeleteAdminGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(102);
@@ -497,7 +490,6 @@ class GroupsControllerTest extends \Test\TestCase {
->method('getSubAdminsGroups')
->willReturn([]);
-
$this->api->getGroupUsersDetails($gid);
}
@@ -542,7 +534,6 @@ class GroupsControllerTest extends \Test\TestCase {
->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 7ad501dffe8..20a0cf6bffc 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 @@ class UsersControllerTest extends TestCase {
$this->assertEquals($expected, $this->api->getDisabledUsersDetails('MyCustomSearch', 3)->getData());
}
-
public function testAddUserAlreadyExisting(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(102);
@@ -375,7 +373,6 @@ class UsersControllerTest extends TestCase {
$this->api->addUser('AlreadyExistingUser', 'password', '', '', []);
}
-
public function testAddUserNonExistingGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Group NonExistingGroup does not exist');
@@ -411,7 +408,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
));
}
-
public function testAddUserFailedToGenerateUserID(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Could not create non-existing user ID');
@@ -740,7 +735,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', []);
}
-
public function testAddUserAsSubAdminValidGroupNotSubAdmin(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Insufficient privileges for group ExistingGroup');
@@ -1066,7 +1057,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$this->assertEquals($expected, $this->invokePrivate($this->api, 'getUserData', ['UID']));
}
-
-
public function testGetUserDataAsSubAdminAndUserIsNotAccessible(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -2093,8 +2081,6 @@ class UsersControllerTest extends TestCase {
$this->assertEquals([], $this->api->editUser('UserToEdit', 'password', 'NewPassword')->getData());
}
-
-
public function testEditUserRegularUserSelfEditChangeQuota(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(113);
@@ -2175,8 +2161,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
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 @@ class UsersControllerTest extends TestCase {
$this->assertEquals([], $this->api->editUser('UserToEdit', 'quota', '3042824')->getData());
}
-
public function testEditUserSubadminUserInaccessible(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -2555,7 +2537,6 @@ class UsersControllerTest extends TestCase {
$this->api->editUser('UserToEdit', 'quota', 'value');
}
-
public function testUpdateUserAsAdminMultipleFields(): void {
$currentUser = $this->createMock(IUser::class);
$currentUser->method('getUID')->willReturn('admin');
@@ -2867,7 +2848,6 @@ class UsersControllerTest extends TestCase {
$this->assertSame(Http::STATUS_OK, $result->getStatus());
}
-
public function testDeleteUserNotExistingUser(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -2890,7 +2870,6 @@ class UsersControllerTest extends TestCase {
$this->api->deleteUser('UserToDelete');
}
-
public function testDeleteUserSelf(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -2951,7 +2930,6 @@ class UsersControllerTest extends TestCase {
$this->assertEquals([], $this->api->deleteUser('UserToDelete')->getData());
}
-
public function testDeleteUnsuccessfulUserAsAdmin(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -3032,7 +3010,6 @@ class UsersControllerTest extends TestCase {
$this->assertEquals([], $this->api->deleteUser('UserToDelete')->getData());
}
-
public function testDeleteUnsuccessfulUserAsSubadmin(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -3080,7 +3057,6 @@ class UsersControllerTest extends TestCase {
$this->api->deleteUser('UserToDelete');
}
-
public function testDeleteUserAsSubAdminAndUserIsNotAccessible(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -3124,7 +3100,6 @@ class UsersControllerTest extends TestCase {
$this->api->deleteUser('UserToDelete');
}
-
public function testGetUsersGroupsTargetUserNotExisting(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -3261,7 +3236,6 @@ class UsersControllerTest extends TestCase {
$this->assertEquals(['groups' => ['Group1']], $this->api->getUsersGroups('UserToLookup')->getData());
}
-
public function testGetUsersGroupsForSubAdminUserAndUserIsInaccessible(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -3310,7 +3284,6 @@ class UsersControllerTest extends TestCase {
$this->api->getUsersGroups('UserToLookup');
}
-
public function testAddToGroupWithTargetGroupNotExisting(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(102);
@@ -3323,7 +3296,6 @@ class UsersControllerTest extends TestCase {
$this->api->addToGroup('TargetUser', 'GroupToAddTo');
}
-
public function testAddToGroupWithNoGroupSpecified(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -3331,7 +3303,6 @@ class UsersControllerTest extends TestCase {
$this->api->addToGroup('TargetUser');
}
-
public function testAddToGroupWithTargetUserNotExisting(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(103);
@@ -3345,7 +3316,6 @@ class UsersControllerTest extends TestCase {
$this->api->addToGroup('TargetUser', 'GroupToAddTo');
}
-
public function testAddToGroupNoSubadmin(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(104);
@@ -3366,7 +3336,6 @@ class UsersControllerTest extends TestCase {
->with('GroupToAddTo')
->willReturn($targetGroup);
-
$subAdminManager = $this->createMock(SubAdmin::class);
$subAdminManager->expects($this->once())
->method('isSubAdminOfGroup')
@@ -3410,7 +3379,6 @@ class UsersControllerTest extends TestCase {
->with('GroupToAddTo')
->willReturn($targetGroup);
-
$subAdminManager = $this->createMock(SubAdmin::class);
$subAdminManager->expects($this->once())
->method('isSubAdminOfGroup')
@@ -3454,7 +3422,6 @@ class UsersControllerTest extends TestCase {
->with('GroupToAddTo')
->willReturn($targetGroup);
-
$subAdminManager = $this->createMock(SubAdmin::class);
$subAdminManager->expects($this->never())
->method('isSubAdminOfGroup');
@@ -3479,7 +3446,6 @@ class UsersControllerTest extends TestCase {
$this->assertEquals(new DataResponse(), $this->api->addToGroup('TargetUser', 'GroupToAddTo'));
}
-
public function testRemoveFromGroupWithNoTargetGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -3493,7 +3459,6 @@ class UsersControllerTest extends TestCase {
$this->api->removeFromGroup('TargetUser', '');
}
-
public function testRemoveFromGroupWithEmptyTargetGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(101);
@@ -3507,7 +3472,6 @@ class UsersControllerTest extends TestCase {
$this->api->removeFromGroup('TargetUser', '');
}
-
public function testRemoveFromGroupWithNotExistingTargetGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(102);
@@ -3526,7 +3490,6 @@ class UsersControllerTest extends TestCase {
$this->api->removeFromGroup('TargetUser', 'TargetGroup');
}
-
public function testRemoveFromGroupWithNotExistingTargetUser(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(103);
@@ -3551,7 +3514,6 @@ class UsersControllerTest extends TestCase {
$this->api->removeFromGroup('TargetUser', 'TargetGroup');
}
-
public function testRemoveFromGroupWithoutPermission(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(104);
@@ -3592,7 +3554,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$this->api->removeSubAdmin('NotExistingUser', 'GroupToDeleteFrom');
}
-
public function testRemoveSubAdminNotExistingTargetGroup(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Group does not exist');
@@ -3959,8 +3912,6 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$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 @@ class UsersControllerTest extends TestCase {
$this->assertSame($expected, $api->getUser('currentuser')->getData());
}
-
public function testResendWelcomeMessageWithNotExistingTargetUser(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -4297,7 +4244,6 @@ class UsersControllerTest extends TestCase {
$this->api->resendWelcomeMessage('NotExistingUser');
}
-
public function testResendWelcomeMessageAsSubAdminAndUserIsNotAccessible(): void {
$this->expectException(OCSException::class);
$this->expectExceptionCode(998);
@@ -4342,7 +4288,6 @@ class UsersControllerTest extends TestCase {
$this->api->resendWelcomeMessage('UserToGet');
}
-
public function testResendWelcomeMessageNoEmail(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Email address not available');
@@ -4387,7 +4332,6 @@ class UsersControllerTest extends TestCase {
$this->api->resendWelcomeMessage('UserToGet');
}
-
public function testResendWelcomeMessageNullEmail(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Email address not available');
@@ -4534,7 +4478,6 @@ class UsersControllerTest extends TestCase {
$this->api->resendWelcomeMessage('UserToGet');
}
-
public function testResendWelcomeMessageFailed(): void {
$this->expectException(OCSException::class);
$this->expectExceptionMessage('Sending email failed');
@@ -4592,7 +4535,6 @@ class UsersControllerTest extends TestCase {
$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 0b55424a255..15760f21e16 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 b69da0b76eb..c2bab1d23fd 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 8abaeaa0834..38e6b9fd139 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 98b672f3f55..4a2f2054781 100644
--- a/apps/settings/lib/Activity/GroupSetting.php
+++ b/apps/settings/lib/Activity/GroupSetting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6489833de3..4b19366163a 100644
--- a/apps/settings/lib/Activity/Provider.php
+++ b/apps/settings/lib/Activity/Provider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8bb40a170f2..108bc36a4b8 100644
--- a/apps/settings/lib/Activity/SecurityFilter.php
+++ b/apps/settings/lib/Activity/SecurityFilter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3b6c121439e..bcad6566269 100644
--- a/apps/settings/lib/Activity/SecurityProvider.php
+++ b/apps/settings/lib/Activity/SecurityProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a3ada47b47d..e3c4b96c65a 100644
--- a/apps/settings/lib/Activity/SecuritySetting.php
+++ b/apps/settings/lib/Activity/SecuritySetting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 85a4efe3971..00cfab54f20 100644
--- a/apps/settings/lib/Activity/Setting.php
+++ b/apps/settings/lib/Activity/Setting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed746572ff4..bbabb2534ec 100644
--- a/apps/settings/lib/AppInfo/Application.php
+++ b/apps/settings/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f4eb595aabf..4bef610f266 100644
--- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php
+++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class VerifyUserData extends Job {
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 25fc8abcf8e..da8c0c1b63b 100644
--- a/apps/settings/lib/Command/AdminDelegation/Add.php
+++ b/apps/settings/lib/Command/AdminDelegation/Add.php
@@ -5,6 +5,7 @@ declare(strict_types = 1);
* 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 c04d25744e7..f9386e4d3c8 100644
--- a/apps/settings/lib/Command/AdminDelegation/Remove.php
+++ b/apps/settings/lib/Command/AdminDelegation/Remove.php
@@ -5,6 +5,7 @@ declare(strict_types = 1);
* 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 633888c5b6e..7b5f8309950 100644
--- a/apps/settings/lib/Command/AdminDelegation/Show.php
+++ b/apps/settings/lib/Command/AdminDelegation/Show.php
@@ -5,6 +5,7 @@ declare(strict_types = 1);
* 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 a47f7cb45d1..ca4b6018b00 100644
--- a/apps/settings/lib/ConfigLexicon.php
+++ b/apps/settings/lib/ConfigLexicon.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 512afe9d3fd..891f428fa6d 100644
--- a/apps/settings/lib/Controller/AISettingsController.php
+++ b/apps/settings/lib/Controller/AISettingsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 15e2c392148..cd02d68ec38 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 dc7fa2ebd82..afdc13b7625 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 3ff16b61612..0eaed675667 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 f54b1d63aab..b0b240bd855 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 @@ Raw output
$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 05bff158ee6..e5e70998cd6 100644
--- a/apps/settings/lib/Controller/HelpController.php
+++ b/apps/settings/lib/Controller/HelpController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4f4986122d2..80083e73e7b 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 9fb3266c899..d9333e6122c 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 340ca3f93eb..be74b2ed0c7 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 91d0a8640d1..f96797695a0 100644
--- a/apps/settings/lib/Controller/ReasonsController.php
+++ b/apps/settings/lib/Controller/ReasonsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9ef62047f47..cf8933ecb5c 100644
--- a/apps/settings/lib/Controller/TwoFactorSettingsController.php
+++ b/apps/settings/lib/Controller/TwoFactorSettingsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 edaad01e42c..19da07e854b 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -95,7 +95,6 @@ class UsersController extends Controller {
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 495b58e6a4b..1f2f1e0ceb2 100644
--- a/apps/settings/lib/Controller/WebAuthnController.php
+++ b/apps/settings/lib/Controller/WebAuthnController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b5feeffe30a..cecf0fea2cd 100644
--- a/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php
+++ b/apps/settings/lib/Events/BeforeTemplateRenderedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 510eed6dd43..09187d3c902 100644
--- a/apps/settings/lib/Hooks.php
+++ b/apps/settings/lib/Hooks.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Hooks implements IEventListener {
$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 @@ class Hooks implements IEventListener {
}
$this->activityManager->publish($event);
-
if ($oldMailAddress !== null) {
$template = $this->mailer->createEMailTemplate('settings.EmailChanged', [
'displayname' => $user->getDisplayName(),
@@ -185,7 +184,6 @@ class Hooks implements IEventListener {
}
$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 138cfeeb8c6..72310feef17 100644
--- a/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php
+++ b/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a46e14d5bb..4d64e37f0b3 100644
--- a/apps/settings/lib/Listener/GroupRemovedListener.php
+++ b/apps/settings/lib/Listener/GroupRemovedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c0925b6a3d8..cad0cfd3e1a 100644
--- a/apps/settings/lib/Listener/MailProviderListener.php
+++ b/apps/settings/lib/Listener/MailProviderListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4e76478b897..648b7d82f5a 100644
--- a/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php
+++ b/apps/settings/lib/Listener/UserAddedToGroupActivityListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UserAddedToGroupActivityListener implements IEventListener {
$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 b8fedc0975c..51e829925e9 100644
--- a/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php
+++ b/apps/settings/lib/Listener/UserRemovedFromGroupActivityListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UserRemovedFromGroupActivityListener implements IEventListener {
$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 202495a020e..217efaad00b 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 b68768a2bac..ee9073ea148 100644
--- a/apps/settings/lib/Search/SectionSearch.php
+++ b/apps/settings/lib/Search/SectionSearch.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 79c8a6c1990..3218bbbbf6b 100644
--- a/apps/settings/lib/Search/UserSearch.php
+++ b/apps/settings/lib/Search/UserSearch.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 392e0695269..1c456f3a7bf 100644
--- a/apps/settings/lib/Sections/Admin/Additional.php
+++ b/apps/settings/lib/Sections/Admin/Additional.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3d819a86090..35c5371521f 100644
--- a/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php
+++ b/apps/settings/lib/Sections/Admin/ArtificialIntelligence.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 146058c3f9b..7b6a654310a 100644
--- a/apps/settings/lib/Sections/Admin/Delegation.php
+++ b/apps/settings/lib/Sections/Admin/Delegation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8bc6ed81b8e..563a7f5e740 100644
--- a/apps/settings/lib/Sections/Admin/Groupware.php
+++ b/apps/settings/lib/Sections/Admin/Groupware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5926f178519..b922fdfdee1 100644
--- a/apps/settings/lib/Sections/Admin/Overview.php
+++ b/apps/settings/lib/Sections/Admin/Overview.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 479f87de078..7f138a4d5ad 100644
--- a/apps/settings/lib/Sections/Admin/Presets.php
+++ b/apps/settings/lib/Sections/Admin/Presets.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 687fa1ae446..99da554ce2e 100644
--- a/apps/settings/lib/Sections/Admin/Security.php
+++ b/apps/settings/lib/Sections/Admin/Security.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fcf1b7bd873..26c7530f08b 100644
--- a/apps/settings/lib/Sections/Admin/Server.php
+++ b/apps/settings/lib/Sections/Admin/Server.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1c8aa624ada..e5b44600962 100644
--- a/apps/settings/lib/Sections/Admin/Sharing.php
+++ b/apps/settings/lib/Sections/Admin/Sharing.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 15c101e82d1..4273aaaed89 100644
--- a/apps/settings/lib/Sections/Personal/PersonalInfo.php
+++ b/apps/settings/lib/Sections/Personal/PersonalInfo.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fa32c1a9cbf..d16c1ac433a 100644
--- a/apps/settings/lib/Sections/Personal/Security.php
+++ b/apps/settings/lib/Sections/Personal/Security.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 349358c2a26..ff2044d9776 100644
--- a/apps/settings/lib/Sections/Personal/SyncClients.php
+++ b/apps/settings/lib/Sections/Personal/SyncClients.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 51eae61670e..f068a6e065c 100644
--- a/apps/settings/lib/Service/AuthorizedGroupService.php
+++ b/apps/settings/lib/Service/AuthorizedGroupService.php
@@ -6,11 +6,11 @@ declare(strict_types=1);
* 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 9dbd5aa2993..933970a834f 100644
--- a/apps/settings/lib/Service/ConflictException.php
+++ b/apps/settings/lib/Service/ConflictException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b72779349a9..48dfa84da54 100644
--- a/apps/settings/lib/Service/NotFoundException.php
+++ b/apps/settings/lib/Service/NotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a9ef5f87627..6b84fb1d139 100644
--- a/apps/settings/lib/Service/ServiceException.php
+++ b/apps/settings/lib/Service/ServiceException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 702dcb4a620..9674809778f 100644
--- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
+++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ArtificialIntelligence implements IDelegatedSettings {
$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 19efa169267..2ec23954024 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 353abb95377..5264e521b08 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 a1badb5d5b9..6a451ca48dd 100644
--- a/apps/settings/lib/Settings/Admin/MailProvider.php
+++ b/apps/settings/lib/Settings/Admin/MailProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7cc37537de4..3d39b0eeec4 100644
--- a/apps/settings/lib/Settings/Admin/Overview.php
+++ b/apps/settings/lib/Settings/Admin/Overview.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f629beca447..77dd3fb5422 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 9cd375972d9..871dda325d8 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 b38234361a4..51f05ca5648 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 d4ebf1fedd0..fdc3ba9b9f3 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 d4be223d4f5..28c3f47d344 100644
--- a/apps/settings/lib/Settings/Personal/Additional.php
+++ b/apps/settings/lib/Settings/Personal/Additional.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7503637e669..f5cf7014603 100644
--- a/apps/settings/lib/Settings/Personal/Security/Authtokens.php
+++ b/apps/settings/lib/Settings/Personal/Security/Authtokens.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 599eb203f76..4835015d0c1 100644
--- a/apps/settings/lib/Settings/Personal/Security/Password.php
+++ b/apps/settings/lib/Settings/Personal/Security/Password.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 06883d762d9..a9d14ea96d1 100644
--- a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
+++ b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8ead56dc83a..b91cc82757f 100644
--- a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
+++ b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 be4137b5593..f1f7ac0f4ef 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 46e6e1bfdf0..daeb14857ae 100644
--- a/apps/settings/lib/SetupChecks/AllowedAdminRanges.php
+++ b/apps/settings/lib/SetupChecks/AllowedAdminRanges.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cedbd6a6205..cf893ae50dc 100644
--- a/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php
+++ b/apps/settings/lib/SetupChecks/AppDirsWithDifferentOwner.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 34c5348dabd..c02e8eba3b7 100644
--- a/apps/settings/lib/SetupChecks/CheckUserCertificates.php
+++ b/apps/settings/lib/SetupChecks/CheckUserCertificates.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 89251f15a26..ae99d70d8b4 100644
--- a/apps/settings/lib/SetupChecks/CodeIntegrity.php
+++ b/apps/settings/lib/SetupChecks/CodeIntegrity.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a49fdef4b84..f168b707f9f 100644
--- a/apps/settings/lib/SetupChecks/DataDirectoryProtected.php
+++ b/apps/settings/lib/SetupChecks/DataDirectoryProtected.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DataDirectoryProtected implements ISetupCheck {
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 83d1fa4ad33..00a21c56582 100644
--- a/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php
+++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingColumns.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df0ff70aa0f..74a5840daac 100644
--- a/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php
+++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingIndices.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a5a342c096..57b22996027 100644
--- a/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php
+++ b/apps/settings/lib/SetupChecks/DatabaseHasMissingPrimaryKeys.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4635d76d838..dc73f2fd393 100644
--- a/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php
+++ b/apps/settings/lib/SetupChecks/DatabasePendingBigIntConversions.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f916b2a35f..d1dbd2cc838 100644
--- a/apps/settings/lib/SetupChecks/DebugMode.php
+++ b/apps/settings/lib/SetupChecks/DebugMode.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70c3fc8361e..09c277d14ac 100644
--- a/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php
+++ b/apps/settings/lib/SetupChecks/DefaultPhoneRegionSet.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 432a388c4ca..38286e70499 100644
--- a/apps/settings/lib/SetupChecks/InternetConnectivity.php
+++ b/apps/settings/lib/SetupChecks/InternetConnectivity.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 de3cf231fc7..aac3a71d03a 100644
--- a/apps/settings/lib/SetupChecks/JavaScriptModules.php
+++ b/apps/settings/lib/SetupChecks/JavaScriptModules.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class JavaScriptModules implements ISetupCheck {
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 a1b4d0d89de..3ebae231f41 100644
--- a/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php
+++ b/apps/settings/lib/SetupChecks/JavaScriptSourceMaps.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cb752f01385..95c09293866 100644
--- a/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php
+++ b/apps/settings/lib/SetupChecks/LegacySSEKeyFormat.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e0b8809ea62..30eaa2303e1 100644
--- a/apps/settings/lib/SetupChecks/LoggingLevel.php
+++ b/apps/settings/lib/SetupChecks/LoggingLevel.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2016a4f1345..ce8814a8ae7 100644
--- a/apps/settings/lib/SetupChecks/MemcacheConfigured.php
+++ b/apps/settings/lib/SetupChecks/MemcacheConfigured.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2b5ad98d5fc..ae12f3f5228 100644
--- a/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php
+++ b/apps/settings/lib/SetupChecks/MimeTypeMigrationAvailable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7eaee90afe9..d7d18ad30de 100644
--- a/apps/settings/lib/SetupChecks/MysqlRowFormat.php
+++ b/apps/settings/lib/SetupChecks/MysqlRowFormat.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86bee1f30ce..2b0a2e3a230 100644
--- a/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php
+++ b/apps/settings/lib/SetupChecks/MysqlUnicodeSupport.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f839585a345..8cbdf07861b 100644
--- a/apps/settings/lib/SetupChecks/OcxProviders.php
+++ b/apps/settings/lib/SetupChecks/OcxProviders.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 140ab627bee..04e536bfe38 100644
--- a/apps/settings/lib/SetupChecks/PhpDefaultCharset.php
+++ b/apps/settings/lib/SetupChecks/PhpDefaultCharset.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f18a145b10b..ca2926c697b 100644
--- a/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php
+++ b/apps/settings/lib/SetupChecks/PhpDisabledFunctions.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 33458ff96bd..c451a694eda 100644
--- a/apps/settings/lib/SetupChecks/PhpGetEnv.php
+++ b/apps/settings/lib/SetupChecks/PhpGetEnv.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4ee4d9165cc..e21226d48b8 100644
--- a/apps/settings/lib/SetupChecks/PhpModules.php
+++ b/apps/settings/lib/SetupChecks/PhpModules.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b1ee390b9cf..d84e758c3c8 100644
--- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
+++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f594d14b4c2..f98b0edabc8 100644
--- a/apps/settings/lib/SetupChecks/PhpOutputBuffering.php
+++ b/apps/settings/lib/SetupChecks/PhpOutputBuffering.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f66bce7a57..da80e430397 100644
--- a/apps/settings/lib/SetupChecks/PushService.php
+++ b/apps/settings/lib/SetupChecks/PushService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5280d7fe9d9..20c0c740fec 100644
--- a/apps/settings/lib/SetupChecks/RandomnessSecure.php
+++ b/apps/settings/lib/SetupChecks/RandomnessSecure.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86efabff060..7200895e4da 100644
--- a/apps/settings/lib/SetupChecks/ReadOnlyConfig.php
+++ b/apps/settings/lib/SetupChecks/ReadOnlyConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 237143bbc39..dcfb38e8efb 100644
--- a/apps/settings/lib/SetupChecks/SchedulingTableSize.php
+++ b/apps/settings/lib/SetupChecks/SchedulingTableSize.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 46bb41f47f1..618f5d9c15c 100644
--- a/apps/settings/lib/SetupChecks/ServerIdConfig.php
+++ b/apps/settings/lib/SetupChecks/ServerIdConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf017aaec58..cf5c949c0ce 100644
--- a/apps/settings/lib/SetupChecks/SupportedDatabase.php
+++ b/apps/settings/lib/SetupChecks/SupportedDatabase.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d4aa3db94b0..e75c2dc3866 100644
--- a/apps/settings/lib/SetupChecks/TempSpaceAvailable.php
+++ b/apps/settings/lib/SetupChecks/TempSpaceAvailable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ce2e32d2a74..01ba2fe35b2 100644
--- a/apps/settings/lib/SetupChecks/Woff2Loading.php
+++ b/apps/settings/lib/SetupChecks/Woff2Loading.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 993d770fe6e..842ea7b6992 100644
--- a/apps/settings/lib/UserMigration/AccountMigrator.php
+++ b/apps/settings/lib/UserMigration/AccountMigrator.php
@@ -30,7 +30,6 @@ use Throwable;
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 c581962a795..6207dc2d8a8 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}
{linkclose}
{blueskyopen}
{linkclose}
diff --git a/apps/settings/tests/Activity/SecurityFilterTest.php b/apps/settings/tests/Activity/SecurityFilterTest.php
index b07c1e825b4..24b321e74fe 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 3f7fe468da3..da8c9e621bc 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 ca11e38caa8..d5ff004b2dc 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 de73622f812..7da1c11c241 100644
--- a/apps/settings/tests/AppInfo/ApplicationTest.php
+++ b/apps/settings/tests/AppInfo/ApplicationTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ce4f983bbbd..e27b4b640e6 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 805e810144a..c2e20fdf8ad 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 @@ class AuthSettingsControllerTest extends TestCase {
$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 1582fe3f371..82bce109c99 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 @@ class CheckSetupControllerTest extends TestCase {
$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 c4cbe67466b..3ccd8fc085b 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 6064e76058a..eadb9cce4fb 100644
--- a/apps/settings/tests/Controller/MailSettingsControllerTest.php
+++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9f8d53d4f9f..c743cf53d81 100644
--- a/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php
+++ b/apps/settings/tests/Controller/TwoFactorSettingsControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ce8de5498d9..39a4dbc42c0 100644
--- a/apps/settings/tests/Controller/UsersControllerTest.php
+++ b/apps/settings/tests/Controller/UsersControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UsersControllerTest extends \Test\TestCase {
'JOHN@example.com',
null
],
-
];
}
@@ -834,7 +834,6 @@ class UsersControllerTest extends \Test\TestCase {
$this->invokePrivate($controller, 'saveUserSettings', [$userAccount]);
}
-
public static function dataTestSaveUserSettingsException(): array {
return [
[
@@ -867,7 +866,6 @@ class UsersControllerTest extends \Test\TestCase {
false,
false
],
-
];
}
diff --git a/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php b/apps/settings/tests/Integration/DuplicateAssignmentIntegrationTest.php
index 43ba37c5d07..e5283359916 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 f352a2b733d..395bef17f75 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 489359c3469..371af677340 100644
--- a/apps/settings/tests/Middleware/SubadminMiddlewareTest.php
+++ b/apps/settings/tests/Middleware/SubadminMiddlewareTest.php
@@ -58,7 +58,6 @@ class SubadminMiddlewareTest extends \Test\TestCase {
->willReturn($this->createMock(IUser::class));
}
-
public function testBeforeControllerAsUserWithoutAnnotation(): void {
$this->expectException(NotAdminException::class);
@@ -83,7 +82,6 @@ class SubadminMiddlewareTest extends \Test\TestCase {
$this->subadminMiddleware->beforeController($this->controller, 'foo');
}
-
public function testBeforeControllerWithAnnotation(): void {
$this->reflector
->expects($this->once())
@@ -126,7 +124,6 @@ class SubadminMiddlewareTest extends \Test\TestCase {
$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 4030222dde8..5d83f4d97fe 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 c27e5c99926..0d708fa4d79 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 b99e3c1f2a9..a6456f68bd5 100644
--- a/apps/settings/tests/Settings/Admin/ServerTest.php
+++ b/apps/settings/tests/Settings/Admin/ServerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ab11e40ce6..df4af61f4b9 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 4935212fb49..9ba738c60e2 100644
--- a/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php
+++ b/apps/settings/tests/Settings/Personal/Security/AuthtokensTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 34a4b8e296f..155b041d3af 100644
--- a/apps/settings/tests/Settings/Personal/Security/PasswordTest.php
+++ b/apps/settings/tests/Settings/Personal/Security/PasswordTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dcff37a1815..411cbdd1893 100644
--- a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php
+++ b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4dd54a644f5..262bd264bbb 100644
--- a/apps/settings/tests/SetupChecks/CodeIntegrityTest.php
+++ b/apps/settings/tests/SetupChecks/CodeIntegrityTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2b5bb1b6c8a..5d78c3d4b7f 100644
--- a/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php
+++ b/apps/settings/tests/SetupChecks/DataDirectoryProtectedTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 92896af868d..ebc569826c7 100644
--- a/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php
+++ b/apps/settings/tests/SetupChecks/ForwardedForHeadersTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 feeee792a34..f2437f0a288 100644
--- a/apps/settings/tests/SetupChecks/LoggingLevelTest.php
+++ b/apps/settings/tests/SetupChecks/LoggingLevelTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 65afa181307..3a41088af81 100644
--- a/apps/settings/tests/SetupChecks/OcxProvicersTest.php
+++ b/apps/settings/tests/SetupChecks/OcxProvicersTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3722346219a..29e89414ed2 100644
--- a/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php
+++ b/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 de509347044..eaf90583da5 100644
--- a/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php
+++ b/apps/settings/tests/SetupChecks/PhpOutputBufferingTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9a6abe82b6d..7dc4dd970db 100644
--- a/apps/settings/tests/SetupChecks/SecurityHeadersTest.php
+++ b/apps/settings/tests/SetupChecks/SecurityHeadersTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f63326e7821..fd31ab733ca 100644
--- a/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php
+++ b/apps/settings/tests/SetupChecks/SupportedDatabaseTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7ff272e86bc..67fd0d81e1c 100644
--- a/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php
+++ b/apps/settings/tests/SetupChecks/TaskProcessingPickupSpeedTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8c78cd6937d..4b3b3e24215 100644
--- a/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php
+++ b/apps/settings/tests/SetupChecks/TaskProcessingSuccessRateTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 43df9e599b6..2d2278e5ced 100644
--- a/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php
+++ b/apps/settings/tests/SetupChecks/TaskProcessingWorkerIsRunningTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6eca345b40..b2f764400cc 100644
--- a/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php
+++ b/apps/settings/tests/SetupChecks/WellKnownUrlsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0938f36c48c..b053dae82cc 100644
--- a/apps/settings/tests/UserMigration/AccountMigratorTest.php
+++ b/apps/settings/tests/UserMigration/AccountMigratorTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 6f0edfe95be..d482a92c337 100644
--- a/apps/sharebymail/lib/AppInfo/Application.php
+++ b/apps/sharebymail/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 afc0bd70482..8d02e3646c0 100644
--- a/apps/sharebymail/lib/Capabilities.php
+++ b/apps/sharebymail/lib/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99849ae323b..c9e997a7743 100644
--- a/apps/sharebymail/lib/Settings/Admin.php
+++ b/apps/sharebymail/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d487bd2ac43..00480380d2b 100644
--- a/apps/sharebymail/lib/Settings/SettingsManager.php
+++ b/apps/sharebymail/lib/Settings/SettingsManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12fb4158413..af92c13e987 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 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
}
}
-
/**
* publish activity if a file/folder was shared by mail
*/
@@ -512,7 +512,6 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
protected function sendNote(IShare $share): void {
$recipient = $share->getSharedWith();
-
$filename = $share->getNode()->getName();
$initiator = $share->getSharedBy();
$note = $share->getNote();
@@ -962,7 +961,6 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
}
$cursor->closeCursor();
-
return $shares;
}
diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php
index 7327e679533..7198051a6f6 100644
--- a/apps/sharebymail/tests/CapabilitiesTest.php
+++ b/apps/sharebymail/tests/CapabilitiesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 aa42a9ccc63..300bf7c94d0 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ShareByMailProviderTest extends TestCase {
$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 @@ class ShareByMailProviderTest extends TestCase {
$expiration = new \DateTime();
$passwordExpirationTime = new \DateTime();
-
$instance = $this->getInstance();
$id = $this->invokePrivate(
$instance,
@@ -777,7 +776,6 @@ class ShareByMailProviderTest extends TestCase {
$token = 'token';
$note = 'personal note';
-
$instance = $this->getInstance();
$id = $this->createDummyShare($itemType, $itemSource, $shareWith, $sharedBy, $uidOwner, $permissions, $token, $note);
@@ -906,7 +904,6 @@ class ShareByMailProviderTest extends TestCase {
$this->assertInstanceOf('OCP\Share\IShare', $result);
}
-
public function testGetShareByIdFailed(): void {
$this->expectException(ShareNotFound::class);
@@ -937,7 +934,6 @@ class ShareByMailProviderTest extends TestCase {
$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 @@ class ShareByMailProviderTest extends TestCase {
$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 @@ class ShareByMailProviderTest extends TestCase {
$this->assertTrue(is_array($before));
$this->assertSame(2, count($before));
-
$instance = $this->getInstance();
$instance->userDeleted($uidOwner, IShare::TYPE_EMAIL);
@@ -1116,7 +1109,6 @@ class ShareByMailProviderTest extends TestCase {
$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 93e3f102c94..4901f81b8cf 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 @@ class Listener {
}
}
-
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 605c3b7c282..6103571aabc 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 b3a3e6b4477..eff7d9b1c2f 100644
--- a/apps/systemtags/lib/Activity/Setting.php
+++ b/apps/systemtags/lib/Activity/Setting.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 442a14ac662..a6e41d34ca6 100644
--- a/apps/systemtags/lib/AppInfo/Application.php
+++ b/apps/systemtags/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 092a74ae635..942537790f3 100644
--- a/apps/systemtags/lib/Capabilities.php
+++ b/apps/systemtags/lib/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 617c502d5c6..e3a31837479 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 7491b1bdc49..30ec26d09f7 100644
--- a/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php
+++ b/apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e868b206544..9bba83adcda 100644
--- a/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php
+++ b/apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 196e01cf58d..0876999f4a6 100644
--- a/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php
+++ b/apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 edce457adbc..9d6b3ee35fa 100644
--- a/apps/systemtags/lib/Search/TagSearchProvider.php
+++ b/apps/systemtags/lib/Search/TagSearchProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e994eef6fa7..8825efc4da3 100644
--- a/apps/systemtags/lib/Settings/Admin.php
+++ b/apps/systemtags/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ffbe8850dfc..66943a5cd9d 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 ef5fa7ec885..f04724f8070 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 3590c3fcb9a..975f76c84b7 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 756adba4cde..9b8dac98e39 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 1b38666e51c..9b250c859ac 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 edc66d012ee..095f452e2b2 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 d3700b69858..2b098f6545e 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 4bb6b67dd53..7e9fbc64c87 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 145e58a5617..a3418c80598 100644
--- a/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php
+++ b/apps/testing/lib/Listener/GetDeclarativeSettingsValueListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 dc08335bcb5..396fa707803 100644
--- a/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php
+++ b/apps/testing/lib/Listener/RegisterDeclarativeSettingsListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 554bda6f436..b41c219fcdc 100644
--- a/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php
+++ b/apps/testing/lib/Listener/SetDeclarativeSettingsValueListener.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 6792c6543c3..62de8b48e47 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 08529bd0803..37b21167264 100644
--- a/apps/testing/lib/Provider/FakeTextProcessingProvider.php
+++ b/apps/testing/lib/Provider/FakeTextProcessingProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0585a15bc45..b331c15c600 100644
--- a/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php
+++ b/apps/testing/lib/Provider/FakeTextProcessingProviderSync.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6455710fc6d..89faac69f1f 100644
--- a/apps/testing/lib/Provider/FakeTranslationProvider.php
+++ b/apps/testing/lib/Provider/FakeTranslationProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9a5a094d456..4fd9275ba87 100644
--- a/apps/testing/lib/Settings/DeclarativeSettingsForm.php
+++ b/apps/testing/lib/Settings/DeclarativeSettingsForm.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 359c84580e6..fe257f648bf 100644
--- a/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php
+++ b/apps/testing/lib/TaskProcessing/FakeTextToTextSummaryProvider.php
@@ -6,7 +6,6 @@ declare(strict_types=1);
* 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 f7d792e099b..df74503e2bc 100644
--- a/apps/theming/lib/AppInfo/Application.php
+++ b/apps/theming/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c99b4ff87ca..9d4847f58b0 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 efdb738988d..14f8e1d5f04 100644
--- a/apps/theming/lib/Command/UpdateConfig.php
+++ b/apps/theming/lib/Command/UpdateConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UpdateConfig extends Command {
);
}
-
#[\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 df312133ebf..63a2d37383c 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 bbd598a2c28..abe9b7f4887 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 770f2ca922f..fa3dc4219b1 100644
--- a/apps/theming/lib/Controller/UserThemeController.php
+++ b/apps/theming/lib/Controller/UserThemeController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 775731799d8..92018456a21 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 ad3903f148e..3b99402d577 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 8beebda0a6d..d823df1ab33 100644
--- a/apps/theming/lib/Listener/BeforePreferenceListener.php
+++ b/apps/theming/lib/Listener/BeforePreferenceListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a0f857130e..3a62d8ebdf3 100644
--- a/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php
+++ b/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d13ad171dde..aeeea7cb065 100644
--- a/apps/theming/lib/Service/BackgroundService.php
+++ b/apps/theming/lib/Service/BackgroundService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12cb5b4ef7e..a2cddd02e96 100644
--- a/apps/theming/lib/Service/JSDataService.php
+++ b/apps/theming/lib/Service/JSDataService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 873d388081c..b1c975baf07 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 589cb41c0ee..3380b33d0c9 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 80184b988e1..6a05beae10e 100644
--- a/apps/theming/lib/Settings/Admin.php
+++ b/apps/theming/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6a60fcd8816..c26cf6d725e 100644
--- a/apps/theming/lib/Settings/AdminSection.php
+++ b/apps/theming/lib/Settings/AdminSection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 875d2ed7ea6..5e1779d937a 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 4a24420dfc8..9aaf1365cad 100644
--- a/apps/theming/lib/Settings/PersonalSection.php
+++ b/apps/theming/lib/Settings/PersonalSection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 31f5a033e2d..266e728d4c0 100644
--- a/apps/theming/lib/SetupChecks/PhpImagickModule.php
+++ b/apps/theming/lib/SetupChecks/PhpImagickModule.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 45bedcc3bf2..9dfdbe2a101 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 70801936f38..699723a3086 100644
--- a/apps/theming/lib/Themes/DarkHighContrastTheme.php
+++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1c2d746dabd..8d5083fbdc0 100644
--- a/apps/theming/lib/Themes/DarkTheme.php
+++ b/apps/theming/lib/Themes/DarkTheme.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9b37b088714..fa8ef650944 100644
--- a/apps/theming/lib/Themes/DefaultTheme.php
+++ b/apps/theming/lib/Themes/DefaultTheme.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 0900a62511d..68e6bb3835f 100644
--- a/apps/theming/lib/Themes/DyslexiaFont.php
+++ b/apps/theming/lib/Themes/DyslexiaFont.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ed60a9e6519..8a2f9212dea 100644
--- a/apps/theming/lib/Themes/HighContrastTheme.php
+++ b/apps/theming/lib/Themes/HighContrastTheme.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 484668fa0fd..f467412f245 100644
--- a/apps/theming/lib/Themes/LightTheme.php
+++ b/apps/theming/lib/Themes/LightTheme.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 2cf5ddc9dc9..2007bf29411 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 a3a9c3240a8..b7f1ad86a1c 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 @@ class Util {
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 a3ae8191efa..6101a833f36 100644
--- a/apps/theming/tests/CapabilitiesTest.php
+++ b/apps/theming/tests/CapabilitiesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ebc392fc0bb..ef26eb0cc32 100644
--- a/apps/theming/tests/Controller/IconControllerTest.php
+++ b/apps/theming/tests/Controller/IconControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b452b0e8581..8d1380f215c 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ThemingControllerTest extends TestCase {
$this->assertEquals($expected, $this->themingController->undo($value));
}
-
-
public function testGetLogoNotExistent(): void {
$this->imageManager->method('getImage')
->with($this->equalTo('logo'))
@@ -668,7 +667,6 @@ class ThemingControllerTest extends TestCase {
@$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 ccdd0420dc4..aa6e4d54649 100644
--- a/apps/theming/tests/Controller/UserThemeControllerTest.php
+++ b/apps/theming/tests/Controller/UserThemeControllerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3bfa4ee050c..3ffaf7248e5 100644
--- a/apps/theming/tests/IconBuilderTest.php
+++ b/apps/theming/tests/IconBuilderTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d4f54b24257..907e928632a 100644
--- a/apps/theming/tests/ImageManagerTest.php
+++ b/apps/theming/tests/ImageManagerTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ImageManagerTest extends TestCase {
$this->assertEquals($pngFile, $this->imageManager->getImage('logo', false));
}
-
public function testGetImageUnset(): void {
$this->expectException(NotFoundException::class);
@@ -265,7 +265,6 @@ class ImageManagerTest extends TestCase {
$this->assertEquals($expected, $this->imageManager->getCachedImage('filename'));
}
-
public function testGetCachedImageNotFound(): void {
$this->expectException(NotFoundException::class);
@@ -352,7 +351,6 @@ class ImageManagerTest extends TestCase {
$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 c14d8f4f48c..9d3dc9c3e89 100644
--- a/apps/theming/tests/Service/ThemesServiceTest.php
+++ b/apps/theming/tests/Service/ThemesServiceTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ThemesServiceTest extends TestCase {
$this->assertEquals($expectedEnabled, $this->themesService->enableTheme($this->themes[$toEnable]));
}
-
public static function dataTestDisableTheme(): array {
return [
['dark', ['default'], ['default']],
@@ -178,11 +178,9 @@ class ThemesServiceTest extends TestCase {
->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 @@ class ThemesServiceTest extends TestCase {
->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 @@ class ThemesServiceTest extends TestCase {
->method('getUID')
->willReturn('user');
-
$this->config->expects($this->once())
->method('getUserValue')
->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
@@ -245,7 +241,6 @@ class ThemesServiceTest extends TestCase {
->method('getUID')
->willReturn('user');
-
$this->config->expects($this->once())
->method('getUserValue')
->with('user', Application::APP_ID, 'enabled-themes', '["default"]')
@@ -258,7 +253,6 @@ class ThemesServiceTest extends TestCase {
$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 20883bd04ef..908ecc5e4dd 100644
--- a/apps/theming/tests/ServicesTest.php
+++ b/apps/theming/tests/ServicesTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ecb889f264b..30bed40c747 100644
--- a/apps/theming/tests/Settings/AdminSectionTest.php
+++ b/apps/theming/tests/Settings/AdminSectionTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5a26657574e..1d88bcc9a75 100644
--- a/apps/theming/tests/Settings/AdminTest.php
+++ b/apps/theming/tests/Settings/AdminTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4ac9d97e4ae..5d1ebd193ab 100644
--- a/apps/theming/tests/Settings/PersonalTest.php
+++ b/apps/theming/tests/Settings/PersonalTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e1cdb795b1b..14ba1d49ef5 100644
--- a/apps/theming/tests/Themes/AccessibleThemeTestCase.php
+++ b/apps/theming/tests/Themes/AccessibleThemeTestCase.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d03e8b13300..20d30c22781 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 @@ class DarkHighContrastThemeTest extends AccessibleThemeTestCase {
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 656779b5b24..5098b9a427a 100644
--- a/apps/theming/tests/Themes/DarkThemeTest.php
+++ b/apps/theming/tests/Themes/DarkThemeTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class DarkThemeTest extends AccessibleThemeTestCase {
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 d2606ffc275..415600a979f 100644
--- a/apps/theming/tests/Themes/DefaultThemeTest.php
+++ b/apps/theming/tests/Themes/DefaultThemeTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class DefaultThemeTest extends AccessibleThemeTestCase {
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 997f3f685d5..30bcaa1b8e9 100644
--- a/apps/theming/tests/Themes/DyslexiaFontTest.php
+++ b/apps/theming/tests/Themes/DyslexiaFontTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class DyslexiaFontTest extends TestCase {
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 94f87d7433b..897cb915fca 100644
--- a/apps/theming/tests/Themes/HighContrastThemeTest.php
+++ b/apps/theming/tests/Themes/HighContrastThemeTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class HighContrastThemeTest extends AccessibleThemeTestCase {
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 0338752f2a6..4646c0ced80 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ThemingDefaultsTest extends TestCase {
$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 301d8ddd1e7..e9b4fac5ba2 100644
--- a/apps/theming/tests/UtilTest.php
+++ b/apps/theming/tests/UtilTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5d9899cb602..eaa0eee7b53 100644
--- a/apps/twofactor_backupcodes/lib/Activity/Provider.php
+++ b/apps/twofactor_backupcodes/lib/Activity/Provider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4898f89f1d7..5b1a4bd5251 100644
--- a/apps/twofactor_backupcodes/lib/AppInfo/Application.php
+++ b/apps/twofactor_backupcodes/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Application extends App implements IBootstrap {
$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 871fa16098d..64c4f37b741 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea7dec2878b..22111bfdb2f 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 effc058e05c..fbe8fe5dc3e 100644
--- a/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
+++ b/apps/twofactor_backupcodes/lib/Controller/SettingsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 252b9b77faa..07ce5cdca11 100644
--- a/apps/twofactor_backupcodes/lib/Db/BackupCode.php
+++ b/apps/twofactor_backupcodes/lib/Db/BackupCode.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 39cc37af686..d5d9001d86a 100644
--- a/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
+++ b/apps/twofactor_backupcodes/lib/Db/BackupCodeMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 90dc6206f71..e69e0fcabd4 100644
--- a/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php
+++ b/apps/twofactor_backupcodes/lib/Event/CodesGenerated.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1bbef159651..26ae2a9c8aa 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ActivityPublisher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5b666dd83fa..653276dd63e 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ClearNotifications.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6c221130129..984ea471cbb 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc1780a987b..aa931f8d3bb 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1cdc8cb9f10..41ffe61a8b9 100644
--- a/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php
+++ b/apps/twofactor_backupcodes/lib/Listener/RegistryUpdater.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1b5c3bbb995..020718fb756 100644
--- a/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php
+++ b/apps/twofactor_backupcodes/lib/Listener/UserDeleted.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ca0fca2ac63..f8abe65d9a9 100644
--- a/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php
+++ b/apps/twofactor_backupcodes/lib/Migration/CheckBackupCodes.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 da6c560419d..661e97d157c 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df53f32b8d7..3a0411c6f10 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607113030.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 befe9061af4..c96263360f6 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 96baef3adc8..069bcd49d5d 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170926101419.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5934b1521cc..2abe65a0f4e 100644
--- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php
+++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20180821043638.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5b99c77b60b..f512e691ff0 100644
--- a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php
+++ b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Notifier implements INotifier {
$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 385b4927e78..f5a3479fb4b 100644
--- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
+++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 24621ba2ee2..0cac675c139 100644
--- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
+++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0da2e96c69d..5df3af9ba99 100644
--- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
+++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dd86e96137c..886373fc3d4 100644
--- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
+++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99e695a1035..a3301be9c85 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Activity/ProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 87bc65e4309..fbb0abefc8e 100644
--- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6b162894258..6349e07316a 100644
--- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/RememberBackupCodesJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 02c42b65148..e24315eed2f 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Controller/SettingsControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3f619e387e9..7186ca584dd 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Event/CodesGeneratedTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bd944dc2396..74d7afe01dd 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ActivityPublisherTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01decdaa59e..13623203cbd 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fb606e45efd..ff568daa92b 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderDisabledTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 926bd34dc50..34a65069ccc 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ProviderEnabledTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1749bb49ae9..9534d4ad89f 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Listener/RegistryUpdaterTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8c1080754fb..e4527709735 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Migration/CheckBackupCodeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b091d57dbd2..e4335c57dc7 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class NotifierTest extends TestCase {
);
}
-
public function testPrepareWrongApp(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -58,7 +58,6 @@ class NotifierTest extends TestCase {
$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 512374fca8c..37c73a3cb33 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Provider/BackupCodesProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ef7e6674afa..60c6adaa651 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e8b9476884d..4cee6296a23 100644
--- a/apps/updatenotification/lib/AppInfo/Application.php
+++ b/apps/updatenotification/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3d401a7075..92b3929921f 100644
--- a/apps/updatenotification/lib/BackgroundJob/ResetToken.php
+++ b/apps/updatenotification/lib/BackgroundJob/ResetToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ab114e8971e..938646b8200 100644
--- a/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php
+++ b/apps/updatenotification/lib/BackgroundJob/UpdateAvailableNotifications.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 61fdc8c48d4..4c2b56de536 100644
--- a/apps/updatenotification/lib/Command/Check.php
+++ b/apps/updatenotification/lib/Command/Check.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Check extends Command {
$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 04d5840d67a..0bd77e0a799 100644
--- a/apps/updatenotification/lib/Controller/APIController.php
+++ b/apps/updatenotification/lib/Controller/APIController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3402410536b..484846eab68 100644
--- a/apps/updatenotification/lib/Controller/AdminController.php
+++ b/apps/updatenotification/lib/Controller/AdminController.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a274ed3d2b2..6e3409420cd 100644
--- a/apps/updatenotification/lib/Controller/ChangelogController.php
+++ b/apps/updatenotification/lib/Controller/ChangelogController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d27dcea024f..ef24823eefb 100644
--- a/apps/updatenotification/lib/Notification/Notifier.php
+++ b/apps/updatenotification/lib/Notification/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2fceababc0..5dc662bd48d 100644
--- a/apps/updatenotification/lib/Settings/Admin.php
+++ b/apps/updatenotification/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 198793b8864..eef7b8cdd19 100644
--- a/apps/updatenotification/lib/UpdateChecker.php
+++ b/apps/updatenotification/lib/UpdateChecker.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3845ee05be7..4bd73d69e87 100644
--- a/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php
+++ b/apps/updatenotification/tests/BackgroundJob/ResetTokenTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9bdf633ca78..a223e1e9b9f 100644
--- a/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php
+++ b/apps/updatenotification/tests/BackgroundJob/UpdateAvailableNotificationsTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\UpdateNotification\Tests\BackgroundJob;
use OC\Installer;
@@ -249,7 +250,6 @@ class UpdateAvailableNotificationsTest extends TestCase {
$i++;
});
-
self::invokePrivate($job, 'checkAppUpdates');
}
diff --git a/apps/updatenotification/tests/Controller/APIControllerTest.php b/apps/updatenotification/tests/Controller/APIControllerTest.php
index fb7ef8ba761..d12411ffdc8 100644
--- a/apps/updatenotification/tests/Controller/APIControllerTest.php
+++ b/apps/updatenotification/tests/Controller/APIControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a27b409490b..1a46bd6ee36 100644
--- a/apps/updatenotification/tests/Controller/AdminControllerTest.php
+++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 689dde8b554..03b2af1f3ef 100644
--- a/apps/updatenotification/tests/Notification/NotifierTest.php
+++ b/apps/updatenotification/tests/Notification/NotifierTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 38eb602a0e8..d86c7d2121f 100644
--- a/apps/updatenotification/tests/Settings/AdminTest.php
+++ b/apps/updatenotification/tests/Settings/AdminTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class AdminTest extends TestCase {
$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 b8693acd0ef..caacf14d8da 100644
--- a/apps/updatenotification/tests/UpdateCheckerTest.php
+++ b/apps/updatenotification/tests/UpdateCheckerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 09fd099b750..b693c693c92 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 739a19f46ef..8a2e7cb6cd5 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 f1bf6a6ccba..573110fd704 100644
--- a/apps/user_ldap/lib/AppInfo/Application.php
+++ b/apps/user_ldap/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 65512fc2cf8..7058ec35e73 100644
--- a/apps/user_ldap/lib/BackendUtility.php
+++ b/apps/user_ldap/lib/BackendUtility.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0c482c19187..363518673e7 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 f51e1f9f891..ed8615a417a 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 08c8fa3f0fe..d0ff203f74b 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 f6ba058e03d..9a9fce9e151 100644
--- a/apps/user_ldap/lib/Command/PromoteGroup.php
+++ b/apps/user_ldap/lib/Command/PromoteGroup.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 20218324179..e26caad7c84 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 1c46af5b029..4f42c5f86d1 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 4aab2502562..001a23d26b8 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 1fa298087d0..3b223775bb8 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 9084d24f7bb..36a8349287c 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 381e346cc40..f27b8d77cbd 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 OCP\IDateTimeFormatter;
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 ee6417982b4..a67371423b3 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 98399125f04..2cd059455ca 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 @@ class TestUserSettings extends Command {
$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 f09970ea75a..22b244e4a7e 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 367c79d7e5d..208ff438d73 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 @@ class Connection extends LDAPUtility {
$this->configured = $this->validateConfiguration($throw);
}
-
return $this->configured;
}
@@ -580,7 +580,6 @@ class Connection extends LDAPUtility {
}
}
-
/**
* Connects and Binds to LDAP
*
diff --git a/apps/user_ldap/lib/ConnectionFactory.php b/apps/user_ldap/lib/ConnectionFactory.php
index dd0ad31920a..35c4cc7cee6 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 9ef20a0ffc9..e1faacac902 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 13bef6845cc..f441d5c2b5f 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 25e5a68b504..a325659ce7c 100644
--- a/apps/user_ldap/lib/Controller/WizardController.php
+++ b/apps/user_ldap/lib/Controller/WizardController.php
@@ -88,7 +88,6 @@ class WizardController extends OCSController {
throw new OCSException($e->getMessage());
}
throw new OCSException();
-
case 'testLoginName':
try {
if ($loginName === null || $loginName === '') {
@@ -102,7 +101,6 @@ class WizardController extends OCSController {
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 a94c239c1b3..29d845c2567 100644
--- a/apps/user_ldap/lib/Events/GroupBackendRegistered.php
+++ b/apps/user_ldap/lib/Events/GroupBackendRegistered.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a26e23f8f83..ad15a14a845 100644
--- a/apps/user_ldap/lib/Events/UserBackendRegistered.php
+++ b/apps/user_ldap/lib/Events/UserBackendRegistered.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 73465c1daad..a0c2dde3c01 100644
--- a/apps/user_ldap/lib/Exceptions/AttributeNotSet.php
+++ b/apps/user_ldap/lib/Exceptions/AttributeNotSet.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 22ce85da354..3c676b6438b 100644
--- a/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php
+++ b/apps/user_ldap/lib/Exceptions/ConstraintViolationException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b5621d86eb6..4979a803c5f 100644
--- a/apps/user_ldap/lib/Exceptions/NoMoreResults.php
+++ b/apps/user_ldap/lib/Exceptions/NoMoreResults.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c4301130f2..62f7c4c79ef 100644
--- a/apps/user_ldap/lib/Exceptions/NotOnLDAP.php
+++ b/apps/user_ldap/lib/Exceptions/NotOnLDAP.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9e8ae6805a4..8ec7c1bf7af 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 3ca30890306..e6b68c3686e 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 5449930e846..507d9018260 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 @@ class Group_Proxy extends Proxy implements GroupInterface, IGroupLDAP, IGetDispl
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 a91f76fbd0f..6ca2b771200 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 0fb318d57b6..6fea8035e49 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 e10e4fe10b4..f36aeff6023 100644
--- a/apps/user_ldap/lib/IGroupLDAP.php
+++ b/apps/user_ldap/lib/IGroupLDAP.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bb9a5a6066e..c6241699147 100644
--- a/apps/user_ldap/lib/ILDAPGroupPlugin.php
+++ b/apps/user_ldap/lib/ILDAPGroupPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 14903784102..4077950b86c 100644
--- a/apps/user_ldap/lib/ILDAPUserPlugin.php
+++ b/apps/user_ldap/lib/ILDAPUserPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8b388575eb..05afdb34075 100644
--- a/apps/user_ldap/lib/ILDAPWrapper.php
+++ b/apps/user_ldap/lib/ILDAPWrapper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7d8e0fd5f53..260576cdaa6 100644
--- a/apps/user_ldap/lib/IUserLDAP.php
+++ b/apps/user_ldap/lib/IUserLDAP.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f3bdb19f3d3..2a2df47033c 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 ab58205b735..d1f3661191c 100644
--- a/apps/user_ldap/lib/Jobs/UpdateGroups.php
+++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 6ed24c03eaf..b9951cf5054 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 b9cbc70a82d..967dd25234f 100644
--- a/apps/user_ldap/lib/LDAPUtility.php
+++ b/apps/user_ldap/lib/LDAPUtility.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 eb8a29d3ee6..e995d16731b 100644
--- a/apps/user_ldap/lib/LoginListener.php
+++ b/apps/user_ldap/lib/LoginListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b1993fa7cf..236d337ae82 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 ab474c3fe04..6db0eef9188 100644
--- a/apps/user_ldap/lib/Mapping/GroupMapping.php
+++ b/apps/user_ldap/lib/Mapping/GroupMapping.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8bafff2f80d..ba589cbd68e 100644
--- a/apps/user_ldap/lib/Migration/GroupMappingMigration.php
+++ b/apps/user_ldap/lib/Migration/GroupMappingMigration.php
@@ -33,7 +33,6 @@ abstract class GroupMappingMigration extends SimpleMigrationStep {
$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 cb41ed59f71..9bcae9ec91f 100644
--- a/apps/user_ldap/lib/Migration/RemoveRefreshTime.php
+++ b/apps/user_ldap/lib/Migration/RemoveRefreshTime.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3fa476ddeca..cf1ae4a5fc2 100644
--- a/apps/user_ldap/lib/Migration/SetDefaultProvider.php
+++ b/apps/user_ldap/lib/Migration/SetDefaultProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dff3c5f5c7e..cc4f2b5d045 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 58e157eccbc..eec3f52de39 100644
--- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php
+++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b88d8f41a97..2e871d7d244 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 9ca028d1f8a..607b142db88 100644
--- a/apps/user_ldap/lib/Migration/UUIDFixUser.php
+++ b/apps/user_ldap/lib/Migration/UUIDFixUser.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0947f266ab7..138cb2b4fa2 100644
--- a/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php
+++ b/apps/user_ldap/lib/Migration/UnsetDefaultProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ef85fa66ba3..b9d1300efee 100644
--- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
+++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b4cafc1c732..c01510c540a 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 @@ class Notifier implements INotifier {
));
}
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 46d392995e0..1d8973bb966 100644
--- a/apps/user_ldap/lib/PagedResults/TLinkId.php
+++ b/apps/user_ldap/lib/PagedResults/TLinkId.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 22b2c6617af..0c0ec57bc4f 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 189b440843d..579627c7432 100644
--- a/apps/user_ldap/lib/Service/BirthdateParserService.php
+++ b/apps/user_ldap/lib/Service/BirthdateParserService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 485117b3483..55cb865b906 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 068637b5443..85ad8daaa70 100644
--- a/apps/user_ldap/lib/Settings/Section.php
+++ b/apps/user_ldap/lib/Settings/Section.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dd05af7f01a..2fc1f6096cc 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 0d83c29b7b4..f9b3f669c3e 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 5033623344b..4a74e7b665f 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 325b7af0d1b..68f3fcbad46 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 @@ class User {
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 ed87fea6fde..5f7a2881d34 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 6a4ba3bf642..9698882bdbd 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 9fec6a989a2..080f828e0a2 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 b1fa715cc10..a64c595ac51 100644
--- a/apps/user_ldap/lib/WizardResult.php
+++ b/apps/user_ldap/lib/WizardResult.php
@@ -28,7 +28,6 @@ class WizardResult {
$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 16feadf8149..8450e787a87 100644
--- a/apps/user_ldap/tests/AccessTest.php
+++ b/apps/user_ldap/tests/AccessTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCA\User_LDAP\Tests;
use OC\ServerNotAvailableException;
@@ -433,7 +434,6 @@ class AccessTest extends TestCase {
$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 @@ class AccessTest extends TestCase {
$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 c5173331f6d..5d297aae32b 100644
--- a/apps/user_ldap/tests/ConfigurationTest.php
+++ b/apps/user_ldap/tests/ConfigurationTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 681c9fbeeb7..bc3f7068d82 100644
--- a/apps/user_ldap/tests/ConnectionTest.php
+++ b/apps/user_ldap/tests/ConnectionTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9f4cff64d6b..c37bce95aa6 100644
--- a/apps/user_ldap/tests/GroupLDAPPluginTest.php
+++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 @@ class GroupLDAPPluginTest extends \Test\TestCase {
$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 036b5fd2e71..cf6bdea557b 100644
--- a/apps/user_ldap/tests/Group_LDAPTest.php
+++ b/apps/user_ldap/tests/Group_LDAPTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Group_LDAPTest extends TestCase {
$this->assertTrue($this->groupBackend->createGroup('gid'));
}
-
public function testCreateGroupFailing(): void {
$this->expectException(\Exception::class);
@@ -1119,7 +1119,6 @@ class Group_LDAPTest extends TestCase {
$this->assertTrue($this->groupBackend->deleteGroup('gid'));
}
-
public function testDeleteGroupFailing(): void {
$this->expectException(\Exception::class);
@@ -1155,7 +1154,6 @@ class Group_LDAPTest extends TestCase {
$this->assertEquals('result', $this->groupBackend->addToGroup('uid', 'gid'));
}
-
public function testAddToGroupFailing(): void {
$this->expectException(\Exception::class);
@@ -1191,7 +1189,6 @@ class Group_LDAPTest extends TestCase {
$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 97661243b91..b95eb6c53b0 100644
--- a/apps/user_ldap/tests/HelperTest.php
+++ b/apps/user_ldap/tests/HelperTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 00f8be18586..bf4587fc9a6 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 3eec3df675a..d07a4ae67fc 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 e1529384239..d262bef419b 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 8a1093e4304..ec19a503544 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 1c2d7145ddf..275a1bd5838 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 3e21d22fca3..9cbfd456ae2 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 a2e8bbb4212..040bab095a1 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 9b05298a151..f657db2eedd 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 6fbfd9ba51b..2a73ffe1bfd 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 5a1e563a1e8..d161bda83f0 100644
--- a/apps/user_ldap/tests/Jobs/CleanUpTest.php
+++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3ff34172cfa..de60b0cf3f1 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 5ea1a491f14..a106772c66a 100644
--- a/apps/user_ldap/tests/LDAPGroupPluginDummy.php
+++ b/apps/user_ldap/tests/LDAPGroupPluginDummy.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3055ff40dce..582cdde2325 100644
--- a/apps/user_ldap/tests/LDAPProviderTest.php
+++ b/apps/user_ldap/tests/LDAPProviderTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class LDAPProviderTest extends \Test\TestCase {
);
}
-
public function testGetUserDNUserIDNotFound(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('User id not found in LDAP');
@@ -92,7 +92,6 @@ class LDAPProviderTest extends \Test\TestCase {
$ldapProvider->getUserDN('nonexisting_user');
}
-
public function testGetUserDN(): void {
$userAccess = $this->getMockBuilder(Access::class)
->onlyMethods(['username2dn'])
@@ -117,7 +116,6 @@ class LDAPProviderTest extends \Test\TestCase {
$ldapProvider->getUserDN('existing_user'));
}
-
public function testGetGroupDNGroupIDNotFound(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Group id not found in LDAP');
@@ -194,7 +192,6 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$this->addToAssertionCount(1);
}
-
public function testClearGroupCacheGroupIDNotFound(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Group id not found in LDAP');
@@ -490,7 +482,6 @@ class LDAPProviderTest extends \Test\TestCase {
$this->addToAssertionCount(1);
}
-
public function testGetLDAPDisplayNameFieldUserIDNotFound(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('User id not found in LDAP');
@@ -530,7 +521,6 @@ class LDAPProviderTest extends \Test\TestCase {
$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 @@ class LDAPProviderTest extends \Test\TestCase {
$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 a453a174355..69a856515f4 100644
--- a/apps/user_ldap/tests/LDAPTest.php
+++ b/apps/user_ldap/tests/LDAPTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8d4870406ae..1be19d31ab1 100644
--- a/apps/user_ldap/tests/LDAPUserPluginDummy.php
+++ b/apps/user_ldap/tests/LDAPUserPluginDummy.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8188e39cd84..ee5cfc36edc 100644
--- a/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php
+++ b/apps/user_ldap/tests/Mapping/AbstractMappingTestCase.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3384f1eecc3..2d9fc6d1de3 100644
--- a/apps/user_ldap/tests/Mapping/GroupMappingTest.php
+++ b/apps/user_ldap/tests/Mapping/GroupMappingTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cf20430fd10..0bdd71a155b 100644
--- a/apps/user_ldap/tests/Mapping/UserMappingTest.php
+++ b/apps/user_ldap/tests/Mapping/UserMappingTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fa52491cdca..d098f08d76c 100644
--- a/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php
+++ b/apps/user_ldap/tests/Migration/AbstractUUIDFixTestCase.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 30a2731521b..d200688f08e 100644
--- a/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php
+++ b/apps/user_ldap/tests/Migration/UUIDFixGroupTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 35c19d54032..e3378f2b392 100644
--- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
+++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b9a11191d56..45ea77e1c7d 100644
--- a/apps/user_ldap/tests/Migration/UUIDFixUserTest.php
+++ b/apps/user_ldap/tests/Migration/UUIDFixUserTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 601aee86602..ec56b6b6264 100644
--- a/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php
+++ b/apps/user_ldap/tests/Service/UpdateGroupsServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a05d08b3cf4..37771463c4e 100644
--- a/apps/user_ldap/tests/Settings/AdminTest.php
+++ b/apps/user_ldap/tests/Settings/AdminTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3f9ae1e56d4..e2c82adae6b 100644
--- a/apps/user_ldap/tests/Settings/SectionTest.php
+++ b/apps/user_ldap/tests/Settings/SectionTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5ae78655bed..a6d499e5d03 100644
--- a/apps/user_ldap/tests/User/DeletedUsersIndexTest.php
+++ b/apps/user_ldap/tests/User/DeletedUsersIndexTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 6f59c36702a..b6cb9bc1bbc 100644
--- a/apps/user_ldap/tests/User/ManagerTest.php
+++ b/apps/user_ldap/tests/User/ManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4599414005e..ddf287bd7aa 100644
--- a/apps/user_ldap/tests/User/OfflineUserTest.php
+++ b/apps/user_ldap/tests/User/OfflineUserTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3e9b90fe0e6..60f9233f3b6 100644
--- a/apps/user_ldap/tests/User/UserTest.php
+++ b/apps/user_ldap/tests/User/UserTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UserTest extends \Test\TestCase {
$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 8a065374e61..80eff8b1d50 100644
--- a/apps/user_ldap/tests/UserLDAPPluginTest.php
+++ b/apps/user_ldap/tests/UserLDAPPluginTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 @@ class UserLDAPPluginTest extends \Test\TestCase {
$pluginManager->countUsers();
}
-
public function testCountUsersNotRegistered(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('No plugin implements countUsers in this LDAP Backend.');
@@ -279,7 +273,6 @@ class UserLDAPPluginTest extends \Test\TestCase {
$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 4720b0a5709..3ba73087119 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class User_LDAPTest extends TestCase {
$this->assertEquals($dataDir . '/susannah/', $result);
}
-
public function testGetHomeNoPath(): void {
$this->expectException(\Exception::class);
@@ -1228,7 +1228,6 @@ class User_LDAPTest extends TestCase {
});
}
-
public function testSetPasswordInvalid(): void {
$this->expectException(HintException::class);
$this->expectExceptionMessage('Password fails quality checking policy');
@@ -1272,7 +1271,6 @@ class User_LDAPTest extends TestCase {
$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 @@ class User_LDAPTest extends TestCase {
$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 38f94af33a7..7a71ca1a7d2 100644
--- a/apps/user_ldap/tests/User_ProxyTest.php
+++ b/apps/user_ldap/tests/User_ProxyTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 0209a676502..5f5af7e258f 100644
--- a/apps/user_ldap/tests/WizardTest.php
+++ b/apps/user_ldap/tests/WizardTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01e4b5317d4..b508bb3a69b 100644
--- a/apps/user_status/lib/AppInfo/Application.php
+++ b/apps/user_status/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0e8ee825f6d..2bce800c069 100644
--- a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php
+++ b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e6084c21a73..34d4e04729e 100644
--- a/apps/user_status/lib/Capabilities.php
+++ b/apps/user_status/lib/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 562be840412..07d53778835 100644
--- a/apps/user_status/lib/Connector/UserStatus.php
+++ b/apps/user_status/lib/Connector/UserStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 56215911b43..d0f3147cabf 100644
--- a/apps/user_status/lib/Connector/UserStatusProvider.php
+++ b/apps/user_status/lib/Connector/UserStatusProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 30f4af6572a..28ceb8f9bba 100644
--- a/apps/user_status/lib/Controller/HeartbeatController.php
+++ b/apps/user_status/lib/Controller/HeartbeatController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70262d1108a..60d285e4d97 100644
--- a/apps/user_status/lib/Controller/PredefinedStatusController.php
+++ b/apps/user_status/lib/Controller/PredefinedStatusController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 44688c39023..b1d55774a11 100644
--- a/apps/user_status/lib/Controller/StatusesController.php
+++ b/apps/user_status/lib/Controller/StatusesController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b3807ce86e..6c16e0aa8a0 100644
--- a/apps/user_status/lib/Controller/UserStatusController.php
+++ b/apps/user_status/lib/Controller/UserStatusController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 49c618a2826..03131e0da28 100644
--- a/apps/user_status/lib/Dashboard/UserStatusWidget.php
+++ b/apps/user_status/lib/Dashboard/UserStatusWidget.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b2da4a9e07a..a2df466fcb6 100644
--- a/apps/user_status/lib/Db/UserStatus.php
+++ b/apps/user_status/lib/Db/UserStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 15982d44fd8..1fcbaff29c5 100644
--- a/apps/user_status/lib/Db/UserStatusMapper.php
+++ b/apps/user_status/lib/Db/UserStatusMapper.php
@@ -144,7 +144,6 @@ class UserStatusMapper extends QBMapper {
$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 a3bd4dfa0d0..0a52e1eeb64 100644
--- a/apps/user_status/lib/Exception/InvalidClearAtException.php
+++ b/apps/user_status/lib/Exception/InvalidClearAtException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1feb36a916a..2bc9845404b 100644
--- a/apps/user_status/lib/Exception/InvalidMessageIdException.php
+++ b/apps/user_status/lib/Exception/InvalidMessageIdException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 80dff2a7666..33ccc5d3983 100644
--- a/apps/user_status/lib/Exception/InvalidStatusIconException.php
+++ b/apps/user_status/lib/Exception/InvalidStatusIconException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a09284be40e..fc01e5f5c1b 100644
--- a/apps/user_status/lib/Exception/InvalidStatusTypeException.php
+++ b/apps/user_status/lib/Exception/InvalidStatusTypeException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 03d578abf46..817105428fa 100644
--- a/apps/user_status/lib/Exception/StatusMessageTooLongException.php
+++ b/apps/user_status/lib/Exception/StatusMessageTooLongException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c9bc233e84d..c8be9467fff 100644
--- a/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php
+++ b/apps/user_status/lib/Listener/OutOfOfficeStatusListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0828b1b44e0..80f80a9a318 100644
--- a/apps/user_status/lib/Listener/UserDeletedListener.php
+++ b/apps/user_status/lib/Listener/UserDeletedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class UserDeletedListener implements IEventListener {
) {
}
-
/**
* @inheritDoc
*/
diff --git a/apps/user_status/lib/Listener/UserLiveStatusListener.php b/apps/user_status/lib/Listener/UserLiveStatusListener.php
index c65386b3e22..0204d101ec3 100644
--- a/apps/user_status/lib/Listener/UserLiveStatusListener.php
+++ b/apps/user_status/lib/Listener/UserLiveStatusListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2302befdfa6..6324137ae7a 100644
--- a/apps/user_status/lib/Migration/Version0001Date20200602134824.php
+++ b/apps/user_status/lib/Migration/Version0001Date20200602134824.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ba372b439a4..1a8c3af0f6e 100644
--- a/apps/user_status/lib/Migration/Version0002Date20200902144824.php
+++ b/apps/user_status/lib/Migration/Version0002Date20200902144824.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12b75f576c2..5e964c74d1a 100644
--- a/apps/user_status/lib/Migration/Version1000Date20201111130204.php
+++ b/apps/user_status/lib/Migration/Version1000Date20201111130204.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe8395f701a..d1330d74316 100644
--- a/apps/user_status/lib/Migration/Version1003Date20210809144824.php
+++ b/apps/user_status/lib/Migration/Version1003Date20210809144824.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0bf7a4fceb5..a2e17dea2aa 100644
--- a/apps/user_status/lib/Service/JSDataService.php
+++ b/apps/user_status/lib/Service/JSDataService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 599d5b8b52f..3e9c196dbe2 100644
--- a/apps/user_status/lib/Service/PredefinedStatusService.php
+++ b/apps/user_status/lib/Service/PredefinedStatusService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class PredefinedStatusService {
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 @@ class PredefinedStatusService {
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 188eb26d1d7..6ee7ae66763 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 66142082343..6d19d19e270 100644
--- a/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php
+++ b/apps/user_status/tests/Unit/BackgroundJob/ClearOldStatusesBackgroundJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 514999acc12..aef3ddcd439 100644
--- a/apps/user_status/tests/Unit/CapabilitiesTest.php
+++ b/apps/user_status/tests/Unit/CapabilitiesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df6c55488d5..89e74f36fce 100644
--- a/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php
+++ b/apps/user_status/tests/Unit/Connector/UserStatusProviderTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fee9b4e4b89..e76534a6fde 100644
--- a/apps/user_status/tests/Unit/Connector/UserStatusTest.php
+++ b/apps/user_status/tests/Unit/Connector/UserStatusTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0f96f41a524..afcea6084c5 100644
--- a/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php
+++ b/apps/user_status/tests/Unit/Controller/PredefinedStatusControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 76d337879c3..e623486c82d 100644
--- a/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php
+++ b/apps/user_status/tests/Unit/Controller/StatusesControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 90b18c5b525..4791a1dac77 100644
--- a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
+++ b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8773b04c95f..61f29f5f730 100644
--- a/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php
+++ b/apps/user_status/tests/Unit/Dashboard/UserStatusWidgetTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3cbd4e6d930..f6f924b91fd 100644
--- a/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php
+++ b/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5a2d52fea0a..1ced2f8fcc4 100644
--- a/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php
+++ b/apps/user_status/tests/Unit/Listener/UserDeletedListenerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7db72f60a4..07c1b29939d 100644
--- a/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php
+++ b/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf337a3c152..390952d8ebd 100644
--- a/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php
+++ b/apps/user_status/tests/Unit/Service/PredefinedStatusServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 88c32d477d4..69128033631 100644
--- a/apps/user_status/tests/Unit/Service/StatusServiceTest.php
+++ b/apps/user_status/tests/Unit/Service/StatusServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1227f391c12..56ff148a186 100644
--- a/apps/weather_status/lib/AppInfo/Application.php
+++ b/apps/weather_status/lib/AppInfo/Application.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ac6cd6986cd..e8631aac8ff 100644
--- a/apps/weather_status/lib/Capabilities.php
+++ b/apps/weather_status/lib/Capabilities.php
@@ -6,10 +6,10 @@ declare(strict_types=1);
* 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 c56ea3b97b3..ca3313de6be 100644
--- a/apps/weather_status/lib/Controller/WeatherStatusController.php
+++ b/apps/weather_status/lib/Controller/WeatherStatusController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2856ab611e..a7496726ec4 100644
--- a/apps/weather_status/lib/Service/WeatherStatusService.php
+++ b/apps/weather_status/lib/Service/WeatherStatusService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d9c355190c7..37e3385892e 100644
--- a/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php
+++ b/apps/webhook_listeners/lib/Db/EphemeralTokenMapper.php
@@ -64,7 +64,6 @@ class EphemeralTokenMapper extends QBMapper {
return $this->findEntities($qb);
}
-
/**
* @param int $olderThan
* @return EphemeralToken[]
@@ -106,7 +105,6 @@ class EphemeralTokenMapper extends QBMapper {
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 da24ab4d2c5..1fabf14d5ce 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 5bb6d99f04e..d77f5298dc5 100644
--- a/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php
+++ b/apps/webhook_listeners/lib/Db/WebhookListenerMapper.php
@@ -231,7 +231,6 @@ class WebhookListenerMapper extends QBMapper {
->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 ecb8e819780..0c49e890583 100644
--- a/apps/webhook_listeners/lib/Service/PHPMongoQuery.php
+++ b/apps/webhook_listeners/lib/Service/PHPMongoQuery.php
@@ -287,7 +287,6 @@ abstract class PHPMongoQuery {
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 @@ abstract class PHPMongoQuery {
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 5080055bf2a..548bc149a03 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 0921ddff199..511e56c607d 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 8e083ba3c26..a8a964d0df3 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 ee156db984b..262db44dd83 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 61dd23079d7..d69e4c3a49b 100644
--- a/apps/workflowengine/lib/Check/FileName.php
+++ b/apps/workflowengine/lib/Check/FileName.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f0998cb4dcf..6e312ca9ad3 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 c9886fecd02..dfd4f282c1c 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 c3f50f9967a..afb2c57febd 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 87b99c841d4..71afcf0f057 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 9f64517dff4..00b4cd22bdc 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 f7eb9be0db7..9b61768d37e 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 336542026da..7f99f5c0939 100644
--- a/apps/workflowengine/lib/Check/TFileCheck.php
+++ b/apps/workflowengine/lib/Check/TFileCheck.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3e65d6062f8..2a029dde402 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 @@ class UserGroupMembership implements ICheck {
}
}
-
/**
* @param string $operator
* @param string $value
diff --git a/apps/workflowengine/lib/Command/Runtime.php b/apps/workflowengine/lib/Command/Runtime.php
index 261c137b08e..b1fc3b39af2 100644
--- a/apps/workflowengine/lib/Command/Runtime.php
+++ b/apps/workflowengine/lib/Command/Runtime.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 394075bde0b..f2d88a42115 100644
--- a/apps/workflowengine/lib/Controller/AWorkflowOCSController.php
+++ b/apps/workflowengine/lib/Controller/AWorkflowOCSController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7c4dcbf0634..1a0e185e247 100644
--- a/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php
+++ b/apps/workflowengine/lib/Controller/GlobalWorkflowsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2437253c8b7..b961be01c98 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 a359e8decf2..dce6554867c 100644
--- a/apps/workflowengine/lib/Controller/UserWorkflowsController.php
+++ b/apps/workflowengine/lib/Controller/UserWorkflowsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5c04bf2bbba..2eb000c44f5 100644
--- a/apps/workflowengine/lib/Entity/File.php
+++ b/apps/workflowengine/lib/Entity/File.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 929e9efd664..346e9409ef4 100644
--- a/apps/workflowengine/lib/Helper/LogContext.php
+++ b/apps/workflowengine/lib/Helper/LogContext.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3a82001233d..26430843caa 100644
--- a/apps/workflowengine/lib/Helper/ScopeContext.php
+++ b/apps/workflowengine/lib/Helper/ScopeContext.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea5d5f5ce04..22e2af94cd1 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 @@ class Manager implements IManager {
$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 95c7dd22d3c..93a28af91b0 100644
--- a/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
+++ b/apps/workflowengine/lib/Migration/PopulateNewlyIntroducedDatabaseFields.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2d8e47aa59..1d6c0ae8568 100644
--- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
+++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e0d21d6d799..480aecf3040 100644
--- a/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php
+++ b/apps/workflowengine/lib/Migration/Version2200Date20210805101925.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5e85b7ba272..dacd15e9c77 100644
--- a/apps/workflowengine/lib/Service/Logger.php
+++ b/apps/workflowengine/lib/Service/Logger.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 89c61ed4cb7..e4e2c0961ec 100644
--- a/apps/workflowengine/lib/Service/RuleMatcher.php
+++ b/apps/workflowengine/lib/Service/RuleMatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 065559aaf92..fca82b1bacd 100644
--- a/apps/workflowengine/lib/Settings/ASettings.php
+++ b/apps/workflowengine/lib/Settings/ASettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95c1be66a9a..adca1800265 100644
--- a/apps/workflowengine/lib/Settings/Admin.php
+++ b/apps/workflowengine/lib/Settings/Admin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 47442487527..2584749e1fa 100644
--- a/apps/workflowengine/lib/Settings/Personal.php
+++ b/apps/workflowengine/lib/Settings/Personal.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6bd26c30609..ff2c3355106 100644
--- a/apps/workflowengine/lib/Settings/Section.php
+++ b/apps/workflowengine/lib/Settings/Section.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86e7c5cca4d..af2c95f3b52 100644
--- a/apps/workflowengine/tests/Check/AbstractStringCheckTest.php
+++ b/apps/workflowengine/tests/Check/AbstractStringCheckTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 60e9087d223..4ba2ea84f08 100644
--- a/apps/workflowengine/tests/Check/FileMimeTypeTest.php
+++ b/apps/workflowengine/tests/Check/FileMimeTypeTest.php
@@ -75,7 +75,6 @@ class FileMimeTypeTest extends TestCase {
$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 666a97ffecf..2c7663c24e0 100644
--- a/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php
+++ b/apps/workflowengine/tests/Check/RequestRemoteAddressTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ff1490d92b7..d0292f79959 100644
--- a/apps/workflowengine/tests/Check/RequestTimeTest.php
+++ b/apps/workflowengine/tests/Check/RequestTimeTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2fbb632a43e..bb299a7db75 100644
--- a/apps/workflowengine/tests/Check/RequestUserAgentTest.php
+++ b/apps/workflowengine/tests/Check/RequestUserAgentTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 74c5663adfc..c06b702764f 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 13be6fa9cc3..fad36a74182 100644
--- a/build/integration/features/bootstrap/Auth.php
+++ b/build/integration/features/bootstrap/Auth.php
@@ -239,7 +239,6 @@ trait Auth {
$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 e7556bbd834..030bf86509e 100644
--- a/build/integration/features/bootstrap/CardDavContext.php
+++ b/build/integration/features/bootstrap/CardDavContext.php
@@ -35,7 +35,6 @@ class CardDavContext implements \Behat\Behat\Context\Context {
$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 86d52f8dba4..6f07c32b09d 100644
--- a/build/integration/features/bootstrap/ChecksumsContext.php
+++ b/build/integration/features/bootstrap/ChecksumsContext.php
@@ -35,7 +35,6 @@ class ChecksumsContext implements \Behat\Behat\Context\Context {
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 594d5617efe..a3da58a7055 100644
--- a/build/integration/features/bootstrap/CommentsContext.php
+++ b/build/integration/features/bootstrap/CommentsContext.php
@@ -139,7 +139,6 @@ class CommentsContext implements \Behat\Behat\Context\Context {
}
}
-
/**
* @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 6725b922d16..4f3ce8c44f0 100644
--- a/build/integration/features/bootstrap/FederationContext.php
+++ b/build/integration/features/bootstrap/FederationContext.php
@@ -73,7 +73,6 @@ class FederationContext implements Context, SnippetAcceptingContext {
$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 4ccb58f0864..3f32948bd5b 100644
--- a/build/integration/features/bootstrap/FilesDropContext.php
+++ b/build/integration/features/bootstrap/FilesDropContext.php
@@ -45,7 +45,6 @@ class FilesDropContext implements Context, SnippetAcceptingContext {
}
}
-
/**
* @When Dropping file :path with :content as :nickName
*/
@@ -53,7 +52,6 @@ class FilesDropContext implements Context, SnippetAcceptingContext {
$this->droppingFileWith($path, $content, $nickname);
}
-
/**
* @When Creating folder :folder in drop
*/
@@ -84,7 +82,6 @@ class FilesDropContext implements Context, SnippetAcceptingContext {
}
}
-
/**
* @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 ba2ea5784d3..0889042c9af 100644
--- a/build/integration/features/bootstrap/FilesRemindersContext.php
+++ b/build/integration/features/bootstrap/FilesRemindersContext.php
@@ -9,7 +9,6 @@ use PHPUnit\Framework\Assert;
require __DIR__ . '/autoload.php';
-
/**
* Files reminders context.
*/
diff --git a/build/integration/features/bootstrap/Provisioning.php b/build/integration/features/bootstrap/Provisioning.php
index c539e4e9b53..80322978741 100644
--- a/build/integration/features/bootstrap/Provisioning.php
+++ b/build/integration/features/bootstrap/Provisioning.php
@@ -239,7 +239,6 @@ trait Provisioning {
}
}
-
/**
* @Then /^user "([^"]*)" has editable fields$/
*
@@ -556,7 +555,6 @@ trait Provisioning {
$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 35688c26492..f0aa09d9355 100644
--- a/build/integration/features/bootstrap/SetupContext.php
+++ b/build/integration/features/bootstrap/SetupContext.php
@@ -10,7 +10,6 @@ use Behat\Behat\Context\Context;
require __DIR__ . '/autoload.php';
-
/**
* Setup context.
*/
diff --git a/build/integration/features/bootstrap/ShareesContext.php b/build/integration/features/bootstrap/ShareesContext.php
index a70897c2743..3539bf34598 100644
--- a/build/integration/features/bootstrap/ShareesContext.php
+++ b/build/integration/features/bootstrap/ShareesContext.php
@@ -12,7 +12,6 @@ use Behat\Behat\Context\SnippetAcceptingContext;
require __DIR__ . '/autoload.php';
-
/**
* Features context.
*/
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index 4d5b78dd05e..c0a41208d5a 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -13,7 +13,6 @@ use Psr\Http\Message\ResponseInterface;
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 3d13c0ae3f5..de8cf286bd6 100644
--- a/build/integration/features/bootstrap/SharingContext.php
+++ b/build/integration/features/bootstrap/SharingContext.php
@@ -11,7 +11,6 @@ use Behat\Behat\Context\SnippetAcceptingContext;
require __DIR__ . '/autoload.php';
-
/**
* Features context.
*/
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index fb2e441d937..8682472847a 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -14,7 +14,6 @@ use Sabre\DAV\Xml\Property\ResourceType;
require __DIR__ . '/autoload.php';
-
trait WebDav {
use Sharing;
@@ -859,7 +858,6 @@ trait WebDav {
}
}
-
/**
* @Given user :user creates a new chunking v2 upload with id :id and destination :targetDestination
*/
@@ -1088,7 +1086,6 @@ trait WebDav {
}
}
-
/**
* @param string $user
* @param string $path
diff --git a/config/config.sample.php b/config/config.sample.php
index b645121a59a..953a47fd198 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -27,8 +27,6 @@
*/
$CONFIG = [
-
-
/**
* Default Parameters
*
@@ -36,7 +34,6 @@ $CONFIG = [
* 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 @@ $CONFIG = [
*/
'installed' => false,
-
/**
* User Experience
*
@@ -904,7 +900,6 @@ $CONFIG = [
*/
'trashbin_retention_obligation' => 'auto',
-
/**
* File versions
*
@@ -1304,7 +1299,6 @@ $CONFIG = [
*/
'profiling.path' => '/tmp',
-
/**
* Alternate Code Locations
*
@@ -1844,7 +1838,6 @@ $CONFIG = [
]
],
-
/**
* Server details for one or more Memcached servers to use for memory caching.
*/
@@ -1881,7 +1874,6 @@ $CONFIG = [
//\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 @@ $CONFIG = [
*/
'objectstore.multibucket.preview-distribution' => false,
-
/**
* Sharing
*
diff --git a/core/AppInfo/Application.php b/core/AppInfo/Application.php
index cd655ac386f..acfb1c130d8 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 868c517a34c..7853d11630b 100644
--- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
+++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aec853252ad..439a591e89f 100644
--- a/core/BackgroundJobs/CheckForUserCertificates.php
+++ b/core/BackgroundJobs/CheckForUserCertificates.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c7e7ba3dd43..11ef1ccb754 100644
--- a/core/BackgroundJobs/CleanupLoginFlowV2.php
+++ b/core/BackgroundJobs/CleanupLoginFlowV2.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 472f4235717..e3d306ac823 100644
--- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php
+++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b61585f80a3..e611a5f2149 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 d7b81bc4b5b..aa75159d97b 100644
--- a/core/Command/App/Enable.php
+++ b/core/Command/App/Enable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 222bbd278f4..2d313bb82c9 100644
--- a/core/Command/App/GetPath.php
+++ b/core/Command/App/GetPath.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bc426e8d8be..4169d0c5943 100644
--- a/core/Command/App/Install.php
+++ b/core/Command/App/Install.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b51bc3149d4..fd70288dbea 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 c078488f45b..bb69c3fc792 100644
--- a/core/Command/App/Remove.php
+++ b/core/Command/App/Remove.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0061b4d6e76..baec5458b5e 100644
--- a/core/Command/App/Update.php
+++ b/core/Command/App/Update.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4ed59231a5c..558ccccf29d 100644
--- a/core/Command/Background/JobBase.php
+++ b/core/Command/Background/JobBase.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 302f0428818..a4d1f6c5b3b 100644
--- a/core/Command/Background/Mode.php
+++ b/core/Command/Background/Mode.php
@@ -6,10 +6,10 @@ declare(strict_types=1);
* 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 ff95eccf02a..14ec07113fd 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 @@ class Base extends Command implements CompletionAwareInterface {
}
}
-
/**
* @param mixed $item
*/
diff --git a/core/Command/Broadcast/Test.php b/core/Command/Broadcast/Test.php
index 5419c3d8b00..c9c9da02059 100644
--- a/core/Command/Broadcast/Test.php
+++ b/core/Command/Broadcast/Test.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 51499b16f8e..e0d83c4f36c 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 5844b112c19..ccbb1d701d9 100644
--- a/core/Command/Config/App/Base.php
+++ b/core/Command/Config/App/Base.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 64b00275ad7..fb6590a19e2 100644
--- a/core/Command/Config/App/DeleteConfig.php
+++ b/core/Command/Config/App/DeleteConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f118dd01f8b..21e209d53ca 100644
--- a/core/Command/Config/App/GetConfig.php
+++ b/core/Command/Config/App/GetConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8dd91070633..e33f1ea63bf 100644
--- a/core/Command/Config/App/SetConfig.php
+++ b/core/Command/Config/App/SetConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95989e7c44f..8bdcc6d32b7 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 3ce18f91ef9..9e56e47660f 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 8e5d0d6b567..e0b7c4841da 100644
--- a/core/Command/Config/Preset.php
+++ b/core/Command/Config/Preset.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf722e96427..7727b146824 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 c588b37e705..2f214875bba 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 3b9571b1290..bf89567bd57 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 40227f3beca..bdec496b58b 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 1380c708d4b..51da5bc9a93 100644
--- a/core/Command/Db/AddMissingColumns.php
+++ b/core/Command/Db/AddMissingColumns.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 31a28ea6588..1b9bc36d781 100644
--- a/core/Command/Db/AddMissingIndices.php
+++ b/core/Command/Db/AddMissingIndices.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 475715a94e6..84da22b6bbc 100644
--- a/core/Command/Db/AddMissingPrimaryKeys.php
+++ b/core/Command/Db/AddMissingPrimaryKeys.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 04b58595a39..5d55cdb314e 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 b83da3c7c06..4cda18afc3a 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 f6f2df92ae2..f91949fe92a 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 0d565509510..50345d64bca 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 @@ class ExecuteCommand extends Command implements CompletionAwareInterface {
}
}
-
$ms->executeStep($version);
return 0;
}
diff --git a/core/Command/Db/Migrations/GenerateCommand.php b/core/Command/Db/Migrations/GenerateCommand.php
index 4c2be062634..14adc62fa6f 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 @@ class {{classname}} extends SimpleMigrationStep {
$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 438ef112689..d37ddddfa8d 100644
--- a/core/Command/Db/Migrations/GenerateMetadataCommand.php
+++ b/core/Command/Db/Migrations/GenerateMetadataCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0949334a90f..2815dda31b3 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 2177f22a3df..c723d692eb3 100644
--- a/core/Command/Db/Migrations/PreviewCommand.php
+++ b/core/Command/Db/Migrations/PreviewCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f7de52bab4c..6fc8c213cd6 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 ee914f73f0b..b75b728b2f3 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 @@ class ChangeKeyStorageRoot extends Command {
}
}
-
/**
* move system key folder
*
@@ -132,7 +132,6 @@ class ChangeKeyStorageRoot extends Command {
}
}
-
/**
* setup file system for the given user
*
@@ -143,7 +142,6 @@ class ChangeKeyStorageRoot extends Command {
\OC_Util::setupFS($uid);
}
-
/**
* iterate over each user and move the keys to the new storage
*
@@ -155,7 +153,6 @@ class ChangeKeyStorageRoot extends Command {
$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 fe280daa111..a8adfd6222a 100644
--- a/core/Command/Encryption/Disable.php
+++ b/core/Command/Encryption/Disable.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 02c61025001..659538036ee 100644
--- a/core/Command/Encryption/Enable.php
+++ b/core/Command/Encryption/Enable.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 dfdf9c98a2e..0ffc6fdbda7 100644
--- a/core/Command/Encryption/EncryptAll.php
+++ b/core/Command/Encryption/EncryptAll.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3c5af72c701..1d0ea51e37d 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 0b61572fdc0..2867f734329 100644
--- a/core/Command/Encryption/MigrateKeyStorage.php
+++ b/core/Command/Encryption/MigrateKeyStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class MigrateKeyStorage extends Command {
}
}
-
/**
* setup file system for the given user
*/
@@ -169,7 +169,6 @@ class MigrateKeyStorage extends Command {
\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 5324cd8cdee..65d54850c8e 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 e717983bf25..21811a47935 100644
--- a/core/Command/Encryption/ShowKeyStorageRoot.php
+++ b/core/Command/Encryption/ShowKeyStorageRoot.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f8602236ffd..946eb332e48 100644
--- a/core/Command/Encryption/Status.php
+++ b/core/Command/Encryption/Status.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a6d40178be6..bad6455c791 100644
--- a/core/Command/Group/Add.php
+++ b/core/Command/Group/Add.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0fbd98ebce6..61795462708 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 4c548e83b18..ec5bdda2d98 100644
--- a/core/Command/Group/Delete.php
+++ b/core/Command/Group/Delete.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 71492507086..a2ef4cc02ea 100644
--- a/core/Command/Group/Info.php
+++ b/core/Command/Group/Info.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c80dc52f4ac..c56c440aeda 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 04be18e4c77..4b7dc164f87 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 4f5a04e521d..8c08b73d102 100644
--- a/core/Command/Info/File.php
+++ b/core/Command/Info/File.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 750da22286c..3104eef99e3 100644
--- a/core/Command/Integrity/CheckCore.php
+++ b/core/Command/Integrity/CheckCore.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a9c1cbb7be1..e4d61e8cc5b 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 bd46e0e4f51..73b7e76b4ba 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 c71942e0f6e..84b957c1e31 100644
--- a/core/Command/InterruptedException.php
+++ b/core/Command/InterruptedException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d4eee220e5f..e02cdfed233 100644
--- a/core/Command/L10n/CreateJs.php
+++ b/core/Command/L10n/CreateJs.php
@@ -7,10 +7,10 @@ declare(strict_types=1);
* 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 aa87ea59305..cd46740ed84 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 c04ddf837a0..db1188debb9 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 99be354f09d..fa74d30ca8a 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 c91f500aa72..8dc551b97b1 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f8f19a61993..32efcdc26d0 100644
--- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
+++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3636e7d96ec..cb393f77214 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 a9e7e79db19..dc8e5f85992 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 7f8cfe4e012..d73f911984e 100644
--- a/core/Command/Maintenance/Mode.php
+++ b/core/Command/Maintenance/Mode.php
@@ -7,10 +7,10 @@ declare(strict_types=1);
* 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 a79d296e520..a3fb2545723 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 881b5187ba3..8ff10e800cd 100644
--- a/core/Command/Maintenance/UpdateHtaccess.php
+++ b/core/Command/Maintenance/UpdateHtaccess.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d077032935b..d41fe1ca9bc 100644
--- a/core/Command/Maintenance/UpdateTheme.php
+++ b/core/Command/Maintenance/UpdateTheme.php
@@ -6,13 +6,13 @@ declare(strict_types=1);
* 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 582763880a7..20d8f7305ed 100644
--- a/core/Command/OCM/ActivateKey.php
+++ b/core/Command/OCM/ActivateKey.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b4eb4715fe9..bd5a981cdef 100644
--- a/core/Command/OCM/ListKeys.php
+++ b/core/Command/OCM/ListKeys.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6c26014e5a1..e35da99ed37 100644
--- a/core/Command/OCM/RetireKey.php
+++ b/core/Command/OCM/RetireKey.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 69f2167ba43..13e5b194e8e 100644
--- a/core/Command/OCM/StageKey.php
+++ b/core/Command/OCM/StageKey.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 978128a609f..77984582286 100644
--- a/core/Command/Preview/ResetRenderedTexts.php
+++ b/core/Command/Preview/ResetRenderedTexts.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10bd5809d28..32f68773ac6 100644
--- a/core/Command/Security/BruteforceAttempts.php
+++ b/core/Command/Security/BruteforceAttempts.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f882f1d0263..e756499cd5e 100644
--- a/core/Command/Security/BruteforceResetAttempts.php
+++ b/core/Command/Security/BruteforceResetAttempts.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b2fdabd3237..3a7fe6e888d 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 0692d8204fb..455d00523be 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 4c37eb0670b..4db386c879f 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 4c75488ab1a..eb8ea640ec8 100644
--- a/core/Command/SnowflakeDecodeId.php
+++ b/core/Command/SnowflakeDecodeId.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 77aaa537419..a98c4970e44 100644
--- a/core/Command/Status.php
+++ b/core/Command/Status.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7e2006d6aff..c19dd527ca6 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 93a2d015bfc..69037bc8e4f 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 6e6295c486d..e07f707fdcc 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 c96e6af405f..501338b4849 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 63a5cee393e..1f8856c8792 100644
--- a/core/Command/TaskProcessing/Cleanup.php
+++ b/core/Command/TaskProcessing/Cleanup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c0136398104..198699d58d8 100644
--- a/core/Command/TaskProcessing/EnabledCommand.php
+++ b/core/Command/TaskProcessing/EnabledCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f7cfe3c8750..47e8a176d9e 100644
--- a/core/Command/TaskProcessing/GetCommand.php
+++ b/core/Command/TaskProcessing/GetCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0fb208ad72a..e6b3a5c75de 100644
--- a/core/Command/TaskProcessing/ListCommand.php
+++ b/core/Command/TaskProcessing/ListCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a8622efefb..fe11211cf69 100644
--- a/core/Command/TaskProcessing/Statistics.php
+++ b/core/Command/TaskProcessing/Statistics.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0a2ed99e425..1f6d473f4e8 100644
--- a/core/Command/TaskProcessing/WorkerCommand.php
+++ b/core/Command/TaskProcessing/WorkerCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8d417eb4400..275c095d78d 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 02fa86251d6..43b80557ffc 100644
--- a/core/Command/TwoFactorAuth/Cleanup.php
+++ b/core/Command/TwoFactorAuth/Cleanup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 201dd9c1991..aead150da87 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 7158a4695fd..8cd90c6e628 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 dfa6ce362e1..0f27e55eb62 100644
--- a/core/Command/TwoFactorAuth/Enforce.php
+++ b/core/Command/TwoFactorAuth/Enforce.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dc718cb0c8b..07cd42f3702 100644
--- a/core/Command/TwoFactorAuth/State.php
+++ b/core/Command/TwoFactorAuth/State.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 20c2ec0d5ef..f60bfc31a68 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 @@ class Upgrade extends Command {
$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 35a4dca5cc1..abc9c0bf469 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 bbfd7f38cea..db2842223cd 100644
--- a/core/Command/User/AuthTokens/Add.php
+++ b/core/Command/User/AuthTokens/Add.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 803bcf6a0b9..041c9584ec5 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 7b26090735f..73a07b34f51 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 ff9073dcf4b..5d8634bdc0e 100644
--- a/core/Command/User/ClearGeneratedAvatarCacheCommand.php
+++ b/core/Command/User/ClearGeneratedAvatarCacheCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8cc5beb98a..625f58526f9 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 c13cbb4a4e5..23a65e266ba 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 be6888ac65b..4f9f08359dd 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 f9c7600800f..ce9bad0a2d3 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 fdbbe13915e..15735c46270 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 bbd835e0f3c..6dfcef6eb5f 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 e4ec87c5f02..1b3b6ac7797 100644
--- a/core/Command/User/Profile.php
+++ b/core/Command/User/Profile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8d6b5bcb50..63ab3946f4d 100644
--- a/core/Command/User/Report.php
+++ b/core/Command/User/Report.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 59b4b40c0f9..813c38fe1d5 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 @@ class ResetPassword extends Base {
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 17b11fa0838..35df2db5add 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 1cbbca7fc20..aa975d2e8f9 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 9f2707e75c2..4b1758a7f4d 100644
--- a/core/Controller/AppPasswordController.php
+++ b/core/Controller/AppPasswordController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 692fe1b7297..e73ea1a1377 100644
--- a/core/Controller/AutoCompleteController.php
+++ b/core/Controller/AutoCompleteController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3d6f79151e8..c232dd140fc 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 @@ class AvatarController extends Controller {
return $response;
}
-
/**
* Get the avatar
*
diff --git a/core/Controller/CSRFTokenController.php b/core/Controller/CSRFTokenController.php
index 85b187f42e6..c44b5f99ea9 100644
--- a/core/Controller/CSRFTokenController.php
+++ b/core/Controller/CSRFTokenController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 836bba6d8b7..060091621bc 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 @@ class ClientFlowLoginController extends Controller {
'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 85b82b388f4..f53f247a03c 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ClientFlowLoginV2Controller extends Controller {
'appTokenUrl' => $this->urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.apptokenRedirect'),
]);
-
Util::addScript('core', 'login_flow');
return new StandaloneTemplateResponse(
$this->appName,
@@ -179,7 +179,6 @@ class ClientFlowLoginV2Controller extends Controller {
'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 b6b0777fe40..0ac608a3acd 100644
--- a/core/Controller/CssController.php
+++ b/core/Controller/CssController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 711158e0708..c78350cdf00 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 236a81760ac..9ef33df64ea 100644
--- a/core/Controller/HoverCardController.php
+++ b/core/Controller/HoverCardController.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f214d3043c2..3cbbe3fd3b3 100644
--- a/core/Controller/JsController.php
+++ b/core/Controller/JsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a105130785..b7ffb00d182 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d956f3427f2..fba0413ddc4 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 017061ef979..3b667137e7f 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 db42a3608b5..af8a9359ba4 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 e1e220a6439..144012ac35f 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 ab7383f93a4..d1889316c0c 100644
--- a/core/Controller/OpenMetricsController.php
+++ b/core/Controller/OpenMetricsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aac49c06d57..310d7f85f74 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ba35bc8705e..3c7bd1c248f 100644
--- a/core/Controller/RecommendedAppsController.php
+++ b/core/Controller/RecommendedAppsController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f695aa57fc..aa0ce4e1118 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 fd22d485af3..ac81af45f0b 100644
--- a/core/Controller/TaskProcessingApiController.php
+++ b/core/Controller/TaskProcessingApiController.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Core\Controller;
use OC\Core\ResponseDefinitions;
@@ -371,7 +370,6 @@ class TaskProcessingApiController extends OCSController {
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 46d067557e3..e841b9c6506 100644
--- a/core/Controller/TextProcessingApiController.php
+++ b/core/Controller/TextProcessingApiController.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Core\Controller;
use InvalidArgumentException;
@@ -188,7 +187,6 @@ class TextProcessingApiController extends OCSController {
}
}
-
/**
* 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 1019114bee9..fbfc343bc6a 100644
--- a/core/Controller/TextToImageApiController.php
+++ b/core/Controller/TextToImageApiController.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Core\Controller;
use OC\Core\ResponseDefinitions;
@@ -213,7 +212,6 @@ class TextToImageApiController extends OCSController {
}
}
-
/**
* 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 671c15711d8..e572753cc97 100644
--- a/core/Controller/TranslationApiController.php
+++ b/core/Controller/TranslationApiController.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\Core\Controller;
use InvalidArgumentException;
@@ -76,7 +75,6 @@ class TranslationApiController extends OCSController {
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 b683c681c0d..0ea46ec167c 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 6888a9a2639..d418d58b25e 100644
--- a/core/Controller/UnifiedSearchController.php
+++ b/core/Controller/UnifiedSearchController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b6e464d9a95..7c6227014f2 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 d0bc0665534..d86e7843d9f 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 d7255831e88..2518ab274aa 100644
--- a/core/Controller/WebAuthnController.php
+++ b/core/Controller/WebAuthnController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9ce83686355..10740b96d0b 100644
--- a/core/Controller/WellKnownController.php
+++ b/core/Controller/WellKnownController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1b57be71aa0..f495ba5a692 100644
--- a/core/Controller/WipeController.php
+++ b/core/Controller/WipeController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class WipeController extends Controller {
}
}
-
/**
* Finish the wipe
*
diff --git a/core/Data/LoginFlowV2Credentials.php b/core/Data/LoginFlowV2Credentials.php
index 211d6a23696..dafb71ef412 100644
--- a/core/Data/LoginFlowV2Credentials.php
+++ b/core/Data/LoginFlowV2Credentials.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 278c18f3b56..4f8841766ab 100644
--- a/core/Data/LoginFlowV2Tokens.php
+++ b/core/Data/LoginFlowV2Tokens.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1671e5990e0..1a56ae3237d 100644
--- a/core/Db/LoginFlowV2.php
+++ b/core/Db/LoginFlowV2.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32664917cb5..65a00e16def 100644
--- a/core/Db/LoginFlowV2Mapper.php
+++ b/core/Db/LoginFlowV2Mapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 428ebfeefad..943df244736 100644
--- a/core/Events/BeforePasswordResetEvent.php
+++ b/core/Events/BeforePasswordResetEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86889951321..1e620513775 100644
--- a/core/Events/PasswordResetEvent.php
+++ b/core/Events/PasswordResetEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e6ac6d9618f..001dc295b65 100644
--- a/core/Exception/LoginFlowV2ClientForbiddenException.php
+++ b/core/Exception/LoginFlowV2ClientForbiddenException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b637d50370b..330a10bc5b6 100644
--- a/core/Exception/LoginFlowV2NotFoundException.php
+++ b/core/Exception/LoginFlowV2NotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0572c1d052e..4f794b2bc6b 100644
--- a/core/Exception/ResetPasswordException.php
+++ b/core/Exception/ResetPasswordException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f91bad7998b..07d0c42678c 100644
--- a/core/Listener/AddMissingIndicesListener.php
+++ b/core/Listener/AddMissingIndicesListener.php
@@ -157,7 +157,6 @@ class AddMissingIndicesListener implements IEventListener {
['propertyname', 'propertypath', 'userid']
);
-
$event->addMissingIndex(
'jobs',
'job_lastcheck_reserved',
diff --git a/core/Listener/BeforeTemplateRenderedListener.php b/core/Listener/BeforeTemplateRenderedListener.php
index 949d58eea55..9e55ce068e0 100644
--- a/core/Listener/BeforeTemplateRenderedListener.php
+++ b/core/Listener/BeforeTemplateRenderedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e2ea5296a04..ec4fdb5219f 100644
--- a/core/Middleware/TwoFactorMiddleware.php
+++ b/core/Middleware/TwoFactorMiddleware.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 effc0e7fc25..17b500abe05 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 2de0c2b9ba0..79f45345184 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 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
}
}
-
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
diff --git a/core/Migrations/Version13000Date20170814074715.php b/core/Migrations/Version13000Date20170814074715.php
index beb492ac557..75dc9e3bff4 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 @@ class Version13000Date20170814074715 extends SimpleMigrationStep {
/** @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 104c3739c43..64ce9c7e740 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 4c14168c87a..25350c73fe4 100644
--- a/core/Migrations/Version13000Date20170926101637.php
+++ b/core/Migrations/Version13000Date20170926101637.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc9b19de588..ba56f76707f 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 b512af080d9..40a2e17bec5 100644
--- a/core/Migrations/Version14000Date20180404140050.php
+++ b/core/Migrations/Version14000Date20180404140050.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d4ddf083f39..66f6c0fa395 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 b7d65cd3f25..9e122b3d8c3 100644
--- a/core/Migrations/Version14000Date20180518120534.php
+++ b/core/Migrations/Version14000Date20180518120534.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4e90d9fbc0d..6c5c44d7ece 100644
--- a/core/Migrations/Version14000Date20180522074438.php
+++ b/core/Migrations/Version14000Date20180522074438.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 81fc3b61988..4efd261e5ee 100644
--- a/core/Migrations/Version14000Date20180710092004.php
+++ b/core/Migrations/Version14000Date20180710092004.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 89d50bdc338..d54c1160c55 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 be2cc70ad6c..d3393425078 100644
--- a/core/Migrations/Version15000Date20180926101451.php
+++ b/core/Migrations/Version15000Date20180926101451.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ddde2a2ca84..c5be4ce349f 100644
--- a/core/Migrations/Version15000Date20181015062942.php
+++ b/core/Migrations/Version15000Date20181015062942.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 65a45bb7bdb..30c6ba7e096 100644
--- a/core/Migrations/Version15000Date20181029084625.php
+++ b/core/Migrations/Version15000Date20181029084625.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 291eb56ecce..10b56a8beab 100644
--- a/core/Migrations/Version16000Date20190207141427.php
+++ b/core/Migrations/Version16000Date20190207141427.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f9c077e1470..d26cfe7c48d 100644
--- a/core/Migrations/Version16000Date20190212081545.php
+++ b/core/Migrations/Version16000Date20190212081545.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9e98cee0d07..457ca17701d 100644
--- a/core/Migrations/Version16000Date20190427105638.php
+++ b/core/Migrations/Version16000Date20190427105638.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95c9bb0b690..ca5e076048f 100644
--- a/core/Migrations/Version16000Date20190428150708.php
+++ b/core/Migrations/Version16000Date20190428150708.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e15619e57f3..0728d179a28 100644
--- a/core/Migrations/Version17000Date20190514105811.php
+++ b/core/Migrations/Version17000Date20190514105811.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e07ce3fbfb9..b05f7d6c8c6 100644
--- a/core/Migrations/Version18000Date20190920085628.php
+++ b/core/Migrations/Version18000Date20190920085628.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bdc28fa4261..9a11494c713 100644
--- a/core/Migrations/Version18000Date20191014105105.php
+++ b/core/Migrations/Version18000Date20191014105105.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aafaf95c15f..2b0e76eead6 100644
--- a/core/Migrations/Version18000Date20191204114856.php
+++ b/core/Migrations/Version18000Date20191204114856.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f4995e333f7..a1f6ace465f 100644
--- a/core/Migrations/Version19000Date20200211083441.php
+++ b/core/Migrations/Version19000Date20200211083441.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 88948caea89..add87698184 100644
--- a/core/Migrations/Version20000Date20201109081915.php
+++ b/core/Migrations/Version20000Date20201109081915.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1f5679f7741..c30d2d72ce8 100644
--- a/core/Migrations/Version20000Date20201109081918.php
+++ b/core/Migrations/Version20000Date20201109081918.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c625c607905..fffa2f4b0fe 100644
--- a/core/Migrations/Version20000Date20201109081919.php
+++ b/core/Migrations/Version20000Date20201109081919.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a879563cebc..14da98fbf64 100644
--- a/core/Migrations/Version20000Date20201111081915.php
+++ b/core/Migrations/Version20000Date20201111081915.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1bba2f769a2..e9404e997d1 100644
--- a/core/Migrations/Version21000Date20201120141228.php
+++ b/core/Migrations/Version21000Date20201120141228.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb3418031e2..2798f315f14 100644
--- a/core/Migrations/Version21000Date20201202095923.php
+++ b/core/Migrations/Version21000Date20201202095923.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 951af95a7fc..9c648fc8286 100644
--- a/core/Migrations/Version21000Date20210119195004.php
+++ b/core/Migrations/Version21000Date20210119195004.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 696b50514b7..90113c4dab6 100644
--- a/core/Migrations/Version21000Date20210309185126.php
+++ b/core/Migrations/Version21000Date20210309185126.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea9bb493c0d..429c3d09c4b 100644
--- a/core/Migrations/Version21000Date20210309185127.php
+++ b/core/Migrations/Version21000Date20210309185127.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 353e0037e3c..b0375639341 100644
--- a/core/Migrations/Version22000Date20210216080825.php
+++ b/core/Migrations/Version22000Date20210216080825.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 853b36d77ec..15430d75e54 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 a80331591d1..6da2b130389 100644
--- a/core/Migrations/Version23000Date20210906132259.php
+++ b/core/Migrations/Version23000Date20210906132259.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 9983a55403c..cb96a9cf3d2 100644
--- a/core/Migrations/Version24000Date20220202150027.php
+++ b/core/Migrations/Version24000Date20220202150027.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d9111872da1..d4d65ae7228 100644
--- a/core/Migrations/Version24000Date20220404230027.php
+++ b/core/Migrations/Version24000Date20220404230027.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 af43916b65d..540c858519b 100644
--- a/core/Migrations/Version27000Date20230309104325.php
+++ b/core/Migrations/Version27000Date20230309104325.php
@@ -50,7 +50,6 @@ class Version27000Date20230309104325 extends SimpleMigrationStep {
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 6a5f014a3fd..47d758ad228 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 11afec44d25..6aec37063f8 100644
--- a/core/Migrations/Version29000Date20231126110901.php
+++ b/core/Migrations/Version29000Date20231126110901.php
@@ -38,7 +38,6 @@ class Version29000Date20231126110901 extends SimpleMigrationStep {
* @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 7be514ec094..45004f7e6a9 100644
--- a/core/Migrations/Version29000Date20240131122720.php
+++ b/core/Migrations/Version29000Date20240131122720.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8a2f4aa586b..7f256b929cb 100644
--- a/core/Migrations/Version30000Date20240429122720.php
+++ b/core/Migrations/Version30000Date20240429122720.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1d9b84d112..587cf451ff7 100644
--- a/core/Migrations/Version30000Date20240708160048.php
+++ b/core/Migrations/Version30000Date20240708160048.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c57e9caa330..8f06c003b0e 100644
--- a/core/Migrations/Version30000Date20240717111406.php
+++ b/core/Migrations/Version30000Date20240717111406.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d81da356965..bb2b13a734c 100644
--- a/core/Migrations/Version30000Date20240814180800.php
+++ b/core/Migrations/Version30000Date20240814180800.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 223b78b6056..67237538543 100644
--- a/core/Migrations/Version31000Date20240101084401.php
+++ b/core/Migrations/Version31000Date20240101084401.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f35ce498ddf..d02466cba92 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 ca3b993c507..d4a422a4724 100644
--- a/core/Migrations/Version32000Date20250806110519.php
+++ b/core/Migrations/Version32000Date20250806110519.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 570a2ee72d4..03ae05da9e5 100644
--- a/core/Migrations/Version33000Date20250819110529.php
+++ b/core/Migrations/Version33000Date20250819110529.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 78ab693e2b9..bc85301b96c 100644
--- a/core/Migrations/Version33000Date20251013110519.php
+++ b/core/Migrations/Version33000Date20251013110519.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 26204088a64..7fc135d2a03 100644
--- a/core/Migrations/Version33000Date20251023110529.php
+++ b/core/Migrations/Version33000Date20251023110529.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1cecb655181..f418fa7418a 100644
--- a/core/Migrations/Version33000Date20251023120529.php
+++ b/core/Migrations/Version33000Date20251023120529.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5d26abfedd2..65fd869acea 100644
--- a/core/Migrations/Version33000Date20251106131209.php
+++ b/core/Migrations/Version33000Date20251106131209.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 043367b17d9..4fac2064c7e 100644
--- a/core/Migrations/Version33000Date20251124110529.php
+++ b/core/Migrations/Version33000Date20251124110529.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2962bffc8cc..912d341b8f9 100644
--- a/core/Migrations/Version33000Date20251126152410.php
+++ b/core/Migrations/Version33000Date20251126152410.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c4ee339c766..06910b65fe4 100644
--- a/core/Notification/CoreNotifier.php
+++ b/core/Notification/CoreNotifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 13bd18e0ffa..5d6048230c6 100644
--- a/core/Service/LoginFlowV2Service.php
+++ b/core/Service/LoginFlowV2Service.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8ca8f3ef527..94f6e936a87 100644
--- a/cypress/fixtures/testapp/lib/AppInfo/Application.php
+++ b/cypress/fixtures/testapp/lib/AppInfo/Application.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e7812fa1046..1ee1c218985 100644
--- a/cypress/fixtures/testapp/lib/Controller/PageController.php
+++ b/cypress/fixtures/testapp/lib/Controller/PageController.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b945ba3ee1d..fc09cc64849 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -674,7 +674,6 @@ class OC {
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 e443f65870a..b894ac1b7c9 100644
--- a/lib/private/Accounts/Account.php
+++ b/lib/private/Accounts/Account.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f3d2878b254..7dcc2c289b4 100644
--- a/lib/private/Accounts/AccountManager.php
+++ b/lib/private/Accounts/AccountManager.php
@@ -53,7 +53,6 @@ use function json_last_error;
*/
class AccountManager implements IAccountManager {
use TAccountsHelper;
-
use TProfileHelper;
private string $table = 'accounts';
@@ -755,7 +754,6 @@ class AccountManager implements IAccountManager {
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 685fa013ed2..3be9fcb85aa 100644
--- a/lib/private/Accounts/AccountProperty.php
+++ b/lib/private/Accounts/AccountProperty.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b163b7ac87d..02f0253f861 100644
--- a/lib/private/Accounts/AccountPropertyCollection.php
+++ b/lib/private/Accounts/AccountPropertyCollection.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 eebc2300f49..97c0fb723f8 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 69d25d9a933..be241f4e542 100644
--- a/lib/private/Accounts/TAccountsHelper.php
+++ b/lib/private/Accounts/TAccountsHelper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a165d32dc98..5bb16c88a67 100644
--- a/lib/private/Activity/ActivitySettingsAdapter.php
+++ b/lib/private/Activity/ActivitySettingsAdapter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1c3ea936d82..4875d76649f 100644
--- a/lib/private/Activity/Event.php
+++ b/lib/private/Activity/Event.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 486874ddae9..df2c8e138ad 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 3981345c698..98453520a8d 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 @@ class Manager implements IManager {
}
}
-
/**
* 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 @@ class Manager implements IManager {
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 9779c91ae59..78f16598af0 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 @@ class AllConfig implements IConfig {
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 93015d29d7f..a2b91f560aa 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 afff8693e08..9a80188bd5d 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 4ff53b0c70b..798913784e1 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 e91fa3b49e2..e39e3d58aec 100644
--- a/lib/private/App/AppStore/Bundles/EducationBundle.php
+++ b/lib/private/App/AppStore/Bundles/EducationBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d8845830cf7..c598b6396b5 100644
--- a/lib/private/App/AppStore/Bundles/EnterpriseBundle.php
+++ b/lib/private/App/AppStore/Bundles/EnterpriseBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6cc535329a2..370fdb4e6db 100644
--- a/lib/private/App/AppStore/Bundles/GroupwareBundle.php
+++ b/lib/private/App/AppStore/Bundles/GroupwareBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 640e8a610a3..ecfec0b181e 100644
--- a/lib/private/App/AppStore/Bundles/HubBundle.php
+++ b/lib/private/App/AppStore/Bundles/HubBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 759e0e551c2..32e08d895a4 100644
--- a/lib/private/App/AppStore/Bundles/PublicSectorBundle.php
+++ b/lib/private/App/AppStore/Bundles/PublicSectorBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 533fafb2d92..065845b397a 100644
--- a/lib/private/App/AppStore/Bundles/SocialSharingBundle.php
+++ b/lib/private/App/AppStore/Bundles/SocialSharingBundle.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 83775bf3e9d..a39bcfd2e31 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 a2abc70ba12..be614f81928 100644
--- a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d4675f7c547..7aec5f3251e 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 5add30e84b5..33bf1805259 100644
--- a/lib/private/App/AppStore/Version/Version.php
+++ b/lib/private/App/AppStore/Version/Version.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8976f28837f..387792148e7 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 7edc3e565b1..4b5bae9d75c 100644
--- a/lib/private/App/CompareVersion.php
+++ b/lib/private/App/CompareVersion.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1441f01125b..94e8951fd37 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 38b0bd58b98..358337fa622 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 504b9a00fe1..47dc227bab7 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 ec485840535..01015aa9440 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -240,7 +240,6 @@ class AppConfig implements IAppConfig {
throw new AppConfigUnknownKeyException('unknown config key');
}
-
/**
* @inheritDoc
*
@@ -319,7 +318,6 @@ class AppConfig implements IAppConfig {
return $values;
}
-
/**
* Get the config value as string.
* If the value does not exist the given default will be returned.
@@ -605,7 +603,6 @@ class AppConfig implements IAppConfig {
return $type;
}
-
/**
* Store a config key and its value in database as VALUE_MIXED
*
@@ -644,7 +641,6 @@ class AppConfig implements IAppConfig {
);
}
-
/**
* @inheritDoc
*
@@ -1003,7 +999,6 @@ class AppConfig implements IAppConfig {
return true;
}
-
/**
* @inheritDoc
*
@@ -1305,7 +1300,6 @@ class AppConfig implements IAppConfig {
$this->loadConfig(lazy: true);
}
-
/**
* For debug purpose.
* Returns the cached data.
@@ -1504,7 +1498,6 @@ class AppConfig implements IAppConfig {
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 @@ class AppConfig implements IAppConfig {
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 ac078d8ba98..1d9c2157f93 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d90e87ae449..48ce3798bba 100644
--- a/lib/private/AppFramework/Bootstrap/ARegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ARegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 60b30c9c799..1e05ac840a0 100644
--- a/lib/private/AppFramework/Bootstrap/BootContext.php
+++ b/lib/private/AppFramework/Bootstrap/BootContext.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ceafcaa20a..d63dd96e9d5 100644
--- a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6177bf0aa06..a80010b7afa 100644
--- a/lib/private/AppFramework/Bootstrap/FunctionInjector.php
+++ b/lib/private/AppFramework/Bootstrap/FunctionInjector.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7398628e62f..b7073a1b098 100644
--- a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 27a1b747590..8a361f359ef 100644
--- a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1b1c986b667..010a489612a 100644
--- a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 42825816a7e..ffef8bf951a 100644
--- a/lib/private/AppFramework/Bootstrap/ServiceRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ServiceRegistration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f5b3b96b71..0245aa95a7f 100644
--- a/lib/private/AppFramework/Http.php
+++ b/lib/private/AppFramework/Http.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class Http extends BaseHttp {
];
}
-
/**
* 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 1f95459fb37..f905296f95d 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\AppFramework\Http;
use OC\AppFramework\Http;
@@ -47,7 +48,6 @@ class Dispatcher {
) {
}
-
/**
* Handles a request and calls the dispatcher on the controller
* @param Controller $controller the controller which will be called
@@ -127,7 +127,6 @@ class Dispatcher {
];
}
-
/**
* 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 aee009b4654..83b6ee6e450 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 f3d4d221fa0..e02f20ca308 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
}
-
/**
* Checks if the CSRF check was correct
* @return bool true if CSRF check passed
@@ -551,7 +551,6 @@ class Request implements \ArrayAccess, \Countable, IRequest {
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 @@ class Request implements \ArrayAccess, \Countable, IRequest {
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 45dd2246be6..ba498289590 100644
--- a/lib/private/AppFramework/Http/RequestId.php
+++ b/lib/private/AppFramework/Http/RequestId.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 281e52a159d..ea252ac4109 100644
--- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php
+++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a6e4f65035f..796c998c66f 100644
--- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 56f5babcc6f..c4db6733822 100644
--- a/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php
+++ b/lib/private/AppFramework/Middleware/FlowV2EphemeralSessionsMiddleware.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 c9b51f26f34..dc2de2ebd30 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class MiddlewareDispatcher {
$this->middlewareCounter = 0;
}
-
/**
* Adds a new middleware
* @param Middleware $middleWare the middleware which will be added
@@ -45,7 +44,6 @@ class MiddlewareDispatcher {
$this->middlewares[] = $middleWare;
}
-
/**
* returns an array with all middleware elements
* @return Middleware[] the middlewares
@@ -54,7 +52,6 @@ class MiddlewareDispatcher {
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 @@ class MiddlewareDispatcher {
}
}
-
/**
* 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 @@ class MiddlewareDispatcher {
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 @@ class MiddlewareDispatcher {
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 07a7ed0addf..5278bae128d 100644
--- a/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php
+++ b/lib/private/AppFramework/Middleware/NotModifiedMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dc2bf5cb4e1..042990e3c12 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 002364aa9a2..547b97a0586 100644
--- a/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php
+++ b/lib/private/AppFramework/Middleware/PublicShare/Exceptions/NeedAuthenticationException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a8aacc63724..5d52217e300 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 2630e7821f8..401490bf13b 100644
--- a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2d87f616a9d..a894fe9a4a1 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 3cc4fe1a101..94f56e08b43 100644
--- a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 36eb8f18928..f654bea356f 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/AdminIpNotAllowedException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f59e4ab4968..3741c2e8c7b 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/AppNotEnabledException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a29e3961bfe..d47816628c5 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/CrossSiteRequestForgeryException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f0d79ef593a..89ceaefd3da 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/ExAppRequiredException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c446d6a220b..8115861e729 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/LaxSameSiteCookieFailedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6252c914ac1..638b2f17d0a 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotAdminException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 854189f1b6b..fcc22bf9bbb 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotConfirmedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d2c52534420..dfb8abe3c50 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/NotLoggedInException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d12ee96292e..50be558e0e7 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/ReloadExecutionException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8d70ad4f2b..71e3b091ab9 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/SecurityException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8ae20ab4e70..47ed1b6a090 100644
--- a/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php
+++ b/lib/private/AppFramework/Middleware/Security/Exceptions/StrictCookieMissingException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d1d9bfbe5b4..396115a82f9 100644
--- a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 94fc329d5c7..d6caaa4f308 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 bec5a3c3db3..9d4fdfb6b74 100644
--- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 488093149ad..56f9a00f7bf 100644
--- a/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/ReloadExecutionMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99263d125cf..f25d49f8996 100644
--- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c589d1f0dc5..3b3028c0a20 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f10b24ec60..c0bb2567770 100644
--- a/lib/private/AppFramework/Middleware/SessionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 067b484494d..34b0dcb4abe 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 11d674b57f5..271e19827ef 100644
--- a/lib/private/AppFramework/OCS/V1Response.php
+++ b/lib/private/AppFramework/OCS/V1Response.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1c6c2cd076e..83d7b1812b6 100644
--- a/lib/private/AppFramework/OCS/V2Response.php
+++ b/lib/private/AppFramework/OCS/V2Response.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bbccda74d0b..dd6798480e3 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 7c4faeee5eb..483e0c16d28 100644
--- a/lib/private/AppFramework/Routing/RouteParser.php
+++ b/lib/private/AppFramework/Routing/RouteParser.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a14a9d0b03..f00200e64d2 100644
--- a/lib/private/AppFramework/ScopedPsrLogger.php
+++ b/lib/private/AppFramework/ScopedPsrLogger.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 04178d042c4..a16717132c5 100644
--- a/lib/private/AppFramework/Services/AppConfig.php
+++ b/lib/private/AppFramework/Services/AppConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d2caca47f7e..dfced82d692 100644
--- a/lib/private/AppFramework/Services/InitialState.php
+++ b/lib/private/AppFramework/Services/InitialState.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8d76d6a1028..b064dfc2bb3 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9afdfbef718..e827dc42fc4 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 5aba31577b2..deaf61558b6 100644
--- a/lib/private/AppFramework/Utility/TimeFactory.php
+++ b/lib/private/AppFramework/Utility/TimeFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2887a341bbf..bb5fd90165c 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1376e428060..b5cfd43304a 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 e3d20ccfd66..e67632e1452 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 438fcd2615d..ee88eababb8 100644
--- a/lib/private/Authentication/Events/ARemoteWipeEvent.php
+++ b/lib/private/Authentication/Events/ARemoteWipeEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf502ade0cc..b6c6c887d89 100644
--- a/lib/private/Authentication/Events/AppPasswordCreatedEvent.php
+++ b/lib/private/Authentication/Events/AppPasswordCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b946afc2afd..22f1676c1ab 100644
--- a/lib/private/Authentication/Events/LoginFailed.php
+++ b/lib/private/Authentication/Events/LoginFailed.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9704ebff3f5..897f9ee4e6a 100644
--- a/lib/private/Authentication/Events/RemoteWipeFinished.php
+++ b/lib/private/Authentication/Events/RemoteWipeFinished.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ad0f72f0e09..bc6a27671fe 100644
--- a/lib/private/Authentication/Events/RemoteWipeStarted.php
+++ b/lib/private/Authentication/Events/RemoteWipeStarted.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 58ee79dd41c..3e48cc52c52 100644
--- a/lib/private/Authentication/Exceptions/ExpiredTokenException.php
+++ b/lib/private/Authentication/Exceptions/ExpiredTokenException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9dbf3a7782a..bca4c42fc3e 100644
--- a/lib/private/Authentication/Exceptions/InvalidProviderException.php
+++ b/lib/private/Authentication/Exceptions/InvalidProviderException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d23f767e69b..1878ff3f06d 100644
--- a/lib/private/Authentication/Exceptions/InvalidTokenException.php
+++ b/lib/private/Authentication/Exceptions/InvalidTokenException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 53aa7e0a2ed..4c3c0bdd452 100644
--- a/lib/private/Authentication/Exceptions/LoginRequiredException.php
+++ b/lib/private/Authentication/Exceptions/LoginRequiredException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0326eede983..f8f52102150 100644
--- a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php
+++ b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a8d8181b5ae..146738f2b38 100644
--- a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php
+++ b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 aa331f31fd0..aa557532a2a 100644
--- a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php
+++ b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d8366f3bb65..ab57c8ffd5b 100644
--- a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php
+++ b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f8cec3d44a5..21c189a61c0 100644
--- a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php
+++ b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 00b28e8e2a1..57e010fa7e8 100644
--- a/lib/private/Authentication/Exceptions/WipeTokenException.php
+++ b/lib/private/Authentication/Exceptions/WipeTokenException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c8747d53b55..530a6d4efc6 100644
--- a/lib/private/Authentication/Listeners/LoginFailedListener.php
+++ b/lib/private/Authentication/Listeners/LoginFailedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a7c605569f4..cad23007732 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 943df1e44e1..aae2449c83a 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b3fafa44c98..5229aff150b 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 45de836482d..19b5e99a4b8 100644
--- a/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedFilesCleanupListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a3933116bd2..609e2bd057e 100644
--- a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bc67ef0feec..872ead6732c 100644
--- a/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedTokenCleanupListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2eafc7e1c4e..ff66433b95c 100644
--- a/lib/private/Authentication/Listeners/UserLoggedInListener.php
+++ b/lib/private/Authentication/Listeners/UserLoggedInListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c60fef2019c..93e79d3e7d3 100644
--- a/lib/private/Authentication/Login/ALoginCommand.php
+++ b/lib/private/Authentication/Login/ALoginCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fc90d9225a7..530112b5161 100644
--- a/lib/private/Authentication/Login/Chain.php
+++ b/lib/private/Authentication/Login/Chain.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0b6bb19da80..4e2b8d28b7a 100644
--- a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php
+++ b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3726de7cc3a..ecfc8e7101b 100644
--- a/lib/private/Authentication/Login/CompleteLoginCommand.php
+++ b/lib/private/Authentication/Login/CompleteLoginCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8ad098cebe1..63f906b52ba 100644
--- a/lib/private/Authentication/Login/CreateSessionTokenCommand.php
+++ b/lib/private/Authentication/Login/CreateSessionTokenCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e76ecd61407..544830e3bc9 100644
--- a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php
+++ b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 40b78229306..6aaa57d0fd0 100644
--- a/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php
+++ b/lib/private/Authentication/Login/FlowV2EphemeralSessionsCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b359c619aa..b7156068ca4 100644
--- a/lib/private/Authentication/Login/LoggedInCheckCommand.php
+++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8a4b61db59e..da58f774301 100644
--- a/lib/private/Authentication/Login/LoginResult.php
+++ b/lib/private/Authentication/Login/LoginResult.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 71f545f79b7..8679c4f02a4 100644
--- a/lib/private/Authentication/Login/PreLoginHookCommand.php
+++ b/lib/private/Authentication/Login/PreLoginHookCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 182e6967227..732194a1ffc 100644
--- a/lib/private/Authentication/Login/SetUserTimezoneCommand.php
+++ b/lib/private/Authentication/Login/SetUserTimezoneCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f770067824d..f338edc5123 100644
--- a/lib/private/Authentication/Login/TwoFactorCommand.php
+++ b/lib/private/Authentication/Login/TwoFactorCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 09c87ad3a8d..a4bf1424f61 100644
--- a/lib/private/Authentication/Login/UidLoginCommand.php
+++ b/lib/private/Authentication/Login/UidLoginCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a03ccd5d243..340609752e8 100644
--- a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php
+++ b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d9c5fc3aa92..5ced7f34012 100644
--- a/lib/private/Authentication/Login/UserDisabledCheckCommand.php
+++ b/lib/private/Authentication/Login/UserDisabledCheckCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6732a4339fa..87027d8a956 100644
--- a/lib/private/Authentication/Login/WebAuthnChain.php
+++ b/lib/private/Authentication/Login/WebAuthnChain.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3ceec3eeb6e..0bd64666cec 100644
--- a/lib/private/Authentication/Login/WebAuthnLoginCommand.php
+++ b/lib/private/Authentication/Login/WebAuthnLoginCommand.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99e7827743e..4d2dff0ad8c 100644
--- a/lib/private/Authentication/LoginCredentials/Credentials.php
+++ b/lib/private/Authentication/LoginCredentials/Credentials.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bab1d1cf910..c3c68774c13 100644
--- a/lib/private/Authentication/LoginCredentials/Store.php
+++ b/lib/private/Authentication/LoginCredentials/Store.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 af92e476110..73d8505ce2e 100644
--- a/lib/private/Authentication/Notifications/Notifier.php
+++ b/lib/private/Authentication/Notifications/Notifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9a90cfc7d76..f745503a117 100644
--- a/lib/private/Authentication/Token/INamedToken.php
+++ b/lib/private/Authentication/Token/INamedToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d47427e79bf..542aeb118a8 100644
--- a/lib/private/Authentication/Token/IProvider.php
+++ b/lib/private/Authentication/Token/IProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 2028a0b328c..5af528c487d 100644
--- a/lib/private/Authentication/Token/IToken.php
+++ b/lib/private/Authentication/Token/IToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fc1476785cd..a4744a16eba 100644
--- a/lib/private/Authentication/Token/IWipeableToken.php
+++ b/lib/private/Authentication/Token/IWipeableToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 836484dbf7f..46438377376 100644
--- a/lib/private/Authentication/Token/Manager.php
+++ b/lib/private/Authentication/Token/Manager.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class Manager implements IProvider, OCPIProvider {
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 11739507851..e3d5e7001ff 100644
--- a/lib/private/Authentication/Token/PublicKeyToken.php
+++ b/lib/private/Authentication/Token/PublicKeyToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9aabd69e57a..cdf9556e146 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a43d4a7f888..a079c5e38f1 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 2a023f43b68..08dce6fa5a1 100644
--- a/lib/private/Authentication/Token/RemoteWipe.php
+++ b/lib/private/Authentication/Token/RemoteWipe.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 76998eea4c1..d69e7b37836 100644
--- a/lib/private/Authentication/Token/TokenCleanupJob.php
+++ b/lib/private/Authentication/Token/TokenCleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70a3827f301..bf9b08efcf1 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f7b4e85e3ab..affd37aed02 100644
--- a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php
+++ b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe6aae0f99f..0211ac74541 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf4c187f1e9..b829666f3c0 100644
--- a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php
+++ b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d1bfc4f4085..66313b1b0a3 100644
--- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
+++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f82f666ac9d..c69380d4685 100644
--- a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php
+++ b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d417721268c..6f08eec54b2 100644
--- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php
+++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1224a6caaf0..6001ce70b33 100644
--- a/lib/private/Authentication/TwoFactorAuth/Registry.php
+++ b/lib/private/Authentication/TwoFactorAuth/Registry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bf24d2b0b77..a58dfa6444c 100644
--- a/lib/private/Authentication/WebAuthn/CredentialRepository.php
+++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 abc9a74f5c8..b3a780cb8e4 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fa7304157c8..2463f7dd1b4 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c322c844c9c..932631f2aea 100644
--- a/lib/private/Authentication/WebAuthn/Manager.php
+++ b/lib/private/Authentication/WebAuthn/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b92a7aafacd..2c674de8b06 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\Avatar;
use Imagick;
@@ -228,7 +229,6 @@ abstract class Avatar implements IAvatar {
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 d4ea69a9584..fc508d7d2cd 100644
--- a/lib/private/Avatar/AvatarManager.php
+++ b/lib/private/Avatar/AvatarManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 11e9a47223f..7bbc3efdc79 100644
--- a/lib/private/Avatar/GuestAvatar.php
+++ b/lib/private/Avatar/GuestAvatar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class GuestAvatar extends Avatar {
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 7e3c35cbddf..705cbb754d4 100644
--- a/lib/private/Avatar/PlaceholderAvatar.php
+++ b/lib/private/Avatar/PlaceholderAvatar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f2dd98bcced..97226f4bb3f 100644
--- a/lib/private/Avatar/UserAvatar.php
+++ b/lib/private/Avatar/UserAvatar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bfc4902f2f9..283ceedc1fd 100644
--- a/lib/private/BackgroundJob/JobClassesRegistry.php
+++ b/lib/private/BackgroundJob/JobClassesRegistry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 242b78ade85..a6d7f761419 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 06a16625910..7a19bdf001a 100644
--- a/lib/private/BackgroundJob/JobRuns.php
+++ b/lib/private/BackgroundJob/JobRuns.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6d834e0b58d..549ba44700f 100644
--- a/lib/private/Broadcast/Events/BroadcastEvent.php
+++ b/lib/private/Broadcast/Events/BroadcastEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0d312bd9797..addc9b0cd20 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 f45a0ba30d7..e8e129e9d63 100644
--- a/lib/private/Calendar/CalendarQuery.php
+++ b/lib/private/Calendar/CalendarQuery.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1ef694ac6c2..be7853aee37 100644
--- a/lib/private/Calendar/Manager.php
+++ b/lib/private/Calendar/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ace6e5a219c..cd00e20649d 100644
--- a/lib/private/Calendar/Resource/Manager.php
+++ b/lib/private/Calendar/Resource/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a31127068a4..76de5eb34a7 100644
--- a/lib/private/Calendar/Room/Manager.php
+++ b/lib/private/Calendar/Room/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 494504af3d8..884b957dbdd 100644
--- a/lib/private/CapabilitiesManager.php
+++ b/lib/private/CapabilitiesManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d94e4c431bc..26220d2f8e2 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 36143b7479f..5f70fca126b 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 de1bfa9edb9..9c48670daaa 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 5c4156c6e19..57fcdbf1991 100644
--- a/lib/private/Collaboration/Collaborators/MailByMailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/MailByMailPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3149a4d14f9..1f36ff0eadd 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 @@ class MailPlugin implements ISearchPlugin {
'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 68d0a462f00..d6ea7e6cc57 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 5dd17c9527b..20556bfb277 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 @@ class RemotePlugin implements ISearchPlugin {
$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 4eb3b275c67..1e7f38e1c85 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 0b887aac545..1a2e4f3d5ca 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 6c1367cdba8..3805593b085 100644
--- a/lib/private/Collaboration/Collaborators/UserByMailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserByMailPlugin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 59d52b94344..36be0b041db 100644
--- a/lib/private/Collaboration/Resources/Collection.php
+++ b/lib/private/Collaboration/Resources/Collection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1ee792a0b55..8e95a9f815e 100644
--- a/lib/private/Collaboration/Resources/Listener.php
+++ b/lib/private/Collaboration/Resources/Listener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3e6e7e5d5bc..f4673bc6e94 100644
--- a/lib/private/Collaboration/Resources/Manager.php
+++ b/lib/private/Collaboration/Resources/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 839aef847ed..a73a383ac30 100644
--- a/lib/private/Collaboration/Resources/ProviderManager.php
+++ b/lib/private/Collaboration/Resources/ProviderManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2af252da598..c61bd4a1dca 100644
--- a/lib/private/Collaboration/Resources/Resource.php
+++ b/lib/private/Collaboration/Resources/Resource.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b802489198..cf14d82b90d 100644
--- a/lib/private/Color.php
+++ b/lib/private/Color.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0215b131238..0f65a63c405 100644
--- a/lib/private/Command/AsyncBus.php
+++ b/lib/private/Command/AsyncBus.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b00e6159f91..b461e3c1370 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 0b059e2e5af..07cc92d0320 100644
--- a/lib/private/Command/CronBus.php
+++ b/lib/private/Command/CronBus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1af1591492d..a8deeac359e 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 9c3c2467959..de2d1e3f9c0 100644
--- a/lib/private/Command/QueueBus.php
+++ b/lib/private/Command/QueueBus.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 2736d14ccaf..b3b4da225e2 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 @@ class Comment implements IComment {
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 b4922f967e5..c6857162f2b 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 @@ class Manager implements ICommentsManager {
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 cef07216a27..043c7cf6d73 100644
--- a/lib/private/Comments/ManagerFactory.php
+++ b/lib/private/Comments/ManagerFactory.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1a8337907f1..ecfb9fc3160 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 302b7b3b725..432fc344eb5 100644
--- a/lib/private/Config/ConfigManager.php
+++ b/lib/private/Config/ConfigManager.php
@@ -41,7 +41,6 @@ class ConfigManager {
$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 @@ class ConfigManager {
}
}
-
/**
* converting value from rename to the new key
*
@@ -202,19 +200,15 @@ class ConfigManager {
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 @@ class ConfigManager {
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 4ee0dc4e04b..304980bce60 100644
--- a/lib/private/Config/UserConfig.php
+++ b/lib/private/Config/UserConfig.php
@@ -364,7 +364,6 @@ class UserConfig implements IUserConfig {
return $values;
}
-
/**
* @inheritDoc
*
@@ -928,7 +927,6 @@ class UserConfig implements IUserConfig {
);
}
-
/**
* @inheritDoc
*
@@ -1469,7 +1467,6 @@ class UserConfig implements IUserConfig {
return true;
}
-
/**
* @inheritDoc
*
@@ -1970,7 +1967,6 @@ class UserConfig implements IUserConfig {
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 2e4783a11cf..2aaa6f21baf 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 44de18263e6..adc4296e596 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 ead893e5745..b703d7fb53a 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 bee6dce5677..0482db2cae0 100644
--- a/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
+++ b/lib/private/Contacts/ContactsMenu/Actions/LinkAction.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f8def45421b..9b2fb6238bb 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 75eeb0f5e34..4f148a6d6b1 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 e19efb243b8..847dd535fa9 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 6ebcfdc34f2..2b6ea3eeb97 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 b50e676249d..b038d8c28a0 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 70fe9290cc5..f27ff858d9b 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 fe7181005df..b565846d495 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 00fff562094..0d8c4e3844b 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 27be1b327e2..c53cf5f3dd8 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\DB;
use Doctrine\Common\EventManager;
@@ -786,7 +787,6 @@ class Connection extends PrimaryReadReplicaConnection {
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 0f275c3aae2..814b3fa5d49 100644
--- a/lib/private/DB/ConnectionAdapter.php
+++ b/lib/private/DB/ConnectionAdapter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3d5de0d7c84..51fb565859c 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 483b3d8542f..2e9dfa8fa63 100644
--- a/lib/private/DB/Exceptions/DbalException.php
+++ b/lib/private/DB/Exceptions/DbalException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e7044bf73ea..679391009c4 100644
--- a/lib/private/DB/Middleware/UtcTimezoneMiddleware.php
+++ b/lib/private/DB/Middleware/UtcTimezoneMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d8e91f5c393..0ef4e8ad0c0 100644
--- a/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php
+++ b/lib/private/DB/Middleware/UtcTimezoneMiddlewareDriver.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7e0d9528f0..4feaf2863f1 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 e7f40f4ed03..a0cb407a94d 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 0d2f73a9a1d..737a6dbe3d3 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 8a5c43cf5e5..f58902a9282 100644
--- a/lib/private/DB/MigratorExecuteSqlEvent.php
+++ b/lib/private/DB/MigratorExecuteSqlEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5e8402d394e..68d4e03dcbc 100644
--- a/lib/private/DB/MissingColumnInformation.php
+++ b/lib/private/DB/MissingColumnInformation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99a81782858..be3135e7751 100644
--- a/lib/private/DB/MissingIndexInformation.php
+++ b/lib/private/DB/MissingIndexInformation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 355ce86423a..6885526c529 100644
--- a/lib/private/DB/MissingPrimaryKeyInformation.php
+++ b/lib/private/DB/MissingPrimaryKeyInformation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3413be43417..cd376e6381d 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 d46aa694665..d88dfbd1dac 100644
--- a/lib/private/DB/OCSqlitePlatform.php
+++ b/lib/private/DB/OCSqlitePlatform.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 04159f818cf..e4dd4a85fb6 100644
--- a/lib/private/DB/ObjectParameter.php
+++ b/lib/private/DB/ObjectParameter.php
@@ -8,6 +8,7 @@ declare(strict_types = 1);
* 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 6b4efa8ca5a..5cf6324dc59 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 30e44af6e95..68eb6324226 100644
--- a/lib/private/DB/OracleMigrator.php
+++ b/lib/private/DB/OracleMigrator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc8812e202b..e2482fb4985 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 f88ad0edc6c..3ce7fdce5cc 100644
--- a/lib/private/DB/PreparedStatement.php
+++ b/lib/private/DB/PreparedStatement.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6a1d6c3f513..093fd9dee42 100644
--- a/lib/private/DB/QueryBuilder/CompositeExpression.php
+++ b/lib/private/DB/QueryBuilder/CompositeExpression.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3565e97efd1..8dea79417a4 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 a604f6957a3..345921249bc 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 f95cd98921f..16b8cde8582 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 e3dd5841a11..6b3a855afeb 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 f1ae4d06536..e10b299c7dd 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 acdf19189a7..4653ee0c489 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 606d1e6b288..d0370f97a2d 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 c41f9ff1bfd..7bc3433b4be 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 b317d9f21b9..1813e21a86e 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 438883b077f..bf7960eec34 100644
--- a/lib/private/DB/QueryBuilder/Literal.php
+++ b/lib/private/DB/QueryBuilder/Literal.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 fa7b7dbd0a6..c3a5daec9ce 100644
--- a/lib/private/DB/QueryBuilder/Parameter.php
+++ b/lib/private/DB/QueryBuilder/Parameter.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a08858d1d6b..28e4a4a8ebd 100644
--- a/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php
+++ b/lib/private/DB/QueryBuilder/Partitioned/JoinCondition.php
@@ -120,7 +120,6 @@ class JoinCondition {
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 3e66bab1f4d..8c04cc79292 100644
--- a/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/Partitioned/PartitionedQueryBuilder.php
@@ -179,7 +179,6 @@ class PartitionedQueryBuilder extends ShardedQueryBuilder {
$this->selects = [];
}
-
public function addPartition(PartitionSplit $partition): void {
$this->partitions[] = $partition;
}
@@ -375,7 +374,6 @@ class PartitionedQueryBuilder extends ShardedQueryBuilder {
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 30e85675a75..f5252fcfacc 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 @@ class QueryBuilder extends TypedQueryBuilder {
);
}
-
/**
* 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 fa456836a40..4d008bd464c 100644
--- a/lib/private/DB/QueryBuilder/QueryFunction.php
+++ b/lib/private/DB/QueryBuilder/QueryFunction.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7ce4b359638..dfed901f7e7 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 034abd3ce20..0c2bf2fa1db 100644
--- a/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/Sharded/ShardedQueryBuilder.php
@@ -437,5 +437,4 @@ class ShardedQueryBuilder extends ExtendedQueryBuilder {
}
}
-
}
diff --git a/lib/private/DB/QueryBuilder/TypedQueryBuilder.php b/lib/private/DB/QueryBuilder/TypedQueryBuilder.php
index eb3a81a0c23..8f95b99f74d 100644
--- a/lib/private/DB/QueryBuilder/TypedQueryBuilder.php
+++ b/lib/private/DB/QueryBuilder/TypedQueryBuilder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b403e78673e..45922f8e310 100644
--- a/lib/private/DB/ResultAdapter.php
+++ b/lib/private/DB/ResultAdapter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0d178506d08..a3704dda100 100644
--- a/lib/private/DB/SQLiteMigrator.php
+++ b/lib/private/DB/SQLiteMigrator.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e3c64924e63..26113a52780 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 17c457ac53e..103bcb25ccc 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 5e43a32c3bb..ca8254832fb 100644
--- a/lib/private/DB/SetTransactionIsolationLevel.php
+++ b/lib/private/DB/SetTransactionIsolationLevel.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4619a4ee5c1..2d4a8f1a0db 100644
--- a/lib/private/Dashboard/Manager.php
+++ b/lib/private/Dashboard/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70190d88bd2..f09bb1ee5c2 100644
--- a/lib/private/DatabaseException.php
+++ b/lib/private/DatabaseException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 03f769b3c74..afbd94d9ac9 100644
--- a/lib/private/DatabaseSetupException.php
+++ b/lib/private/DatabaseSetupException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 91c84baee27..05bfba084d7 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 2c5e1dbab3e..d31a50823d0 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 c322f99e306..e449ba5d269 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 996f7165f96..37b062df76d 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 5b687de935f..22bd1a39285 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 ea378d15d11..cd7cff6338a 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 @@ class QueryLogger implements IQueryLogger {
$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 f3a62fc201f..1189aaf1867 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 @@ class Manager implements IManager {
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 ece88c293aa..7fbdb798546 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 7f1046d6f2d..6ab57be751e 100644
--- a/lib/private/EmojiHelper.php
+++ b/lib/private/EmojiHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 af5b7873858..23a7af44863 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 126aec13709..8c4e87ef8b3 100644
--- a/lib/private/Encryption/Exceptions/DecryptionFailedException.php
+++ b/lib/private/Encryption/Exceptions/DecryptionFailedException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 12d0b2ee047..5e71397bf61 100644
--- a/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php
+++ b/lib/private/Encryption/Exceptions/EmptyEncryptionDataException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 fc95f70ea7d..94167ae9032 100644
--- a/lib/private/Encryption/Exceptions/EncryptionFailedException.php
+++ b/lib/private/Encryption/Exceptions/EncryptionFailedException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c6136bc0255..d37f01424a6 100644
--- a/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php
+++ b/lib/private/Encryption/Exceptions/EncryptionHeaderKeyExistsException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f31adb757e1..da6b24b08b9 100644
--- a/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php
+++ b/lib/private/Encryption/Exceptions/EncryptionHeaderToLargeException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0d2350ca5dc..e668ca724e8 100644
--- a/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php
+++ b/lib/private/Encryption/Exceptions/ModuleAlreadyExistsException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 6b4db0dbc77..29a6f007c41 100644
--- a/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php
+++ b/lib/private/Encryption/Exceptions/ModuleDoesNotExistsException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b70f008b9f0..5f5e604c7b6 100644
--- a/lib/private/Encryption/Exceptions/UnknownCipherException.php
+++ b/lib/private/Encryption/Exceptions/UnknownCipherException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 6b4b7528bf3..0a4423ce38e 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 @@ class File implements IFile {
$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 48a5bc1bdc3..7180d206d55 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 @@ class Storage implements IStorage {
return false;
}
-
/**
* copy keys if a file was renamed
*
diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php
index ac27f0911b8..b7db4dced17 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 @@ class Manager implements IManager {
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 0fff34cb111..8002131d83e 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 @@ class Util {
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 5bba7747c8a..9b44ac89f98 100644
--- a/lib/private/EventDispatcher/EventDispatcher.php
+++ b/lib/private/EventDispatcher/EventDispatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0876a440465..c51b0cc2789 100644
--- a/lib/private/EventSource.php
+++ b/lib/private/EventSource.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f183fa3e87d..ffe86305295 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 b5ecd468814..cf4a8389a34 100644
--- a/lib/private/Federation/CloudFederationNotification.php
+++ b/lib/private/Federation/CloudFederationNotification.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 77d225a49b3..a0bafa84c99 100644
--- a/lib/private/Federation/CloudFederationProviderManager.php
+++ b/lib/private/Federation/CloudFederationProviderManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class CloudFederationProviderManager implements ICloudFederationProviderManager
) {
}
-
/**
* 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 311a0ee7f5b..bcc9e7a87d3 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 9150d89d4d9..6964bbe60b3 100644
--- a/lib/private/Federation/CloudId.php
+++ b/lib/private/Federation/CloudId.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 57217af524e..c94fa7dac83 100644
--- a/lib/private/Federation/CloudIdManager.php
+++ b/lib/private/Federation/CloudIdManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b4e8d51d438..6790ca40474 100644
--- a/lib/private/Files/AppData/AppData.php
+++ b/lib/private/Files/AppData/AppData.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cf436b54ea3..6cff491f097 100644
--- a/lib/private/Files/AppData/Factory.php
+++ b/lib/private/Files/AppData/Factory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b90d241ab45..9a897ba68bc 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 @@ class Cache implements ICache {
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 a115dcfbdba..a8c31822373 100644
--- a/lib/private/Files/Cache/CacheDependencies.php
+++ b/lib/private/Files/Cache/CacheDependencies.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 74af7d0a598..1dbdda4240b 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 @@ class CacheEntry implements ICacheEntry {
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 3174974b6f5..b62dd6f2120 100644
--- a/lib/private/Files/Cache/CacheQueryBuilder.php
+++ b/lib/private/Files/Cache/CacheQueryBuilder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7db87accc32..324ae352d12 100644
--- a/lib/private/Files/Cache/FailedCache.php
+++ b/lib/private/Files/Cache/FailedCache.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b7357dfe0bc..016ff6de46e 100644
--- a/lib/private/Files/Cache/FileAccess.php
+++ b/lib/private/Files/Cache/FileAccess.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a0b4754ff97..b34c1e4db08 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 f42e1d880ad..eceae6eb11d 100644
--- a/lib/private/Files/Cache/HomePropagator.php
+++ b/lib/private/Files/Cache/HomePropagator.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 be9f74daf8a..0f72147d5a6 100644
--- a/lib/private/Files/Cache/LocalRootScanner.php
+++ b/lib/private/Files/Cache/LocalRootScanner.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a13e0d7d00e..f4fd07bb4ba 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 e6973e8d266..a422a9410db 100644
--- a/lib/private/Files/Cache/NullWatcher.php
+++ b/lib/private/Files/Cache/NullWatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 38d8ccee641..722866dd1b3 100644
--- a/lib/private/Files/Cache/Propagator.php
+++ b/lib/private/Files/Cache/Propagator.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 91a35cb63da..8cbc4591d75 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 @@ class QuerySearchHelper {
}
}
-
/**
* @return list
*/
@@ -118,7 +118,6 @@ class QuerySearchHelper {
));
}
-
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 36c8c02a8bf..58f15755277 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 53a6c6f6596..009a1d068e1 100644
--- a/lib/private/Files/Cache/SearchBuilder.php
+++ b/lib/private/Files/Cache/SearchBuilder.php
@@ -286,7 +286,6 @@ class SearchBuilder {
}
}
-
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 8eea54b5840..7b16eabb0bd 100644
--- a/lib/private/Files/Cache/Storage.php
+++ b/lib/private/Files/Cache/Storage.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 53a40c034ce..6efefc149ad 100644
--- a/lib/private/Files/Cache/StorageGlobal.php
+++ b/lib/private/Files/Cache/StorageGlobal.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5c55bbe34e4..62d43be5f59 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 48c5e323514..14769772509 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 477d85c6933..53140f29217 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 56e661b3c02..5ad88ce12e8 100644
--- a/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php
+++ b/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 c08a703a08a..1139e900cc2 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 2b5b5a2d6a1..59950f92579 100644
--- a/lib/private/Files/Cache/Wrapper/JailPropagator.php
+++ b/lib/private/Files/Cache/Wrapper/JailPropagator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d066d069d15..7facd3eeae7 100644
--- a/lib/private/Files/Cache/Wrapper/JailWatcher.php
+++ b/lib/private/Files/Cache/Wrapper/JailWatcher.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class JailWatcher extends Watcher {
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 29636e5c665..4bc1093f261 100644
--- a/lib/private/Files/Config/CachedMountFileInfo.php
+++ b/lib/private/Files/Config/CachedMountFileInfo.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ffe06c25b16..c46e5f9fb66 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 699f3e4bd55..c0f5c28fcef 100644
--- a/lib/private/Files/Config/LazyPathCachedMountInfo.php
+++ b/lib/private/Files/Config/LazyPathCachedMountInfo.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8c992f7a162..1b1e1c119fe 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 d6a33e675b3..0040dbe1f71 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 6df2d08de77..319cc311363 100644
--- a/lib/private/Files/Config/UserMountCacheListener.php
+++ b/lib/private/Files/Config/UserMountCacheListener.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 65280b0f315..d78c67fd9be 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 1610b09da22..095dabdd486 100644
--- a/lib/private/Files/FilenameValidator.php
+++ b/lib/private/Files/FilenameValidator.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class FilenameValidator implements IFilenameValidator {
}
}
-
/**
* 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 fcefbac5e24..8dffd9bd1b3 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 ae2613fc9dd..d8a67db86c9 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 b05f2aaee31..c1fdae8f03b 100644
--- a/lib/private/Files/Mount/CacheMountProvider.php
+++ b/lib/private/Files/Mount/CacheMountProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0b867436300..5c5db6d2bed 100644
--- a/lib/private/Files/Mount/LocalHomeMountProvider.php
+++ b/lib/private/Files/Mount/LocalHomeMountProvider.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 3ec0fa5d125..6923eb7aa66 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f927c4f7d98..22a36fd5834 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 574a5594f87..b48fc8bdcc5 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 de22ccc9f75..7c4b2745dc3 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 37de7abfbe5..b6774987193 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 1149951174c..a318d182fe6 100644
--- a/lib/private/Files/Node/HookConnector.php
+++ b/lib/private/Files/Node/HookConnector.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd67de7c33a..96b4cecd3d2 100644
--- a/lib/private/Files/Node/LazyFolder.php
+++ b/lib/private/Files/Node/LazyFolder.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cf1cd90245b..f69d1ab5e4e 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 496d2be81a7..1989372c67c 100644
--- a/lib/private/Files/Node/LazyUserFolder.php
+++ b/lib/private/Files/Node/LazyUserFolder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 63e275d1f47..a599833567f 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 356ba5e4785..d2d57a47f08 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 487170c98fa..e4481ceecc2 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 422b39356e0..0d9dd05f65d 100644
--- a/lib/private/Files/Notify/Change.php
+++ b/lib/private/Files/Notify/Change.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7dfde93118..0510a720f52 100644
--- a/lib/private/Files/Notify/RenameChange.php
+++ b/lib/private/Files/Notify/RenameChange.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 090c81cfe62..4d73efc988f 100644
--- a/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/AppdataPreviewObjectStoreStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 75add59f4ee..c63ee3afc4d 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 d157f86f5ae..44f0cfc25e8 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 a8f0a58e4e0..686f36993ca 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 19ac35de3ce..e39c906997d 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 bd69fa7926e..edc082f9290 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 661d95c4f82..1c6eaf437ae 100644
--- a/lib/private/Files/ObjectStore/S3ConfigTrait.php
+++ b/lib/private/Files/ObjectStore/S3ConfigTrait.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f3a88d42185..3837f0b869f 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 f632c15a3ee..d2f43ca65f7 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 @@ trait S3ObjectTrait {
$this->getConnection()->putObject($args);
}
-
/**
* Multipart upload helper that tries to avoid orphaned fragments in S3
*
@@ -217,7 +217,6 @@ trait S3ObjectTrait {
'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 47b3cf8e7f5..33e459453c6 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 0e8b54a6843..a851d61c4bb 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 288af35bbaf..fec626078a0 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 aef25b0c421..0dc49472f7a 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class SwiftFactory {
}
}
-
$client = new OpenStack($this->params);
return $client;
diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
index 7ffd728a922..1a3f0e70046 100644
--- a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
+++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b4f3258709f..be109c03cc7 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 6c2e443f232..f64c85b68bc 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 74ce9fea93a..b620cdb5006 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 6fbada1d5a1..9d71ffb5f94 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 84022c2f71a..392518f1db6 100644
--- a/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php
+++ b/lib/private/Files/Search/QueryOptimizer/PathPrefixOptimizer.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 562ed4aa915..d7a1ff4f64b 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 660138f9d83..b4c51643c2f 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 95d222474d7..9bb230e76b3 100644
--- a/lib/private/Files/Search/SearchBinaryOperator.php
+++ b/lib/private/Files/Search/SearchBinaryOperator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f3ebfa64858..ca50f93fe42 100644
--- a/lib/private/Files/Search/SearchComparison.php
+++ b/lib/private/Files/Search/SearchComparison.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3c79e641512..11361cf8d17 100644
--- a/lib/private/Files/Search/SearchOrder.php
+++ b/lib/private/Files/Search/SearchOrder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ecefe02205a..5823e81f59a 100644
--- a/lib/private/Files/Search/SearchQuery.php
+++ b/lib/private/Files/Search/SearchQuery.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5f331e648d9..b269a4fbddc 100644
--- a/lib/private/Files/SimpleFS/NewSimpleFile.php
+++ b/lib/private/Files/SimpleFS/NewSimpleFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class NewSimpleFile implements ISimpleFile {
}
}
-
/**
* Delete the file
*
diff --git a/lib/private/Files/SimpleFS/SimpleFile.php b/lib/private/Files/SimpleFS/SimpleFile.php
index b28a415f57e..3ce653530d5 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 @@ class SimpleFile implements ISimpleFile {
}
}
-
/**
* Delete the file
*
diff --git a/lib/private/Files/SimpleFS/SimpleFolder.php b/lib/private/Files/SimpleFS/SimpleFolder.php
index 2124302823c..91339a7f6bc 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 dbb98eda9b7..02983ac178c 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 bcd73ad7cfc..f4f158c4fe7 100644
--- a/lib/private/Files/Storage/CommonTest.php
+++ b/lib/private/Files/Storage/CommonTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 0c74abdfee1..60b9b1504f7 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 @@ class DAV extends Common {
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 e85982cb6ec..e6e3b8f8f4c 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 ab3a8c8806a..7ed391fa372 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 @@ class Home extends Local implements IHomeStorage {
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 e5806f855bc..e38485f7554 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 4086b481051..f9cb250e92f 100644
--- a/lib/private/Files/Storage/LocalRootStorage.php
+++ b/lib/private/Files/Storage/LocalRootStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 805a67084cc..ea1d6c65c8d 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 afb7334afd4..56265516dae 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 88383350152..d53b1140cbc 100644
--- a/lib/private/Files/Storage/Storage.php
+++ b/lib/private/Files/Storage/Storage.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e590c44ed55..bddfaeb0da8 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 bb46d7100a1..2bbe232f7ef 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 924567e1afe..0f040fe703b 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 @@ class Availability extends Wrapper {
}
}
-
-
#[\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 e8c01f0a018..bf080cd47f2 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 3f07d690a50..a0f706bf696 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 8edf25e9a51..0683afddc70 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 @@ class Encryption extends Wrapper {
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 7d1a5814e93..c17bd1f750d 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 @@ class Jail extends Wrapper {
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 da10e940753..881c2aad1d2 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 15061b7c023..5dbedc76b8d 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 11b992dbf97..b0ff0117b96 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 97c0ea46187..64ef604920c 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1c662aa023c..80ad76c0724 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\Files\Stream;
use Icewind\Streams\Wrapper;
@@ -67,7 +68,6 @@ class Encryption extends Wrapper {
];
}
-
/**
* Wraps a stream with the provided callbacks
*
diff --git a/lib/private/Files/Stream/HashWrapper.php b/lib/private/Files/Stream/HashWrapper.php
index 16206e56c4a..b4e743b79cf 100644
--- a/lib/private/Files/Stream/HashWrapper.php
+++ b/lib/private/Files/Stream/HashWrapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 755d9b428d6..09659997a6b 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 cefa8ced1db..9d629920486 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 ff9c40029e7..a9754b95bbe 100644
--- a/lib/private/Files/Template/TemplateManager.php
+++ b/lib/private/Files/Template/TemplateManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 67a65cdf0e0..5cb69eb674a 100644
--- a/lib/private/Files/Type/Detection.php
+++ b/lib/private/Files/Type/Detection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48a62bc2858..3c502378822 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 c1a8d0d1a66..ac29ff20e84 100644
--- a/lib/private/Files/Utils/PathHelper.php
+++ b/lib/private/Files/Utils/PathHelper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cca0b6784a2..adf0d82c8ce 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 da3900bff4a..468ad73acec 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 @@ class View {
}
}
-
/**
* @param string $path
* @return mixed
diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php
index 85774b82027..b645166117f 100644
--- a/lib/private/FilesMetadata/Model/FilesMetadata.php
+++ b/lib/private/FilesMetadata/Model/FilesMetadata.php
@@ -165,7 +165,6 @@ class FilesMetadata implements IFilesMetadata {
$this->metadata[$key]->setEditPermission($permission);
}
-
#[\Override]
public function getEtag(string $key): string {
if (!array_key_exists($key, $this->metadata)) {
@@ -417,7 +416,6 @@ class FilesMetadata implements IFilesMetadata {
return $this;
}
-
/**
* @param string $key metadata key
* @param bool $value metadata value
@@ -446,7 +444,6 @@ class FilesMetadata implements IFilesMetadata {
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 b6547c6ba2e..a75a3e6103f 100644
--- a/lib/private/FilesMetadata/Model/MetadataValueWrapper.php
+++ b/lib/private/FilesMetadata/Model/MetadataValueWrapper.php
@@ -163,7 +163,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper {
$this->assertType(self::TYPE_BOOL);
$this->value = $value;
-
return $this;
}
@@ -217,7 +216,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper {
return $this;
}
-
/**
* @inheritDoc
* @return string set value
diff --git a/lib/private/ForbiddenException.php b/lib/private/ForbiddenException.php
index c03c27e59e8..3524bd593c7 100644
--- a/lib/private/ForbiddenException.php
+++ b/lib/private/ForbiddenException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 67f9b88b7e8..a3bdf36c00b 100644
--- a/lib/private/FullTextSearch/FullTextSearchManager.php
+++ b/lib/private/FullTextSearch/FullTextSearchManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class FullTextSearchManager implements IFullTextSearchManager {
return true;
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -78,7 +78,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
return $this->providerService;
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -90,7 +89,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
return $this->indexService;
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -102,7 +100,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
return $this->searchService;
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -111,7 +108,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
$this->getProviderService()->addJavascriptAPI();
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -120,7 +116,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
return $this->getProviderService()->isProviderIndexed($providerId);
}
-
/**
* @throws FullTextSearchAppNotAvailableException
*/
@@ -144,7 +139,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
return $this->getIndexService()->createIndex($providerId, $documentId, $userId, $status);
}
-
/**
* @see IIndex for available value for $status.
*
@@ -175,7 +169,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
$this->getIndexService()->updateIndexesStatus($providerId, $documentIds, $status, $reset);
}
-
/**
* @param IIndex[] $indexes
*
@@ -186,7 +179,6 @@ class FullTextSearchManager implements IFullTextSearchManager {
$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 10adb4bb5a0..288ec45ef9a 100644
--- a/lib/private/FullTextSearch/Model/DocumentAccess.php
+++ b/lib/private/FullTextSearch/Model/DocumentAccess.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
$this->setOwnerId($ownerId);
}
-
/**
* Set the Owner of the document.
*
@@ -78,7 +77,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->ownerId;
}
-
/**
* Set the viewer of the document.
*
@@ -101,7 +99,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->viewerId;
}
-
/**
* Set the list of users that have read access to the document.
*
@@ -149,7 +146,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->users;
}
-
/**
* Set the list of groups that have read access to the document.
*
@@ -197,7 +193,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->groups;
}
-
/**
* Set the list of circles that have read access to the document.
*
@@ -245,7 +240,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->circles;
}
-
/**
* Set the list of links that have read access to the document.
*
@@ -268,7 +262,6 @@ final class DocumentAccess implements IDocumentAccess, JsonSerializable {
return $this->links;
}
-
/**
* @since 16.0.0
*/
diff --git a/lib/private/FullTextSearch/Model/IndexDocument.php b/lib/private/FullTextSearch/Model/IndexDocument.php
index ec6f2f0ee1e..55d47e7a5af 100644
--- a/lib/private/FullTextSearch/Model/IndexDocument.php
+++ b/lib/private/FullTextSearch/Model/IndexDocument.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
) {
}
-
/**
* Returns the Id of the original document.
*
@@ -90,7 +89,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->id;
}
-
/**
* Returns the Id of the provider.
*
@@ -101,7 +99,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->providerId;
}
-
/**
* Set the Index related to the IIndexDocument.
*
@@ -173,7 +170,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return ($this->modifiedTime < $time);
}
-
/**
* Set the read rights of the original document using a IDocumentAccess.
*
@@ -198,7 +194,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->access;
}
-
/**
* Add a tag to the list.
*
@@ -233,7 +228,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->tags;
}
-
/**
* Add a meta tag to the list.
*
@@ -268,7 +262,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->metaTags;
}
-
/**
* Add a sub tag to the list.
*
@@ -285,7 +278,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this;
}
-
/**
* Set the list of sub tags assigned to the original document.
*
@@ -323,7 +315,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $subTags;
}
-
/**
* Set the source of the original document.
*
@@ -346,7 +337,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->source;
}
-
/**
* Set the title of the original document.
*
@@ -369,7 +359,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
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 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return strlen($this->getContent());
}
-
/**
* Generate a hash, based on the content of the original document.
*
@@ -454,7 +442,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->hash;
}
-
/**
* Add a part, identified by a string, and its content.
*
@@ -492,7 +479,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->parts;
}
-
/**
* Add a link, usable by the frontend.
*
@@ -515,7 +501,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->link;
}
-
/**
* Set more information that couldn't be set using other method.
*
@@ -538,7 +523,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this->more;
}
-
/**
* Add some excerpt of the content of the original document, usually based
* on the search request.
@@ -556,7 +540,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $this;
}
-
/**
* Set all excerpts of the content of the original document.
*
@@ -603,7 +586,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $excerpt;
}
-
/**
* Set the score to the result assigned to this document during a search
* request.
@@ -627,7 +609,6 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
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 @@ class IndexDocument implements IIndexDocument, JsonSerializable {
return $info;
}
-
/**
* @since 15.0.0
*
diff --git a/lib/private/FullTextSearch/Model/SearchOption.php b/lib/private/FullTextSearch/Model/SearchOption.php
index 5329b78421f..726d0b1ca08 100644
--- a/lib/private/FullTextSearch/Model/SearchOption.php
+++ b/lib/private/FullTextSearch/Model/SearchOption.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ final class SearchOption implements ISearchOption, JsonSerializable {
) {
}
-
/**
* Set the name/key of the option.
* The string should only contain alphanumerical chars and underscore.
@@ -110,7 +110,6 @@ final class SearchOption implements ISearchOption, JsonSerializable {
return $this->name;
}
-
/**
* Set the title/display name of the option.
*
@@ -133,7 +132,6 @@ final class SearchOption implements ISearchOption, JsonSerializable {
return $this->title;
}
-
/**
* Set the type of the option.
* $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT
@@ -157,7 +155,6 @@ final class SearchOption implements ISearchOption, JsonSerializable {
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 2ab47c04eb2..fc61b78932b 100644
--- a/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
+++ b/lib/private/FullTextSearch/Model/SearchRequestSimpleQuery.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ use OCP\FullTextSearch\Model\ISearchRequestSimpleQuery;
final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonSerializable {
private array $values = [];
-
/**
* SearchRequestQuery constructor.
*
@@ -32,7 +32,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
) {
}
-
/**
* Get the compare type of the query
*
@@ -43,7 +42,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
return $this->type;
}
-
/**
* Get the field to apply query
*
@@ -66,7 +64,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
return $this;
}
-
/**
* Get the value to compare (string)
*
@@ -77,7 +74,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
return $this->values;
}
-
/**
* Add value to compare (string)
*
@@ -126,7 +122,6 @@ final class SearchRequestSimpleQuery implements ISearchRequestSimpleQuery, JsonS
return $this;
}
-
/**
* @since 17.0.0
*/
diff --git a/lib/private/FullTextSearch/Model/SearchTemplate.php b/lib/private/FullTextSearch/Model/SearchTemplate.php
index e54c3c88da7..dea907a8dbd 100644
--- a/lib/private/FullTextSearch/Model/SearchTemplate.php
+++ b/lib/private/FullTextSearch/Model/SearchTemplate.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
) {
}
-
/**
* 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 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
return $this->icon;
}
-
/**
* Set the path of a CSS file that will be loaded when needed.
*
@@ -106,7 +105,6 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
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 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
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 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
return $this->panelOptions;
}
-
/**
* Add an option in the left panel of the FullTextSearch navigation page.
*
@@ -185,7 +181,6 @@ final class SearchTemplate implements ISearchTemplate, JsonSerializable {
return $this->navigationOptions;
}
-
/**
* @since 15.0.0
*/
diff --git a/lib/private/GlobalScale/Config.php b/lib/private/GlobalScale/Config.php
index 4319a2fbb42..a2cc1429c95 100644
--- a/lib/private/GlobalScale/Config.php
+++ b/lib/private/GlobalScale/Config.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b9c295c34ff..4dd3e273133 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 fff9cef31f7..fb83ea8df19 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 @@ class Database extends ABackend implements
->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 cfd39897015..815f74dd9fb 100644
--- a/lib/private/Group/DisplayNameCache.php
+++ b/lib/private/Group/DisplayNameCache.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7b7ca00a88f..65aff5d225b 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 028dffd2273..cb3b0d3b12a 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 @@ class Manager extends PublicEmitter implements IGroupManager {
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 77432eea5ff..3f91f3c3887 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 775a7d47a8c..adaac7e42a2 100644
--- a/lib/private/Hooks/BasicEmitter.php
+++ b/lib/private/Hooks/BasicEmitter.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b8c00a211fe..ea1dfe5c7f2 100644
--- a/lib/private/Hooks/Emitter.php
+++ b/lib/private/Hooks/Emitter.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8d1ebe4c0da..1dddca3f357 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 e6cb97e93d7..f95349fec85 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 10f07f51e8a..97ef67d49f6 100644
--- a/lib/private/Http/Client/Client.php
+++ b/lib/private/Http/Client/Client.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 12d633a962b..8df3d3ed193 100644
--- a/lib/private/Http/Client/ClientService.php
+++ b/lib/private/Http/Client/ClientService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cb868aa7cb5..bf38006916d 100644
--- a/lib/private/Http/Client/DnsPinMiddleware.php
+++ b/lib/private/Http/Client/DnsPinMiddleware.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ca8a477d6be..0fed1567989 100644
--- a/lib/private/Http/Client/NegativeDnsCache.php
+++ b/lib/private/Http/Client/NegativeDnsCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f005347067c..4d7037fb09e 100644
--- a/lib/private/Http/Client/Response.php
+++ b/lib/private/Http/Client/Response.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9d07ff4534c..10cfbdafa8a 100644
--- a/lib/private/Http/CookieHelper.php
+++ b/lib/private/Http/CookieHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f65471caa0..e4ff5c03b73 100644
--- a/lib/private/Http/WellKnown/RequestManager.php
+++ b/lib/private/Http/WellKnown/RequestManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f7798f3cdaa..e00f7555021 100644
--- a/lib/private/InitialStateService.php
+++ b/lib/private/InitialStateService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f853a7a1eed..5990e93277d 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 fbb2c512ced..8425a96bff3 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 68038c2d0d2..da878d5cb5f 100644
--- a/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php
+++ b/lib/private/IntegrityCheck/Exceptions/InvalidSignatureException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 583ae5e534f..d34d15b8564 100644
--- a/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php
+++ b/lib/private/IntegrityCheck/Helpers/EnvironmentHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c6e57d5d935..42caae2fd9d 100644
--- a/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php
+++ b/lib/private/IntegrityCheck/Helpers/FileAccessHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7a63a080529..6577beceb35 100644
--- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php
+++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 52ccbec082c..d1ea0f90c01 100644
--- a/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php
+++ b/lib/private/IntegrityCheck/Iterator/ExcludeFoldersByPathFilterIterator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 808c0400c6e..443486a1a08 100644
--- a/lib/private/KnownUser/KnownUser.php
+++ b/lib/private/KnownUser/KnownUser.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c3bbb0b436..16554760371 100644
--- a/lib/private/KnownUser/KnownUserMapper.php
+++ b/lib/private/KnownUser/KnownUserMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 da8260d1987..86e54393aef 100644
--- a/lib/private/KnownUser/KnownUserService.php
+++ b/lib/private/KnownUser/KnownUserService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 635c5d65589..dbf18a05c36 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 07a392d5226..25d3caab2e9 100644
--- a/lib/private/L10N/L10N.php
+++ b/lib/private/L10N/L10N.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 88bdb125b79..4eeab67daa1 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 0055180f2a2..0bbbfc836c8 100644
--- a/lib/private/L10N/LanguageIterator.php
+++ b/lib/private/L10N/LanguageIterator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 42053e70831..dc03b8668a7 100644
--- a/lib/private/L10N/LanguageNotFoundException.php
+++ b/lib/private/L10N/LanguageNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bb499045d3e..2bf1b7b768e 100644
--- a/lib/private/L10N/LazyL10N.php
+++ b/lib/private/L10N/LazyL10N.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5ae1b0b4b68..5a4cdc8b3ab 100644
--- a/lib/private/LDAP/NullLDAPProviderFactory.php
+++ b/lib/private/LDAP/NullLDAPProviderFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e5c367bac5e..c0b28051379 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 c8612ff3ba5..947a239fd57 100644
--- a/lib/private/Lock/AbstractLockingProvider.php
+++ b/lib/private/Lock/AbstractLockingProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ddc7ded15c..8cefabc662f 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 77c61bcfe88..51a3ca26ec7 100644
--- a/lib/private/Lock/MemcacheLockingProvider.php
+++ b/lib/private/Lock/MemcacheLockingProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f5cadbf045f..4ac7e6adc2b 100644
--- a/lib/private/Lock/NoopLockingProvider.php
+++ b/lib/private/Lock/NoopLockingProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d5508ae877d..719926758d7 100644
--- a/lib/private/Lockdown/Filesystem/NullCache.php
+++ b/lib/private/Lockdown/Filesystem/NullCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5cf32f125d4..edc9fc98137 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 9fa4892b548..d5315c89633 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 @@ class LockdownManager implements ILockdownManager {
$this->sessionCallback = $sessionCallback;
}
-
#[\Override]
public function enable() {
$this->enabled = true;
diff --git a/lib/private/Log.php b/lib/private/Log.php
index a7b1a5fba0b..b1ab40812a5 100644
--- a/lib/private/Log.php
+++ b/lib/private/Log.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC;
use Exception;
@@ -143,7 +144,6 @@ class Log implements ILogger, IDataLogger {
$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 6597274a868..0be807c6f38 100644
--- a/lib/private/Log/ErrorHandler.php
+++ b/lib/private/Log/ErrorHandler.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0a0fa530cb3..32e9d97fc4b 100644
--- a/lib/private/Log/Errorlog.php
+++ b/lib/private/Log/Errorlog.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 af7c9e48435..c39f3e005f0 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 014c0d0759a..57ef1d45cf9 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 2c995f46e59..baf5f32d595 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 de5b4df5e15..4c6d0563b03 100644
--- a/lib/private/Log/PsrLoggerAdapter.php
+++ b/lib/private/Log/PsrLoggerAdapter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1d2f37b1dba..6a78852d4c7 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 92305edc17d..495d8cc9847 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 8e3a68e2ffb..f783f78cdf4 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 54b0cc76d9a..5001c2c9a2c 100644
--- a/lib/private/Mail/Attachment.php
+++ b/lib/private/Mail/Attachment.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2e4d905cf44..ad1d2071ff8 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99d9cd99f3a..da61abb7dd4 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d27f2e5797d..b19570c9cc0 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99f7b21c621..706f944ace8 100644
--- a/lib/private/Mail/Provider/Manager.php
+++ b/lib/private/Mail/Provider/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Manager implements IManager {
// return true if collection has any providers
return !empty($this->providers());
-
}
/**
@@ -54,7 +54,6 @@ class Manager implements IManager {
// return count of providers in collection
return count($this->providers());
-
}
/**
@@ -75,7 +74,6 @@ class Manager implements IManager {
}
// return types collection
return $types;
-
}
/**
@@ -117,7 +115,6 @@ class Manager implements IManager {
}
// return mail provider collection
return $this->providersCollection;
-
}
/**
@@ -142,7 +139,6 @@ class Manager implements IManager {
}
// return null if provider was not found
return null;
-
}
/**
@@ -170,7 +166,6 @@ class Manager implements IManager {
}
// return collection
return $services;
-
}
/**
@@ -214,7 +209,6 @@ class Manager implements IManager {
// return null if no match was found
return null;
-
}
/**
@@ -258,6 +252,5 @@ class Manager implements IManager {
}
// return null if no match was found
return null;
-
}
}
diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php
index f7f4f65fa5e..6173922b8e3 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 b93211d9143..6929028349c 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 d0f6611c4f3..5f9ad745376 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 8c2d2a46b19..7524f42d4db 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 f1a8b0f811c..e830a11b1a4 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 6cefc3d2dbc..cb89b77b592 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 d6e0e182aca..a3d65d545ee 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 683a71ba2bb..adbe689519f 100644
--- a/lib/private/Memcache/NullCache.php
+++ b/lib/private/Memcache/NullCache.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\Memcache;
use OCP\IMemcache;
@@ -62,7 +63,6 @@ class NullCache extends Cache implements IMemcache {
return true;
}
-
#[\Override]
public function clear($prefix = '') {
return true;
diff --git a/lib/private/Memcache/Redis.php b/lib/private/Memcache/Redis.php
index 03da8e138e7..8195a6795a4 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 339c097f3db..36e7741b52e 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 ca252962d4e..e499caaec23 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 a97ffe5cb93..d742bdc1c6c 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 3daf99032ad..8a4e52ca08f 100644
--- a/lib/private/Migration/Exceptions/AttributeException.php
+++ b/lib/private/Migration/Exceptions/AttributeException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f4cb95342b4..fa81d360a1a 100644
--- a/lib/private/Migration/MetadataManager.php
+++ b/lib/private/Migration/MetadataManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 86b92312534..8b529900b5e 100644
--- a/lib/private/Migration/NullOutput.php
+++ b/lib/private/Migration/NullOutput.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48df5e43141..926dc96d10b 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 c37f383b58b..3bbf053308b 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 d688a34133a..0e97b094401 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 f1047d17a53..d0d5ee45818 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 @@ class NavigationManager implements INavigationManager {
return $list;
}
-
/**
* removes all the entries
*/
diff --git a/lib/private/NeedsUpdateException.php b/lib/private/NeedsUpdateException.php
index cae8dc0047a..56b025576e0 100644
--- a/lib/private/NeedsUpdateException.php
+++ b/lib/private/NeedsUpdateException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 2fb5e3dc6cf..28de9a7dd17 100644
--- a/lib/private/NotSquareException.php
+++ b/lib/private/NotSquareException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 45e99bf6264..e96fd127422 100644
--- a/lib/private/Notification/Action.php
+++ b/lib/private/Notification/Action.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a1c15759d4f..8be73978760 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b055b0f9c79..b30931c615e 100644
--- a/lib/private/Notification/Notification.php
+++ b/lib/private/Notification/Notification.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 20d3fbf8360..6c1591013a7 100644
--- a/lib/private/OCM/Model/OCMProvider.php
+++ b/lib/private/OCM/Model/OCMProvider.php
@@ -276,7 +276,6 @@ class OCMProvider implements IOCMProvider {
return $this;
}
-
/**
* @return bool
*/
@@ -313,6 +312,5 @@ class OCMProvider implements IOCMProvider {
$response['inviteAcceptDialog'] = $inviteAcceptDialog;
}
return $response;
-
}
}
diff --git a/lib/private/OCM/OCMDiscoveryService.php b/lib/private/OCM/OCMDiscoveryService.php
index 7aca4ab3e48..fc9cba73697 100644
--- a/lib/private/OCM/OCMDiscoveryService.php
+++ b/lib/private/OCM/OCMDiscoveryService.php
@@ -70,7 +70,6 @@ final class OCMDiscoveryService implements IOCMDiscoveryService {
$this->cache = $cacheFactory->createDistributed('ocm-discovery');
}
-
/**
* @inheritDoc
*
@@ -130,7 +129,6 @@ final class OCMDiscoveryService implements IOCMDiscoveryService {
$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 1bde75e552b..8320671456a 100644
--- a/lib/private/OCM/OCMSignatoryManager.php
+++ b/lib/private/OCM/OCMSignatoryManager.php
@@ -139,7 +139,6 @@ class OCMSignatoryManager implements IJwkResolvingSignatoryManager {
$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 4a697e72c2d..2bab5d96677 100644
--- a/lib/private/OCS/CoreCapabilities.php
+++ b/lib/private/OCS/CoreCapabilities.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 26d7abbd0a7..0c3d6d67981 100644
--- a/lib/private/OCS/DiscoveryService.php
+++ b/lib/private/OCS/DiscoveryService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DiscoveryService implements IDiscoveryService {
$this->client = $clientService->newClient();
}
-
/**
* Discover OCS end-points
*
diff --git a/lib/private/OCS/Provider.php b/lib/private/OCS/Provider.php
index 3af70b70057..b49c3474f70 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 624bd051c44..587a5bf24cf 100644
--- a/lib/private/Preview/BMP.php
+++ b/lib/private/Preview/BMP.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b853e98114f..b301418aedd 100644
--- a/lib/private/Preview/BackgroundCleanupJob.php
+++ b/lib/private/Preview/BackgroundCleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a9f5004201b..cbdd932159d 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 39070bd6848..7c9897b1d19 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 0d9699a5015..9c50eddf7aa 100644
--- a/lib/private/Preview/Db/PreviewMapper.php
+++ b/lib/private/Preview/Db/PreviewMapper.php
@@ -219,7 +219,6 @@ class PreviewMapper extends QBMapper {
}
return $this->yieldEntities($qb);
-
}
/**
diff --git a/lib/private/Preview/Font.php b/lib/private/Preview/Font.php
index 312d5de2bb8..a0c813204b7 100644
--- a/lib/private/Preview/Font.php
+++ b/lib/private/Preview/Font.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e1d632fb4ec..b93175edf62 100644
--- a/lib/private/Preview/GIF.php
+++ b/lib/private/Preview/GIF.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 422b18e346e..403e76f6f0e 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 @@ class Generator {
'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 7849cb3ba38..5078124f266 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 413a3ef9e1e..e56101e8e40 100644
--- a/lib/private/Preview/HEIC.php
+++ b/lib/private/Preview/HEIC.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8225b1e7644..08ad28371e4 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 fdbe68542c7..2d4557a3e6d 100644
--- a/lib/private/Preview/Illustrator.php
+++ b/lib/private/Preview/Illustrator.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8a299bd2848..25f1c7db35b 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 e029823a9cf..b99a6ebe50f 100644
--- a/lib/private/Preview/Imaginary.php
+++ b/lib/private/Preview/Imaginary.php
@@ -13,7 +13,6 @@ use OCP\Http\Client\IClientService;
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 0eb2cd970f2..a13878b2de5 100644
--- a/lib/private/Preview/ImaginaryPDF.php
+++ b/lib/private/Preview/ImaginaryPDF.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4121e664941..aae706388bd 100644
--- a/lib/private/Preview/JPEG.php
+++ b/lib/private/Preview/JPEG.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 736f317f6da..b8e7369ecf1 100644
--- a/lib/private/Preview/Krita.php
+++ b/lib/private/Preview/Krita.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Krita extends Bundled {
return '/application\/x-krita/';
}
-
/**
* @inheritDoc
*/
diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php
index ed2a904194a..08ab422b5c1 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 844ee3ead71..0b6b552c02b 100644
--- a/lib/private/Preview/MSOffice2003.php
+++ b/lib/private/Preview/MSOffice2003.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 6b979f16962..00afcf814e0 100644
--- a/lib/private/Preview/MSOffice2007.php
+++ b/lib/private/Preview/MSOffice2007.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 807c07c5fc5..275779ed982 100644
--- a/lib/private/Preview/MSOfficeDoc.php
+++ b/lib/private/Preview/MSOfficeDoc.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7dba88278d9..8ea10be50bb 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 4c6ed18ab83..2cb966fd253 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 d1879a96622..07d119674ca 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 a574bb41311..15121911e1e 100644
--- a/lib/private/Preview/OpenDocument.php
+++ b/lib/private/Preview/OpenDocument.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 @@ class OpenDocument extends Bundled {
return '/application\/vnd.oasis.opendocument.*/';
}
-
/**
* @inheritDoc
*/
diff --git a/lib/private/Preview/PDF.php b/lib/private/Preview/PDF.php
index 2aab2385569..98c9d17b8ce 100644
--- a/lib/private/Preview/PDF.php
+++ b/lib/private/Preview/PDF.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1569a4283fa..84736a76a65 100644
--- a/lib/private/Preview/PNG.php
+++ b/lib/private/Preview/PNG.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 fea1bcf9a0d..8c54e603edb 100644
--- a/lib/private/Preview/Photoshop.php
+++ b/lib/private/Preview/Photoshop.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 49b3ff5af22..f35f4fc34bb 100644
--- a/lib/private/Preview/Postscript.php
+++ b/lib/private/Preview/Postscript.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b27a270034d..ad2060ea667 100644
--- a/lib/private/Preview/SGI.php
+++ b/lib/private/Preview/SGI.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c23553090d5..2cd85af8398 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 2306ea2fb57..4b12e735de2 100644
--- a/lib/private/Preview/StarOffice.php
+++ b/lib/private/Preview/StarOffice.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 98ae85ad865..034eff0b3d9 100644
--- a/lib/private/Preview/TGA.php
+++ b/lib/private/Preview/TGA.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f04f56c3343..bbf2eaaa25f 100644
--- a/lib/private/Preview/TIFF.php
+++ b/lib/private/Preview/TIFF.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 95977e3e5d7..6a718618bca 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 9b95e87d2ed..342ec20adf5 100644
--- a/lib/private/Preview/Watcher.php
+++ b/lib/private/Preview/Watcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1331cd670d0..84840943617 100644
--- a/lib/private/Preview/WatcherConnector.php
+++ b/lib/private/Preview/WatcherConnector.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4edc21aa97f..27fbfeaae74 100644
--- a/lib/private/Preview/WebP.php
+++ b/lib/private/Preview/WebP.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 75a22402f6b..281d9786412 100644
--- a/lib/private/Preview/XBitmap.php
+++ b/lib/private/Preview/XBitmap.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 578c256aac0..e99349ea22e 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 OCP\Preview\IProviderV2;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Log\LoggerInterface;
-
use function array_key_exists;
/**
@@ -365,7 +365,6 @@ class PreviewManager implements IPreview {
$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 3cc4b17f4ac..1eabe84b238 100644
--- a/lib/private/PreviewNotAvailableException.php
+++ b/lib/private/PreviewNotAvailableException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 55f261aed68..e99f7c0680c 100644
--- a/lib/private/Profiler/BuiltInProfiler.php
+++ b/lib/private/Profiler/BuiltInProfiler.php
@@ -30,7 +30,6 @@ class BuiltInProfiler {
$shouldProfileSingleRequest = $this->shouldProfileSingleRequest();
$shouldSample = $this->config->getSystemValueBool('profiling.sample') && !$shouldProfileSingleRequest;
-
if (!$shouldProfileSingleRequest && !$shouldSample) {
return;
}
@@ -39,7 +38,6 @@ class BuiltInProfiler {
$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 4c8160d81d1..d2c81947b5c 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 @@ class RedisFactory {
}
}
-
// 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 2801ece60f6..1b8f5395c3e 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 7f89a70ac11..4513fb4d098 100644
--- a/lib/private/Remote/Api/ApiCollection.php
+++ b/lib/private/Remote/Api/ApiCollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2ffa38991b4..4ad7ca737bd 100644
--- a/lib/private/Remote/Api/ApiFactory.php
+++ b/lib/private/Remote/Api/ApiFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e4dc514c366..2f3953629fe 100644
--- a/lib/private/Remote/Api/NotFoundException.php
+++ b/lib/private/Remote/Api/NotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 458ed718060..dc9ff432a05 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 2bb7c86ee4d..5946555dacc 100644
--- a/lib/private/Remote/Credentials.php
+++ b/lib/private/Remote/Credentials.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9807c6b5b1b..8aa395c7059 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 13a4e2c1e56..42bec5abb50 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 a3d0f3815e8..e72255a56bd 100644
--- a/lib/private/Remote/User.php
+++ b/lib/private/Remote/User.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class User implements IUser {
) {
}
-
/**
* @return string
*/
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index 90e209cfe90..d25a12ccd9d 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 20c1191b006..52a7ff8821b 100644
--- a/lib/private/Repair/AddBruteForceCleanupJob.php
+++ b/lib/private/Repair/AddBruteForceCleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ac66d4f59d7..a59fb42490c 100644
--- a/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php
+++ b/lib/private/Repair/AddCleanupDeletedUsersBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f0138133196..c0e139b1df8 100644
--- a/lib/private/Repair/AddCleanupUpdaterBackupsJob.php
+++ b/lib/private/Repair/AddCleanupUpdaterBackupsJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3ab619d6246..5d2450d165a 100644
--- a/lib/private/Repair/AddMetadataGenerationJob.php
+++ b/lib/private/Repair/AddMetadataGenerationJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 37f8398e56f..bf89464583b 100644
--- a/lib/private/Repair/AddMovePreviewJob.php
+++ b/lib/private/Repair/AddMovePreviewJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 292a4e85a7b..16299f4bea8 100644
--- a/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php
+++ b/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3ea09e8c97c..2cc06706367 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 4300bf18d8b..be08b210e56 100644
--- a/lib/private/Repair/CleanUpAbandonedApps.php
+++ b/lib/private/Repair/CleanUpAbandonedApps.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4211f6c745f..3b97a272fd2 100644
--- a/lib/private/Repair/ClearFrontendCaches.php
+++ b/lib/private/Repair/ClearFrontendCaches.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 75b5d8fe85e..2edee5d3b82 100644
--- a/lib/private/Repair/ClearGeneratedAvatarCache.php
+++ b/lib/private/Repair/ClearGeneratedAvatarCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2cd0596f274..51c84e8699d 100644
--- a/lib/private/Repair/ClearGeneratedAvatarCacheJob.php
+++ b/lib/private/Repair/ClearGeneratedAvatarCacheJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 52537886961..f149e9a9f65 100644
--- a/lib/private/Repair/Collation.php
+++ b/lib/private/Repair/Collation.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 eb5bdb01805..d6ee4518932 100644
--- a/lib/private/Repair/Events/RepairAdvanceEvent.php
+++ b/lib/private/Repair/Events/RepairAdvanceEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 219a7cd97bb..d4b19970e8d 100644
--- a/lib/private/Repair/Events/RepairErrorEvent.php
+++ b/lib/private/Repair/Events/RepairErrorEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 767a7506e6f..f1e197b2a7b 100644
--- a/lib/private/Repair/Events/RepairFinishEvent.php
+++ b/lib/private/Repair/Events/RepairFinishEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 87b2056f8d3..fa0f37b0efb 100644
--- a/lib/private/Repair/Events/RepairInfoEvent.php
+++ b/lib/private/Repair/Events/RepairInfoEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e8e97c5233b..d74fc7cfa13 100644
--- a/lib/private/Repair/Events/RepairStartEvent.php
+++ b/lib/private/Repair/Events/RepairStartEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5c68778f260..39fab37a788 100644
--- a/lib/private/Repair/Events/RepairStepEvent.php
+++ b/lib/private/Repair/Events/RepairStepEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 118965739e8..eed5e4e084f 100644
--- a/lib/private/Repair/Events/RepairWarningEvent.php
+++ b/lib/private/Repair/Events/RepairWarningEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 72ea92be0fb..3edc2d9cdde 100644
--- a/lib/private/Repair/MoveUpdaterStepFile.php
+++ b/lib/private/Repair/MoveUpdaterStepFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 68e3693aac4..c20bdb7b85d 100644
--- a/lib/private/Repair/NC13/AddLogRotateJob.php
+++ b/lib/private/Repair/NC13/AddLogRotateJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dff83d7a6cb..a58126c592f 100644
--- a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
+++ b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 028cce593f9..e725a6005eb 100644
--- a/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php
+++ b/lib/private/Repair/NC16/AddCleanupLoginFlowV2BackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 163f5794700..37f6b58f84f 100644
--- a/lib/private/Repair/NC16/ClearCollectionsAccessCache.php
+++ b/lib/private/Repair/NC16/ClearCollectionsAccessCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5de39b58a95..b8c655fc2e2 100644
--- a/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php
+++ b/lib/private/Repair/NC18/ResetGeneratedAvatarFlag.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32f98a140d7..559940c41c1 100644
--- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php
+++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d46752dbcfc..72de5d40752 100644
--- a/lib/private/Repair/NC20/EncryptionMigration.php
+++ b/lib/private/Repair/NC20/EncryptionMigration.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4ff1bae77e1..11635b0106b 100644
--- a/lib/private/Repair/NC20/ShippedDashboardEnable.php
+++ b/lib/private/Repair/NC20/ShippedDashboardEnable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e16a5862cd5..34dd195be8e 100644
--- a/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php
+++ b/lib/private/Repair/NC21/AddCheckForUserCertificatesJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 47d752cfcb7..5e626f01f0e 100644
--- a/lib/private/Repair/NC22/LookupServerSendCheck.php
+++ b/lib/private/Repair/NC22/LookupServerSendCheck.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2fa9235c9f9..a663d46b69d 100644
--- a/lib/private/Repair/NC24/AddTokenCleanupJob.php
+++ b/lib/private/Repair/NC24/AddTokenCleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d754862a1ac..5dabe257736 100644
--- a/lib/private/Repair/NC25/AddMissingSecretJob.php
+++ b/lib/private/Repair/NC25/AddMissingSecretJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 da51c67e268..fe20fa20821 100644
--- a/lib/private/Repair/NC29/SanitizeAccountProperties.php
+++ b/lib/private/Repair/NC29/SanitizeAccountProperties.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fbce960d302..ee18cec81f0 100644
--- a/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php
+++ b/lib/private/Repair/NC29/SanitizeAccountPropertiesJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 80b7da014f4..44002c3903e 100644
--- a/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php
+++ b/lib/private/Repair/NC30/RemoveLegacyDatadirFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 602cbcac478..ec7db9643ab 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 63bec39859b..0432b199809 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 ff83de3b5bb..3b26a6e9b79 100644
--- a/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php
+++ b/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a0b4b19433c..43814df0d9f 100644
--- a/lib/private/Repair/Owncloud/DropAccountTermsTable.php
+++ b/lib/private/Repair/Owncloud/DropAccountTermsTable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 26c280fb840..46a7e6b7bc9 100644
--- a/lib/private/Repair/Owncloud/MoveAvatars.php
+++ b/lib/private/Repair/Owncloud/MoveAvatars.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6895cad0e1c..c03d6c7cf21 100644
--- a/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php
+++ b/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d37c941b7e8..3c6355e310d 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 611e33602dd..5cf14f79b5e 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 b993ffaa5e8..0e2a7318f22 100644
--- a/lib/private/Repair/RemoveBrokenProperties.php
+++ b/lib/private/Repair/RemoveBrokenProperties.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 25255f9d3f8..37b5293f20a 100644
--- a/lib/private/Repair/RemoveLinkShares.php
+++ b/lib/private/Repair/RemoveLinkShares.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1321fd7913c..3c375777f89 100644
--- a/lib/private/Repair/RepairDavShares.php
+++ b/lib/private/Repair/RepairDavShares.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1793ef55f30..487a7ce652e 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 7d01bbea696..58299d95fd5 100644
--- a/lib/private/Repair/RepairLogoDimension.php
+++ b/lib/private/Repair/RepairLogoDimension.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0fa3ebc51fe..785b6a0f607 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 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}
-
/**
* @throws Exception
* @since 31.0.0
diff --git a/lib/private/RepairException.php b/lib/private/RepairException.php
index 9f57c2fabeb..d4f08a2c987 100644
--- a/lib/private/RepairException.php
+++ b/lib/private/RepairException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 14a034d0980..6cb6065221a 100644
--- a/lib/private/RichObjectStrings/Validator.php
+++ b/lib/private/RichObjectStrings/Validator.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 bbc20ac7b77..fca6d4b1c51 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 2d9becc86e3..3589429769b 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 3a9c82ae05a..b75c3e69826 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 @@ class Router implements IRouter {
return $this->collectionName;
}
-
/**
* Create a \OC\Route\Route.
*
@@ -527,7 +527,6 @@ class Router implements IRouter {
$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 dfd02e7ef2e..6baea027b44 100644
--- a/lib/private/Search/FilterCollection.php
+++ b/lib/private/Search/FilterCollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7a9baf10b4c..791f54c7ebd 100644
--- a/lib/private/Search/FilterFactory.php
+++ b/lib/private/Search/FilterFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c017d1ec9a3..6f5307d53a7 100644
--- a/lib/private/Search/SearchComposer.php
+++ b/lib/private/Search/SearchComposer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4ed81bdebff..1833cba0ea6 100644
--- a/lib/private/Search/SearchQuery.php
+++ b/lib/private/Search/SearchQuery.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ea520e6b872..d4f3df1f6a3 100644
--- a/lib/private/Search/UnsupportedFilter.php
+++ b/lib/private/Search/UnsupportedFilter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 49570685851..d4055fdb51a 100644
--- a/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php
+++ b/lib/private/Security/Bruteforce/Backend/DatabaseBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7118123cbb5..7e8a771caad 100644
--- a/lib/private/Security/Bruteforce/Backend/IBackend.php
+++ b/lib/private/Security/Bruteforce/Backend/IBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 633f75d4e9d..53724d78fe0 100644
--- a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php
+++ b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d2ddc0bf05b..6cf40825012 100644
--- a/lib/private/Security/Bruteforce/Capabilities.php
+++ b/lib/private/Security/Bruteforce/Capabilities.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9033d4b775e..2e6c5da972a 100644
--- a/lib/private/Security/Bruteforce/CleanupJob.php
+++ b/lib/private/Security/Bruteforce/CleanupJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6c5ebdce084..6d6384fe993 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8dd87cf4999..2440f16d2ea 100644
--- a/lib/private/Security/CSP/ContentSecurityPolicy.php
+++ b/lib/private/Security/CSP/ContentSecurityPolicy.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC\Security\CSP;
/**
@@ -131,7 +132,6 @@ class ContentSecurityPolicy extends \OCP\AppFramework\Http\ContentSecurityPolicy
$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 7804bca7741..e960dd7fd13 100644
--- a/lib/private/Security/CSP/ContentSecurityPolicyManager.php
+++ b/lib/private/Security/CSP/ContentSecurityPolicyManager.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 993f74ae0e4..44abc87983e 100644
--- a/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
+++ b/lib/private/Security/CSP/ContentSecurityPolicyNonceManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6aad0cd5944..007703ad64e 100644
--- a/lib/private/Security/CSRF/CsrfToken.php
+++ b/lib/private/Security/CSRF/CsrfToken.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9e3f15c63d2..b0d081c5da5 100644
--- a/lib/private/Security/CSRF/CsrfTokenGenerator.php
+++ b/lib/private/Security/CSRF/CsrfTokenGenerator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a9b3afcc407..9fd9ab18eeb 100644
--- a/lib/private/Security/CSRF/CsrfTokenManager.php
+++ b/lib/private/Security/CSRF/CsrfTokenManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1f0f8bcaa0a..94681e5e177 100644
--- a/lib/private/Security/CSRF/TokenStorage/SessionStorage.php
+++ b/lib/private/Security/CSRF/TokenStorage/SessionStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 31015a1d6bd..8997d9b0062 100644
--- a/lib/private/Security/Certificate.php
+++ b/lib/private/Security/Certificate.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ee9332e550f..076e32d048f 100644
--- a/lib/private/Security/CertificateManager.php
+++ b/lib/private/Security/CertificateManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 202cde52397..ca5fd05823f 100644
--- a/lib/private/Security/CredentialsManager.php
+++ b/lib/private/Security/CredentialsManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 594b769e8f3..26b8332a1e2 100644
--- a/lib/private/Security/Crypto.php
+++ b/lib/private/Security/Crypto.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b513b80813..b4541a99036 100644
--- a/lib/private/Security/FeaturePolicy/FeaturePolicy.php
+++ b/lib/private/Security/FeaturePolicy/FeaturePolicy.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e50aaac0faf..e3083ac6940 100644
--- a/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php
+++ b/lib/private/Security/FeaturePolicy/FeaturePolicyManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 daaecf396d7..418c8b88a58 100644
--- a/lib/private/Security/Hasher.php
+++ b/lib/private/Security/Hasher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0bfcd6bf9ed..c1b435f730a 100644
--- a/lib/private/Security/IdentityProof/Key.php
+++ b/lib/private/Security/IdentityProof/Key.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 298c1d459b3..36f0c21dfc2 100644
--- a/lib/private/Security/IdentityProof/Manager.php
+++ b/lib/private/Security/IdentityProof/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6083cbb5c9b..b2e8c6d0c46 100644
--- a/lib/private/Security/IdentityProof/Signer.php
+++ b/lib/private/Security/IdentityProof/Signer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fb837690a7b..e1fdabba34f 100644
--- a/lib/private/Security/Ip/BruteforceAllowList.php
+++ b/lib/private/Security/Ip/BruteforceAllowList.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70884e6f769..25dfc5542cc 100644
--- a/lib/private/Security/Normalizer/IpAddress.php
+++ b/lib/private/Security/Normalizer/IpAddress.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 16b51ae264a..385ea2030fd 100644
--- a/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/DatabaseBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 43eff5dcf02..222602ce5ee 100644
--- a/lib/private/Security/RateLimiting/Backend/IBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/IBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 466c7efde05..87d8e84d162 100644
--- a/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php
+++ b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 19defc2d896..a5f278e1be5 100644
--- a/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php
+++ b/lib/private/Security/RateLimiting/Exception/RateLimitExceededException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e14def14550..262b2bb83ef 100644
--- a/lib/private/Security/RateLimiting/Limiter.php
+++ b/lib/private/Security/RateLimiting/Limiter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ddb6b16655d..efaa74a9e1a 100644
--- a/lib/private/Security/SecureRandom.php
+++ b/lib/private/Security/SecureRandom.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c5b5584475c..5a8adbde892 100644
--- a/lib/private/Security/Signature/Model/IncomingSignedRequest.php
+++ b/lib/private/Security/Signature/Model/IncomingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0a87aa70895..e64f80a5c45 100644
--- a/lib/private/Security/Signature/Model/OutgoingSignedRequest.php
+++ b/lib/private/Security/Signature/Model/OutgoingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 137c64dffda..825b6ea214c 100644
--- a/lib/private/Security/Signature/Model/SignedRequest.php
+++ b/lib/private/Security/Signature/Model/SignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f094ac5148a..555ff28e1a3 100644
--- a/lib/private/Security/Signature/SignatureManager.php
+++ b/lib/private/Security/Signature/SignatureManager.php
@@ -309,7 +309,6 @@ class SignatureManager implements ISignatureManager {
return $this->mapper->getByHost($host, $account);
}
-
/**
* @inheritDoc
*
@@ -432,7 +431,6 @@ class SignatureManager implements ISignatureManager {
$this->deleteSignatory($knownSignatory->getKeyId());
$this->insertSignatory($signatory);
return;
-
case SignatoryType::REFRESHABLE:
$this->updateSignatoryPublicKey($signatory);
$this->updateSignatoryMetadata($signatory);
@@ -441,7 +439,6 @@ class SignatureManager implements ISignatureManager {
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 @@ class SignatureManager implements ISignatureManager {
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 @@ class SignatureManager implements ISignatureManager {
}
}
-
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 526c20be26f..a830c2a62fe 100644
--- a/lib/private/Security/TrustedDomainHelper.php
+++ b/lib/private/Security/TrustedDomainHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5b951da1398..b2992c783da 100644
--- a/lib/private/Security/VerificationToken/CleanUpJob.php
+++ b/lib/private/Security/VerificationToken/CleanUpJob.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 602b06390aa..13eec2b95bf 100644
--- a/lib/private/Security/VerificationToken/VerificationToken.php
+++ b/lib/private/Security/VerificationToken/VerificationToken.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7ce89644664..5259e4cd42a 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 a98814d2479..94e2ce13f16 100644
--- a/lib/private/ServerContainer.php
+++ b/lib/private/ServerContainer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 979032938aa..97c0ff6b652 100644
--- a/lib/private/ServerNotAvailableException.php
+++ b/lib/private/ServerNotAvailableException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 f73f8bbc80a..f1afc0f216e 100644
--- a/lib/private/ServiceUnavailableException.php
+++ b/lib/private/ServiceUnavailableException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 bd9d35c18f7..2e6675f3c1c 100644
--- a/lib/private/Session/CryptoSessionData.php
+++ b/lib/private/Session/CryptoSessionData.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 953544e374c..d1009101157 100644
--- a/lib/private/Session/Internal.php
+++ b/lib/private/Session/Internal.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e73a8c3fa31..81bec82ed27 100644
--- a/lib/private/Session/Memory.php
+++ b/lib/private/Session/Memory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 08465ba3b08..f68bc6380a8 100644
--- a/lib/private/Session/Session.php
+++ b/lib/private/Session/Session.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 284c3ae42ce..6676b67b07a 100644
--- a/lib/private/Settings/AuthorizedGroup.php
+++ b/lib/private/Settings/AuthorizedGroup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e057ab94c9d..87cc06fe593 100644
--- a/lib/private/Settings/AuthorizedGroupMapper.php
+++ b/lib/private/Settings/AuthorizedGroupMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10419913a16..a3d7e62b15a 100644
--- a/lib/private/Settings/DeclarativeManager.php
+++ b/lib/private/Settings/DeclarativeManager.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8fb30165bcf..25ad93a9c95 100644
--- a/lib/private/Settings/Section.php
+++ b/lib/private/Settings/Section.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1d63cffb86e..ad1e59135d1 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a2369085e6f..88ea7c2a43f 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 e2923578d3d..492d83d3cd2 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 5e343b754f1..13174f791e3 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 687d9b2c7d7..cdb46010e68 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 cbbcf18d259..96eb60a1bf0 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 1f7f66343c0..56c66909b28 100644
--- a/lib/private/Share/Constants.php
+++ b/lib/private/Share/Constants.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1e064ec821e..dd2b863f815 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -308,7 +308,6 @@ class DefaultShareProvider implements
$this->propagateNote($share);
}
-
return $share;
}
@@ -1059,7 +1058,6 @@ class DefaultShareProvider implements
throw new BackendError('Invalid backend');
}
-
return $shares;
}
@@ -1714,7 +1712,6 @@ class DefaultShareProvider implements
$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 056629ee677..bcf02e89bbb 100644
--- a/lib/private/Share20/Exception/BackendError.php
+++ b/lib/private/Share20/Exception/BackendError.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 eba781fa934..a4b5a2c3b1b 100644
--- a/lib/private/Share20/Exception/InvalidShare.php
+++ b/lib/private/Share20/Exception/InvalidShare.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 1c2dcae89aa..611008f2fc4 100644
--- a/lib/private/Share20/Exception/ProviderException.php
+++ b/lib/private/Share20/Exception/ProviderException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e6370cd958f..77689f6e6a1 100644
--- a/lib/private/Share20/GroupDeletedListener.php
+++ b/lib/private/Share20/GroupDeletedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5c79ad9b5d0..63f4c1d4bb2 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 9d68aa23653..1bf284fcf17 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 @@ class Manager implements IManager {
$share->setPasswordExpirationTime($expirationTime);
}
-
/**
* Delete all the children of this share
*
@@ -1434,7 +1434,6 @@ class Manager implements IManager {
} 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 @@ class Manager implements IManager {
/** @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 769dc7426c7..eb9b9f7530e 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -194,7 +194,6 @@ class ProviderFactory implements IProviderFactory {
$provider = $this->getProvider('deck');
}
-
if ($provider === null) {
throw new ProviderException('No share provider for share type ' . $shareType);
}
@@ -232,8 +231,6 @@ class ProviderFactory implements IProviderFactory {
$shares[] = $this->shareProviders[$instance->identifier()];
}
-
-
return $shares;
}
}
diff --git a/lib/private/Share20/PublicShareTemplateFactory.php b/lib/private/Share20/PublicShareTemplateFactory.php
index 164a0b79a64..858b6559a13 100644
--- a/lib/private/Share20/PublicShareTemplateFactory.php
+++ b/lib/private/Share20/PublicShareTemplateFactory.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 2ededbc7c36..40a5054eed1 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 617322d5499..867d5e17803 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 286be7a1036..1a549989d35 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 4b4e57ecb0b..d45325d5869 100644
--- a/lib/private/Share20/ShareHelper.php
+++ b/lib/private/Share20/ShareHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 426b3857c91..0f6871322ef 100644
--- a/lib/private/Share20/UserDeletedListener.php
+++ b/lib/private/Share20/UserDeletedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e0da6e050f0..5db753d6371 100644
--- a/lib/private/Share20/UserRemovedListener.php
+++ b/lib/private/Share20/UserRemovedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5126d756e25..8d0f6a3bc06 100644
--- a/lib/private/SpeechToText/SpeechToTextManager.php
+++ b/lib/private/SpeechToText/SpeechToTextManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 11ef970ab0b..59fe7596362 100644
--- a/lib/private/SpeechToText/TranscriptionJob.php
+++ b/lib/private/SpeechToText/TranscriptionJob.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
namespace OC\SpeechToText;
use OC\User\NoUserException;
@@ -36,7 +35,6 @@ class TranscriptionJob extends QueuedJob {
$this->setAllowParallelRuns(false);
}
-
/**
* @inheritDoc
*/
diff --git a/lib/private/StreamImage.php b/lib/private/StreamImage.php
index f4c444a2f0d..89a2a13607c 100644
--- a/lib/private/StreamImage.php
+++ b/lib/private/StreamImage.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 eba7f4e98e9..887b082a621 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 18c5d81d2f7..a1bea2bfb08 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 a05df9d7594..0b5e2a5ba9a 100644
--- a/lib/private/Support/Subscription/Assertion.php
+++ b/lib/private/Support/Subscription/Assertion.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7cf5b4b9583..25a1a9cc010 100644
--- a/lib/private/Support/Subscription/Registry.php
+++ b/lib/private/Support/Subscription/Registry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class Registry implements IRegistry {
$this->subscriptionService = $subscriptionService;
}
-
/**
* Fetches the list of app IDs that are supported by the subscription
*
@@ -115,7 +115,6 @@ class Registry implements IRegistry {
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 4c6f9d19f83..126ea7efbf8 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 4bc5c2ea34d..fe220d881b9 100644
--- a/lib/private/SystemTag/ManagerFactory.php
+++ b/lib/private/SystemTag/ManagerFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 52f303896b8..026ce7403a3 100644
--- a/lib/private/SystemTag/SystemTag.php
+++ b/lib/private/SystemTag/SystemTag.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 97d3708be8e..45da673a607 100644
--- a/lib/private/SystemTag/SystemTagManager.php
+++ b/lib/private/SystemTag/SystemTagManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 59fafe3200b..2cc192e4f68 100644
--- a/lib/private/SystemTag/SystemTagObjectMapper.php
+++ b/lib/private/SystemTag/SystemTagObjectMapper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 9268b7ab098..9db114dcb28 100644
--- a/lib/private/SystemTag/SystemTagsInFilesDetector.php
+++ b/lib/private/SystemTag/SystemTagsInFilesDetector.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 90b8d558d88..f7895c51652 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 7ddcd97e6ac..11af0539cfa 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 efac45a2e3a..f829df9a4b6 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 ec06259db70..4d3a3e798a4 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 3ac4facf97e..4a874b7fdb7 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 6821aee65a0..4d0acc2022c 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -161,7 +161,6 @@ class Manager implements IManager {
$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 @@ class Manager implements IManager {
$this->distributedCache->set($cacheKey, serialize($this->availableTaskTypes), 60);
}
-
return $this->availableTaskTypes;
}
#[\Override]
@@ -1029,7 +1027,6 @@ class Manager implements IManager {
$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 1d10450e7bc..c26fd897047 100644
--- a/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php
+++ b/lib/private/TaskProcessing/RemoveOldTasksBackgroundJob.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ec221635992..31a15e01a78 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 @@ class SynchronousBackgroundJob extends QueuedJob {
parent::__construct($timeFactory);
}
-
/**
* @inheritDoc
*/
diff --git a/lib/private/TempManager.php b/lib/private/TempManager.php
index c45912f03bb..f5801e5ab98 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 4b963aa5e4a..504537a7b00 100644
--- a/lib/private/Template/JSCombiner.php
+++ b/lib/private/Template/JSCombiner.php
@@ -180,7 +180,6 @@ class JSCombiner {
return $result;
}
-
/**
* Clear cache with combined javascript files
*
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index 4907274f730..0035e52be8c 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5be76eac7d2..c59eeee3b91 100644
--- a/lib/private/Template/Template.php
+++ b/lib/private/Template/Template.php
@@ -61,7 +61,6 @@ class Template extends Base implements ITemplate {
);
}
-
/**
* find the template with the given name
*
diff --git a/lib/private/TextProcessing/Db/Task.php b/lib/private/TextProcessing/Db/Task.php
index d4ebc19e74a..b7df44ae838 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 2c120d8aac5..1070f86034c 100644
--- a/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php
+++ b/lib/private/TextProcessing/RemoveOldTasksBackgroundJob.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 e44adf8b179..7b75b023042 100644
--- a/lib/private/TextProcessing/TaskBackgroundJob.php
+++ b/lib/private/TextProcessing/TaskBackgroundJob.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 48a8bcc6c40..3ae8a72392a 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 7a38b847948..51f2c90a149 100644
--- a/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php
+++ b/lib/private/TextToImage/RemoveOldTasksBackgroundJob.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 8127addca50..f9c12fcedcf 100644
--- a/lib/private/TextToImage/TaskBackgroundJob.php
+++ b/lib/private/TextToImage/TaskBackgroundJob.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 5aecb1b8e06..f440a7dfb14 100644
--- a/lib/private/Translation/TranslationManager.php
+++ b/lib/private/Translation/TranslationManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 e083886aae9..968978ac843 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC;
use OC\Route\Router;
@@ -241,7 +242,6 @@ class URLGenerator implements IURLGenerator {
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 ab154041ce0..b33dfcf8b85 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OC;
use OC\App\AppManager;
@@ -461,7 +462,6 @@ class Updater extends BasicEmitter {
$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 bc82e4e03df..23d7072f1aa 100644
--- a/lib/private/Updater/Exceptions/ReleaseMetadataException.php
+++ b/lib/private/Updater/Exceptions/ReleaseMetadataException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 665847037e7..5bfb1cbfa3b 100644
--- a/lib/private/Updater/ReleaseMetadata.php
+++ b/lib/private/Updater/ReleaseMetadata.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4766ccd20bb..bfac5d06a5d 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 @@ class VersionCheck {
) {
}
-
/**
* Check if a new version is available
*
diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php
index 878a7ae8c7e..e18afa0102b 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 983ff73be65..eae08736085 100644
--- a/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php
+++ b/lib/private/User/BackgroundJobs/CleanupDeletedUsers.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d65ef769c52..10dee5c2eac 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a126fee40d3..c29ce7cdeef 100644
--- a/lib/private/User/DisabledUserException.php
+++ b/lib/private/User/DisabledUserException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 186fef23602..674c3d14ceb 100644
--- a/lib/private/User/DisplayNameCache.php
+++ b/lib/private/User/DisplayNameCache.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 322b4e9f94a..163ec2bb2cd 100644
--- a/lib/private/User/Listeners/BeforeUserDeletedListener.php
+++ b/lib/private/User/Listeners/BeforeUserDeletedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7ce6f8126f1..e2c14ba6c3c 100644
--- a/lib/private/User/Listeners/UserChangedListener.php
+++ b/lib/private/User/Listeners/UserChangedListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e94b3b79b0e..632321e7e2c 100644
--- a/lib/private/User/LoginException.php
+++ b/lib/private/User/LoginException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4e7664420d4..98a90879b4b 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 @@ class Manager extends PublicEmitter implements IUserManager {
->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 @@ class Manager extends PublicEmitter implements IUserManager {
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 3df46821184..8bd6de5e45e 100644
--- a/lib/private/User/NoUserException.php
+++ b/lib/private/User/NoUserException.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4a49261768f..d525dcf2988 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 8154178e455..2f3e94c198b 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 636c109c308..d22b8ae89a4 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\User\GetQuotaEvent;
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 1a2e7cfe7cf..a31d3a5a84b 100644
--- a/lib/private/UserStatus/ISettableProvider.php
+++ b/lib/private/UserStatus/ISettableProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 abd5440e738..b5da986dfd7 100644
--- a/lib/private/UserStatus/Manager.php
+++ b/lib/private/UserStatus/Manager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f8355f1d017..910253490b7 100644
--- a/lib/private/legacy/OC_User.php
+++ b/lib/private/legacy/OC_User.php
@@ -247,7 +247,6 @@ class OC_User {
return null;
}
-
/**
* Sets user id for session and triggers emit
*/
@@ -309,7 +308,6 @@ class OC_User {
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 f9218f5fdf6..47d20fe221c 100644
--- a/lib/public/Accounts/IAccount.php
+++ b/lib/public/Accounts/IAccount.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ae5535ef13b..cd361e22fdc 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 c9d05bfb6ca..542d9093592 100644
--- a/lib/public/Accounts/IAccountProperty.php
+++ b/lib/public/Accounts/IAccountProperty.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8fde9781d1f..3a21a047f3d 100644
--- a/lib/public/Accounts/IAccountPropertyCollection.php
+++ b/lib/public/Accounts/IAccountPropertyCollection.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1d27ef1df30..59dda2fb6ce 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 fe9ea62a302..37302dfdb84 100644
--- a/lib/public/Accounts/UserUpdatedEvent.php
+++ b/lib/public/Accounts/UserUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 132be7501f1..9f7facb50ae 100644
--- a/lib/public/Activity/ActivitySettings.php
+++ b/lib/public/Activity/ActivitySettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5d0f691f2d4..3f06db825e0 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 c85d8ce5ed9..5804333a260 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 008de6f5bca..ef76c73e518 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 a76f17fa30e..a4d0070a997 100644
--- a/lib/public/Activity/IManager.php
+++ b/lib/public/Activity/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dec4e7ade64..94b4f33ec31 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 1304ab8c658..3a4d2f72534 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 b4547faf69f..261057b2f77 100644
--- a/lib/public/App/AppInfoDefinition.php
+++ b/lib/public/App/AppInfoDefinition.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 56d6571ea68..3cd3a92d7d0 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 5d16d42785e..05050e14d7a 100644
--- a/lib/public/App/Events/AppDisableEvent.php
+++ b/lib/public/App/Events/AppDisableEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe1523d6a83..87e585ac77f 100644
--- a/lib/public/App/Events/AppEnableEvent.php
+++ b/lib/public/App/Events/AppEnableEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2cf59ff7949..67b643d9c7a 100644
--- a/lib/public/App/Events/AppUpdateEvent.php
+++ b/lib/public/App/Events/AppUpdateEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e9fd994c675..94d6e15d803 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 e02a82195e2..71ed5616251 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 729582c8505..1215bf902ba 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 @@ abstract class ApiController extends Controller {
$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 b2efeea7436..b012e93bce8 100644
--- a/lib/public/AppFramework/App.php
+++ b/lib/public/AppFramework/App.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCP\AppFramework;
use OC\AppFramework\Utility\SimpleContainer;
@@ -42,7 +43,6 @@ class App {
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 4113f95770b..49b47e4cbd2 100644
--- a/lib/public/AppFramework/AuthPublicShareController.php
+++ b/lib/public/AppFramework/AuthPublicShareController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ abstract class AuthPublicShareController extends PublicShareController {
);
}
-
/**
* @since 14.0.0
*/
diff --git a/lib/public/AppFramework/Bootstrap/IBootContext.php b/lib/public/AppFramework/Bootstrap/IBootContext.php
index cdf3a0af732..dc9f046b9e3 100644
--- a/lib/public/AppFramework/Bootstrap/IBootContext.php
+++ b/lib/public/AppFramework/Bootstrap/IBootContext.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7260d2b77a1..a7d058a427e 100644
--- a/lib/public/AppFramework/Bootstrap/IBootstrap.php
+++ b/lib/public/AppFramework/Bootstrap/IBootstrap.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fa83eda1801..15d89371be2 100644
--- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
+++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
@@ -448,7 +448,6 @@ interface IRegistrationContext {
*/
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 d4f26bef007..d2cd6269a34 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 @@ abstract class Controller {
];
}
-
/**
* Parses an HTTP accept header and returns the supported responder type
* @param string $acceptHeader
@@ -110,7 +110,6 @@ abstract class Controller {
return $default;
}
-
/**
* Registers a formatter for a type
* @param string $format
@@ -121,7 +120,6 @@ abstract class Controller {
$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 416268b27c1..49bbb80b008 100644
--- a/lib/public/AppFramework/Db/DoesNotExistException.php
+++ b/lib/public/AppFramework/Db/DoesNotExistException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5313447e045..fe7c1414fe3 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 @@ abstract class Entity {
return $instance;
}
-
/**
* @return array with attribute and type
* @since 7.0.0
@@ -70,7 +69,6 @@ abstract class Entity {
return $this->_fieldTypes;
}
-
/**
* Marks the entity as clean needed for setting the id after the insertion
* @since 7.0.0
@@ -161,7 +159,6 @@ abstract class Entity {
}
}
-
/**
* 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 @@ abstract class Entity {
$this->_updatedFields[$attribute] = true;
}
-
/**
* Transform a database columnname to a property
*
@@ -227,7 +223,6 @@ abstract class Entity {
return $property;
}
-
/**
* Transform a property to a database column name
*
@@ -250,7 +245,6 @@ abstract class Entity {
return $column;
}
-
/**
* @return array array of updated fields for update query
* @since 7.0.0
@@ -259,7 +253,6 @@ abstract class Entity {
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 @@ abstract class Entity {
$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 3e91422a89f..21affadfe4a 100644
--- a/lib/public/AppFramework/Db/IMapperException.php
+++ b/lib/public/AppFramework/Db/IMapperException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e83bc1647d7..328984a015f 100644
--- a/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php
+++ b/lib/public/AppFramework/Db/MultipleObjectsReturnedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 681d98f69f6..9e6a47dce12 100644
--- a/lib/public/AppFramework/Db/QBMapper.php
+++ b/lib/public/AppFramework/Db/QBMapper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ abstract class QBMapper {
}
}
-
/**
* @return string the table name
* @since 14.0.0
@@ -60,7 +60,6 @@ abstract class QBMapper {
return $this->tableName;
}
-
/**
* Deletes an entity from the table
*
@@ -307,7 +306,6 @@ abstract class QBMapper {
. ': 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 @@ abstract class QBMapper {
return \call_user_func($this->entityClass . '::fromRow', $row);
}
-
/**
* Runs a sql query and returns an array of entities
*
@@ -365,7 +362,6 @@ abstract class QBMapper {
}
}
-
/**
* 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 9a0aee65ec7..5f68708a6ca 100644
--- a/lib/public/AppFramework/Db/SnowflakeAwareEntity.php
+++ b/lib/public/AppFramework/Db/SnowflakeAwareEntity.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8dd275e5420..56ecf522504 100644
--- a/lib/public/AppFramework/Db/TTransactional.php
+++ b/lib/public/AppFramework/Db/TTransactional.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 72bdadc9d17..ea609b3b1f1 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 c5a2fdb34d0..d70916e61b0 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 6141659eb3f..4bab86a1a4a 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 @@ class DataDisplayResponse extends Response {
return $this->data;
}
-
/**
* Sets values in the data
* @param string $data the data to display
@@ -61,7 +60,6 @@ class DataDisplayResponse extends Response {
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 de4706f2c17..3de2265a74f 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 12ac2afd560..ea03ffc877a 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 @@ class DataResponse extends Response {
$this->data = $data;
}
-
/**
* Sets values in the data json array
* @psalm-suppress InvalidTemplateParam
@@ -52,7 +51,6 @@ class DataResponse extends Response {
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 a31a8d29536..58b5c2bfc89 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 322c8a09b8f..ec8c5d67c15 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 a1d19a9f34b..2ff10a6d6d5 100644
--- a/lib/public/AppFramework/Http/EmptyFeaturePolicy.php
+++ b/lib/public/AppFramework/Http/EmptyFeaturePolicy.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b724b3a72ad..7346a69d048 100644
--- a/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php
+++ b/lib/public/AppFramework/Http/Events/BeforeLoginTemplateRenderedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7219ca5bfb6..35a628c09e2 100644
--- a/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php
+++ b/lib/public/AppFramework/Http/Events/BeforeTemplateRenderedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2291a78055c..451b21fc0f9 100644
--- a/lib/public/AppFramework/Http/FeaturePolicy.php
+++ b/lib/public/AppFramework/Http/FeaturePolicy.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a22f540a90f..45a8fb19ffe 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 a51f72612fb..4ae02d90058 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 105eaa0edb9..bd20251a8ba 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 9936f095e1c..ee0520e7aba 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 @@ class JSONResponse extends Response {
$this->addHeader('Content-Type', 'application/json; charset=utf-8');
}
-
/**
* Returns the rendered json
* @return string the rendered json
@@ -82,7 +81,6 @@ class JSONResponse extends Response {
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 6faeb4110d2..7be6b4ab991 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 ef1fb2761ea..ceb64c3b36a 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 @@ class RedirectResponse extends Response {
$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 32fcb1c4951..bfcc960f3ac 100644
--- a/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php
+++ b/lib/public/AppFramework/Http/RedirectToDefaultAppResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 323ff8fc8cd..cccd6a318a4 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 @@ class Response {
return $this;
}
-
/**
* Set the specified cookies
* @param array $cookies array('foo' => array('value' => 'bar', 'expire' => null))
@@ -136,7 +132,6 @@ class Response {
return $this;
}
-
/**
* Invalidates the specified cookie
* @param string $name
@@ -204,7 +199,6 @@ class Response {
return $this;
}
-
/**
* Set the headers
* @template NewH as array
@@ -220,7 +214,6 @@ class Response {
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 @@ class Response {
return array_merge($mergeWith, $this->headers);
}
-
/**
* By default renders no output
* @return string
@@ -266,7 +258,6 @@ class Response {
return '';
}
-
/**
* Set response status
* @template NewS as int
@@ -306,7 +297,6 @@ class Response {
return $this->contentSecurityPolicy;
}
-
/**
* @since 17.0.0
*/
@@ -326,8 +316,6 @@ class Response {
return $this;
}
-
-
/**
* Get response status
* @since 6.0.0
@@ -337,7 +325,6 @@ class Response {
return $this->status;
}
-
/**
* Get the ETag
* @return string the etag
@@ -347,7 +334,6 @@ class Response {
return $this->ETag;
}
-
/**
* Get "last modified" date
* @return \DateTime RFC2822 formatted last modified date
@@ -357,7 +343,6 @@ class Response {
return $this->lastModified;
}
-
/**
* Set the ETag
* @param string $ETag
@@ -370,7 +355,6 @@ class Response {
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 06be77b6c3f..dcf12ae385b 100644
--- a/lib/public/AppFramework/Http/StandaloneTemplateResponse.php
+++ b/lib/public/AppFramework/Http/StandaloneTemplateResponse.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a6d122eb66d..86b19914b03 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 @@ class StreamResponse extends Response implements ICallbackResponse {
$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 4338ed73d5d..39f49d55ad4 100644
--- a/lib/public/AppFramework/Http/StreamTraversableResponse.php
+++ b/lib/public/AppFramework/Http/StreamTraversableResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class StreamTraversableResponse extends Response implements ICallbackResponse {
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 281bb559a10..9a60626b0cb 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 124e95fe019..47cf9c0ee24 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 391802a1dce..a29f0c6c91f 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 14adeb27d02..3eb895a9a45 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 5339ef2483a..c4e89f13f2d 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 b1cee3fd8bd..3e4b43c044b 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 @@ class TemplateResponse extends Response {
$this->setFeaturePolicy(new FeaturePolicy());
}
-
/**
* Sets template parameters
* @param array $params an array with key => value structure which sets template
@@ -110,7 +108,6 @@ class TemplateResponse extends Response {
return $this;
}
-
/**
* Used for accessing the set parameters
* @return array the params
@@ -120,7 +117,6 @@ class TemplateResponse extends Response {
return $this->params;
}
-
/**
* @return string the app id of the used template
* @since 25.0.0
@@ -129,7 +125,6 @@ class TemplateResponse extends Response {
return $this->appName;
}
-
/**
* Used for accessing the name of the set template
* @return string the name of the used template
@@ -139,7 +134,6 @@ class TemplateResponse extends Response {
return $this->templateName;
}
-
/**
* Sets the template page
* @param string $renderAs admin, user or blank. Admin also prints the admin
@@ -155,7 +149,6 @@ class TemplateResponse extends Response {
return $this;
}
-
/**
* Returns the set renderAs
* @return string the renderAs value
@@ -165,7 +158,6 @@ class TemplateResponse extends Response {
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 f0bc873dee8..9b8a89e0ac0 100644
--- a/lib/public/AppFramework/Http/TextPlainResponse.php
+++ b/lib/public/AppFramework/Http/TextPlainResponse.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class TextPlainResponse extends Response {
$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 41687e5d9ce..e83049a6cc9 100644
--- a/lib/public/AppFramework/Http/TooManyRequestsResponse.php
+++ b/lib/public/AppFramework/Http/TooManyRequestsResponse.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 85b1cbe18a5..16ddcf8b9ef 100644
--- a/lib/public/AppFramework/Http/ZipResponse.php
+++ b/lib/public/AppFramework/Http/ZipResponse.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 dac7926f612..d8146fcc58f 100644
--- a/lib/public/AppFramework/IAppContainer.php
+++ b/lib/public/AppFramework/IAppContainer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 33bc288780e..47eec0d729b 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 @@ abstract class Middleware {
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 @@ abstract class Middleware {
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 77b8ec6c86d..f1901346701 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 02901992f8d..4c0fa2de2eb 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 0d001377043..2c8ad02f840 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 67cea9ed759..85323ba13c2 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 4fc2820eaec..9bf1108d3db 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 b7c25316653..56e55f02140 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 feb4ca53a38..302fc4b1c01 100644
--- a/lib/public/AppFramework/PublicShareController.php
+++ b/lib/public/AppFramework/PublicShareController.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 20a964e82c8..1879bcd8e72 100644
--- a/lib/public/AppFramework/QueryException.php
+++ b/lib/public/AppFramework/QueryException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aa95e665604..faf380d0380 100644
--- a/lib/public/AppFramework/Services/IAppConfig.php
+++ b/lib/public/AppFramework/Services/IAppConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ac58bcad3cc..41910f23ccc 100644
--- a/lib/public/AppFramework/Services/IInitialState.php
+++ b/lib/public/AppFramework/Services/IInitialState.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a7e061ed7c6..2e7d60f2ded 100644
--- a/lib/public/AppFramework/Services/InitialStateProvider.php
+++ b/lib/public/AppFramework/Services/InitialStateProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d4e36e310e0..3e675a4048e 100644
--- a/lib/public/AppFramework/Utility/IControllerMethodReflector.php
+++ b/lib/public/AppFramework/Utility/IControllerMethodReflector.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd63b94dee3..c1cffcb0ab3 100644
--- a/lib/public/AppFramework/Utility/ITimeFactory.php
+++ b/lib/public/AppFramework/Utility/ITimeFactory.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 e39a39372cb..cea2a7f59d9 100644
--- a/lib/public/Authentication/Events/AnyLoginFailedEvent.php
+++ b/lib/public/Authentication/Events/AnyLoginFailedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 36d31e766dc..a6462c798ef 100644
--- a/lib/public/Authentication/Events/LoginFailedEvent.php
+++ b/lib/public/Authentication/Events/LoginFailedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f2d3a6c1594..3bf2648cf87 100644
--- a/lib/public/Authentication/Events/TokenInvalidatedEvent.php
+++ b/lib/public/Authentication/Events/TokenInvalidatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6ca8e68ed95..c55cf2621f0 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 27a5a2ad5ce..9299970c02d 100644
--- a/lib/public/Authentication/Exceptions/ExpiredTokenException.php
+++ b/lib/public/Authentication/Exceptions/ExpiredTokenException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 af2ddf04f9d..c6941e47df2 100644
--- a/lib/public/Authentication/Exceptions/InvalidTokenException.php
+++ b/lib/public/Authentication/Exceptions/InvalidTokenException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 89e254e8ba1..52de7c3633c 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 9ae8d6dace3..a8e386e02c2 100644
--- a/lib/public/Authentication/Exceptions/WipeTokenException.php
+++ b/lib/public/Authentication/Exceptions/WipeTokenException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 185b0954940..6d36cb5bb74 100644
--- a/lib/public/Authentication/IAlternativeLogin.php
+++ b/lib/public/Authentication/IAlternativeLogin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 818f8716504..b566c5a785d 100644
--- a/lib/public/Authentication/IAlternativeLoginProvider.php
+++ b/lib/public/Authentication/IAlternativeLoginProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 315ae0ccca5..cda967a5c66 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 e92a492f145..30ee562da3a 100644
--- a/lib/public/Authentication/LoginCredentials/IStore.php
+++ b/lib/public/Authentication/LoginCredentials/IStore.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ade44a3ee94..3eeb8da73ee 100644
--- a/lib/public/Authentication/Token/IProvider.php
+++ b/lib/public/Authentication/Token/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 546e6a42255..c4496fe1f50 100644
--- a/lib/public/Authentication/Token/IToken.php
+++ b/lib/public/Authentication/Token/IToken.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f298ccbc64b..71eaf31484e 100644
--- a/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php
+++ b/lib/public/Authentication/TwoFactorAuth/ALoginSetupController.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 176b593afb7..791ad96d99f 100644
--- a/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php
+++ b/lib/public/Authentication/TwoFactorAuth/IActivatableAtLogin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fffb154b174..3a566c316a7 100644
--- a/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php
+++ b/lib/public/Authentication/TwoFactorAuth/IActivatableByAdmin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e6cf91ac6a3..ded9b32bab4 100644
--- a/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php
+++ b/lib/public/Authentication/TwoFactorAuth/IDeactivatableByAdmin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 32ede4f385c..42bfd33882e 100644
--- a/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/ILoginSetupProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 27c4121f4ac..b66e40d4cab 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvider.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8dd0a1dd205..b2a4c251a80 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvidesCustomCSP.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b19926cab03..88928f764a3 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvidesIcons.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c922318950..398fde14edf 100644
--- a/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php
+++ b/lib/public/Authentication/TwoFactorAuth/IProvidesPersonalSettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6817f1763cf..06617c83a66 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d498f51316f..1c57f720c88 100644
--- a/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php
+++ b/lib/public/Authentication/TwoFactorAuth/RegistryEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a8d265b9ce..00f3af9ccde 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 42ca855df35..bcabb3687f2 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengeFailed.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 396fbf9e9a5..44b62188b8e 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderChallengePassed.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48690cb9e2a..9669f6d4c48 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderDisabled.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 002ac079e06..ee117a32fdc 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserDisabled.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9172358cd16..0c304494e9f 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserEnabled.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed51cee99c8..804d9a09921 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserRegistered.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1c488a04cdf..4a244985dce 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderForUserUnregistered.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e99c91b8464..4ab7fb63710 100644
--- a/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php
+++ b/lib/public/Authentication/TwoFactorAuth/TwoFactorProviderUserDeleted.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a296ea3356a..aed94dca1ba 100644
--- a/lib/public/AutoloadNotAllowedException.php
+++ b/lib/public/AutoloadNotAllowedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2b2b031be46..9ff95982e6d 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 ee1066d8a47..340f00b4435 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 276224b0e52..d257cb4f7dc 100644
--- a/lib/public/BackgroundJob/IJobRuns.php
+++ b/lib/public/BackgroundJob/IJobRuns.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d69d897cb0c..d325e8640a9 100644
--- a/lib/public/BackgroundJob/IParallelAwareJob.php
+++ b/lib/public/BackgroundJob/IParallelAwareJob.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 dbf3dda866d..645e210383f 100644
--- a/lib/public/BackgroundJob/Job.php
+++ b/lib/public/BackgroundJob/Job.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8432f6b94f7..13a1c663969 100644
--- a/lib/public/BackgroundJob/JobRun.php
+++ b/lib/public/BackgroundJob/JobRun.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e24837bf2f4..d6e95807304 100644
--- a/lib/public/BackgroundJob/JobStatus.php
+++ b/lib/public/BackgroundJob/JobStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0b86d6909b5..811ca37297b 100644
--- a/lib/public/BackgroundJob/QueuedJob.php
+++ b/lib/public/BackgroundJob/QueuedJob.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ab5e09e01c8..9c2de7fb9fd 100644
--- a/lib/public/BackgroundJob/TimedJob.php
+++ b/lib/public/BackgroundJob/TimedJob.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 33f9f8bc378..13b9690d949 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 00cd79f7d77..5fffc10e2af 100644
--- a/lib/public/Broadcast/Events/IBroadcastEvent.php
+++ b/lib/public/Broadcast/Events/IBroadcastEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cbffece2c0f..a071d7a9cb9 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 @@ class CappedMemoryCache implements ICache, \ArrayAccess {
return $this->cache;
}
-
/**
* @since 25.0.0
*/
diff --git a/lib/public/Calendar/BackendTemporarilyUnavailableException.php b/lib/public/Calendar/BackendTemporarilyUnavailableException.php
index c2bbb1417ee..09df5352dce 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 fd735150578..c2ba687fc4c 100644
--- a/lib/public/Calendar/CalendarEventStatus.php
+++ b/lib/public/Calendar/CalendarEventStatus.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a7778f57852..71801f3db85 100644
--- a/lib/public/Calendar/CalendarExportOptions.php
+++ b/lib/public/Calendar/CalendarExportOptions.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f5f330a4254..f7322a7ed56 100644
--- a/lib/public/Calendar/CalendarImportOptions.php
+++ b/lib/public/Calendar/CalendarImportOptions.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f500aa9c646..5e1c1f0e26f 100644
--- a/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php
+++ b/lib/public/Calendar/Events/AbstractCalendarObjectEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a4d0f40ec55..a0ea592c7b3 100644
--- a/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5466213584e..c63cb80bc1d 100644
--- a/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e678f7c5063..1f2b191ed07 100644
--- a/lib/public/Calendar/Events/CalendarObjectMovedEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectMovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ffbd7b0375a..1d472a8b13e 100644
--- a/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectMovedToTrashEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7890e3ca5b3..f5d8d333a45 100644
--- a/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectRestoredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c06b2b8198f..bb6048506e5 100644
--- a/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php
+++ b/lib/public/Calendar/Events/CalendarObjectUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 27fea75bf14..62c0e96f77e 100644
--- a/lib/public/Calendar/Exceptions/CalendarException.php
+++ b/lib/public/Calendar/Exceptions/CalendarException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a267ec097bd..bf811be4677 100644
--- a/lib/public/Calendar/ICalendar.php
+++ b/lib/public/Calendar/ICalendar.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d884c104a4a..03b0cfee5ca 100644
--- a/lib/public/Calendar/ICalendarExport.php
+++ b/lib/public/Calendar/ICalendarExport.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6bcb487e3dc..24c4da917e1 100644
--- a/lib/public/Calendar/ICalendarIsEnabled.php
+++ b/lib/public/Calendar/ICalendarIsEnabled.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1cf66de2ddc..e1b71b0d938 100644
--- a/lib/public/Calendar/ICalendarIsPublic.php
+++ b/lib/public/Calendar/ICalendarIsPublic.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f63c6eefd0..c6c7da740fa 100644
--- a/lib/public/Calendar/ICalendarIsShared.php
+++ b/lib/public/Calendar/ICalendarIsShared.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5bf08a25cdc..ec754590829 100644
--- a/lib/public/Calendar/ICalendarIsWritable.php
+++ b/lib/public/Calendar/ICalendarIsWritable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95090b1c377..e124c953f6f 100644
--- a/lib/public/Calendar/ICalendarProvider.php
+++ b/lib/public/Calendar/ICalendarProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2bb0f2ffa20..2b4c06468be 100644
--- a/lib/public/Calendar/ICreateFromString.php
+++ b/lib/public/Calendar/ICreateFromString.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 27190f93f24..5789cab7bf7 100644
--- a/lib/public/Calendar/IHandleImipMessage.php
+++ b/lib/public/Calendar/IHandleImipMessage.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3c2247b7548..587f69ef3e0 100644
--- a/lib/public/Calendar/IManager.php
+++ b/lib/public/Calendar/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 acacf7efdaf..adeb9b5b193 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 23d37c102f2..e206700c078 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 d3a6b2449e3..6bc0c9e82f9 100644
--- a/lib/public/Calendar/Resource/IManager.php
+++ b/lib/public/Calendar/Resource/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 15abe4e2d0f..88abf008615 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 29f628d6f7f..7283beb6b77 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 c99f5fbdb72..34dfbf77f72 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 b1136ede3fe..eadb9c16695 100644
--- a/lib/public/Calendar/Room/IManager.php
+++ b/lib/public/Calendar/Room/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 526e65b8f5f..893dc157d24 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 15d4b501e12..66867d1da62 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 c51d8b26f1a..a1d3542cff4 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 d11c9f08768..bdb07e0e183 100644
--- a/lib/public/Capabilities/IInitialStateExcludedCapability.php
+++ b/lib/public/Capabilities/IInitialStateExcludedCapability.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1a9dd965b16..f1b3dbe25a7 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 1a225178310..44826403a5a 100644
--- a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
+++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0ae49a9a1f3..08fad839e96 100644
--- a/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php
+++ b/lib/public/Collaboration/AutoComplete/AutoCompleteFilterEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2d5443b921d..7d64cb5afb5 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 1009092af6a..39a626fdb92 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 d2c5c85c07f..8ad9a76c489 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 e55a095e2b6..986f4725c5c 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 bcc5a91ce99..d8fde04fa91 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 3fdbefdcf1f..538df1555a5 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 da1c66352b0..9badcbd2ebb 100644
--- a/lib/public/Collaboration/Resources/CollectionException.php
+++ b/lib/public/Collaboration/Resources/CollectionException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f9e14c52e2..e1994b7e374 100644
--- a/lib/public/Collaboration/Resources/ICollection.php
+++ b/lib/public/Collaboration/Resources/ICollection.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f017f348241..1eeea128307 100644
--- a/lib/public/Collaboration/Resources/IManager.php
+++ b/lib/public/Collaboration/Resources/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f0e54b1ef6f..8339f06f15d 100644
--- a/lib/public/Collaboration/Resources/IProvider.php
+++ b/lib/public/Collaboration/Resources/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f5a652dcef..b183f2374cb 100644
--- a/lib/public/Collaboration/Resources/IProviderManager.php
+++ b/lib/public/Collaboration/Resources/IProviderManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ccea7acb4a7..3144812e853 100644
--- a/lib/public/Collaboration/Resources/IResource.php
+++ b/lib/public/Collaboration/Resources/IResource.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 60d86f95f7a..63b1254eb3d 100644
--- a/lib/public/Collaboration/Resources/ResourceException.php
+++ b/lib/public/Collaboration/Resources/ResourceException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed955b8f056..5773c6af795 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 35f26abb58c..fdebc3437e0 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 e063bb5f97b..9307b326e20 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 9adac1030a4..86553fe4b55 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 46e6ad202ac..6b9e7a12f9f 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 15df999a427..2adf360dff1 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 3323b46a93e..1ee6bdd7cdd 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 b2f146ce50f..0423579a381 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 23d21500ecb..b2227473051 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 7b0611c7001..45b15f1900d 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 @@ interface IComment {
*/
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 148ead2c367..f33f3a0f907 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 651734ea1ff..14cc8f6cc94 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 @@ interface ICommentsManager {
*/
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 bfe6154a48f..38d66d674ad 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 08eddfc6fa4..ad9a3a38d2f 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 4358dc2e291..6ff78aa0f14 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 4f25fdbf09f..eed084241b6 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 d4922ae8734..050810852b3 100644
--- a/lib/public/Common/Exception/NotFoundException.php
+++ b/lib/public/Common/Exception/NotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c50c349d5a..7b2bd71e2e2 100644
--- a/lib/public/Config/IUserConfig.php
+++ b/lib/public/Config/IUserConfig.php
@@ -631,7 +631,6 @@ interface IUserConfig {
*/
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 fc98a40b88f..a2eeee84b92 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 00fe8ba35c4..d8cee298b47 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 69e6030e95b..75947ac0606 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 b817b8cbcdc..65154780783 100644
--- a/lib/public/Contacts/ContactsMenu/IBulkProvider.php
+++ b/lib/public/Contacts/ContactsMenu/IBulkProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 67913a2d919..c1a7c0d6761 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 9ae8a207297..8ba394f7c19 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 559e04885c5..6b8ebb66cb1 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 e462b0133b8..1c0b1d20707 100644
--- a/lib/public/Contacts/ContactsMenu/IProvider.php
+++ b/lib/public/Contacts/ContactsMenu/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f37cee7dba..c1a5a5e3a93 100644
--- a/lib/public/Contacts/Events/ContactInteractedWithEvent.php
+++ b/lib/public/Contacts/Events/ContactInteractedWithEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6b908382aea..09fcecffb25 100644
--- a/lib/public/DB/Exception.php
+++ b/lib/public/DB/Exception.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 887451a1caf..f7c0766cd37 100644
--- a/lib/public/DB/IPreparedStatement.php
+++ b/lib/public/DB/IPreparedStatement.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 daca3be31ba..70c082493a2 100644
--- a/lib/public/DB/IResult.php
+++ b/lib/public/DB/IResult.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8995fd5bfb1..faefa988e4d 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 12f321d9e54..4363f78abb7 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 12e30a45071..5d4dac3966f 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 @@ interface IExpressionBuilder {
*/
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 1d10e5a4dcf..2667f148796 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 574eb0894eb..4d83313a9ba 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 86ea9437e9c..bfb44d42a15 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 f3b7e8d2075..a999150d452 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 e19fc2959db..a4c45f3513d 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 5a906313802..f096b5cff0f 100644
--- a/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/ITypedQueryBuilder.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f6221d98a89..ad5525c3346 100644
--- a/lib/public/DB/Types.php
+++ b/lib/public/DB/Types.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3acd675202d..533546d21e8 100644
--- a/lib/public/Dashboard/IAPIWidgetV2.php
+++ b/lib/public/Dashboard/IAPIWidgetV2.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f4ebd9253c7..34d9fb3825f 100644
--- a/lib/public/Dashboard/IButtonWidget.php
+++ b/lib/public/Dashboard/IButtonWidget.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 203a89279b0..cbe88bd8969 100644
--- a/lib/public/Dashboard/IIconWidget.php
+++ b/lib/public/Dashboard/IIconWidget.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e69bf78225e..e87a0d2c8c4 100644
--- a/lib/public/Dashboard/IManager.php
+++ b/lib/public/Dashboard/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3f4cd4dcd2e..1d37c83cb90 100644
--- a/lib/public/Dashboard/IOptionWidget.php
+++ b/lib/public/Dashboard/IOptionWidget.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 80f0181a33c..a156f5e0fcd 100644
--- a/lib/public/Dashboard/IReloadableWidget.php
+++ b/lib/public/Dashboard/IReloadableWidget.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 c6bac98cae2..46e1dd867a8 100644
--- a/lib/public/Dashboard/IWidget.php
+++ b/lib/public/Dashboard/IWidget.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 80ceaf9fc9b..a8bbf37db5b 100644
--- a/lib/public/Dashboard/Model/WidgetItems.php
+++ b/lib/public/Dashboard/Model/WidgetItems.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 dd664c4dad5..8e4f9d4946f 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 fc3cb4288d0..a2a0bf3443d 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 3fe39be27bd..48041540688 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 a1b42fd7d32..b8a934b2749 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 6ad499ec760..8d228ca6f14 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 e56e9c09cbb..d1bf4a12566 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 b08c39fe6f6..84d6305fc86 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 096af1d2a24..2355576929e 100644
--- a/lib/public/DirectEditing/IEditor.php
+++ b/lib/public/DirectEditing/IEditor.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dcc3493bcf2..bfe7ab19e3c 100644
--- a/lib/public/DirectEditing/IManager.php
+++ b/lib/public/DirectEditing/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 64abbf939f4..2b863d0b445 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 cbf9b07185d..e989184563b 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 772ba23b73e..f6910ad15d6 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 f7213577fb6..1917a95b264 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 0bf0ef3476b..a5a74ad1610 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 ca8783290e3..1715212dca2 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 27cceab29df..d33276ee089 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 @@ interface IManager {
*/
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 e0a21751ad7..8e2bc1177e3 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 cb3adbe46b3..d4f0b8da52d 100644
--- a/lib/public/EventDispatcher/ABroadcastedEvent.php
+++ b/lib/public/EventDispatcher/ABroadcastedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1d6fc66a4c6..711ce3be5db 100644
--- a/lib/public/EventDispatcher/Event.php
+++ b/lib/public/EventDispatcher/Event.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2d69c79faf0..b09bda5acc8 100644
--- a/lib/public/EventDispatcher/GenericEvent.php
+++ b/lib/public/EventDispatcher/GenericEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a1eb75580fe..35796371854 100644
--- a/lib/public/EventDispatcher/IEventDispatcher.php
+++ b/lib/public/EventDispatcher/IEventDispatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 46ed53fa7a2..e671d801add 100644
--- a/lib/public/EventDispatcher/IEventListener.php
+++ b/lib/public/EventDispatcher/IEventListener.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 773377eb853..19e4b54bb48 100644
--- a/lib/public/Federation/Events/TrustedServerRemovedEvent.php
+++ b/lib/public/Federation/Events/TrustedServerRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7f0e0f46907..dfc307284f8 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 6ce5314844e..ccefe708d82 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 0210437a8d5..0bcdb095f8f 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 f753f5f3326..c9c8eba562c 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 168eb2b8aeb..bbfd3f8d9f9 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 64dfcf0f856..8083724fa30 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 5238188b4fa..583aafa151f 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 c550a936927..100602767e7 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 b92404866cb..717ec1811e4 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 68adb4b4da7..815808ffa41 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 0b67bbfadee..56ef7ed3bf7 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 @@ interface ICloudFederationShare {
*/
public function getShareSecret();
-
/**
* get protocol specification
*
diff --git a/lib/public/Federation/ICloudId.php b/lib/public/Federation/ICloudId.php
index 44b653e327e..da7a4847922 100644
--- a/lib/public/Federation/ICloudId.php
+++ b/lib/public/Federation/ICloudId.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 29e261ab3af..4e32a64f4e1 100644
--- a/lib/public/Federation/ICloudIdManager.php
+++ b/lib/public/Federation/ICloudIdManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 79f9ed11dd7..13537f0a5d9 100644
--- a/lib/public/Federation/ICloudIdResolver.php
+++ b/lib/public/Federation/ICloudIdResolver.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e23b9cadfcb..f058133e2a9 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 678332c9073..317c38b8780 100644
--- a/lib/public/Files/Cache/AbstractCacheEvent.php
+++ b/lib/public/Files/Cache/AbstractCacheEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 35c3f79844f..31d33584b83 100644
--- a/lib/public/Files/Cache/CacheEntriesRemovedEvent.php
+++ b/lib/public/Files/Cache/CacheEntriesRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3afe0f034f..922c223ba03 100644
--- a/lib/public/Files/Cache/CacheEntryInsertedEvent.php
+++ b/lib/public/Files/Cache/CacheEntryInsertedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d015f3ba94d..cda226b5ff2 100644
--- a/lib/public/Files/Cache/CacheEntryRemovedEvent.php
+++ b/lib/public/Files/Cache/CacheEntryRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 91dcf5340aa..d83ae68ba01 100644
--- a/lib/public/Files/Cache/CacheEntryUpdatedEvent.php
+++ b/lib/public/Files/Cache/CacheEntryUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f324c85f85..2891fbbc6af 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 790c972b51b..9dc9a7d9806 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 a5659efd4a6..d2e3c1dc071 100644
--- a/lib/public/Files/Cache/ICacheEvent.php
+++ b/lib/public/Files/Cache/ICacheEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7a993d81e7a..9b40d19a10a 100644
--- a/lib/public/Files/Cache/IFileAccess.php
+++ b/lib/public/Files/Cache/IFileAccess.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b3c283b436..a48a066fa14 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 65c4ce3bfdb..d533005c7d6 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 55063eec817..15a60d500dc 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 d0a6b69d8d8..20e054187a0 100644
--- a/lib/public/Files/Config/IAuthoritativeMountProvider.php
+++ b/lib/public/Files/Config/IAuthoritativeMountProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a9b30d8ba6d..921598c1624 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 cb9c0205d3d..cd968061993 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 b193e9ba22e..1612de719ba 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 189f9c07e7a..cbc1ca45846 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 db5188372c1..1b9e114c887 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 0b603e500ba..fd9102f042a 100644
--- a/lib/public/Files/Config/IPartialMountProvider.php
+++ b/lib/public/Files/Config/IPartialMountProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e2a32fc346a..dd53b663a16 100644
--- a/lib/public/Files/Config/IRootMountProvider.php
+++ b/lib/public/Files/Config/IRootMountProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fc0ec3f1f92..9ff3118664d 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 73eefd52841..3d1ed665437 100644
--- a/lib/public/Files/Config/MountProviderArgs.php
+++ b/lib/public/Files/Config/MountProviderArgs.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3fd97b48901..a0ea4cde865 100644
--- a/lib/public/Files/ConnectionLostException.php
+++ b/lib/public/Files/ConnectionLostException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1630ce63ea2..649a7b954d1 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 550a5e17496..b5303aa0d10 100644
--- a/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php
+++ b/lib/public/Files/Events/BeforeDirectFileDownloadEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70c9d23c156..17e51c23401 100644
--- a/lib/public/Files/Events/BeforeFileScannedEvent.php
+++ b/lib/public/Files/Events/BeforeFileScannedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cd72c79e8d8..bb0f941f700 100644
--- a/lib/public/Files/Events/BeforeFolderScannedEvent.php
+++ b/lib/public/Files/Events/BeforeFolderScannedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b3877bb05d..042f4a8b398 100644
--- a/lib/public/Files/Events/FileCacheUpdated.php
+++ b/lib/public/Files/Events/FileCacheUpdated.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9ede4e2425f..63545c3b93f 100644
--- a/lib/public/Files/Events/FileScannedEvent.php
+++ b/lib/public/Files/Events/FileScannedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5e14bbfb6a8..b0ca71c3c04 100644
--- a/lib/public/Files/Events/FolderScannedEvent.php
+++ b/lib/public/Files/Events/FolderScannedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 06259051f9c..90a084116b1 100644
--- a/lib/public/Files/Events/Node/AbstractNodeEvent.php
+++ b/lib/public/Files/Events/Node/AbstractNodeEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1569b58cfc1..0b8f7cc8afc 100644
--- a/lib/public/Files/Events/Node/AbstractNodesEvent.php
+++ b/lib/public/Files/Events/Node/AbstractNodesEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c7c014cfd64..4c39f62cf7f 100644
--- a/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeCopiedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3f42687576d..f94c42961ba 100644
--- a/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 83d9402dbeb..d7f5729a33e 100644
--- a/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ae688fccb30..9a0c9e19bd0 100644
--- a/lib/public/Files/Events/Node/BeforeNodeReadEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeReadEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 54714b8f7e2..b73f5bea7be 100644
--- a/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed2e561e947..2ae73076e4a 100644
--- a/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 61d3afb9cd6..4032cf967ff 100644
--- a/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php
+++ b/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8913f34835e..4c4e442cb77 100644
--- a/lib/public/Files/Events/Node/NodeCopiedEvent.php
+++ b/lib/public/Files/Events/Node/NodeCopiedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ffcbc9a9f10..a83849f2d04 100644
--- a/lib/public/Files/Events/Node/NodeCreatedEvent.php
+++ b/lib/public/Files/Events/Node/NodeCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 58689e2c3d9..94183bf810b 100644
--- a/lib/public/Files/Events/Node/NodeDeletedEvent.php
+++ b/lib/public/Files/Events/Node/NodeDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f126d191d7f..11e65816e37 100644
--- a/lib/public/Files/Events/Node/NodeRenamedEvent.php
+++ b/lib/public/Files/Events/Node/NodeRenamedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 88037311b4a..f0762c44144 100644
--- a/lib/public/Files/Events/Node/NodeTouchedEvent.php
+++ b/lib/public/Files/Events/Node/NodeTouchedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b6bb949167c..1f25a870a44 100644
--- a/lib/public/Files/Events/Node/NodeWrittenEvent.php
+++ b/lib/public/Files/Events/Node/NodeWrittenEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4ea20a3f3c1..a505abe6d28 100644
--- a/lib/public/Files/Events/NodeAddedToCache.php
+++ b/lib/public/Files/Events/NodeAddedToCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2a2725063b6..dfedbba0f06 100644
--- a/lib/public/Files/Events/NodeAddedToFavorite.php
+++ b/lib/public/Files/Events/NodeAddedToFavorite.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01c8c21f71d..dd10a214eae 100644
--- a/lib/public/Files/Events/NodeRemovedFromCache.php
+++ b/lib/public/Files/Events/NodeRemovedFromCache.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3b2f75346c4..53877af8150 100644
--- a/lib/public/Files/Events/NodeRemovedFromFavorite.php
+++ b/lib/public/Files/Events/NodeRemovedFromFavorite.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 76b2083085d..4d93e576014 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 66a3b5e5ac4..f9b3108cf98 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 4d0c4da6a8a..959c5d5dd38 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 9b7fa1e2e2e..f60007e5f55 100644
--- a/lib/public/Files/IFilenameValidator.php
+++ b/lib/public/Files/IFilenameValidator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 77c59fb2c0a..cda549b96f5 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 fb8532f8c81..870b2dceb1a 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 b9640209cbf..bb61ea14e78 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 43a771c07ce..9cdf546aea2 100644
--- a/lib/public/Files/Mount/IMountManager.php
+++ b/lib/public/Files/Mount/IMountManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8989a885fda..ff06021ca88 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 e9026c2446f..a5e7c127500 100644
--- a/lib/public/Files/Mount/IMovableMount.php
+++ b/lib/public/Files/Mount/IMovableMount.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 ae1d51621ea..56d2bcffae1 100644
--- a/lib/public/Files/Mount/ISystemMountPoint.php
+++ b/lib/public/Files/Mount/ISystemMountPoint.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 b3b0ffb5c01..727cb2f4da1 100644
--- a/lib/public/Files/Node.php
+++ b/lib/public/Files/Node.php
@@ -151,7 +151,6 @@ interface Node extends FileInfo {
#[\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 c7c758eec11..d9b70b3823a 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 09b3dbca919..b10efadaca7 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 b1bfae5fc00..4e8c1bd55c2 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 fc9f5f60538..587b8001268 100644
--- a/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php
+++ b/lib/public/Files/ObjectStore/Events/BucketCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2b33ed485ad..3226990275c 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 9683873be36..8ceb1ea160a 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 7989e27dfc8..fe4119e38de 100644
--- a/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php
+++ b/lib/public/Files/ObjectStore/IObjectStoreMultiPartUpload.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 fa7ef4d1bb3..2270ab7ecea 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 ab298fa0a57..b26a8a312a4 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 f6ae8edcbb1..f6f91e7bcbc 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 e6e68849443..1efeffdf9e7 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 1b400c56e5b..dc96a7a2f98 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 4e77299ab00..100e1ad402a 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 95efc676688..ebd36b86658 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 6be8a1d47c9..1fbfe302831 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 b8bfbabbf6e..eef075119f0 100644
--- a/lib/public/Files/SimpleFS/InMemoryFile.php
+++ b/lib/public/Files/SimpleFS/InMemoryFile.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0cf27814f0e..6dc4ff792ed 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 19951da2015..3d64e3c309b 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 ceedf33ceab..cc269f0477f 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 063ff815581..e081c6eb156 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 69fc60750c5..e63cbc3ed57 100644
--- a/lib/public/Files/Storage/ISharedStorage.php
+++ b/lib/public/Files/Storage/ISharedStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 24f87d2e775..76b701199fd 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 b03f46ef2bc..ed3559e2ad4 100644
--- a/lib/public/Files/Storage/IWriteStreamStorage.php
+++ b/lib/public/Files/Storage/IWriteStreamStorage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d0115313a96..6cf56c19b6d 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 c38bd840d3e..0d994069faa 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 8629d8cee6e..b659357f6a3 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 85201932d66..b09d7f6442e 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 0636d1dc251..09b1f274875 100644
--- a/lib/public/Files/Template/FileCreatedFromTemplateEvent.php
+++ b/lib/public/Files/Template/FileCreatedFromTemplateEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6136bc4f1c0..96aeac86bfb 100644
--- a/lib/public/Files/Template/ICustomTemplateProvider.php
+++ b/lib/public/Files/Template/ICustomTemplateProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c838bfff20d..8d47a3fddaf 100644
--- a/lib/public/Files/Template/ITemplateManager.php
+++ b/lib/public/Files/Template/ITemplateManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4d838a6d4ad..bdc95e68d3e 100644
--- a/lib/public/Files/Template/Template.php
+++ b/lib/public/Files/Template/Template.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb5c79600e4..312c039c710 100644
--- a/lib/public/Files/Template/TemplateFileCreator.php
+++ b/lib/public/Files/Template/TemplateFileCreator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 72eaae61733..09d5e48acf4 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 @@ interface IMetadataValueWrapper extends JsonSerializable {
*/
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 297d6bc6ffc..eed0c374414 100644
--- a/lib/public/Files_FullTextSearch/Model/AFilesDocument.php
+++ b/lib/public/Files_FullTextSearch/Model/AFilesDocument.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 class AFilesDocument extends IndexDocument {
*/
abstract public function getViewerId(): string;
-
/**
* Returns the type of the document/file.
*
@@ -60,7 +59,6 @@ abstract class AFilesDocument extends IndexDocument {
*/
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 11c7fc62de9..0040f5638b2 100644
--- a/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php
+++ b/lib/public/FullTextSearch/Exceptions/FullTextSearchAppNotAvailableException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a2222fe57cb..e156baca623 100644
--- a/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php
+++ b/lib/public/FullTextSearch/Exceptions/FullTextSearchIndexNotAvailableException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 db7a50adabb..c3ba54401ef 100644
--- a/lib/public/FullTextSearch/IFullTextSearchManager.php
+++ b/lib/public/FullTextSearch/IFullTextSearchManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ interface IFullTextSearchManager {
*/
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 @@ interface IFullTextSearchManager {
*/
public function addJavascriptAPI();
-
/**
* Check if the provider $providerId is already indexed.
*
@@ -82,7 +81,6 @@ interface IFullTextSearchManager {
*/
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 @@ interface IFullTextSearchManager {
*/
public function getIndex(string $providerId, string $documentId): IIndex;
-
/**
* Create a new Index.
*
@@ -113,7 +110,6 @@ interface IFullTextSearchManager {
*/
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 @@ interface IFullTextSearchManager {
*/
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 62b3070d5f2..a32e0c7e47b 100644
--- a/lib/public/FullTextSearch/IFullTextSearchPlatform.php
+++ b/lib/public/FullTextSearch/IFullTextSearchPlatform.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IFullTextSearchPlatform {
*/
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 @@ interface IFullTextSearchPlatform {
*/
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 @@ interface IFullTextSearchPlatform {
*/
public function setRunner(IRunner $runner);
-
/**
* Called when FullTextSearch is loading your Search Platform.
*
@@ -111,7 +108,6 @@ interface IFullTextSearchPlatform {
*/
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 @@ interface IFullTextSearchPlatform {
*/
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 @@ interface IFullTextSearchPlatform {
*/
public function initializeIndex();
-
/**
* Reset the indexes for a specific providerId.
* $providerId can be 'all' if it is a global reset.
@@ -142,7 +136,6 @@ interface IFullTextSearchPlatform {
*/
public function resetIndex(string $providerId);
-
/**
* Deleting some IIndex, sent in an array
*
@@ -154,7 +147,6 @@ interface IFullTextSearchPlatform {
*/
public function deleteIndexes(array $indexes);
-
/**
* Indexing a document.
*
@@ -168,7 +160,6 @@ interface IFullTextSearchPlatform {
*/
public function indexDocument(IIndexDocument $document): IIndex;
-
/**
* Searching documents, ISearchResult should be updated with the result of
* the search.
@@ -180,7 +171,6 @@ interface IFullTextSearchPlatform {
*/
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 b1ee3b66274..2bd24238a7f 100644
--- a/lib/public/FullTextSearch/IFullTextSearchProvider.php
+++ b/lib/public/FullTextSearch/IFullTextSearchProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
public function getConfiguration(): array;
-
/**
* Must returns a ISearchTemplate that contains displayable items and
* available options to users when searching.
@@ -98,7 +96,6 @@ interface IFullTextSearchProvider {
*/
public function getSearchTemplate(): ISearchTemplate;
-
/**
* Called when FullTextSearch is loading your Content Provider.
*
@@ -106,7 +103,6 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
public function generateChunks(string $userId): array;
-
/**
* Returns all indexable document for a user as an array of IIndexDocument.
*
@@ -178,7 +171,6 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
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 @@ interface IFullTextSearchProvider {
*/
public function improveSearchRequest(ISearchRequest $searchRequest);
-
/**
* Method is called after results of a search are returned by the
* Search Platform.
@@ -285,7 +271,6 @@ interface IFullTextSearchProvider {
*/
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 407f0f2bb28..b7a71e27a42 100644
--- a/lib/public/FullTextSearch/Model/IDocumentAccess.php
+++ b/lib/public/FullTextSearch/Model/IDocumentAccess.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IDocumentAccess {
*/
public function getOwnerId(): string;
-
/**
* Set the viewer of the document.
*
@@ -80,7 +79,6 @@ interface IDocumentAccess {
*/
public function getViewerId(): string;
-
/**
* Set the list of users that have read access to the document.
*
@@ -124,7 +122,6 @@ interface IDocumentAccess {
*/
public function getUsers(): array;
-
/**
* Set the list of groups that have read access to the document.
*
@@ -168,7 +165,6 @@ interface IDocumentAccess {
*/
public function getGroups(): array;
-
/**
* Set the list of circles that have read access to the document.
*
@@ -212,7 +208,6 @@ interface 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 13aee916498..858c3a6d3b1 100644
--- a/lib/public/FullTextSearch/Model/IIndex.php
+++ b/lib/public/FullTextSearch/Model/IIndex.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IIndex {
*/
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 @@ interface IIndex {
*/
public function getCollection(): string;
-
/**
* Set the source of the original document.
*
@@ -156,7 +153,6 @@ interface IIndex {
*/
public function getSource(): string;
-
/**
* Set the owner of the original document.
*
@@ -177,7 +173,6 @@ interface 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 @@ interface IIndex {
*/
public function unsetStatus(int $status): IIndex;
-
/**
* Add an option related to the original document (as string).
*
@@ -280,7 +274,6 @@ interface IIndex {
*/
public function getOptions(): array;
-
/**
* Add an error log related to the Index.
*
@@ -310,7 +303,6 @@ interface IIndex {
*/
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 ae93272d246..7d0a65f0af0 100644
--- a/lib/public/FullTextSearch/Model/IIndexDocument.php
+++ b/lib/public/FullTextSearch/Model/IIndexDocument.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IIndexDocument {
*/
public function getProviderId(): string;
-
/**
* Set the Index related to the IIndexDocument.
*
@@ -85,7 +82,6 @@ interface IIndexDocument {
*/
public function hasIndex(): bool;
-
/**
* Set the modified time of the original document.
*
@@ -117,7 +113,6 @@ interface IIndexDocument {
*/
public function isOlderThan(int $time): bool;
-
/**
* Set the read rights of the original document using a IDocumentAccess.
*
@@ -140,7 +135,6 @@ interface IIndexDocument {
*/
public function getAccess(): IDocumentAccess;
-
/**
* Add a tag to the list.
*
@@ -172,7 +166,6 @@ interface IIndexDocument {
*/
public function getTags(): array;
-
/**
* Add a meta tag to the list.
*
@@ -204,7 +197,6 @@ interface IIndexDocument {
*/
public function getMetaTags(): array;
-
/**
* Add a sub tag to the list.
*
@@ -241,7 +233,6 @@ interface IIndexDocument {
*/
public function getSubTags(bool $formatted = false): array;
-
/**
* Set the source of the original document.
*
@@ -262,7 +253,6 @@ interface IIndexDocument {
*/
public function getSource(): string;
-
/**
* Set the title of the original document.
*
@@ -283,7 +273,6 @@ interface 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 @@ interface IIndexDocument {
*/
public function getContentSize(): int;
-
/**
* Generate an hash, based on the content of the original document.
*
@@ -355,7 +343,6 @@ interface IIndexDocument {
*/
public function getHash(): string;
-
/**
* Add a part, identified by a string, and its content.
*
@@ -391,7 +378,6 @@ interface IIndexDocument {
*/
public function getParts(): array;
-
/**
* Add a link, usable by the frontend.
*
@@ -412,7 +398,6 @@ interface IIndexDocument {
*/
public function getLink(): string;
-
/**
* Set more information that couldn't be set using other method.
*
@@ -433,7 +418,6 @@ interface 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 @@ interface IIndexDocument {
*/
public function getExcerpts(): array;
-
/**
* Set the score to the result assigned to this document during a search
* request.
@@ -489,7 +472,6 @@ interface 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 951da3b9a76..697555f5428 100644
--- a/lib/public/FullTextSearch/Model/IIndexOptions.php
+++ b/lib/public/FullTextSearch/Model/IIndexOptions.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3ea7de43dd7..5a5c7f08b8c 100644
--- a/lib/public/FullTextSearch/Model/IRunner.php
+++ b/lib/public/FullTextSearch/Model/IRunner.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface IRunner {
*/
public function setInfoArray(array $data);
-
/**
* Method used to update the current Action when an index is running.
*
@@ -90,7 +88,6 @@ interface IRunner {
*/
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 @@ interface IRunner {
*/
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 50e2cb5010a..e0f828721b8 100644
--- a/lib/public/FullTextSearch/Model/ISearchOption.php
+++ b/lib/public/FullTextSearch/Model/ISearchOption.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface ISearchOption {
*/
public function getName(): string;
-
/**
* Set the title/display name of the option.
*
@@ -75,7 +74,6 @@ interface ISearchOption {
*/
public function getTitle(): string;
-
/**
* Set the type of the option.
* $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT
@@ -97,7 +95,6 @@ interface 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 @@ interface 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 9dc9613c407..16c30d8279c 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequest.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface ISearchRequest {
*/
public function getPage(): int;
-
/**
* Get the author of the request.
*
@@ -86,7 +85,6 @@ interface ISearchRequest {
*/
public function addSearch(string $search): ISearchRequest;
-
/**
* Get the value of an option (as string).
*
@@ -111,7 +109,6 @@ interface ISearchRequest {
*/
public function getOptionArray(string $option, array $default = []): array;
-
/**
* Limit the search to a part of the document.
*
@@ -143,7 +140,6 @@ interface ISearchRequest {
*/
public function getParts(): array;
-
/**
* Limit the search to a specific meta tag.
*
@@ -175,7 +171,6 @@ interface ISearchRequest {
*/
public function setMetaTags(array $tags): ISearchRequest;
-
/**
* Limit the search to a specific sub tag.
*
@@ -210,7 +205,6 @@ interface ISearchRequest {
*/
public function setSubTags(array $tags): ISearchRequest;
-
/**
* Limit the search to a specific field of the mapping, using a full string.
*
@@ -231,7 +225,6 @@ interface 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 @@ interface ISearchRequest {
*/
public function getWildcardFields(): array;
-
/**
* Filter the results, based on a group of field, using regex
*
@@ -274,7 +266,6 @@ interface ISearchRequest {
*/
public function getRegexFilters(): array;
-
/**
* Filter the results, based on a group of field, using wildcard
*
@@ -295,7 +286,6 @@ interface ISearchRequest {
*/
public function getWildcardFilters(): array;
-
/**
* Add an extra field to the search.
*
@@ -316,8 +306,6 @@ interface ISearchRequest {
*/
public function getFields(): array;
-
-
/**
* Add a MUST search on an extra field
*
@@ -328,7 +316,6 @@ interface ISearchRequest {
*/
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 3a6217398b6..7e6e1627b90 100644
--- a/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
+++ b/lib/public/FullTextSearch/Model/ISearchRequestSimpleQuery.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface ISearchRequestSimpleQuery {
*/
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 cf902835a4c..506d43c5c77 100644
--- a/lib/public/FullTextSearch/Model/ISearchResult.php
+++ b/lib/public/FullTextSearch/Model/ISearchResult.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface ISearchResult {
*/
public function getProvider(): IFullTextSearchProvider;
-
/**
* Add an IIndexDocument as one of the result of the search request.
*
@@ -80,7 +80,6 @@ interface ISearchResult {
*/
public function setDocuments(array $documents): ISearchResult;
-
/**
* Add an aggregation to the result.
*
@@ -105,7 +104,6 @@ interface ISearchResult {
*/
public function getAggregations(string $category): array;
-
/**
* Set the raw result of the request.
*
@@ -117,7 +115,6 @@ interface ISearchResult {
*/
public function setRawResult(string $result): ISearchResult;
-
/**
* Set the total number of results for the search request.
* Used by pagination.
@@ -130,7 +127,6 @@ interface ISearchResult {
*/
public function setTotal(int $total): ISearchResult;
-
/**
* Set the top score for the search request.
*
@@ -142,7 +138,6 @@ interface ISearchResult {
*/
public function setMaxScore(int $score): ISearchResult;
-
/**
* Set the time spent by the request to perform the search.
*
@@ -154,7 +149,6 @@ interface 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 89f683ca013..20a2e1c4158 100644
--- a/lib/public/FullTextSearch/Model/ISearchTemplate.php
+++ b/lib/public/FullTextSearch/Model/ISearchTemplate.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ interface ISearchTemplate {
*/
public function getIcon(): string;
-
/**
* Set the path of a CSS file that will be loaded when needed.
*
@@ -76,7 +76,6 @@ interface 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 @@ interface 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 @@ interface 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 c4d1a9f8172..3dc29d0cfc2 100644
--- a/lib/public/FullTextSearch/Service/IIndexService.php
+++ b/lib/public/FullTextSearch/Service/IIndexService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ interface IIndexService {
*/
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 @@ interface IIndexService {
*/
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 @@ interface IIndexService {
*/
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 e6036b1eb7d..70269150b2c 100644
--- a/lib/public/FullTextSearch/Service/IProviderService.php
+++ b/lib/public/FullTextSearch/Service/IProviderService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ab3ec953789..e97f2524838 100644
--- a/lib/public/FullTextSearch/Service/ISearchService.php
+++ b/lib/public/FullTextSearch/Service/ISearchService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 38efce4b8b5..1936e7912dc 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 37605d58a5e..93c7a210703 100644
--- a/lib/public/Group/Backend/ABackend.php
+++ b/lib/public/Group/Backend/ABackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 011cd438bd7..eab757f313d 100644
--- a/lib/public/Group/Backend/IAddToGroupBackend.php
+++ b/lib/public/Group/Backend/IAddToGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5853447d5e9..9ed8248d569 100644
--- a/lib/public/Group/Backend/IBatchMethodsBackend.php
+++ b/lib/public/Group/Backend/IBatchMethodsBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 021ebcf9612..cb1316c21a7 100644
--- a/lib/public/Group/Backend/ICountDisabledInGroup.php
+++ b/lib/public/Group/Backend/ICountDisabledInGroup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6afa49a8b4d..d6001eaca1b 100644
--- a/lib/public/Group/Backend/ICountUsersBackend.php
+++ b/lib/public/Group/Backend/ICountUsersBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 405d0f0a853..e7412c8418c 100644
--- a/lib/public/Group/Backend/ICreateGroupBackend.php
+++ b/lib/public/Group/Backend/ICreateGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 25cef4f8687..d2bfd80596d 100644
--- a/lib/public/Group/Backend/ICreateNamedGroupBackend.php
+++ b/lib/public/Group/Backend/ICreateNamedGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5e2d3f5e52b..59fe5b629b5 100644
--- a/lib/public/Group/Backend/IDeleteGroupBackend.php
+++ b/lib/public/Group/Backend/IDeleteGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0f11dd67bb7..6a5daefcc07 100644
--- a/lib/public/Group/Backend/IGetDisplayNameBackend.php
+++ b/lib/public/Group/Backend/IGetDisplayNameBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a2830849f6c..ae78cec16ce 100644
--- a/lib/public/Group/Backend/IGroupDetailsBackend.php
+++ b/lib/public/Group/Backend/IGroupDetailsBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 605de213c28..28e3572da7f 100644
--- a/lib/public/Group/Backend/IHideFromCollaborationBackend.php
+++ b/lib/public/Group/Backend/IHideFromCollaborationBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed299961dc2..1044e9d404a 100644
--- a/lib/public/Group/Backend/IIsAdminBackend.php
+++ b/lib/public/Group/Backend/IIsAdminBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d98cc8cdb83..d7ab0828e0a 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 e4862feb2f2..0bc6ac76c28 100644
--- a/lib/public/Group/Backend/IRemoveFromGroupBackend.php
+++ b/lib/public/Group/Backend/IRemoveFromGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e9909fcdba0..9fecf7e41f0 100644
--- a/lib/public/Group/Backend/ISearchableGroupBackend.php
+++ b/lib/public/Group/Backend/ISearchableGroupBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d0875e84768..70deb49b65d 100644
--- a/lib/public/Group/Backend/ISetDisplayNameBackend.php
+++ b/lib/public/Group/Backend/ISetDisplayNameBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7fb46b8ce6d..6ddcd42d0e3 100644
--- a/lib/public/Group/Events/BeforeGroupChangedEvent.php
+++ b/lib/public/Group/Events/BeforeGroupChangedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2f197d6a088..eb43304df82 100644
--- a/lib/public/Group/Events/BeforeGroupCreatedEvent.php
+++ b/lib/public/Group/Events/BeforeGroupCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3c8f83440c7..48fbb629a62 100644
--- a/lib/public/Group/Events/BeforeGroupDeletedEvent.php
+++ b/lib/public/Group/Events/BeforeGroupDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 09198112539..1bac10bb5dd 100644
--- a/lib/public/Group/Events/BeforeUserAddedEvent.php
+++ b/lib/public/Group/Events/BeforeUserAddedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 50d34e0c7cf..3c661f1285e 100644
--- a/lib/public/Group/Events/BeforeUserRemovedEvent.php
+++ b/lib/public/Group/Events/BeforeUserRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c9fd12b8c3a..b8206f9d943 100644
--- a/lib/public/Group/Events/GroupChangedEvent.php
+++ b/lib/public/Group/Events/GroupChangedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 106f57c7154..44293f5a63a 100644
--- a/lib/public/Group/Events/GroupCreatedEvent.php
+++ b/lib/public/Group/Events/GroupCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b651f5cdfa9..5f6ddfcd731 100644
--- a/lib/public/Group/Events/GroupDeletedEvent.php
+++ b/lib/public/Group/Events/GroupDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cb1caebdb77..5eb4131afcd 100644
--- a/lib/public/Group/Events/SubAdminAddedEvent.php
+++ b/lib/public/Group/Events/SubAdminAddedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1d76d05cc58..c8b8ea5627c 100644
--- a/lib/public/Group/Events/SubAdminRemovedEvent.php
+++ b/lib/public/Group/Events/SubAdminRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c15d2b5c05..367e168b8d0 100644
--- a/lib/public/Group/Events/UserAddedEvent.php
+++ b/lib/public/Group/Events/UserAddedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1d6bb3cda2..7b88f31f95c 100644
--- a/lib/public/Group/Events/UserRemovedEvent.php
+++ b/lib/public/Group/Events/UserRemovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ed4ef1fa926..e70ed3b31d6 100644
--- a/lib/public/Group/ISubAdmin.php
+++ b/lib/public/Group/ISubAdmin.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9dcba506741..e246befe22f 100644
--- a/lib/public/HintException.php
+++ b/lib/public/HintException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 db675b277cd..b83c97cc6d3 100644
--- a/lib/public/Http/Client/IClient.php
+++ b/lib/public/Http/Client/IClient.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 148757e5b31..12edf3dcf84 100644
--- a/lib/public/Http/Client/IClientService.php
+++ b/lib/public/Http/Client/IClientService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8778829af0e..a3fa51abe64 100644
--- a/lib/public/Http/Client/IPromise.php
+++ b/lib/public/Http/Client/IPromise.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 53032ef2a37..4932acc2e99 100644
--- a/lib/public/Http/Client/IResponse.php
+++ b/lib/public/Http/Client/IResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1becf3d77c9..dca0bd68b02 100644
--- a/lib/public/Http/Client/LocalServerException.php
+++ b/lib/public/Http/Client/LocalServerException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 99a238d72e3..cadaf8fee3f 100644
--- a/lib/public/Http/WellKnown/GenericResponse.php
+++ b/lib/public/Http/WellKnown/GenericResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 274d0241969..eb68f27a2ba 100644
--- a/lib/public/Http/WellKnown/IHandler.php
+++ b/lib/public/Http/WellKnown/IHandler.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 241a9069904..ada0e976391 100644
--- a/lib/public/Http/WellKnown/IRequestContext.php
+++ b/lib/public/Http/WellKnown/IRequestContext.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 2cf63043b63..1e3d826b4db 100644
--- a/lib/public/Http/WellKnown/IResponse.php
+++ b/lib/public/Http/WellKnown/IResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7eb3dfdf2e..3b10048f433 100644
--- a/lib/public/Http/WellKnown/JrdResponse.php
+++ b/lib/public/Http/WellKnown/JrdResponse.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 eb89680767d..790ce30d70a 100644
--- a/lib/public/IAppConfig.php
+++ b/lib/public/IAppConfig.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f45af482837..fc19eb41af9 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 2a8733eff5a..049a02e5da7 100644
--- a/lib/public/IAvatarManager.php
+++ b/lib/public/IAvatarManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d12be3fd4bc..9a677ca91f7 100644
--- a/lib/public/ICacheFactory.php
+++ b/lib/public/ICacheFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 29081337ebf..eea088271f8 100644
--- a/lib/public/ICertificate.php
+++ b/lib/public/ICertificate.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 be4afc799fa..7adc796ba9b 100644
--- a/lib/public/ICertificateManager.php
+++ b/lib/public/ICertificateManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4734f40cb3f..30696af8d5f 100644
--- a/lib/public/IConfig.php
+++ b/lib/public/IConfig.php
@@ -152,7 +152,6 @@ interface IConfig {
*/
public function deleteAppValues($appName);
-
/**
* Set a user defined value
*
diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php
index 0f91a9990d6..dc1c872f4aa 100644
--- a/lib/public/IContainer.php
+++ b/lib/public/IContainer.php
@@ -9,6 +9,7 @@ declare(strict_types=1);
*/
// 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 4526f71ceeb..d526d3d0b77 100644
--- a/lib/public/IDBConnection.php
+++ b/lib/public/IDBConnection.php
@@ -159,7 +159,6 @@ interface IDBConnection {
*/
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 2d47e1182c2..fd30df28fbf 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 32b3903b812..5572cd6f888 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 6b63b0f15aa..bf651ed4358 100644
--- a/lib/public/IEventSource.php
+++ b/lib/public/IEventSource.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0f6b447c0af..7cb40919628 100644
--- a/lib/public/IEventSourceFactory.php
+++ b/lib/public/IEventSourceFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3c53fa666ef..ff98cfc8d4c 100644
--- a/lib/public/IGroup.php
+++ b/lib/public/IGroup.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 93013e72891..d0ca043e923 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 7ba08c889da..acd7ff244ec 100644
--- a/lib/public/IImage.php
+++ b/lib/public/IImage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6c482c2cf20..b24f1b857ae 100644
--- a/lib/public/IInitialStateService.php
+++ b/lib/public/IInitialStateService.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 c4a64e37174..fcb4a1f915c 100644
--- a/lib/public/IL10N.php
+++ b/lib/public/IL10N.php
@@ -74,7 +74,6 @@ interface IL10N {
*/
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 54f9ffeca9a..c34de1608c3 100644
--- a/lib/public/ILogger.php
+++ b/lib/public/ILogger.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3fc171b9120..5f70bc3b8eb 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 8909d306c74..0f31dbd2b61 100644
--- a/lib/public/IPhoneNumberUtil.php
+++ b/lib/public/IPhoneNumberUtil.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 913ecbdd4cd..1ca66c646e8 100644
--- a/lib/public/IRequest.php
+++ b/lib/public/IRequest.php
@@ -119,7 +119,6 @@ interface IRequest {
*/
public function getParam(string $key, $default = null);
-
/**
* Returns all params that were received, be it from the request
*
@@ -149,7 +148,6 @@ interface IRequest {
*/
public function getUploadedFile(string $key);
-
/**
* Shortcut for getting env variables
*
@@ -159,7 +157,6 @@ interface IRequest {
*/
public function getEnv(string $key);
-
/**
* Shortcut for getting cookie variables
*
@@ -171,7 +168,6 @@ interface IRequest {
*/
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 7c5a5771610..fdbebfe2fc7 100644
--- a/lib/public/IRequestId.php
+++ b/lib/public/IRequestId.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4580c3890cc..64e55966798 100644
--- a/lib/public/IServerContainer.php
+++ b/lib/public/IServerContainer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 79b718fc291..ff96a1ecacc 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 ac8f829f357..45ed2e77c2a 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 e9a54f371f5..46fcc6081ce 100644
--- a/lib/public/IURLGenerator.php
+++ b/lib/public/IURLGenerator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCP;
use OCP\AppFramework\Attribute\Consumable;
@@ -84,7 +85,6 @@ interface IURLGenerator {
*/
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 399be67789b..5a06577fde7 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 f19685903ba..863b000e9d4 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 @@ interface IUserManager {
*/
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 7cf75d76d6f..04a5ea2dd0a 100644
--- a/lib/public/Install/Events/InstallationCompletedEvent.php
+++ b/lib/public/Install/Events/InstallationCompletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aebd318dfad..4217ff5e4cb 100644
--- a/lib/public/L10N/IFactory.php
+++ b/lib/public/L10N/IFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f327923c7ad..621ca4a072b 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 35fca39f5eb..0d95b312a9e 100644
--- a/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php
+++ b/lib/public/LDAP/Exceptions/MultipleUsersReturnedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c92883a1377..3b412349ce7 100644
--- a/lib/public/Lock/ILockingProvider.php
+++ b/lib/public/Lock/ILockingProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 799886a2dbb..f7d9df1f894 100644
--- a/lib/public/Lock/LockedException.php
+++ b/lib/public/Lock/LockedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4a70c52011e..203191b989b 100644
--- a/lib/public/Lock/ManuallyLockedException.php
+++ b/lib/public/Lock/ManuallyLockedException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class ManuallyLockedException extends LockedException {
$this->timeout = $timeout;
}
-
/**
* @return int
* @since 18.0.0
diff --git a/lib/public/Lockdown/ILockdownManager.php b/lib/public/Lockdown/ILockdownManager.php
index fe8adaecf91..2d64e7125e0 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 da7bdda8c73..dbee799f5c5 100644
--- a/lib/public/Log/Audit/CriticalActionPerformedEvent.php
+++ b/lib/public/Log/Audit/CriticalActionPerformedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8500a769bca..4706019c7e0 100644
--- a/lib/public/Log/BeforeMessageLoggedEvent.php
+++ b/lib/public/Log/BeforeMessageLoggedEvent.php
@@ -42,7 +42,6 @@ class BeforeMessageLoggedEvent extends Event {
return $this->level;
}
-
/**
* Get the app context of the log item
*
@@ -53,7 +52,6 @@ class BeforeMessageLoggedEvent extends Event {
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 c3334d0bf12..6d752c3c007 100644
--- a/lib/public/Log/IDataLogger.php
+++ b/lib/public/Log/IDataLogger.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ace10ee1b68..eefa0644ed5 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 db7adca2192..ed6135bada4 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 2fcbc094881..0ac8a83ff46 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 73b3b16b665..0287b5879f2 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 f528bd11409..2d95ec6e008 100644
--- a/lib/public/Mail/Events/BeforeMessageSent.php
+++ b/lib/public/Mail/Events/BeforeMessageSent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1191628d401..064bdee02e8 100644
--- a/lib/public/Mail/Headers/AutoSubmitted.php
+++ b/lib/public/Mail/Headers/AutoSubmitted.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f58a5771cc2..9fb03ad8685 100644
--- a/lib/public/Mail/IAttachment.php
+++ b/lib/public/Mail/IAttachment.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 66379abd8ae..de75c977303 100644
--- a/lib/public/Mail/IEMailTemplate.php
+++ b/lib/public/Mail/IEMailTemplate.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bdef34c2e36..6ccee5b78f9 100644
--- a/lib/public/Mail/IMailer.php
+++ b/lib/public/Mail/IMailer.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3d1d047478..69c9fc1e093 100644
--- a/lib/public/Mail/IMessage.php
+++ b/lib/public/Mail/IMessage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70513354109..28bc31b662c 100644
--- a/lib/public/Mail/Provider/Address.php
+++ b/lib/public/Mail/Provider/Address.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8b8b2b9cac7..5b1df7617bb 100644
--- a/lib/public/Mail/Provider/Attachment.php
+++ b/lib/public/Mail/Provider/Attachment.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7514c72a869..da0e459ac59 100644
--- a/lib/public/Mail/Provider/Exception/Exception.php
+++ b/lib/public/Mail/Provider/Exception/Exception.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fba0903cbb3..17382f37e4c 100644
--- a/lib/public/Mail/Provider/Exception/SendException.php
+++ b/lib/public/Mail/Provider/Exception/SendException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 47bb9148968..2969effa15c 100644
--- a/lib/public/Mail/Provider/IAddress.php
+++ b/lib/public/Mail/Provider/IAddress.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ff266994919..53d5b0deb74 100644
--- a/lib/public/Mail/Provider/IAttachment.php
+++ b/lib/public/Mail/Provider/IAttachment.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b55fed3f26f..58af66b829d 100644
--- a/lib/public/Mail/Provider/IManager.php
+++ b/lib/public/Mail/Provider/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 599d9b0566d..f312e66f322 100644
--- a/lib/public/Mail/Provider/IMessage.php
+++ b/lib/public/Mail/Provider/IMessage.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fe1b2884452..22b44ffeb59 100644
--- a/lib/public/Mail/Provider/IMessageSend.php
+++ b/lib/public/Mail/Provider/IMessageSend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d89022d7cbf..91270a0ab11 100644
--- a/lib/public/Mail/Provider/IProvider.php
+++ b/lib/public/Mail/Provider/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e0bb5161aa6..17c5548ae7e 100644
--- a/lib/public/Mail/Provider/IService.php
+++ b/lib/public/Mail/Provider/IService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4251450bf84..8601e9bcb0d 100644
--- a/lib/public/Mail/Provider/Message.php
+++ b/lib/public/Mail/Provider/Message.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ba9cd45ef4c..cb30f2adeb5 100644
--- a/lib/public/Migration/Attributes/AddColumn.php
+++ b/lib/public/Migration/Attributes/AddColumn.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 698eaa53a70..1b5a9de0f23 100644
--- a/lib/public/Migration/Attributes/AddIndex.php
+++ b/lib/public/Migration/Attributes/AddIndex.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fa2b9544f9d..38fd6ac0e13 100644
--- a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 54c0365bc9e..9b1374f258f 100644
--- a/lib/public/Migration/Attributes/ColumnType.php
+++ b/lib/public/Migration/Attributes/ColumnType.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df759b123c3..2f96011786d 100644
--- a/lib/public/Migration/Attributes/CreateTable.php
+++ b/lib/public/Migration/Attributes/CreateTable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc4af24c431..d8c392128c5 100644
--- a/lib/public/Migration/Attributes/DataCleansing.php
+++ b/lib/public/Migration/Attributes/DataCleansing.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 08d12a9f37b..2437b919e9c 100644
--- a/lib/public/Migration/Attributes/DataMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/DataMigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e18fe34f627..39d7e451949 100644
--- a/lib/public/Migration/Attributes/DropColumn.php
+++ b/lib/public/Migration/Attributes/DropColumn.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3da7daf327d..825d1aa6ed2 100644
--- a/lib/public/Migration/Attributes/DropIndex.php
+++ b/lib/public/Migration/Attributes/DropIndex.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cbd79a52092..cb0aab565f4 100644
--- a/lib/public/Migration/Attributes/DropTable.php
+++ b/lib/public/Migration/Attributes/DropTable.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9e2ac9b5a6c..b438e4d1f63 100644
--- a/lib/public/Migration/Attributes/GenericMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/GenericMigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b640a900f39..f80de4130e5 100644
--- a/lib/public/Migration/Attributes/IndexMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/IndexMigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dc3fcb9c656..283d457e71c 100644
--- a/lib/public/Migration/Attributes/IndexType.php
+++ b/lib/public/Migration/Attributes/IndexType.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3ef4312a195..76984c43ca3 100644
--- a/lib/public/Migration/Attributes/MigrationAttribute.php
+++ b/lib/public/Migration/Attributes/MigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 840a3db93ad..24801c97342 100644
--- a/lib/public/Migration/Attributes/ModifyColumn.php
+++ b/lib/public/Migration/Attributes/ModifyColumn.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4b11a75137a..1e6c23dc3bc 100644
--- a/lib/public/Migration/Attributes/TableMigrationAttribute.php
+++ b/lib/public/Migration/Attributes/TableMigrationAttribute.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c16a9ded8cb..a21211b51c6 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 584e2436318..2e22b4661e8 100644
--- a/lib/public/Migration/IMigrationStep.php
+++ b/lib/public/Migration/IMigrationStep.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 60e870055fe..a1540c55f2f 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 33f07d4723a..79eb204b4cc 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 0f954c3eade..1d31dd409c7 100644
--- a/lib/public/Migration/IRepairStepExpensive.php
+++ b/lib/public/Migration/IRepairStepExpensive.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 bea3d1be8fd..0323caff265 100644
--- a/lib/public/Migration/SimpleMigrationStep.php
+++ b/lib/public/Migration/SimpleMigrationStep.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 61db417b927..2defc13a271 100644
--- a/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php
+++ b/lib/public/Navigation/Events/LoadAdditionalEntriesEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 162abd81864..f4bf89aa8e5 100644
--- a/lib/public/Notification/AlreadyProcessedException.php
+++ b/lib/public/Notification/AlreadyProcessedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3c33ee1d727..c58345bd845 100644
--- a/lib/public/Notification/IAction.php
+++ b/lib/public/Notification/IAction.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 37c352d44cd..b1d0be9e8e4 100644
--- a/lib/public/Notification/IApp.php
+++ b/lib/public/Notification/IApp.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 00c7d691b10..afca044af6d 100644
--- a/lib/public/Notification/IDeferrableApp.php
+++ b/lib/public/Notification/IDeferrableApp.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d2f649b45a1..60982166f12 100644
--- a/lib/public/Notification/IDismissableNotifier.php
+++ b/lib/public/Notification/IDismissableNotifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b01cb37386a..d31ea4acb49 100644
--- a/lib/public/Notification/IManager.php
+++ b/lib/public/Notification/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 281fe24faf4..222a7c39eb2 100644
--- a/lib/public/Notification/INotification.php
+++ b/lib/public/Notification/INotification.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b6851e3dfb3..4f28dcb3281 100644
--- a/lib/public/Notification/INotifier.php
+++ b/lib/public/Notification/INotifier.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 386c8c39b48..d68711c2416 100644
--- a/lib/public/OCM/Exceptions/OCMArgumentException.php
+++ b/lib/public/OCM/Exceptions/OCMArgumentException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 98153d7d43e..684e18edcb4 100644
--- a/lib/public/OCM/Exceptions/OCMCapabilityException.php
+++ b/lib/public/OCM/Exceptions/OCMCapabilityException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b24f1d1e1b1..1750873d4f7 100644
--- a/lib/public/OCM/Exceptions/OCMProviderException.php
+++ b/lib/public/OCM/Exceptions/OCMProviderException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8017a34409a..f273e041546 100644
--- a/lib/public/OCM/Exceptions/OCMRequestException.php
+++ b/lib/public/OCM/Exceptions/OCMRequestException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 faf44067d12..051e7fa8752 100644
--- a/lib/public/OCM/ICapabilityAwareOCMProvider.php
+++ b/lib/public/OCM/ICapabilityAwareOCMProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4896a050bd0..2acc2a4d7bb 100644
--- a/lib/public/OCM/IOCMProvider.php
+++ b/lib/public/OCM/IOCMProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9f20a6077ff..d35b15af245 100644
--- a/lib/public/OCS/IDiscoveryService.php
+++ b/lib/public/OCS/IDiscoveryService.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 69cd281ac02..8cdae088803 100644
--- a/lib/public/Preview/BeforePreviewFetchedEvent.php
+++ b/lib/public/Preview/BeforePreviewFetchedEvent.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4a407f48577..bc433859ba1 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 da52f6a7946..2b819965bf5 100644
--- a/lib/public/Preview/IProviderV2.php
+++ b/lib/public/Preview/IProviderV2.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 842ae877339..8323f38a8c5 100644
--- a/lib/public/Preview/IVersionedPreviewFile.php
+++ b/lib/public/Preview/IVersionedPreviewFile.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1fbeec28b0f..d83e234b598 100644
--- a/lib/public/Profile/BeforeTemplateRenderedEvent.php
+++ b/lib/public/Profile/BeforeTemplateRenderedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e7181ab20f2..8b72871c3c1 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 2089c61be82..2fb3dd13fac 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 d0e3fd7ad80..62eace36a95 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 268594c0340..fcd38bf99c2 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 c261d57093d..a175c2c0cc6 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 f25328841c0..6499297810a 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 1cd2b3330ce..b8d84c17d68 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 329e8876c0d..e198be59cfb 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 d6717e54aea..89202cf2346 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 fc486663c73..c0ec8714372 100644
--- a/lib/public/RichObjectStrings/IValidator.php
+++ b/lib/public/RichObjectStrings/IValidator.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 603f4432ba6..d871edaa215 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 7dba6225aff..0a46feee902 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 5c1ccd0e523..b51ad861cb5 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 c8c9db58ac9..a004fa8b026 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 82847e96023..b12c06e1219 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 86b2bb655ff..b5fc23d8c9f 100644
--- a/lib/public/Search/FilterDefinition.php
+++ b/lib/public/Search/FilterDefinition.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a9a8e3ad6ba..f3d74b60a14 100644
--- a/lib/public/Search/IExternalProvider.php
+++ b/lib/public/Search/IExternalProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d3617bbc843..3f2663c87f9 100644
--- a/lib/public/Search/IFilter.php
+++ b/lib/public/Search/IFilter.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a28578a6d31..32fbf58546d 100644
--- a/lib/public/Search/IFilterCollection.php
+++ b/lib/public/Search/IFilterCollection.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8dee3af973d..0c1bac68a83 100644
--- a/lib/public/Search/IFilteringProvider.php
+++ b/lib/public/Search/IFilteringProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1baccb70d1e..1f635a3da6c 100644
--- a/lib/public/Search/IInAppSearch.php
+++ b/lib/public/Search/IInAppSearch.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 070e46cf798..d3416e68fd6 100644
--- a/lib/public/Search/IProvider.php
+++ b/lib/public/Search/IProvider.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 80f6de914d0..f5f8cd47824 100644
--- a/lib/public/Search/ISearchQuery.php
+++ b/lib/public/Search/ISearchQuery.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1168dca43ed..cd87b02d506 100644
--- a/lib/public/Search/SearchResult.php
+++ b/lib/public/Search/SearchResult.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 cfa6ae52d09..98aeb674cca 100644
--- a/lib/public/Search/SearchResultEntry.php
+++ b/lib/public/Search/SearchResultEntry.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 502e9d2e88b..eb29af259e2 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 b44112c5f04..b8032e52817 100644
--- a/lib/public/Security/Bruteforce/MaxDelayReached.php
+++ b/lib/public/Security/Bruteforce/MaxDelayReached.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c1cbddd298f..8cef17fc4dc 100644
--- a/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php
+++ b/lib/public/Security/CSP/AddContentSecurityPolicyEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 419e7b40ee4..288c6ec4740 100644
--- a/lib/public/Security/Events/GenerateSecurePasswordEvent.php
+++ b/lib/public/Security/Events/GenerateSecurePasswordEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d7ac9442392..132e98a44a1 100644
--- a/lib/public/Security/Events/ValidatePasswordPolicyEvent.php
+++ b/lib/public/Security/Events/ValidatePasswordPolicyEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c89c11bf7cd..b52d347d20d 100644
--- a/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php
+++ b/lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 00cdcc2c454..7fa781964f1 100644
--- a/lib/public/Security/IContentSecurityPolicyManager.php
+++ b/lib/public/Security/IContentSecurityPolicyManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7b24eb7e7a2..22d3867bde1 100644
--- a/lib/public/Security/ICredentialsManager.php
+++ b/lib/public/Security/ICredentialsManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 78b0fc14d6d..518ddd026cd 100644
--- a/lib/public/Security/ICrypto.php
+++ b/lib/public/Security/ICrypto.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d0d6e4e9028..f6e46b836a6 100644
--- a/lib/public/Security/IHasher.php
+++ b/lib/public/Security/IHasher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0707a633073..af2559f9c6b 100644
--- a/lib/public/Security/IRemoteHostValidator.php
+++ b/lib/public/Security/IRemoteHostValidator.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 0f4a79e08e0..5d47bdc7a1b 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 01edf57e6f3..f41c3bfed02 100644
--- a/lib/public/Security/ITrustedDomainHelper.php
+++ b/lib/public/Security/ITrustedDomainHelper.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 909070c09ff..a74ad253ae0 100644
--- a/lib/public/Security/PasswordContext.php
+++ b/lib/public/Security/PasswordContext.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 2fdceaa8c01..191840f4c66 100644
--- a/lib/public/Security/Signature/Enum/DigestAlgorithm.php
+++ b/lib/public/Security/Signature/Enum/DigestAlgorithm.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f62b5aeec5b..61fded9d00d 100644
--- a/lib/public/Security/Signature/Enum/SignatoryStatus.php
+++ b/lib/public/Security/Signature/Enum/SignatoryStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 425bdc3d92f..a045e350b89 100644
--- a/lib/public/Security/Signature/Enum/SignatoryType.php
+++ b/lib/public/Security/Signature/Enum/SignatoryType.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 356fae13062..4d3afaf81ba 100644
--- a/lib/public/Security/Signature/Enum/SignatureAlgorithm.php
+++ b/lib/public/Security/Signature/Enum/SignatureAlgorithm.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7e1fb8700c1..e7cf540186c 100644
--- a/lib/public/Security/Signature/Exceptions/IncomingRequestException.php
+++ b/lib/public/Security/Signature/Exceptions/IncomingRequestException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 106d3e8fa6a..9a3f2d0c654 100644
--- a/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php
+++ b/lib/public/Security/Signature/Exceptions/InvalidKeyOriginException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 035d1b790df..a119d76d273 100644
--- a/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php
+++ b/lib/public/Security/Signature/Exceptions/InvalidSignatureException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 71bf97b8dc1..aeae95e6cef 100644
--- a/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php
+++ b/lib/public/Security/Signature/Exceptions/SignatureElementNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c7a05f6e48e..ce18858c6d5 100644
--- a/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php
+++ b/lib/public/Security/Signature/Exceptions/SignatureNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ab25816eb82..f01bbe3d217 100644
--- a/lib/public/Security/Signature/IIncomingSignedRequest.php
+++ b/lib/public/Security/Signature/IIncomingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df8dc8a0de2..de40526434d 100644
--- a/lib/public/Security/Signature/IOutgoingSignedRequest.php
+++ b/lib/public/Security/Signature/IOutgoingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 771ce669b65..53c361ac9f9 100644
--- a/lib/public/Security/Signature/ISignatoryManager.php
+++ b/lib/public/Security/Signature/ISignatoryManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c5238e314c8..e4246d2f820 100644
--- a/lib/public/Security/Signature/ISignatureManager.php
+++ b/lib/public/Security/Signature/ISignatureManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 94f5f13b5e2..d52e5c7c80f 100644
--- a/lib/public/Security/Signature/ISignedRequest.php
+++ b/lib/public/Security/Signature/ISignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 563dadce56e..7e5328f7b35 100644
--- a/lib/public/Security/Signature/Model/Signatory.php
+++ b/lib/public/Security/Signature/Model/Signatory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 519fbd1bbed..10b2b72252c 100644
--- a/lib/public/Security/VerificationToken/IVerificationToken.php
+++ b/lib/public/Security/VerificationToken/IVerificationToken.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 a84f8817350..819a5ad6fdb 100644
--- a/lib/public/Security/VerificationToken/InvalidTokenException.php
+++ b/lib/public/Security/VerificationToken/InvalidTokenException.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 e30d67701f6..16f8e32d8cb 100644
--- a/lib/public/Server.php
+++ b/lib/public/Server.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 3bd661c89c6..d83875beb17 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 ae885dee705..5f7e1f3417a 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 4d0fe40aa29..5fe14cbf38c 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 e33556f0b4a..93cfae4ec7c 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 dfe3b1b9e73..c3feffbbda4 100644
--- a/lib/public/Settings/ISubAdminSettings.php
+++ b/lib/public/Settings/ISubAdminSettings.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 29a2215aa67..b6452b45633 100644
--- a/lib/public/SetupCheck/CheckServerResponseTrait.php
+++ b/lib/public/SetupCheck/CheckServerResponseTrait.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a2149b53e97..7432865ec5d 100644
--- a/lib/public/Share/Events/BeforeShareCreatedEvent.php
+++ b/lib/public/Share/Events/BeforeShareCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0af902f7fb7..805a4a837a1 100644
--- a/lib/public/Share/Events/BeforeShareDeletedEvent.php
+++ b/lib/public/Share/Events/BeforeShareDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dd9061563cc..aa5f5beb2cc 100644
--- a/lib/public/Share/Events/ShareAcceptedEvent.php
+++ b/lib/public/Share/Events/ShareAcceptedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e733c56bc74..3681f68e0a0 100644
--- a/lib/public/Share/Events/ShareCreatedEvent.php
+++ b/lib/public/Share/Events/ShareCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 70887a3f80b..295e483cb84 100644
--- a/lib/public/Share/Events/ShareDeletedEvent.php
+++ b/lib/public/Share/Events/ShareDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1e49975acea..d219c7d03da 100644
--- a/lib/public/Share/Events/ShareDeletedFromSelfEvent.php
+++ b/lib/public/Share/Events/ShareDeletedFromSelfEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3c9fc71f193..a29bc5a9f41 100644
--- a/lib/public/Share/Events/ShareMovedEvent.php
+++ b/lib/public/Share/Events/ShareMovedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 06a7ac3759b..a8e14e0fbdd 100644
--- a/lib/public/Share/Events/ShareTransferredEvent.php
+++ b/lib/public/Share/Events/ShareTransferredEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 03c9ab1f6c9..7fcdc1181b3 100644
--- a/lib/public/Share/Events/VerifyMountPointEvent.php
+++ b/lib/public/Share/Events/VerifyMountPointEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ce58dd19e2a..912909c70da 100644
--- a/lib/public/Share/Exceptions/AlreadySharedException.php
+++ b/lib/public/Share/Exceptions/AlreadySharedException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b94d210f970..c9cb8e67a13 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 e9ff4b66c42..45f8762de9e 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 0876078424e..74758580dec 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 9ddd8275dd6..af74d2cf128 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 6a53646f559..86228837fc8 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 @@ interface IManager {
*/
public function ignoreSecondDisplayName(): bool;
-
/**
* Check if custom tokens are allowed
*
@@ -497,7 +496,6 @@ interface IManager {
*/
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 fe0b4218c9a..681a4870fdf 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 9107274c8c1..f477e345286 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 1825c0c7dc6..6f9e9e72747 100644
--- a/lib/public/Share/IPublicShareTemplateFactory.php
+++ b/lib/public/Share/IPublicShareTemplateFactory.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 7bd1b8c5ebd..16fcd3f9f00 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 @@ interface IShare {
*/
public function getNote();
-
/**
* Set the expiration date
*
@@ -380,7 +380,6 @@ interface IShare {
*/
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 9c91aa32c8c..cd9675b56ab 100644
--- a/lib/public/Share/IShareHelper.php
+++ b/lib/public/Share/IShareHelper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c76040fccc5..6743af9dc3a 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 44e2d8eab70..d8c0a42d69e 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 c3a0c2d0218..a86e01d0f68 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 e27da7682ce..8bb8ec534a0 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 c2ba8118175..de56b950922 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 6554292d413..bca47dd03c9 100644
--- a/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php
+++ b/lib/public/SpeechToText/Events/AbstractTranscriptionEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4c2b0d52017..b5d97050da2 100644
--- a/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php
+++ b/lib/public/SpeechToText/Events/TranscriptionFailedEvent.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 e8e5359a29e..2c3b965e158 100644
--- a/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php
+++ b/lib/public/SpeechToText/Events/TranscriptionSuccessfulEvent.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 6bd95197695..be49b2fcd85 100644
--- a/lib/public/SpeechToText/ISpeechToTextManager.php
+++ b/lib/public/SpeechToText/ISpeechToTextManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 dce4a68ea0a..041d5da6749 100644
--- a/lib/public/SpeechToText/ISpeechToTextProvider.php
+++ b/lib/public/SpeechToText/ISpeechToTextProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 8020c6c9b96..ab8f52d4200 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 d1bc4216a38..5cd271c29c4 100644
--- a/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php
+++ b/lib/public/SpeechToText/ISpeechToTextProviderWithUserId.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 54a88041b52..935ed8ca956 100644
--- a/lib/public/Support/CrashReport/ICollectBreadcrumbs.php
+++ b/lib/public/Support/CrashReport/ICollectBreadcrumbs.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dee6ee61121..bdafd94133f 100644
--- a/lib/public/Support/CrashReport/IMessageReporter.php
+++ b/lib/public/Support/CrashReport/IMessageReporter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 503a21038ca..1c61b842b42 100644
--- a/lib/public/Support/CrashReport/IRegistry.php
+++ b/lib/public/Support/CrashReport/IRegistry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1be8ba58c30..f8107ca7485 100644
--- a/lib/public/Support/CrashReport/IReporter.php
+++ b/lib/public/Support/CrashReport/IReporter.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95179f0501a..f881801815c 100644
--- a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php
+++ b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 973800ba854..e604d19174a 100644
--- a/lib/public/Support/Subscription/IAssertion.php
+++ b/lib/public/Support/Subscription/IAssertion.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 5452430ceed..3e2dbbc5d94 100644
--- a/lib/public/Support/Subscription/IRegistry.php
+++ b/lib/public/Support/Subscription/IRegistry.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a785875d241..f542a326bac 100644
--- a/lib/public/Support/Subscription/ISubscription.php
+++ b/lib/public/Support/Subscription/ISubscription.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d18870e827b..4d5e335740c 100644
--- a/lib/public/Support/Subscription/ISupportedApps.php
+++ b/lib/public/Support/Subscription/ISupportedApps.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 df5506af693..aa70f57ef0b 100644
--- a/lib/public/SystemTag/ISystemTag.php
+++ b/lib/public/SystemTag/ISystemTag.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bcfe98455f1..7cf25351be2 100644
--- a/lib/public/SystemTag/ISystemTagManager.php
+++ b/lib/public/SystemTag/ISystemTagManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7c80624aaad..11b5eaf4c1b 100644
--- a/lib/public/SystemTag/ISystemTagManagerFactory.php
+++ b/lib/public/SystemTag/ISystemTagManagerFactory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 614f72ebc89..11a675a90bc 100644
--- a/lib/public/SystemTag/ISystemTagObjectMapper.php
+++ b/lib/public/SystemTag/ISystemTagObjectMapper.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace OCP\SystemTag;
use OCP\AppFramework\Attribute\Consumable;
@@ -127,7 +128,6 @@ interface ISystemTagObjectMapper {
*/
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 adfe64f8658..92ea2bb7032 100644
--- a/lib/public/SystemTag/ManagerEvent.php
+++ b/lib/public/SystemTag/ManagerEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8647ece01b7..d337f370fd8 100644
--- a/lib/public/SystemTag/MapperEvent.php
+++ b/lib/public/SystemTag/MapperEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d8f391d0dba..b3ed58e77d5 100644
--- a/lib/public/SystemTag/SystemTagsEntityEvent.php
+++ b/lib/public/SystemTag/SystemTagsEntityEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9db94bc4124..7b7d52d8ca2 100644
--- a/lib/public/SystemTag/TagAlreadyExistsException.php
+++ b/lib/public/SystemTag/TagAlreadyExistsException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 50503a6cbdd..d82901aa7e3 100644
--- a/lib/public/SystemTag/TagAssignedEvent.php
+++ b/lib/public/SystemTag/TagAssignedEvent.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 8a143422fff..fc1b594dee0 100644
--- a/lib/public/SystemTag/TagNotFoundException.php
+++ b/lib/public/SystemTag/TagNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5ed085ba87c..27fdfa07e3c 100644
--- a/lib/public/SystemTag/TagUnassignedEvent.php
+++ b/lib/public/SystemTag/TagUnassignedEvent.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 55f33327e9f..0f4918b1b92 100644
--- a/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php
+++ b/lib/public/TaskProcessing/Events/AbstractTaskProcessingEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 10c94d20406..960696169e2 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 df3de34c036..de472694ed0 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 d97c03f282a..6efa661a776 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 257f4d72a32..0e412c642b0 100644
--- a/lib/public/TaskProcessing/Exception/Exception.php
+++ b/lib/public/TaskProcessing/Exception/Exception.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 07ef4c61394..362ca97a4c7 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 5276fb03d34..c9610ce2a48 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 3f332e77b9d..0716e8b7c7c 100644
--- a/lib/public/TaskProcessing/Exception/ProcessingException.php
+++ b/lib/public/TaskProcessing/Exception/ProcessingException.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 8b048c6a9ed..341c9b72680 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 f2669a30e71..50f32378e46 100644
--- a/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php
+++ b/lib/public/TaskProcessing/Exception/UserFacingProcessingException.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 0b8da3218b7..6c5077cee9e 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 2cd0244b52e..f15cecddc7b 100644
--- a/lib/public/TaskProcessing/IManager.php
+++ b/lib/public/TaskProcessing/IManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 a4e752216c7..b79762d0583 100644
--- a/lib/public/TaskProcessing/IProvider.php
+++ b/lib/public/TaskProcessing/IProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 d7e42684df5..9184b2c2697 100644
--- a/lib/public/TaskProcessing/ISynchronousProvider.php
+++ b/lib/public/TaskProcessing/ISynchronousProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 05b7c07ec6c..40814dc91a6 100644
--- a/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php
+++ b/lib/public/TaskProcessing/ISynchronousWatermarkingProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 c837d953f0b..87f3195802c 100644
--- a/lib/public/TaskProcessing/ITriggerableProvider.php
+++ b/lib/public/TaskProcessing/ITriggerableProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 6cdb511e50c..af4bb1acbd4 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 5afffecd2e6..fddeab223f7 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 72edc9a17ce..d709df3632f 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 4cee9997408..d93523b4e03 100644
--- a/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php
+++ b/lib/public/TaskProcessing/TaskTypes/AudioToAudioChat.php
@@ -37,7 +37,6 @@ class AudioToAudioChat implements IInternalTaskType {
$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 438fd52a9df..07fee42d22d 100644
--- a/lib/public/TaskProcessing/TaskTypes/AudioToText.php
+++ b/lib/public/TaskProcessing/TaskTypes/AudioToText.php
@@ -37,7 +37,6 @@ class AudioToText implements ITaskType {
$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 3634168a6bc..7d3b649cfd1 100644
--- a/lib/public/TaskProcessing/TaskTypes/ContextWrite.php
+++ b/lib/public/TaskProcessing/TaskTypes/ContextWrite.php
@@ -37,7 +37,6 @@ class ContextWrite implements ITaskType {
$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 56a0017e2e1..b6711edb2a4 100644
--- a/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php
+++ b/lib/public/TaskProcessing/TaskTypes/GenerateEmoji.php
@@ -37,7 +37,6 @@ class GenerateEmoji implements ITaskType {
$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 d342879b8e2..c2e77c3efa1 100644
--- a/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php
+++ b/lib/public/TaskProcessing/TaskTypes/ImageToTextOpticalCharacterRecognition.php
@@ -36,7 +36,6 @@ class ImageToTextOpticalCharacterRecognition implements ITaskType {
$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 b5db195a474..d43d27e8cef 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToImage.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToImage.php
@@ -37,7 +37,6 @@ class TextToImage implements ITaskType {
$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 bb5f3db96e9..8eef6de6ea2 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToSpeech.php
@@ -37,7 +37,6 @@ class TextToSpeech implements ITaskType {
$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 639e99d0cea..dc50cc79b06 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToText.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToText.php
@@ -37,7 +37,6 @@ class TextToText implements ITaskType {
$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 9af9283a7a9..d6188c18be6 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextChat.php
@@ -37,7 +37,6 @@ class TextToTextChat implements ITaskType {
$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 2502d0ef4a3..0d8f6aba82d 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextFormalization.php
@@ -37,7 +37,6 @@ class TextToTextFormalization implements ITaskType {
$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 6dbe165486d..c76732255de 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextHeadline.php
@@ -37,7 +37,6 @@ class TextToTextHeadline implements ITaskType {
$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 14c08710f81..f8d09e37f49 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextProofread.php
@@ -36,7 +36,6 @@ class TextToTextProofread implements ITaskType {
$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 92ce7ad2e86..7a5b8588eb1 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextReformulation.php
@@ -37,7 +37,6 @@ class TextToTextReformulation implements ITaskType {
$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 b4d88501f7b..0ea747dad8e 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextSimplification.php
@@ -37,7 +37,6 @@ class TextToTextSimplification implements ITaskType {
$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 6b16b0d1c53..14d7788e08b 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextSummary.php
@@ -36,7 +36,6 @@ class TextToTextSummary implements ITaskType {
$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 7aa9aecf36d..bd532f2417a 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextTopics.php
@@ -37,7 +37,6 @@ class TextToTextTopics implements ITaskType {
$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 0de8a7e1ada..8f9dc91bc27 100644
--- a/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php
+++ b/lib/public/TaskProcessing/TaskTypes/TextToTextTranslate.php
@@ -37,7 +37,6 @@ class TextToTextTranslate implements ITaskType {
$this->l = $l10nFactory->get('lib');
}
-
/**
* @inheritDoc
* @since 30.0.0
diff --git a/lib/public/Template.php b/lib/public/Template.php
index c29de52db4f..f625dcf4a87 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 @@ class Template extends \OC_Template implements ITemplate {
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 8b944254020..eedbb83e903 100644
--- a/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php
+++ b/lib/public/TextProcessing/Events/AbstractTextProcessingEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dfdb9137f95..5105cc96c15 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 0716f4d45c6..40d137f7343 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 06fbdf5e765..31fc3c4a74d 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 d5af0fc8ffa..3b2d37a03c4 100644
--- a/lib/public/TextProcessing/FreePromptTaskType.php
+++ b/lib/public/TextProcessing/FreePromptTaskType.php
@@ -32,7 +32,6 @@ class FreePromptTaskType implements ITaskType {
$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 f7fea210a6f..3d6da1274d6 100644
--- a/lib/public/TextProcessing/HeadlineTaskType.php
+++ b/lib/public/TextProcessing/HeadlineTaskType.php
@@ -32,7 +32,6 @@ class HeadlineTaskType implements ITaskType {
$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 701ad18940f..c2f40e449e7 100644
--- a/lib/public/TextProcessing/IManager.php
+++ b/lib/public/TextProcessing/IManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 24efbc1ec8c..b8905543920 100644
--- a/lib/public/TextProcessing/IProvider.php
+++ b/lib/public/TextProcessing/IProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 b3986e8b3a8..3ab51ff1f74 100644
--- a/lib/public/TextProcessing/IProviderWithExpectedRuntime.php
+++ b/lib/public/TextProcessing/IProviderWithExpectedRuntime.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 197dd3d9740..5e44500310f 100644
--- a/lib/public/TextProcessing/IProviderWithUserId.php
+++ b/lib/public/TextProcessing/IProviderWithUserId.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 d3580ca15d6..0f3cc9ebc6c 100644
--- a/lib/public/TextProcessing/SummaryTaskType.php
+++ b/lib/public/TextProcessing/SummaryTaskType.php
@@ -32,7 +32,6 @@ class SummaryTaskType implements ITaskType {
$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 ef47ad7c7af..888fad38cdc 100644
--- a/lib/public/TextProcessing/TopicsTaskType.php
+++ b/lib/public/TextProcessing/TopicsTaskType.php
@@ -32,7 +32,6 @@ class TopicsTaskType implements ITaskType {
$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 df8adfc39f4..3d4abf7fccd 100644
--- a/lib/public/TextToImage/IManager.php
+++ b/lib/public/TextToImage/IManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 a3eedbd9dc0..ebec04130bf 100644
--- a/lib/public/TextToImage/IProviderWithUserId.php
+++ b/lib/public/TextToImage/IProviderWithUserId.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 18f40b1aa52..dfd85f78019 100644
--- a/lib/public/Translation/IDetectLanguageProvider.php
+++ b/lib/public/Translation/IDetectLanguageProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 efeaa2de1e2..c93d5327239 100644
--- a/lib/public/Translation/ITranslationManager.php
+++ b/lib/public/Translation/ITranslationManager.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 39267ab9ca5..c6cb5745f31 100644
--- a/lib/public/Translation/ITranslationProvider.php
+++ b/lib/public/Translation/ITranslationProvider.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 93fc641ee02..4224d6cf759 100644
--- a/lib/public/Translation/ITranslationProviderWithId.php
+++ b/lib/public/Translation/ITranslationProviderWithId.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 5bc2255f21f..841c294968c 100644
--- a/lib/public/Translation/ITranslationProviderWithUserId.php
+++ b/lib/public/Translation/ITranslationProviderWithUserId.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 e30a37a8b11..f159e64c95c 100644
--- a/lib/public/Translation/LanguageTuple.php
+++ b/lib/public/Translation/LanguageTuple.php
@@ -7,7 +7,6 @@ declare(strict_types=1);
* 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 90be168e235..31844ee01d7 100644
--- a/lib/public/User/Backend/ABackend.php
+++ b/lib/public/User/Backend/ABackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 db5d7d08cb5..1324f955e10 100644
--- a/lib/public/User/Backend/ICheckPasswordBackend.php
+++ b/lib/public/User/Backend/ICheckPasswordBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 194cf465cbe..99d0a32f9e0 100644
--- a/lib/public/User/Backend/ICountUsersBackend.php
+++ b/lib/public/User/Backend/ICountUsersBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f273c6d7f8b..d89b5d41ea4 100644
--- a/lib/public/User/Backend/ICreateUserBackend.php
+++ b/lib/public/User/Backend/ICreateUserBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6d0f03387ce..72571e91a78 100644
--- a/lib/public/User/Backend/ICustomLogout.php
+++ b/lib/public/User/Backend/ICustomLogout.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a9c92b8b146..b2229d42986 100644
--- a/lib/public/User/Backend/IGetDisplayNameBackend.php
+++ b/lib/public/User/Backend/IGetDisplayNameBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f280f4c9370..bdd32781e8c 100644
--- a/lib/public/User/Backend/IGetHomeBackend.php
+++ b/lib/public/User/Backend/IGetHomeBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 8041043f7d5..96fd4053ca2 100644
--- a/lib/public/User/Backend/IGetRealUIDBackend.php
+++ b/lib/public/User/Backend/IGetRealUIDBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 856f65ada00..4dcdf45f192 100644
--- a/lib/public/User/Backend/IPasswordConfirmationBackend.php
+++ b/lib/public/User/Backend/IPasswordConfirmationBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6a694a4de95..a4ab960f3b0 100644
--- a/lib/public/User/Backend/IProvideAvatarBackend.php
+++ b/lib/public/User/Backend/IProvideAvatarBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4b3eef6005f..c09b82eeb02 100644
--- a/lib/public/User/Backend/ISearchKnownUsersBackend.php
+++ b/lib/public/User/Backend/ISearchKnownUsersBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 617f1735021..52ed8cc2b56 100644
--- a/lib/public/User/Backend/ISetDisplayNameBackend.php
+++ b/lib/public/User/Backend/ISetDisplayNameBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 571349df58f..fe74247dfbb 100644
--- a/lib/public/User/Backend/ISetPasswordBackend.php
+++ b/lib/public/User/Backend/ISetPasswordBackend.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 489878442b8..0197095ce00 100644
--- a/lib/public/User/Events/BeforePasswordUpdatedEvent.php
+++ b/lib/public/User/Events/BeforePasswordUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 62ee32003ce..de717728226 100644
--- a/lib/public/User/Events/BeforeUserCreatedEvent.php
+++ b/lib/public/User/Events/BeforeUserCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 27bc26a125f..e876e4764e4 100644
--- a/lib/public/User/Events/BeforeUserDeletedEvent.php
+++ b/lib/public/User/Events/BeforeUserDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4e76e0aa36f..630692c34ec 100644
--- a/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php
+++ b/lib/public/User/Events/BeforeUserLoggedInWithCookieEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b6eb81ab10..c34d23dedd8 100644
--- a/lib/public/User/Events/BeforeUserLoggedOutEvent.php
+++ b/lib/public/User/Events/BeforeUserLoggedOutEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0817994f069..654b6fa7f9b 100644
--- a/lib/public/User/Events/OutOfOfficeEndedEvent.php
+++ b/lib/public/User/Events/OutOfOfficeEndedEvent.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1b5c69b3cfb..2bba621e94d 100644
--- a/lib/public/User/Events/OutOfOfficeStartedEvent.php
+++ b/lib/public/User/Events/OutOfOfficeStartedEvent.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 d3fd8f078fe..47952e252a3 100644
--- a/lib/public/User/Events/PasswordUpdatedEvent.php
+++ b/lib/public/User/Events/PasswordUpdatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0a552ef755b..af12ee0a040 100644
--- a/lib/public/User/Events/PostLoginEvent.php
+++ b/lib/public/User/Events/PostLoginEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f71fb17fff0..3606bbda9da 100644
--- a/lib/public/User/Events/UserChangedEvent.php
+++ b/lib/public/User/Events/UserChangedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 46b990206c0..7d524c46dd3 100644
--- a/lib/public/User/Events/UserCreatedEvent.php
+++ b/lib/public/User/Events/UserCreatedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9b74ff96063..37aad2e83c3 100644
--- a/lib/public/User/Events/UserDeletedEvent.php
+++ b/lib/public/User/Events/UserDeletedEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 08f7aacb1c2..8abfc781885 100644
--- a/lib/public/User/Events/UserFirstTimeLoggedInEvent.php
+++ b/lib/public/User/Events/UserFirstTimeLoggedInEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 b1f4c9c1d75..bf918da7cec 100644
--- a/lib/public/User/Events/UserLiveStatusEvent.php
+++ b/lib/public/User/Events/UserLiveStatusEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 53f61073a59..aa3da7a18b6 100644
--- a/lib/public/User/Events/UserLoggedInEvent.php
+++ b/lib/public/User/Events/UserLoggedInEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 6f9def0df7e..dcaa042be5a 100644
--- a/lib/public/User/Events/UserLoggedInWithCookieEvent.php
+++ b/lib/public/User/Events/UserLoggedInWithCookieEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dbdd6d78703..b1195d218f5 100644
--- a/lib/public/User/Events/UserLoggedOutEvent.php
+++ b/lib/public/User/Events/UserLoggedOutEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3b6c018fd8..30134f9c387 100644
--- a/lib/public/User/GetQuotaEvent.php
+++ b/lib/public/User/GetQuotaEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 d291ee0a540..d0c5f947b58 100644
--- a/lib/public/UserStatus/IManager.php
+++ b/lib/public/UserStatus/IManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ef0dc831085..3bcf7375fe1 100644
--- a/lib/public/UserStatus/IProvider.php
+++ b/lib/public/UserStatus/IProvider.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48eecfec24a..b66beb72b1b 100644
--- a/lib/public/UserStatus/IUserStatus.php
+++ b/lib/public/UserStatus/IUserStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 1cafe3f5b52..e2be7f215bd 100644
--- a/lib/public/WorkflowEngine/EntityContext/IContextPortation.php
+++ b/lib/public/WorkflowEngine/EntityContext/IContextPortation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2677e4805e..78bcb26ee2d 100644
--- a/lib/public/WorkflowEngine/EntityContext/IDisplayName.php
+++ b/lib/public/WorkflowEngine/EntityContext/IDisplayName.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4bfb454bf47..335610ca956 100644
--- a/lib/public/WorkflowEngine/EntityContext/IDisplayText.php
+++ b/lib/public/WorkflowEngine/EntityContext/IDisplayText.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c019cda3cf6..66ac09b8637 100644
--- a/lib/public/WorkflowEngine/EntityContext/IIcon.php
+++ b/lib/public/WorkflowEngine/EntityContext/IIcon.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 25e8ecb5a0e..b5d9d75fe0a 100644
--- a/lib/public/WorkflowEngine/EntityContext/IUrl.php
+++ b/lib/public/WorkflowEngine/EntityContext/IUrl.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 666a9ef7039..fadeb485b28 100644
--- a/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php
+++ b/lib/public/WorkflowEngine/Events/LoadSettingsScriptsEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0c43758d660..c5908a15763 100644
--- a/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php
+++ b/lib/public/WorkflowEngine/Events/RegisterChecksEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4f532925578..da2c1e83cf4 100644
--- a/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php
+++ b/lib/public/WorkflowEngine/Events/RegisterEntitiesEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5a22975a9a8..f167b4acfae 100644
--- a/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php
+++ b/lib/public/WorkflowEngine/Events/RegisterOperationsEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7e1b20370df..8f24629f12d 100644
--- a/lib/public/WorkflowEngine/GenericEntityEvent.php
+++ b/lib/public/WorkflowEngine/GenericEntityEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 4671eb84c3e..8e71f1ceb9e 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 45e30029d7d..e654f627a98 100644
--- a/lib/public/WorkflowEngine/IComplexOperation.php
+++ b/lib/public/WorkflowEngine/IComplexOperation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 0b469b479e6..fa5bdefb5f7 100644
--- a/lib/public/WorkflowEngine/IEntity.php
+++ b/lib/public/WorkflowEngine/IEntity.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ccfeb2ece0b..2c2aba05739 100644
--- a/lib/public/WorkflowEngine/IEntityCheck.php
+++ b/lib/public/WorkflowEngine/IEntityCheck.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 66088c26b47..e6162e8770d 100644
--- a/lib/public/WorkflowEngine/IEntityEvent.php
+++ b/lib/public/WorkflowEngine/IEntityEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c26c4d9fcef..14d065e6b7f 100644
--- a/lib/public/WorkflowEngine/IFileCheck.php
+++ b/lib/public/WorkflowEngine/IFileCheck.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 f9655dfa35b..c0174c95a25 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 ac519d33c25..1a880f37d03 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 323c579e6a3..d9264215617 100644
--- a/lib/public/WorkflowEngine/IRuleMatcher.php
+++ b/lib/public/WorkflowEngine/IRuleMatcher.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 aa8c4eeb0c2..8df1b7f8cc5 100644
--- a/lib/public/WorkflowEngine/ISpecificOperation.php
+++ b/lib/public/WorkflowEngine/ISpecificOperation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bffd6a96ebd..7a215b81046 100644
--- a/lib/unstable/Config/IUserConfig.php
+++ b/lib/unstable/Config/IUserConfig.php
@@ -665,7 +665,6 @@ interface IUserConfig {
*/
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 f97de0f5d39..57103fa5cad 100644
--- a/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php
+++ b/lib/unstable/Security/Signature/Enum/DigestAlgorithm.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a46e5449cf0..ea85128e89d 100644
--- a/lib/unstable/Security/Signature/Enum/SignatoryStatus.php
+++ b/lib/unstable/Security/Signature/Enum/SignatoryStatus.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c3bec63d79a..5b2061693ca 100644
--- a/lib/unstable/Security/Signature/Enum/SignatoryType.php
+++ b/lib/unstable/Security/Signature/Enum/SignatoryType.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 7614147bc70..89d33f440c2 100644
--- a/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php
+++ b/lib/unstable/Security/Signature/Enum/SignatureAlgorithm.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5549c41c1e5..08f1ed98a89 100644
--- a/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php
+++ b/lib/unstable/Security/Signature/Exceptions/IncomingRequestException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 9967fb3f11e..7d07fc1a82d 100644
--- a/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php
+++ b/lib/unstable/Security/Signature/Exceptions/InvalidKeyOriginException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3301973224b..5f4a3878aaf 100644
--- a/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php
+++ b/lib/unstable/Security/Signature/Exceptions/InvalidSignatureException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 dbf23feb4e9..ea3aa191564 100644
--- a/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php
+++ b/lib/unstable/Security/Signature/Exceptions/SignatureElementNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 761b04ae228..f3ce9c82eeb 100644
--- a/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php
+++ b/lib/unstable/Security/Signature/Exceptions/SignatureNotFoundException.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 bed64ef1404..15e56a5eea9 100644
--- a/lib/unstable/Security/Signature/IIncomingSignedRequest.php
+++ b/lib/unstable/Security/Signature/IIncomingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 ac99c5e4a50..f4110da2463 100644
--- a/lib/unstable/Security/Signature/IOutgoingSignedRequest.php
+++ b/lib/unstable/Security/Signature/IOutgoingSignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 69b7c3022fa..bad1f58bfd2 100644
--- a/lib/unstable/Security/Signature/ISignatoryManager.php
+++ b/lib/unstable/Security/Signature/ISignatoryManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 3cd51d15582..d0f29c29630 100644
--- a/lib/unstable/Security/Signature/ISignatureManager.php
+++ b/lib/unstable/Security/Signature/ISignatureManager.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 28a9fc87b44..aa02728463e 100644
--- a/lib/unstable/Security/Signature/ISignedRequest.php
+++ b/lib/unstable/Security/Signature/ISignedRequest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 de0aeebc9db..1befe256854 100644
--- a/lib/unstable/Security/Signature/Model/Signatory.php
+++ b/lib/unstable/Security/Signature/Model/Signatory.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e66ba433c4b..769d3a9e0d3 100644
--- a/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php
+++ b/lib/unstable/WorkflowEngine/Events/RegisterRuntimeOperationsEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ use OCP\WorkflowEngine\IManager;
*/
final class RegisterRuntimeOperationsEvent extends Event {
-
-
-
-
-
/**
* @experimental 34.0.0
*/
diff --git a/lib/unstable/WorkflowEngine/RuntimeOperation.php b/lib/unstable/WorkflowEngine/RuntimeOperation.php
index 84764c0fe04..ea33e9a3926 100644
--- a/lib/unstable/WorkflowEngine/RuntimeOperation.php
+++ b/lib/unstable/WorkflowEngine/RuntimeOperation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 cc149f0dd72..695f1bb9eaa 100644
--- a/lib/unstable/WorkflowEngine/RuntimeScope.php
+++ b/lib/unstable/WorkflowEngine/RuntimeScope.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 fced4e4b8a2..219ead209a5 100644
--- a/tests/Core/Command/Config/App/DeleteConfigTest.php
+++ b/tests/Core/Command/Config/App/DeleteConfigTest.php
@@ -37,7 +37,6 @@ class DeleteConfigTest extends TestCase {
$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 1e68f76d86f..36f96803dc3 100644
--- a/tests/Core/Command/Config/App/GetConfigTest.php
+++ b/tests/Core/Command/Config/App/GetConfigTest.php
@@ -38,7 +38,6 @@ class GetConfigTest extends TestCase {
$this->command = new GetConfig($this->appConfig, $this->configManager);
}
-
public static function dataGet(): array {
return [
// String output as json
@@ -77,7 +76,6 @@ class GetConfigTest extends TestCase {
// 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 6a6f03f6125..25cd1c5be73 100644
--- a/tests/Core/Command/Config/App/SetConfigTest.php
+++ b/tests/Core/Command/Config/App/SetConfigTest.php
@@ -39,7 +39,6 @@ class SetConfigTest extends TestCase {
$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 2718d6f38da..c8133f648f7 100644
--- a/tests/Core/Command/Config/System/GetConfigTest.php
+++ b/tests/Core/Command/Config/System/GetConfigTest.php
@@ -40,7 +40,6 @@ class GetConfigTest extends TestCase {
$this->command = new GetConfig($systemConfig);
}
-
public static function getData(): array {
return [
// String output as json
@@ -85,7 +84,6 @@ class GetConfigTest extends TestCase {
[['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 78ea61e42e4..6ed1350ea9c 100644
--- a/tests/Core/Command/Config/System/SetConfigTest.php
+++ b/tests/Core/Command/Config/System/SetConfigTest.php
@@ -41,7 +41,6 @@ class SetConfigTest extends TestCase {
$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 38878c871bd..f831a6e181f 100644
--- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
+++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
@@ -231,7 +231,6 @@ class ChangeKeyStorageRootTest extends TestCase {
];
}
-
public function testMoveUserKeys(): void {
$changeKeyStorageRoot = $this->getMockBuilder('OC\Core\Command\Encryption\ChangeKeyStorageRoot')
->setConstructorArgs(
@@ -306,7 +305,6 @@ class ChangeKeyStorageRootTest extends TestCase {
];
}
-
#[\PHPUnit\Framework\Attributes\DataProvider('dataTestPrepareParentFolder')]
public function testPrepareParentFolder($path, $pathExists): void {
$this->view->expects($this->any())->method('file_exists')
@@ -349,7 +347,6 @@ class ChangeKeyStorageRootTest extends TestCase {
);
}
-
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 009eb36eb7f..a3c761d8da4 100644
--- a/tests/Core/Command/Encryption/DecryptAllTest.php
+++ b/tests/Core/Command/Encryption/DecryptAllTest.php
@@ -150,7 +150,6 @@ class DecryptAllTest extends TestCase {
];
}
-
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 96310a6c75b..3c6fc8d2b95 100644
--- a/tests/Core/Command/Encryption/DisableTest.php
+++ b/tests/Core/Command/Encryption/DisableTest.php
@@ -39,7 +39,6 @@ class DisableTest extends TestCase {
$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 234984b1c09..e90d7b4e66f 100644
--- a/tests/Core/Command/Encryption/EnableTest.php
+++ b/tests/Core/Command/Encryption/EnableTest.php
@@ -46,7 +46,6 @@ class EnableTest extends TestCase {
$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 2787c61c383..d16dcf9074c 100644
--- a/tests/Core/Command/Encryption/EncryptAllTest.php
+++ b/tests/Core/Command/Encryption/EncryptAllTest.php
@@ -82,7 +82,6 @@ class EncryptAllTest extends TestCase {
];
}
-
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 af68e5e5b4b..a3be945d5b9 100644
--- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php
+++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php
@@ -44,7 +44,6 @@ class SetDefaultModuleTest extends TestCase {
$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 66131f9e3b6..a431e33cf81 100644
--- a/tests/Core/Command/Log/ManageTest.php
+++ b/tests/Core/Command/Log/ManageTest.php
@@ -74,14 +74,12 @@ class ManageTest extends TestCase {
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 @@ class ManageTest extends TestCase {
);
}
-
public function testConvertLevelStringInvalid(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -132,7 +129,6 @@ class ManageTest extends TestCase {
);
}
-
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 ec44a770ad6..669a77ea079 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 626b51d0a20..8774412b8ec 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 5d9d51026a2..84b0068842f 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 c7b7f2ce43c..01d64f878cb 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 ae9694435fb..f3958750b2d 100644
--- a/tests/Core/Command/User/DeleteTest.php
+++ b/tests/Core/Command/User/DeleteTest.php
@@ -40,7 +40,6 @@ class DeleteTest extends TestCase {
$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 259a0d99b92..5ebbd9182a3 100644
--- a/tests/Core/Command/User/ProfileTest.php
+++ b/tests/Core/Command/User/ProfileTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class ProfileTest extends TestCase {
->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 dac50409357..75c70a99949 100644
--- a/tests/Core/Command/User/SettingTest.php
+++ b/tests/Core/Command/User/SettingTest.php
@@ -447,7 +447,6 @@ class SettingTest extends TestCase {
->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 6931c9bd70d..d20dde5fe29 100644
--- a/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginV2ControllerTest.php
@@ -280,7 +280,6 @@ class ClientFlowLoginV2ControllerTest extends TestCase {
$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 7f967bf5d6f..b5afd3a1728 100644
--- a/tests/Core/Controller/CssControllerTest.php
+++ b/tests/Core/Controller/CssControllerTest.php
@@ -68,7 +68,6 @@ class CssControllerTest extends TestCase {
$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 2d7c1de2460..0626f0198fd 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 11ad58b4dfd..d15d0c938b7 100644
--- a/tests/Core/Controller/JsControllerTest.php
+++ b/tests/Core/Controller/JsControllerTest.php
@@ -68,7 +68,6 @@ class JsControllerTest extends TestCase {
$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 7f3333172ff..05bea877174 100644
--- a/tests/Core/Controller/LoginControllerTest.php
+++ b/tests/Core/Controller/LoginControllerTest.php
@@ -105,7 +105,6 @@ class LoginControllerTest extends TestCase {
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 37b9272695d..26c9b494222 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -676,7 +676,6 @@ class LostControllerTest extends TestCase {
$this->assertEquals($expectedResponse, $response);
}
-
/**
* @return array
*/
diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
index 2101dea06a9..46b4afaff0a 100644
--- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php
+++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php
@@ -153,7 +153,6 @@ class TwoFactorMiddlewareTest extends TestCase {
$this->middleware->beforeController($controller, 'index');
}
-
public function testBeforeControllerTwoFactorAuthRequired(): void {
$this->expectException(TwoFactorAuthRequiredException::class);
@@ -180,7 +179,6 @@ class TwoFactorMiddlewareTest extends TestCase {
$this->middleware->beforeController($controller, 'index');
}
-
public function testBeforeControllerUserAlreadyLoggedIn(): void {
$this->expectException(UserAlreadyLoggedInException::class);
@@ -279,7 +277,6 @@ class TwoFactorMiddlewareTest extends TestCase {
$providers = [];
}
-
$user = $this->createMock(IUser::class);
$this->userSession
diff --git a/tests/lib/Accounts/AccountTest.php b/tests/lib/Accounts/AccountTest.php
index d7d4ada0812..6c1b04dc34a 100644
--- a/tests/lib/Accounts/AccountTest.php
+++ b/tests/lib/Accounts/AccountTest.php
@@ -101,7 +101,6 @@ class AccountTest extends TestCase {
$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 dcf37db5c7e..d90d66dcee3 100644
--- a/tests/lib/Activity/ManagerTest.php
+++ b/tests/lib/Activity/ManagerTest.php
@@ -72,7 +72,6 @@ class ManagerTest extends TestCase {
$this->assertNotEmpty($consumers);
}
-
public function testGetConsumersInvalidConsumer(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -161,7 +160,6 @@ class ManagerTest extends TestCase {
->willReturn($mockUser);
}
-
public function testPublishExceptionNoApp(): void {
$this->expectException(IncompleteActivityException::class);
@@ -169,7 +167,6 @@ class ManagerTest extends TestCase {
$this->activityManager->publish($event);
}
-
public function testPublishExceptionNoType(): void {
$this->expectException(IncompleteActivityException::class);
@@ -178,7 +175,6 @@ class ManagerTest extends TestCase {
$this->activityManager->publish($event);
}
-
public function testPublishExceptionNoAffectedUser(): void {
$this->expectException(IncompleteActivityException::class);
@@ -188,7 +184,6 @@ class ManagerTest extends TestCase {
$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 798e23423a6..df4e8ca26f3 100644
--- a/tests/lib/AllConfigTest.php
+++ b/tests/lib/AllConfigTest.php
@@ -167,7 +167,6 @@ class AllConfigTest extends \Test\TestCase {
$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 a7f552535a9..9d554dcfeba 100644
--- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
+++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
@@ -52,7 +52,6 @@ class BundleFetcherTest extends TestCase {
$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 913fb9fb2c0..c2123561250 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -1817,7 +1817,6 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
'ETag' => '"myETag"',
];
-
#[\Override]
protected function setUp(): void {
parent::setUp();
@@ -1962,7 +1961,6 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
$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 dd220c44b36..3a0d30a3265 100644
--- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php
+++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
@@ -601,7 +601,6 @@ abstract class FetcherBase extends TestCase {
$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 de50723870b..7bd158870b6 100644
--- a/tests/lib/App/AppStore/Version/VersionParserTest.php
+++ b/tests/lib/App/AppStore/Version/VersionParserTest.php
@@ -69,7 +69,6 @@ class VersionParserTest extends TestCase {
$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 @@ class VersionParserTest extends TestCase {
$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 ec3b55835ba..d4e68f10a23 100644
--- a/tests/lib/App/DependencyAnalyzerTest.php
+++ b/tests/lib/App/DependencyAnalyzerTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 09169801ff4..adc135af650 100644
--- a/tests/lib/App/InfoParserTest.php
+++ b/tests/lib/App/InfoParserTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4fc718bb97a..0045c0209e5 100644
--- a/tests/lib/App/PlatformRepositoryTest.php
+++ b/tests/lib/App/PlatformRepositoryTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 2064ccf4fbc..b9b84065d22 100644
--- a/tests/lib/AppConfigIntegrationTest.php
+++ b/tests/lib/AppConfigIntegrationTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace Test;
use InvalidArgumentException;
@@ -558,7 +559,6 @@ class AppConfigIntegrationTest extends TestCase {
$config->getValueArray('typed', 'string');
}
-
/**
* @return array
* @see testGetValueType
@@ -804,7 +804,6 @@ class AppConfigIntegrationTest extends TestCase {
$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 @@ class AppConfigIntegrationTest extends TestCase {
$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 63e7a96bca2..7e21a2a0730 100644
--- a/tests/lib/AppConfigMigrationFallbackTest.php
+++ b/tests/lib/AppConfigMigrationFallbackTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 4c75d6637b3..ec739d863c1 100644
--- a/tests/lib/AppConfigTest.php
+++ b/tests/lib/AppConfigTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class AppConfigTest extends TestCase {
$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 @@ class AppConfigTest extends TestCase {
$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 @@ class AppConfigTest extends TestCase {
$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 7e76c655e6a..334eeefdab6 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 @@ class AppTest extends \Test\TestCase {
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 @@ class AppTest extends \Test\TestCase {
$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 @@ class AppTest extends \Test\TestCase {
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 d7e4b1ad366..e598ab71ed5 100644
--- a/tests/lib/AppFramework/Controller/ApiControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ApiControllerTest.php
@@ -18,7 +18,6 @@ use OCP\IRequestId;
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 22caf753749..eeda485844c 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 39f7213ef9e..4a638ddd792 100644
--- a/tests/lib/AppFramework/Controller/ControllerTest.php
+++ b/tests/lib/AppFramework/Controller/ControllerTest.php
@@ -66,21 +66,18 @@ class ControllerTest extends \Test\TestCase {
$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 @@ class ControllerTest extends \Test\TestCase {
$this->assertEquals($expectedHeaders, $response->getHeaders());
}
-
public function testCustomFormatter(): void {
$response = $this->controller->custom('hi');
$response = $this->controller->buildResponse($response, 'json');
@@ -108,14 +104,12 @@ class ControllerTest extends \Test\TestCase {
$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 @@ class ControllerTest extends \Test\TestCase {
$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 48b62d5cf86..3602b9e20d5 100644
--- a/tests/lib/AppFramework/Controller/OCSControllerTest.php
+++ b/tests/lib/AppFramework/Controller/OCSControllerTest.php
@@ -20,7 +20,6 @@ use OCP\IRequestId;
class ChildOCSController extends OCSController {
}
-
class OCSControllerTest extends \Test\TestCase {
public function testCors(): void {
$request = new Request(
@@ -46,7 +45,6 @@ class OCSControllerTest extends \Test\TestCase {
$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 1e67e986802..f3a1b6b040c 100644
--- a/tests/lib/AppFramework/Db/EntityTest.php
+++ b/tests/lib/AppFramework/Db/EntityTest.php
@@ -71,7 +71,6 @@ class TestEntity extends Entity {
}
}
-
class EntityTest extends \Test\TestCase {
private TestEntity $entity;
@@ -81,7 +80,6 @@ class EntityTest extends \Test\TestCase {
$this->entity = new TestEntity();
}
-
public function testResetUpdatedFields(): void {
$entity = new TestEntity();
$entity->setId(3);
@@ -90,7 +88,6 @@ class EntityTest extends \Test\TestCase {
$this->assertEquals([], $entity->getUpdatedFields());
}
-
public function testFromRow(): void {
$row = [
'pre_name' => 'john',
@@ -104,7 +101,6 @@ class EntityTest extends \Test\TestCase {
$this->assertEquals($row['another_bool'], $this->entity->getAnotherBool());
}
-
public function testGetSetId(): void {
$id = 3;
$this->entity->setId(3);
@@ -112,58 +108,48 @@ class EntityTest extends \Test\TestCase {
$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 @@ class EntityTest extends \Test\TestCase {
$this->assertEquals($entity2, $this->entity);
}
-
public function testIdGetsConvertedToInt(): void {
$row = ['id' => '4'];
@@ -180,7 +165,6 @@ class EntityTest extends \Test\TestCase {
$this->assertSame(4, $this->entity->getId());
}
-
public function testSetType(): void {
$row = ['testId' => '4'];
@@ -188,7 +172,6 @@ class EntityTest extends \Test\TestCase {
$this->assertSame(4, $this->entity->getTestId());
}
-
public function testFromParams(): void {
$params = [
'testId' => 4,
@@ -210,7 +193,6 @@ class EntityTest extends \Test\TestCase {
$this->assertEquals('slugify-this', $entity->slugify('name'));
}
-
public static function dataSetterCasts(): array {
return [
['Id', '3', 3],
@@ -225,7 +207,6 @@ class EntityTest extends \Test\TestCase {
];
}
-
#[\PHPUnit\Framework\Attributes\DataProvider('dataSetterCasts')]
public function testSetterCasts(string $field, mixed $in, mixed $out): void {
$entity = new TestEntity();
@@ -233,7 +214,6 @@ class EntityTest extends \Test\TestCase {
$this->assertSame($out, $entity->{'get' . $field}());
}
-
public function testSetterDoesNotCastOnNull(): void {
$entity = new TestEntity();
$entity->setId(null);
@@ -288,14 +268,12 @@ class EntityTest extends \Test\TestCase {
], $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 @@ class EntityTest extends \Test\TestCase {
$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 f598b53e250..e64d1fbe414 100644
--- a/tests/lib/AppFramework/Db/QBMapperTest.php
+++ b/tests/lib/AppFramework/Db/QBMapperTest.php
@@ -93,15 +93,12 @@ class QBMapperTest extends \Test\TestCase {
->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 @@ class QBMapperTest extends \Test\TestCase {
$this->mapper->insert($entity);
}
-
public function testUpdateEntityParameterTypeMapping(): void {
$datetime = new \DateTimeImmutable();
$entity = new QBTestEntity();
@@ -211,11 +207,9 @@ class QBMapperTest extends \Test\TestCase {
->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 b7f7352e3dd..128059d2755 100644
--- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php
+++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php
@@ -35,7 +35,6 @@ class DIContainerTest extends \Test\TestCase {
->getMock();
}
-
public function testProvidesRequest(): void {
$this->assertTrue(isset($this->container['Request']));
}
@@ -49,7 +48,6 @@ class DIContainerTest extends \Test\TestCase {
$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 a5e5dd25ee9..b2b49ed9719 100644
--- a/tests/lib/AppFramework/Http/DataResponseTest.php
+++ b/tests/lib/AppFramework/Http/DataResponseTest.php
@@ -24,7 +24,6 @@ class DataResponseTest extends \Test\TestCase {
$this->response = new DataResponse();
}
-
public function testSetData(): void {
$params = ['hi', 'yo'];
$this->response->setData($params);
@@ -32,7 +31,6 @@ class DataResponseTest extends \Test\TestCase {
$this->assertEquals(['hi', 'yo'], $this->response->getData());
}
-
public function testConstructorAllowsToSetData(): void {
$data = ['hi'];
$code = 300;
@@ -42,7 +40,6 @@ class DataResponseTest extends \Test\TestCase {
$this->assertEquals($code, $response->getStatus());
}
-
public function testConstructorAllowsToSetHeaders(): void {
$data = ['hi'];
$code = 300;
@@ -63,7 +60,6 @@ class DataResponseTest extends \Test\TestCase {
$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 cfd0bc9821e..3e90108c60e 100644
--- a/tests/lib/AppFramework/Http/DispatcherTest.php
+++ b/tests/lib/AppFramework/Http/DispatcherTest.php
@@ -53,7 +53,6 @@ class TestController extends Controller {
return [$int, $bool, $test, $test2];
}
-
/**
* @param int $int
* @param bool $bool
@@ -144,7 +143,6 @@ class DispatcherTest extends \Test\TestCase {
$this->etag = 'hi';
}
-
/**
* @param string $out
* @param string $httpHeaders
@@ -221,7 +219,6 @@ class DispatcherTest extends \Test\TestCase {
->willReturn($out);
}
-
public function testDispatcherReturnsArrayWith2Entries(): void {
$this->setMiddlewareExpectations('');
@@ -231,7 +228,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertNull($response[2]);
}
-
public function testHeadersAndOutputAreReturned(): void {
$out = 'yo';
$httpHeaders = 'Http';
@@ -246,7 +242,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals($out, $response[3]);
}
-
public function testExceptionCallsAfterException(): void {
$out = 'yo';
$httpHeaders = 'Http';
@@ -261,7 +256,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals($out, $response[3]);
}
-
public function testExceptionThrowsIfCanNotBeHandledByAfterException(): void {
$out = 'yo';
$httpHeaders = 'Http';
@@ -275,7 +269,6 @@ class DispatcherTest extends \Test\TestCase {
);
}
-
private function dispatcherPassthrough() {
$this->middlewareDispatcher->expects($this->once())
->method('beforeController');
@@ -291,7 +284,6 @@ class DispatcherTest extends \Test\TestCase {
});
}
-
public function testControllerParametersInjected(): void {
$this->request = new Request(
[
@@ -323,7 +315,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals('[3,false,4,1]', $response[3]);
}
-
public function testControllerParametersInjectedDefaultOverwritten(): void {
$this->request = new Request(
[
@@ -356,8 +347,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals('[3,false,4,7]', $response[3]);
}
-
-
public function testResponseTransformedByUrlFormat(): void {
$this->request = new Request(
[
@@ -392,7 +381,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
-
public function testResponseTransformsDataResponse(): void {
$this->request = new Request(
[
@@ -427,7 +415,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
-
public function testResponseTransformedByAcceptHeader(): void {
$this->request = new Request(
[
@@ -498,7 +485,6 @@ class DispatcherTest extends \Test\TestCase {
$this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
-
public function testResponsePrimarilyTransformedByParameterFormat(): void {
$this->request = new Request(
[
@@ -536,7 +522,6 @@ class DispatcherTest extends \Test\TestCase {
$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 4472b3b2dd3..a28aa38824d 100644
--- a/tests/lib/AppFramework/Http/DownloadResponseTest.php
+++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php
@@ -13,7 +13,6 @@ use OCP\AppFramework\Http\DownloadResponse;
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 e58237657f7..82b8263616e 100644
--- a/tests/lib/AppFramework/Http/FileDisplayResponseTest.php
+++ b/tests/lib/AppFramework/Http/FileDisplayResponseTest.php
@@ -70,7 +70,6 @@ class FileDisplayResponseTest extends \Test\TestCase {
$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 b5566c66318..f838dd18e71 100644
--- a/tests/lib/AppFramework/Http/HttpTest.php
+++ b/tests/lib/AppFramework/Http/HttpTest.php
@@ -26,13 +26,11 @@ class HttpTest extends \Test\TestCase {
$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 d0509a40333..d68998825b3 100644
--- a/tests/lib/AppFramework/Http/JSONResponseTest.php
+++ b/tests/lib/AppFramework/Http/JSONResponseTest.php
@@ -23,13 +23,11 @@ class JSONResponseTest extends \Test\TestCase {
$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 @@ class JSONResponseTest extends \Test\TestCase {
$this->assertEquals(['hi', 'yo'], $this->json->getData());
}
-
public function testSetRender(): void {
$params = ['test' => 'hi'];
$this->json->setData($params);
@@ -68,7 +65,6 @@ class JSONResponseTest extends \Test\TestCase {
$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 cb7bd97f5da..37c540b3320 100644
--- a/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php
+++ b/tests/lib/AppFramework/Http/PublicTemplateResponseTest.php
@@ -38,7 +38,6 @@ class PublicTemplateResponseTest extends TestCase {
$this->assertEquals([], $template->getOtherActions());
}
-
public function testActionMultiple(): void {
$actions = [
new SimpleMenuAction('link1', 'Download1', 'download1', 'downloadLink1', 100),
@@ -53,7 +52,6 @@ class PublicTemplateResponseTest extends TestCase {
$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 90127b91757..44a1968903c 100644
--- a/tests/lib/AppFramework/Http/RedirectResponseTest.php
+++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php
@@ -23,7 +23,6 @@ class RedirectResponseTest extends \Test\TestCase {
$this->response = new RedirectResponse('/url');
}
-
public function testHeaders(): void {
$headers = $this->response->getHeaders();
$this->assertEquals('/url', $headers['Location']);
@@ -31,7 +30,6 @@ class RedirectResponseTest extends \Test\TestCase {
$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 7340391b2d5..4a2670f9df1 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 ec67ddeb0ad..306bdc95672 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 @@ class RequestTest extends \Test\TestCase {
$this->assertSame('Johnny Weissmüller', $request->{'name'});
}
-
-
public function testImmutableArrayAccess(): void {
$this->expectException(\RuntimeException::class);
@@ -122,7 +121,6 @@ class RequestTest extends \Test\TestCase {
$request['nickname'] = 'Janey';
}
-
public function testImmutableMagicAccess(): void {
$this->expectException(\RuntimeException::class);
@@ -142,7 +140,6 @@ class RequestTest extends \Test\TestCase {
$request->{'nickname'} = 'Janey';
}
-
public function testGetTheMethodRight(): void {
$this->expectException(\LogicException::class);
@@ -522,7 +519,6 @@ class RequestTest extends \Test\TestCase {
$this->fail('Expected LogicException.');
}
-
public function testSetUrlParameters(): void {
$vars = [
'post' => [],
@@ -753,7 +749,6 @@ class RequestTest extends \Test\TestCase {
['InvalidProvider/1.1', 'HTTP/1.1'],
[null, 'HTTP/1.1'],
['', 'HTTP/1.1'],
-
];
}
@@ -855,7 +850,6 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
-
$this->assertSame('https', $requestHttps->getServerProtocol());
$this->assertSame('http', $requestHttp->getServerProtocol());
}
@@ -1458,7 +1452,6 @@ class RequestTest extends \Test\TestCase {
$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 @@ class RequestTest extends \Test\TestCase {
$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 57adc0cf3f4..4af5cb2443f 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -26,14 +26,12 @@ class ResponseTest extends \Test\TestCase {
$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 @@ class ResponseTest extends \Test\TestCase {
$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 @@ class ResponseTest extends \Test\TestCase {
$this->assertEquals($expectedResponse, $this->childResponse->getCookies());
}
-
public function testSetCookies(): void {
$expected = [
'foo' => [
@@ -127,7 +122,6 @@ class ResponseTest extends \Test\TestCase {
$this->assertEquals($expected, $cookies);
}
-
public function testInvalidateCookie(): void {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->invalidateCookie('foo');
@@ -144,7 +138,6 @@ class ResponseTest extends \Test\TestCase {
$this->assertEquals($expected, $cookies);
}
-
public function testInvalidateCookies(): void {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->addCookie('bar', 'foo');
@@ -181,12 +174,10 @@ class ResponseTest extends \Test\TestCase {
$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 @@ class ResponseTest extends \Test\TestCase {
$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 @@ class ResponseTest extends \Test\TestCase {
$this->assertEquals($lastModified, $this->childResponse->getLastModified());
}
-
-
public function testCacheSecondsZero(): void {
$this->childResponse->cacheFor(0);
@@ -220,7 +207,6 @@ class ResponseTest extends \Test\TestCase {
$this->assertFalse(isset($headers['Expires']));
}
-
public function testCacheSeconds(): void {
$time = $this->createMock(ITimeFactory::class);
$time->method('getTime')
@@ -235,8 +221,6 @@ class ResponseTest extends \Test\TestCase {
$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 d95eb043ae5..fae253db88b 100644
--- a/tests/lib/AppFramework/Http/TemplateResponseTest.php
+++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php
@@ -24,7 +24,6 @@ class TemplateResponseTest extends \Test\TestCase {
$this->tpl = new TemplateResponse('app', 'home');
}
-
public function testSetParamsConstructor(): void {
$params = ['hi' => 'yo'];
$this->tpl = new TemplateResponse('app', 'home', $params);
@@ -32,7 +31,6 @@ class TemplateResponseTest extends \Test\TestCase {
$this->assertEquals(['hi' => 'yo'], $this->tpl->getParams());
}
-
public function testSetRenderAsConstructor(): void {
$renderAs = 'myrender';
$this->tpl = new TemplateResponse('app', 'home', [], $renderAs);
@@ -40,7 +38,6 @@ class TemplateResponseTest extends \Test\TestCase {
$this->assertEquals($renderAs, $this->tpl->getRenderAs());
}
-
public function testSetParams(): void {
$params = ['hi' => 'yo'];
$this->tpl->setParams($params);
@@ -48,7 +45,6 @@ class TemplateResponseTest extends \Test\TestCase {
$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 3d22106563b..52f4ff8c120 100644
--- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
+++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php
@@ -117,7 +117,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->exception = new \Exception();
}
-
private function getControllerMock() {
return $this->getMockBuilder(TestController::class)
->onlyMethods(['controllerMethod'])
@@ -130,14 +129,12 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
])->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 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$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 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$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 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals($this->method, $m1->methodName);
}
-
public function testAfterControllerCorrectArguments(): void {
$m1 = $this->getMiddleware();
@@ -193,7 +187,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals($this->response, $m1->response);
}
-
public function testAfterExceptionCorrectArguments(): void {
$m1 = $this->getMiddleware();
@@ -207,7 +200,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals($this->exception, $m1->exception);
}
-
public function testBeforeOutputCorrectArguments(): void {
$m1 = $this->getMiddleware();
@@ -218,7 +210,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals($this->out, $m1->output);
}
-
public function testBeforeControllerOrder(): void {
$m1 = $this->getMiddleware();
$m2 = $this->getMiddleware();
@@ -239,7 +230,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals(1, $m2->afterControllerOrder);
}
-
public function testAfterExceptionOrder(): void {
$m1 = $this->getMiddleware();
$m2 = $this->getMiddleware();
@@ -252,7 +242,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$this->assertEquals(1, $m2->afterExceptionOrder);
}
-
public function testBeforeOutputOrder(): void {
$m1 = $this->getMiddleware();
$m2 = $this->getMiddleware();
@@ -263,7 +252,6 @@ class MiddlewareDispatcherTest extends \Test\TestCase {
$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 e5619dcda6d..a4712dbe86e 100644
--- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php
@@ -19,7 +19,6 @@ use OCP\IRequestId;
class ChildMiddleware extends Middleware {
};
-
class MiddlewareTest extends \Test\TestCase {
/**
* @var Middleware
@@ -52,26 +51,22 @@ class MiddlewareTest extends \Test\TestCase {
$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 e4d366ebdaa..a5ef02646bc 100644
--- a/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/OCSMiddlewareTest.php
@@ -158,7 +158,6 @@ class OCSMiddlewareTest extends \Test\TestCase {
[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 f40bdb94014..2468c45df1c 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 aaf798198b0..702b0c32607 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 8ab3a48b62e..9d4a8279e3e 100644
--- a/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php
+++ b/tests/lib/AppFramework/Middleware/Security/Mock/CORSMiddlewareController.php
@@ -139,7 +139,6 @@ class CORSMiddlewareController extends Controller {
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 c1c7e587fd2..e33f65fa682 100644
--- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php
@@ -159,8 +159,6 @@ class PasswordConfirmationMiddlewareTest extends TestCase {
$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 1427d947541..da04778fa2a 100644
--- a/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/RateLimitingMiddlewareTest.php
@@ -150,7 +150,6 @@ class RateLimitingMiddlewareTest extends TestCase {
->method('registerUserRequest')
->with(get_class($controller) . '::testMethodWithAnnotation', '20', '200', $user);
-
$this->reflector->reflect($controller, 'testMethodWithAnnotation');
$this->rateLimitingMiddleware->beforeController($controller, 'testMethodWithAnnotation');
}
@@ -167,7 +166,6 @@ class RateLimitingMiddlewareTest extends TestCase {
->method('isLoggedIn')
->willReturn(true);
-
$this->limiter
->expects($this->never())
->method('registerUserRequest');
@@ -226,7 +224,6 @@ class RateLimitingMiddlewareTest extends TestCase {
->method('registerUserRequest')
->with(get_class($controller) . '::testMethodWithAttributes', '20', '200', $user);
-
$this->reflector->reflect($controller, 'testMethodWithAttributes');
$this->rateLimitingMiddleware->beforeController($controller, 'testMethodWithAttributes');
}
@@ -243,7 +240,6 @@ class RateLimitingMiddlewareTest extends TestCase {
->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 f59d5d4c004..c34248411fb 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -196,7 +196,6 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$this->middleware->beforeController($this->controller, $method);
}
-
/**
* @param string $method
* @param string $test
@@ -309,7 +308,6 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$sec->beforeController($this->controller, $method);
}
-
#[\PHPUnit\Framework\Attributes\DataProvider('dataPublicPage')]
public function testCsrfCheck(string $method): void {
$this->expectException(CrossSiteRequestForgeryException::class);
@@ -537,7 +535,6 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$middleware->beforeController($this->controller, $method);
}
-
public function testAfterExceptionNotCaughtThrowsItAgain(): void {
$ex = new \Exception();
$this->expectException(\Exception::class);
@@ -602,7 +599,6 @@ class SecurityMiddlewareTest extends \Test\TestCase {
$this->assertEquals($expected, $response);
}
-
/**
* @return array
*/
diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
index c4fd461943d..b9706a16c76 100644
--- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 53fe7370040..fb09bcd3622 100644
--- a/tests/lib/AppFramework/Routing/RouteParserTest.php
+++ b/tests/lib/AppFramework/Routing/RouteParserTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 48ef39a7db1..e75b9acaec4 100644
--- a/tests/lib/AppFramework/Services/AppConfigTest.php
+++ b/tests/lib/AppFramework/Services/AppConfigTest.php
@@ -42,7 +42,6 @@ class AppConfigTest extends TestCase {
$this->assertSame($expected, $this->appConfig->getAppKeys());
}
-
/**
* @return array
* @see testHasAppKey
@@ -72,7 +71,6 @@ class AppConfigTest extends TestCase {
$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 4bbe825cfb2..1fd89039807 100644
--- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php
+++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php
@@ -125,7 +125,6 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$this->assertFalse($reader->hasAnnotation('param'));
}
-
/**
* @Annotation
* @param int $test
@@ -161,7 +160,6 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$this->assertNull($reader->getType('d'));
}
-
/**
* @Annotation
* @param double $test something special
@@ -190,7 +188,6 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$this->assertEquals('string', $reader->getType('foo'));
}
-
public function arguments($arg, $arg2 = 'hi') {
}
public function testReflectParameters(): void {
@@ -203,7 +200,6 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$this->assertEquals(['arg' => null, 'arg2' => 'hi'], $reader->getParameters());
}
-
public function arguments2($arg) {
}
public function testReflectParameters2(): void {
@@ -216,7 +212,6 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$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 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$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 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
$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 ad0e0233af9..03e31cbb19d 100644
--- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php
+++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php
@@ -58,7 +58,6 @@ class ClassInterfaceConstructor {
}
}
-
class SimpleContainerTest extends \Test\TestCase {
private $container;
@@ -67,14 +66,11 @@ class SimpleContainerTest extends \Test\TestCase {
$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 @@ class SimpleContainerTest extends \Test\TestCase {
}
}
-
/**
* Test querying a class that is not registered with autoload enabled
*/
@@ -102,21 +97,17 @@ class SimpleContainerTest extends \Test\TestCase {
}
}
-
-
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 @@ class SimpleContainerTest extends \Test\TestCase {
$this->assertEquals('abc', $object->test);
}
-
public function testConstructorComplex(): void {
$this->container->registerParameter('test', 'abc');
$object = $this->container->query(
@@ -143,7 +133,6 @@ class SimpleContainerTest extends \Test\TestCase {
$this->assertEquals('abc', $object->test);
}
-
public function testConstructorComplexInterface(): void {
$this->container->registerParameter('test', 'abc');
$this->container->registerService(
@@ -158,7 +147,6 @@ class SimpleContainerTest extends \Test\TestCase {
$this->assertEquals('abc', $object->test);
}
-
public function testOverrideService(): void {
$this->container->registerService(
'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) {
@@ -210,7 +198,6 @@ class SimpleContainerTest extends \Test\TestCase {
$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 c8aeb5ec2d7..83aaa65564c 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -266,7 +266,6 @@ class AppTest extends \Test\TestCase {
$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 28e17e11586..aa268151178 100644
--- a/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php
+++ b/tests/lib/Authentication/Listeners/RemoteWipeEmailListenerTest.php
@@ -66,7 +66,6 @@ class RemoteWipeEmailListenerTest extends TestCase {
);
}
-
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 f7c06f709a9..a0695ef1a4b 100644
--- a/tests/lib/Authentication/LoginCredentials/StoreTest.php
+++ b/tests/lib/Authentication/LoginCredentials/StoreTest.php
@@ -270,7 +270,6 @@ class StoreTest extends TestCase {
->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 d2714cc1925..8511ccf5788 100644
--- a/tests/lib/Authentication/Token/ManagerTest.php
+++ b/tests/lib/Authentication/Token/ManagerTest.php
@@ -104,7 +104,6 @@ class ManagerTest extends TestCase {
$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 e1e0fc00740..e577f2951b0 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenMapperTest.php
@@ -176,7 +176,6 @@ class PublicKeyTokenMapperTest extends TestCase {
$this->assertEquals($token, $dbToken);
}
-
public function testGetInvalidToken(): void {
$this->expectException(DoesNotExistException::class);
@@ -208,14 +207,12 @@ class PublicKeyTokenMapperTest extends TestCase {
$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 1c9dc02f8f1..1c4bfba202d 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
@@ -237,7 +237,6 @@ class PublicKeyTokenProviderTest extends TestCase {
$this->assertSame($password, $this->tokenProvider->getPassword($actual, $token));
}
-
public function testGetPasswordPasswordLessToken(): void {
$this->expectException(PasswordlessTokenException::class);
@@ -248,7 +247,6 @@ class PublicKeyTokenProviderTest extends TestCase {
$this->tokenProvider->getPassword($tk, $token);
}
-
public function testGetPasswordInvalidToken(): void {
$this->expectException(InvalidTokenException::class);
@@ -293,13 +291,11 @@ class PublicKeyTokenProviderTest extends TestCase {
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 26ed14ac0c9..e919d099132 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
@@ -588,7 +588,6 @@ class ManagerTest extends TestCase {
$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 b7d934c6a6d..ddc70a263ca 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php
@@ -47,7 +47,6 @@ class ProviderLoaderTest extends TestCase {
$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 0a060d19b81..0418e277ada 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ProviderManagerTest.php
@@ -43,7 +43,6 @@ class ProviderManagerTest extends TestCase {
);
}
-
public function testTryEnableInvalidProvider(): void {
$this->expectException(InvalidProviderException::class);
@@ -89,7 +88,6 @@ class ProviderManagerTest extends TestCase {
$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 9751b9120a8..31b07d1bde2 100644
--- a/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/RegistryTest.php
@@ -85,7 +85,6 @@ class RegistryTest extends TestCase {
$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 5ace218a020..e74ba90c965 100644
--- a/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php
+++ b/tests/lib/Calendar/ResourcesRoomsUpdaterTest.php
@@ -150,10 +150,8 @@ class ResourcesRoomsUpdaterTest extends TestCase {
switch ($key) {
case 'meta99':
return 'value99-new';
-
case 'meta123':
return 'meta456';
-
default:
return null;
}
@@ -169,7 +167,6 @@ class ResourcesRoomsUpdaterTest extends TestCase {
switch ($key) {
case 'meta1':
return 'value1';
-
default:
return null;
}
@@ -185,7 +182,6 @@ class ResourcesRoomsUpdaterTest extends TestCase {
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 5fc218dc6d8..7f70c3ba3d7 100644
--- a/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/LookupPluginTest.php
@@ -65,7 +65,6 @@ class LookupPluginTest extends TestCase {
return new CloudId('user@someNextcloud.net', 'user', 'someNextcloud.net');
});
-
$this->plugin = new LookupPlugin(
$this->config,
$this->clientService,
@@ -180,7 +179,6 @@ class LookupPluginTest extends TestCase {
$this->assertFalse($moreResults);
}
-
/**
* @param array $searchParams
* @param bool $GSEnabled
@@ -249,7 +247,6 @@ class LookupPluginTest extends TestCase {
$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 4d495b6a3aa..d2afc5b3689 100644
--- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php
+++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php
@@ -63,7 +63,6 @@ class SearchResultTest extends TestCase {
[['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 0a7f6f39c90..2b8decabe93 100644
--- a/tests/lib/Command/AsyncBusTestCase.php
+++ b/tests/lib/Command/AsyncBusTestCase.php
@@ -108,6 +108,5 @@ abstract class AsyncBusTestCase extends TestCase {
$this->assertEquals('', self::$lastCommand);
}
-
abstract protected function runJobs();
}
diff --git a/tests/lib/Command/BackgroundModeTest.php b/tests/lib/Command/BackgroundModeTest.php
index efd49ab4273..32ab2598ae9 100644
--- a/tests/lib/Command/BackgroundModeTest.php
+++ b/tests/lib/Command/BackgroundModeTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8205a6b95c7..352d995ce28 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 65b82739303..a98cea6374f 100644
--- a/tests/lib/Command/Integrity/SignAppTest.php
+++ b/tests/lib/Command/Integrity/SignAppTest.php
@@ -158,7 +158,6 @@ class SignAppTest extends TestCase {
['privateKey', false],
]);
-
$outputInterface
->expects($this->any())
->method('writeln')
diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php
index 80bc5d7818f..011ae43ccfb 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 @@ class CommentTest extends TestCase {
$this->assertSame($metaData, $comment->getMetaData());
}
-
public function testSetIdIllegalInput(): void {
$this->expectException(IllegalIDChangeException::class);
@@ -129,7 +129,6 @@ class CommentTest extends TestCase {
$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 029d3461a22..8b4f3b75e21 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 7ee58b2246a..09a9e338dda 100644
--- a/tests/lib/Comments/FakeManager.php
+++ b/tests/lib/Comments/FakeManager.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 40f9846e077..585397d3987 100644
--- a/tests/lib/Comments/ManagerTest.php
+++ b/tests/lib/Comments/ManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
+
namespace Test\Comments;
use OC\Comments\Comment;
@@ -98,7 +99,6 @@ class ManagerTest extends TestCase {
);
}
-
public function testGetCommentNotFound(): void {
$this->expectException(NotFoundException::class);
@@ -106,7 +106,6 @@ class ManagerTest extends TestCase {
$manager->get('22');
}
-
public function testGetCommentNotFoundInvalidInput(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -446,7 +445,6 @@ class ManagerTest extends TestCase {
$this->assertSame($objectId, $comment->getObjectId());
}
-
public function testDelete(): void {
$this->expectException(NotFoundException::class);
@@ -545,7 +543,6 @@ class ManagerTest extends TestCase {
);
}
-
public function testSaveUpdateException(): void {
$manager = $this->getManager();
$comment = new Comment();
@@ -564,7 +561,6 @@ class ManagerTest extends TestCase {
$manager->save($comment);
}
-
public function testSaveIncomplete(): void {
$manager = $this->getManager();
@@ -931,7 +927,6 @@ class ManagerTest extends TestCase {
$this->assertSame('SOMBRERO', $manager->resolveDisplayName('galaxy', 'sombrero'));
}
-
public function testRegisterResolverDuplicate(): void {
$this->expectException(\OutOfBoundsException::class);
@@ -942,7 +937,6 @@ class ManagerTest extends TestCase {
$manager->registerDisplayNameResolver('planet', $planetClosure);
}
-
public function testResolveDisplayNameUnregisteredType(): void {
$this->expectException(\OutOfBoundsException::class);
@@ -2468,7 +2462,6 @@ class ManagerTest extends TestCase {
$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 b540d5b4281..c3ead6240b5 100644
--- a/tests/lib/Config/LexiconTest.php
+++ b/tests/lib/Config/LexiconTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 12833288cb3..f945bd4bba5 100644
--- a/tests/lib/Config/TestLexicon_W.php
+++ b/tests/lib/Config/TestLexicon_W.php
@@ -28,7 +28,6 @@ class TestLexicon_W implements ILexicon {
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 4d1ec8850cf..c31c547bd5e 100644
--- a/tests/lib/Config/UserConfigMigrationFallbackTest.php
+++ b/tests/lib/Config/UserConfigMigrationFallbackTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 95e0c958e23..6327f02e4b5 100644
--- a/tests/lib/Config/UserConfigTest.php
+++ b/tests/lib/Config/UserConfigTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 @@ class UserConfigTest extends TestCase {
}
}
-
public static function providerSetValueArray(): array {
return [
[null, 'user1', 'app1', 'key1', [], false, false, true],
@@ -1694,7 +1693,6 @@ class UserConfigTest extends TestCase {
$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 c31903dff10..08afc6e9307 100644
--- a/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php
+++ b/tests/lib/Contacts/ContactsMenu/ActionProviderStoreTest.php
@@ -103,7 +103,6 @@ class ActionProviderStoreTest extends TestCase {
$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 977d837c6a2..f8faa2b17f9 100644
--- a/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php
+++ b/tests/lib/Contacts/ContactsMenu/ContactsStoreTest.php
@@ -267,7 +267,6 @@ class ContactsStoreTest extends TestCase {
],
]);
-
$entries = $this->contactsStore->getContacts($currentUser, '');
$this->assertCount(count($expectedUids), $entries);
@@ -300,7 +299,6 @@ class ContactsStoreTest extends TestCase {
->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 @@ class ContactsStoreTest extends TestCase {
],
]);
-
$entries = $this->contactsStore->getContacts($currentUser, '');
$this->assertCount(0, $entries);
diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php
index cd0c5d7ed8f..630ac182606 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 @@ class ContactsManagerTest extends \Test\TestCase {
->method('getKey')
->willReturn('simple:2');
-
$this->cm->registerAddressBook($addressbook1);
$this->cm->registerAddressBook($addressbook2);
$result = $this->cm->search('');
@@ -143,7 +143,6 @@ class ContactsManagerTest extends \Test\TestCase {
$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 4ed4fdbd003..f5ca19c1ce9 100644
--- a/tests/lib/DB/AdapterTest.php
+++ b/tests/lib/DB/AdapterTest.php
@@ -49,7 +49,6 @@ class AdapterTest extends TestCase {
$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 8a1aa2adf53..35ab838f4be 100644
--- a/tests/lib/DB/Exception/DbalExceptionTest.php
+++ b/tests/lib/DB/Exception/DbalExceptionTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 f363b129e60..dff6aeb10c6 100644
--- a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php
+++ b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareDriverTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 43632d2e1ea..514ed2dfb82 100644
--- a/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php
+++ b/tests/lib/DB/Middleware/UtcTimezoneMiddlewareTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 78d28401383..099419884e0 100644
--- a/tests/lib/DB/MigratorTest.php
+++ b/tests/lib/DB/MigratorTest.php
@@ -123,7 +123,6 @@ class MigratorTest extends \Test\TestCase {
return [$startSchema, $endSchema];
}
-
private function getSchemaConfig() {
$config = new SchemaConfig();
$config->setName($this->connection->getDatabase());
@@ -261,7 +260,6 @@ class MigratorTest extends \Test\TestCase {
$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 2082701f610..c0867e42aed 100644
--- a/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/Partitioned/PartitionedQueryBuilderTest.php
@@ -47,7 +47,6 @@ class PartitionedQueryBuilderTest extends TestCase {
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 0014ce86420..1b54a8c946f 100644
--- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php
@@ -545,7 +545,6 @@ class QueryBuilderTest extends \Test\TestCase {
['`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 bbcaa713e11..6a7555cdcd0 100644
--- a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
@@ -33,7 +33,6 @@ class SharedQueryBuilderTest extends TestCase {
$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 e4fcd07abf8..fa7225c2e72 100644
--- a/tests/lib/DateTimeFormatterTest.php
+++ b/tests/lib/DateTimeFormatterTest.php
@@ -76,7 +76,6 @@ class DateTimeFormatterTest extends TestCase {
[$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 @@ class DateTimeFormatterTest extends TestCase {
$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 2c9b74eb0cf..1853e7d254a 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 @@ class Editor implements IEditor {
return [ 'text/plain' ];
}
-
#[\Override]
public function getMimetypesOptional(): array {
return [];
@@ -83,7 +83,6 @@ class Editor implements IEditor {
return false;
}
-
#[\Override]
public function open(IToken $token): Response {
return new DataResponse('edit page');
@@ -150,7 +149,6 @@ class ManagerTest extends TestCase {
->method('get')
->willReturn($this->l10n);
-
$this->rootFolder->expects($this->any())
->method('getUserFolder')
->willReturn($this->userFolder);
@@ -174,7 +172,6 @@ class ManagerTest extends TestCase {
$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 692dff143ee..27f731325f8 100644
--- a/tests/lib/EmojiHelperTest.php
+++ b/tests/lib/EmojiHelperTest.php
@@ -5,6 +5,7 @@ declare(strict_types=1);
* 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 1434adf6bc5..27b13b7da3b 100644
--- a/tests/lib/Encryption/DecryptAllTest.php
+++ b/tests/lib/Encryption/DecryptAllTest.php
@@ -236,7 +236,6 @@ class DecryptAllTest extends TestCase {
$storage = $this->getMockBuilder(IStorage::class)
->disableOriginalConstructor()->getMock();
-
$sharedStorage = $this->getMockBuilder(IStorage::class)
->disableOriginalConstructor()->getMock();
@@ -286,7 +285,6 @@ class DecryptAllTest extends TestCase {
return true;
});
-
/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
@@ -357,7 +355,6 @@ class DecryptAllTest extends TestCase {
->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 b80d1a08af6..20485c97fc0 100644
--- a/tests/lib/Encryption/EncryptionWrapperTest.php
+++ b/tests/lib/Encryption/EncryptionWrapperTest.php
@@ -42,7 +42,6 @@ class EncryptionWrapperTest extends TestCase {
$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 cf0aa4fc04b..8b3ede87408 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -555,7 +555,6 @@ class StorageTest extends TestCase {
$this->assertSame($expected, $args[0]);
}
-
/**
* @param bool $createBackupDir
*/
diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php
index 5f3d1987dc3..bb2acf222a4 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 @@ class ManagerTest extends TestCase {
$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 e272978862e..c0d15598ef4 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 @@ class UtilTest extends TestCase {
];
}
-
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 @@ class UtilTest extends TestCase {
['/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 6f927a12e00..d15218a533d 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 8d62e449306..23b1eca682e 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -495,7 +495,6 @@ class CacheTest extends \Test\TestCase {
$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 @@ class CacheTest extends \Test\TestCase {
$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 a6d5661d409..169a07180ee 100644
--- a/tests/lib/Files/Cache/FileAccessTest.php
+++ b/tests/lib/Files/Cache/FileAccessTest.php
@@ -48,7 +48,6 @@ class FileAccessTest extends TestCase {
$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 547e48a1963..62915d411cf 100644
--- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php
+++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 a956de83262..a8eea342e7d 100644
--- a/tests/lib/Files/Cache/SearchBuilderTest.php
+++ b/tests/lib/Files/Cache/SearchBuilderTest.php
@@ -173,7 +173,6 @@ class SearchBuilderTest extends TestCase {
[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 61b78ab1b74..4431b31372a 100644
--- a/tests/lib/Files/Cache/WatcherTest.php
+++ b/tests/lib/Files/Cache/WatcherTest.php
@@ -86,7 +86,6 @@ class WatcherTest extends TestCase {
$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 5ec38104975..7af6e0663b4 100644
--- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
+++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php
@@ -89,7 +89,6 @@ class CacheJailTest extends CacheTest {
$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 c9cfccc5ee6..d0550e3c347 100644
--- a/tests/lib/Files/Config/UserMountCacheTest.php
+++ b/tests/lib/Files/Config/UserMountCacheTest.php
@@ -481,7 +481,6 @@ class UserMountCacheTest extends TestCase {
$folderId = $this->createCacheEntry('/foo', 2);
$fileId = $this->createCacheEntry('/foo/bar', 2);
-
$mount1 = $this->getMockBuilder(MountPoint::class)
->setConstructorArgs([$storage1, '/'])
->onlyMethods(['getStorageRootId'])
@@ -535,7 +534,6 @@ class UserMountCacheTest extends TestCase {
$this->assertCount(0, $cachedMounts);
}
-
public function testGetMountsForFileIdDeletedUser(): void {
$user1 = $this->userManager->get('u1');
@@ -581,7 +579,6 @@ class UserMountCacheTest extends TestCase {
$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 0a3e3dacbab..d01c8c0cfe6 100644
--- a/tests/lib/Files/FilenameValidatorTest.php
+++ b/tests/lib/Files/FilenameValidatorTest.php
@@ -114,7 +114,6 @@ class FilenameValidatorTest extends TestCase {
$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 56af53584f2..eeaf8c71add 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -337,7 +337,6 @@ class FilesystemTest extends \Test\TestCase {
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 f5bba611f46..a0afb6750b1 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 f5d79cc03d7..e869765d9ae 100644
--- a/tests/lib/Files/Node/FileTest.php
+++ b/tests/lib/Files/Node/FileTest.php
@@ -77,7 +77,6 @@ class FileTest extends NodeTestCase {
$this->assertEquals('bar', $node->getContent());
}
-
public function testGetContentNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -123,7 +122,6 @@ class FileTest extends NodeTestCase {
$node->putContent('bar');
}
-
public function testPutContentNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -237,7 +235,6 @@ class FileTest extends NodeTestCase {
$this->assertEquals(2, $hooksCalled);
}
-
public function testFOpenReadNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -265,7 +262,6 @@ class FileTest extends NodeTestCase {
$node->fopen('r');
}
-
public function testFOpenReadWriteNoReadPermissions(): void {
$this->expectException(NotPermittedException::class);
@@ -293,7 +289,6 @@ class FileTest extends NodeTestCase {
$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 d3ef1f298c6..d67f25f622b 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -214,7 +214,6 @@ class FolderTest extends NodeTestCase {
$this->assertEquals($child, $result);
}
-
public function testNewFolderNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -258,7 +257,6 @@ class FolderTest extends NodeTestCase {
$this->assertEquals($child, $result);
}
-
public function testNewFileNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -412,7 +410,6 @@ class FolderTest extends NodeTestCase {
$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 @@ class FolderTest extends NodeTestCase {
$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 @@ class FolderTest extends NodeTestCase {
->with('/bar/foo')
->willReturn($mount);
-
$node = new Folder($root, $view, '/bar/foo');
$result = $node->search('qw');
$cache->clear();
@@ -809,7 +804,6 @@ class FolderTest extends NodeTestCase {
$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 @@ class FolderTest extends NodeTestCase {
$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 @@ class FolderTest extends NodeTestCase {
$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 a32b4ae1980..9b09bb66ce2 100644
--- a/tests/lib/Files/Node/IntegrationTest.php
+++ b/tests/lib/Files/Node/IntegrationTest.php
@@ -131,7 +131,6 @@ class IntegrationTest extends \Test\TestCase {
$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 4605b8c6487..050c3dc642c 100644
--- a/tests/lib/Files/Node/NodeTestCase.php
+++ b/tests/lib/Files/Node/NodeTestCase.php
@@ -205,7 +205,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$this->assertEquals(2, $hooksRun);
}
-
public function testDeleteNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -222,7 +221,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->delete();
}
-
public function testStat(): void {
$this->root->expects($this->any())
->method('getUser')
@@ -271,7 +269,6 @@ abstract class NodeTestCase extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
-
$stat = $this->getFileInfo([
'fileid' => 1,
'size' => 100,
@@ -370,7 +367,6 @@ abstract class NodeTestCase extends \Test\TestCase {
->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 @@ abstract class NodeTestCase extends \Test\TestCase {
$this->assertEquals(2, $hooksRun);
}
-
public function testTouchNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -471,7 +466,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->touch(100);
}
-
public function testInvalidPath(): void {
$this->expectException(InvalidPathException::class);
@@ -504,7 +498,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$this->assertEquals(3, $target->getId());
}
-
public function testCopyNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -535,7 +528,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->copy('/bar/asd');
}
-
public function testCopyNoParent(): void {
$this->expectException(NotFoundException::class);
@@ -552,7 +544,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->copy('/bar/asd/foo');
}
-
public function testCopyParentIsFile(): void {
$this->expectException(NotPermittedException::class);
@@ -675,7 +666,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$this->assertEquals(4, $hooksRun);
}
-
public function testMoveNotPermitted(): void {
$this->expectException(NotPermittedException::class);
@@ -697,7 +687,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->move('/bar/asd');
}
-
public function testMoveNoParent(): void {
$this->expectException(NotFoundException::class);
@@ -719,7 +708,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->move('/bar/asd');
}
-
public function testMoveParentIsFile(): void {
$this->expectException(NotPermittedException::class);
@@ -737,7 +725,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$node->move('/bar/asd');
}
-
public function testMoveFailed(): void {
$this->expectException(NotPermittedException::class);
@@ -760,7 +747,6 @@ abstract class NodeTestCase extends \Test\TestCase {
$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 c69b74c08c1..584adddad32 100644
--- a/tests/lib/Files/Node/RootTest.php
+++ b/tests/lib/Files/Node/RootTest.php
@@ -111,7 +111,6 @@ class RootTest extends \Test\TestCase {
$this->assertInstanceOf('\OC\Files\Node\File', $node);
}
-
public function testGetNotFound(): void {
$this->expectException(NotFoundException::class);
@@ -143,7 +142,6 @@ class RootTest extends \Test\TestCase {
$root->get('/bar/foo');
}
-
public function testGetInvalidPath(): void {
$this->expectException(NotPermittedException::class);
@@ -163,7 +161,6 @@ class RootTest extends \Test\TestCase {
$root->get('/../foo');
}
-
public function testGetNoStorages(): void {
$this->expectException(NotFoundException::class);
@@ -222,7 +219,6 @@ class RootTest extends \Test\TestCase {
$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 7b3632204bc..7782699c9ff 100644
--- a/tests/lib/Files/ObjectStore/LocalTest.php
+++ b/tests/lib/Files/ObjectStore/LocalTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 145e09b86da..5b5de24b030 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesDifferentBucketTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 b10d3503311..a920de80f54 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreStoragesSameBucketTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 4e318de209c..2bf25e38018 100644
--- a/tests/lib/Files/PathVerificationTest.php
+++ b/tests/lib/Files/PathVerificationTest.php
@@ -33,7 +33,6 @@ class PathVerificationTest extends \Test\TestCase {
$this->view = new View();
}
-
public function testPathVerificationFileNameTooLong(): void {
$this->expectException(InvalidPathException::class);
$this->expectExceptionMessage('Filename is too long');
@@ -42,7 +41,6 @@ class PathVerificationTest extends \Test\TestCase {
$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 2f658970791..e270b047bd0 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 47bef83772b..0b12f234b18 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 3b50d1aadbf..99709565b1c 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 0687bbe1e80..2d67a175991 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 8c0ab15b6ba..80397c4272d 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 @@ class SearchIntegrationTest extends TestCase {
$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 33795fc564a..f26de639c12 100644
--- a/tests/lib/Files/SetupManagerTest.php
+++ b/tests/lib/Files/SetupManagerTest.php
@@ -549,7 +549,6 @@ class SetupManagerTest extends TestCase {
->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 c5e0f2c0989..c9c2874c697 100644
--- a/tests/lib/Files/SimpleFS/InMemoryFileTest.php
+++ b/tests/lib/Files/SimpleFS/InMemoryFileTest.php
@@ -98,7 +98,6 @@ class InMemoryFileTest extends TestCase {
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 6454fe014f2..78786eed51e 100644
--- a/tests/lib/Files/Storage/CopyDirectoryTest.php
+++ b/tests/lib/Files/Storage/CopyDirectoryTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 d55ac6a888b..5bfc6ed060c 100644
--- a/tests/lib/Files/Storage/LocalTest.php
+++ b/tests/lib/Files/Storage/LocalTest.php
@@ -59,21 +59,18 @@ class LocalTest extends Storage {
$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 091f8b69a6e..d0a793ca88e 100644
--- a/tests/lib/Files/Storage/Storage.php
+++ b/tests/lib/Files/Storage/Storage.php
@@ -185,7 +185,6 @@ abstract class Storage extends \Test\TestCase {
$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 cfdf25a590c..79392780da2 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -322,7 +322,6 @@ class EncryptionTest extends Storage {
$this->instance->expects($this->any())->method('verifyUnencryptedSize')
->willReturn(42);
-
$this->assertSame(42,
$this->instance->filesize('/test.txt')
);
@@ -488,7 +487,6 @@ class EncryptionTest extends Storage {
$this->arrayCache,
);
-
if ($rmdirResult === true && $isExcluded === false && $encryptionEnabled === true) {
$this->keyStore->expects($this->once())->method('deleteAllFileKeys')->with('/mountPoint' . $path);
} else {
@@ -911,7 +909,6 @@ class EncryptionTest extends Storage {
['/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 cd7cbea4920..b7dc7b553ac 100644
--- a/tests/lib/Files/Stream/DummyEncryptionWrapper.php
+++ b/tests/lib/Files/Stream/DummyEncryptionWrapper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 62eaab3cc7e..13f14bbc324 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 49fe565b3b4..3d555fbcef4 100644
--- a/tests/lib/Files/Type/DetectionTest.php
+++ b/tests/lib/Files/Type/DetectionTest.php
@@ -213,7 +213,6 @@ class DetectionTest extends \Test\TestCase {
//Empty alias file
$mimetypealiases_dist->setContent(json_encode([], JSON_FORCE_OBJECT));
-
/*
* Test dir mimetype
*/
@@ -236,7 +235,6 @@ class DetectionTest extends \Test\TestCase {
$mimeType = $detection->mimeTypeIcon('dir');
$this->assertEquals('folder.svg', $mimeType);
-
/*
* Test dir-shareed mimetype
*/
@@ -255,7 +253,6 @@ class DetectionTest extends \Test\TestCase {
$mimeType = $detection->mimeTypeIcon('dir-shared');
$this->assertEquals('folder-shared.svg', $mimeType);
-
/*
* Test dir external
*/
@@ -275,7 +272,6 @@ class DetectionTest extends \Test\TestCase {
$mimeType = $detection->mimeTypeIcon('dir-external');
$this->assertEquals('folder-external.svg', $mimeType);
-
/*
* Test complete mimetype
*/
@@ -295,7 +291,6 @@ class DetectionTest extends \Test\TestCase {
$mimeType = $detection->mimeTypeIcon('my-type');
$this->assertEquals('my-type.svg', $mimeType);
-
/*
* Test subtype
*/
@@ -327,7 +322,6 @@ class DetectionTest extends \Test\TestCase {
$mimeType = $detection->mimeTypeIcon('my-type');
$this->assertEquals('my.svg', $mimeType);
-
/*
* Test default mimetype
*/
@@ -381,8 +375,6 @@ class DetectionTest extends \Test\TestCase {
$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 2aaf4c5067c..e5c7e00f59b 100644
--- a/tests/lib/Files/Type/LoaderTest.php
+++ b/tests/lib/Files/Type/LoaderTest.php
@@ -34,7 +34,6 @@ class LoaderTest extends TestCase {
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 feb7800c128..09bd68db1a0 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -282,7 +282,6 @@ class ViewTest extends \Test\TestCase {
$rootView = new View('/test/files');
-
$cachedData = $rootView->getFileInfo('/foo.txt');
$id1 = $cachedData->getId();
$this->assertEquals('/foo.txt', $rootView->getPath($id1));
@@ -295,7 +294,6 @@ class ViewTest extends \Test\TestCase {
$this->assertEquals('/foo.txt', $folderView->getPath($id2));
}
-
public function testGetPathNotExisting(): void {
$this->expectException(NotFoundException::class);
@@ -1029,7 +1027,6 @@ class ViewTest extends \Test\TestCase {
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 @@ class ViewTest extends \Test\TestCase {
$this->assertNull($view->getRelativePath(null));
}
-
public function testNullAsRoot(): void {
$this->expectException(\TypeError::class);
@@ -2563,7 +2559,6 @@ class ViewTest extends \Test\TestCase {
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 926b666e4b5..b1a3c793e6f 100644
--- a/tests/lib/GlobalScale/ConfigTest.php
+++ b/tests/lib/GlobalScale/ConfigTest.php
@@ -47,7 +47,6 @@ class ConfigTest extends TestCase {
$this->assertTrue($result);
}
-
/**
*
* @param bool $gsEnabled
diff --git a/tests/lib/Group/HideFromCollaborationTest.php b/tests/lib/Group/HideFromCollaborationTest.php
index f23660ead2b..0eaff528c11 100644
--- a/tests/lib/Group/HideFromCollaborationTest.php
+++ b/tests/lib/Group/HideFromCollaborationTest.php
@@ -34,7 +34,6 @@ class HideFromCollaborationTest extends TestCase {
$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 9db0bee3ceb..8151ff92e18 100644
--- a/tests/lib/Group/MetaDataTest.php
+++ b/tests/lib/Group/MetaDataTest.php
@@ -52,7 +52,6 @@ class MetaDataTest extends \Test\TestCase {
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 6facd921878..a124b47cec2 100644
--- a/tests/lib/HelperStorageTest.php
+++ b/tests/lib/HelperStorageTest.php
@@ -187,7 +187,6 @@ class HelperStorageTest extends \Test\TestCase {
$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 321d69aa996..c07ccfa4527 100644
--- a/tests/lib/HookHelper.php
+++ b/tests/lib/HookHelper.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 7657f7eca9f..48c9ac9f3ae 100644
--- a/tests/lib/Hooks/BasicEmitterTest.php
+++ b/tests/lib/Hooks/BasicEmitterTest.php
@@ -54,7 +54,6 @@ class BasicEmitterTest extends \Test\TestCase {
throw new EmittedException;
}
-
public function testAnonymousFunction(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -64,7 +63,6 @@ class BasicEmitterTest extends \Test\TestCase {
$this->emitter->emitEvent('Test', 'test');
}
-
public function testStaticCallback(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -72,7 +70,6 @@ class BasicEmitterTest extends \Test\TestCase {
$this->emitter->emitEvent('Test', 'test');
}
-
public function testNonStaticCallback(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -129,7 +126,6 @@ class BasicEmitterTest extends \Test\TestCase {
$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 @@ class BasicEmitterTest extends \Test\TestCase {
$this->emitter->emitEvent('Test', 'test', ['foo', 'bar']);
}
-
public function testNamedArguments(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -220,7 +215,6 @@ class BasicEmitterTest extends \Test\TestCase {
$this->addToAssertionCount(1);
}
-
public function testRemoveKeepOtherCallback(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -238,7 +232,6 @@ class BasicEmitterTest extends \Test\TestCase {
$this->addToAssertionCount(1);
}
-
public function testRemoveKeepOtherMethod(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -253,7 +246,6 @@ class BasicEmitterTest extends \Test\TestCase {
$this->addToAssertionCount(1);
}
-
public function testRemoveKeepOtherScope(): void {
$this->expectException(\Test\Hooks\EmittedException::class);
@@ -268,7 +260,6 @@ class BasicEmitterTest extends \Test\TestCase {
$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 8bf90ea95bd..b2cecfdb0ff 100644
--- a/tests/lib/Http/Client/ClientTest.php
+++ b/tests/lib/Http/Client/ClientTest.php
@@ -296,10 +296,8 @@ class ClientTest extends \Test\TestCase {
'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 5852a114372..8bd91785143 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -153,7 +153,6 @@ class InstallerTest extends TestCase {
$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 @@ gLgK8d8sKL60JMmKHN3boHrsThKBVA==
->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 @@ YSu356M=
$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 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$installer->downloadApp('news');
}
-
public function testDownloadAppWithInvalidSignature(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('App with id passman has invalid signature');
@@ -351,7 +346,6 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$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 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$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 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
$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 b9270bc885e..6579c34c9b9 100644
--- a/tests/lib/IntegrityCheck/CheckerTest.php
+++ b/tests/lib/IntegrityCheck/CheckerTest.php
@@ -76,7 +76,6 @@ class CheckerTest extends TestCase {
);
}
-
public function testWriteAppSignatureOfNotExistingApp(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Exception message');
@@ -101,7 +100,6 @@ class CheckerTest extends TestCase {
$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 @@ class CheckerTest extends TestCase {
['/resources/codesigning/root.crt', file_get_contents(__DIR__ . '/../../data/integritycheck/root.crt')],
]);
-
$expected = [
'INVALID_HASH' => [
'AnotherFile.txt' => [
@@ -299,7 +296,6 @@ class CheckerTest extends TestCase {
'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e',
],
],
-
];
$this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp'));
}
@@ -354,7 +350,6 @@ class CheckerTest extends TestCase {
'current' => 'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e',
],
],
-
];
$this->assertSame($expected, $this->checker->verifyAppSignature('SomeApp', \OC::$SERVERROOT . '/tests/data/integritycheck/appWithInvalidData/'));
}
@@ -435,7 +430,6 @@ class CheckerTest extends TestCase {
$this->assertSame([], $this->checker->verifyAppSignature('SomeApp'));
}
-
public function testWriteCoreSignatureWithException(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Exception message');
@@ -459,7 +453,6 @@ class CheckerTest extends TestCase {
$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 @@ class CheckerTest extends TestCase {
'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 53bd83d0e50..5c324a4085e 100644
--- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php
+++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php
@@ -32,7 +32,6 @@ class FileAccessHelperTest extends TestCase {
$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 @@ class FileAccessHelperTest extends TestCase {
$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 02e9afd142b..395d53d28d8 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 11744e6f5db..b114d42ea35 100644
--- a/tests/lib/L10N/FactoryTest.php
+++ b/tests/lib/L10N/FactoryTest.php
@@ -275,7 +275,6 @@ class FactoryTest extends TestCase {
->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 42161a5b1e6..d01d656fbcc 100644
--- a/tests/lib/L10N/LanguageIteratorTest.php
+++ b/tests/lib/L10N/LanguageIteratorTest.php
@@ -55,7 +55,6 @@ class LanguageIteratorTest extends TestCase {
[ '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 f599b78ccb8..170d5750aae 100644
--- a/tests/lib/LargeFileHelperTest.php
+++ b/tests/lib/LargeFileHelperTest.php
@@ -40,7 +40,6 @@ class LargeFileHelperTest extends TestCase {
);
}
-
public function testFormatUnsignedIntegerStringException(): void {
$this->expectException(\UnexpectedValueException::class);
diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php
index ee897ae5cfb..74172889e4d 100644
--- a/tests/lib/Lock/LockingProvider.php
+++ b/tests/lib/Lock/LockingProvider.php
@@ -61,7 +61,6 @@ abstract class LockingProvider extends TestCase {
$this->assertFalse($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED));
}
-
public function testDoubleExclusiveLock(): void {
$this->expectException(LockedException::class);
@@ -78,7 +77,6 @@ abstract class LockingProvider extends TestCase {
$this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE);
}
-
public function testExclusiveLockAfterShared(): void {
$this->expectException(LockedException::class);
@@ -151,8 +149,6 @@ abstract class LockingProvider extends TestCase {
$this->instance->releaseLock('foo', ILockingProvider::LOCK_SHARED);
}
-
-
public function testSharedLockAfterExclusive(): void {
$this->expectException(LockedException::class);
@@ -199,7 +195,6 @@ abstract class LockingProvider extends TestCase {
$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED));
}
-
public function testChangeLockToExclusiveDoubleShared(): void {
$this->expectException(LockedException::class);
@@ -208,14 +203,12 @@ abstract class LockingProvider extends TestCase {
$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 @@ abstract class LockingProvider extends TestCase {
$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 1757446c6e3..6bf225a4778 100644
--- a/tests/lib/Mail/EMailTemplateTest.php
+++ b/tests/lib/Mail/EMailTemplateTest.php
@@ -174,8 +174,6 @@ class EMailTemplateTest extends TestCase {
$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 6d27b71fe4f..497c7007a68 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 87c4702f181..81589aab449 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 @@ class MailerTest extends TestCase {
$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 7cc4dbb96f0..4f03825149a 100644
--- a/tests/lib/Mail/Provider/AddressTest.php
+++ b/tests/lib/Mail/Provider/AddressTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 00e81952742..42ff76e142e 100644
--- a/tests/lib/Mail/Provider/AttachmentTest.php
+++ b/tests/lib/Mail/Provider/AttachmentTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95f8501b510..451281159ff 100644
--- a/tests/lib/Mail/Provider/ManagerTest.php
+++ b/tests/lib/Mail/Provider/ManagerTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 5998b070fd6..81f99cc6d55 100644
--- a/tests/lib/Mail/Provider/MessageTest.php
+++ b/tests/lib/Mail/Provider/MessageTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 347a2cb5546..b733155372a 100644
--- a/tests/lib/Memcache/ArrayCacheTest.php
+++ b/tests/lib/Memcache/ArrayCacheTest.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 42cb2e193fd..565dfbc5a2c 100644
--- a/tests/lib/Memcache/CasTraitTestClass.php
+++ b/tests/lib/Memcache/CasTraitTestClass.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 95591db6a12..bf6629afec4 100644
--- a/tests/lib/Notification/ManagerTest.php
+++ b/tests/lib/Notification/ManagerTest.php
@@ -164,7 +164,6 @@ class ManagerTest extends TestCase {
$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 434ac37e3d7..d684f3876f8 100644
--- a/tests/lib/Notification/NotificationTest.php
+++ b/tests/lib/Notification/NotificationTest.php
@@ -82,7 +82,6 @@ class NotificationTest extends TestCase {
$this->notification->setApp($app);
}
-
public static function dataSetUser(): array {
return self::dataValidString(64);
}
@@ -416,7 +415,6 @@ class NotificationTest extends TestCase {
$this->assertEquals([], $this->notification->getParsedActions());
}
-
public function testAddActionInvalid(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -462,7 +460,6 @@ class NotificationTest extends TestCase {
$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 58a22a07bd1..8ab77e28b97 100644
--- a/tests/lib/OCM/DiscoveryServiceTest.php
+++ b/tests/lib/OCM/DiscoveryServiceTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 @@ class DiscoveryServiceTest extends TestCase {
}
}
-
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 9c7f0618acd..e815ba59a96 100644
--- a/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php
+++ b/tests/lib/OCM/Listeners/LocalOCMDiscoveryTestEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 e23d71cf8f1..facb30dddd3 100644
--- a/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php
+++ b/tests/lib/OCM/Listeners/OCMEndpointRequestTestEvent.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 c2499443f05..0eef487bf57 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 7e1c64e6556..9024d2d0b68 100644
--- a/tests/lib/Preview/GeneratorTest.php
+++ b/tests/lib/Preview/GeneratorTest.php
@@ -257,7 +257,6 @@ class GeneratorTest extends TestCase {
$this->assertSame(1000, $result->getSize());
}
-
public function testMigrateOldPreview(): void {
$file = $this->getFile(42, 'myMimeType', false);
@@ -437,7 +436,6 @@ class GeneratorTest extends TestCase {
[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 e89bba91238..ecfa2eb5267 100644
--- a/tests/lib/Remote/Api/OCSTest.php
+++ b/tests/lib/Remote/Api/OCSTest.php
@@ -55,7 +55,6 @@ class OCSTest extends TestCase {
$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 @@ class OCSTest extends TestCase {
$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 edf0ff0fa3f..2173bc3c6b6 100644
--- a/tests/lib/Remote/InstanceTest.php
+++ b/tests/lib/Remote/InstanceTest.php
@@ -59,7 +59,6 @@ class InstanceTest extends TestCase {
$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 2a535f854e5..54b3c4e18e4 100644
--- a/tests/lib/Repair/CleanTagsTest.php
+++ b/tests/lib/Repair/CleanTagsTest.php
@@ -95,7 +95,6 @@ class CleanTagsTest extends \Test\TestCase {
$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 7e02c07d099..509c04ee52c 100644
--- a/tests/lib/Repair/ClearFrontendCachesTest.php
+++ b/tests/lib/Repair/ClearFrontendCachesTest.php
@@ -34,7 +34,6 @@ class ClearFrontendCachesTest extends \Test\TestCase {
$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 2d62601a190..8c03c29afc8 100644
--- a/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php
+++ b/tests/lib/Repair/NC29/SanitizeAccountPropertiesJobTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 652873a299f..924dc241149 100644
--- a/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php
+++ b/tests/lib/Repair/NC29/SanitizeAccountPropertiesTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 77036dc73c3..9b51da4de01 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 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
], $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 243e04149d2..7b064228b25 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 @@ class CleanPreviewsTest extends TestCase {
], $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 60ea820e844..ecfc493e1fa 100644
--- a/tests/lib/RichObjectStrings/DefinitionsTest.php
+++ b/tests/lib/RichObjectStrings/DefinitionsTest.php
@@ -21,7 +21,6 @@ class DefinitionsTest extends TestCase {
return $testsuite;
}
-
public function testGetDefinitionNotExisting(): void {
$this->expectException(InvalidObjectExeption::class);
$this->expectExceptionMessage('Object type is undefined');
@@ -50,7 +49,6 @@ class DefinitionsTest extends TestCase {
$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 50911cab3f1..61a14e2351e 100644
--- a/tests/lib/Security/CertificateManagerTest.php
+++ b/tests/lib/Security/CertificateManagerTest.php
@@ -103,7 +103,6 @@ class CertificateManagerTest extends \Test\TestCase {
$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 @@ class CertificateManagerTest extends \Test\TestCase {
->with('targetBundlePath')
->willReturn($targetBundleExists);
-
$view->expects($this->any())->method('filemtime')
->willReturnCallback(function ($path) use ($targetBundleMtime) {
if ($path === 'targetBundlePath') {
@@ -183,7 +181,6 @@ class CertificateManagerTest extends \Test\TestCase {
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 02b67e14a68..f7e24561170 100644
--- a/tests/lib/Security/CertificateTest.php
+++ b/tests/lib/Security/CertificateTest.php
@@ -32,7 +32,6 @@ class CertificateTest extends \Test\TestCase {
$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 d9898e4090e..6e5312d67a0 100644
--- a/tests/lib/Security/CryptoTest.php
+++ b/tests/lib/Security/CryptoTest.php
@@ -38,7 +38,6 @@ class CryptoTest extends \Test\TestCase {
$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 @@ class CryptoTest extends \Test\TestCase {
$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 @@ class CryptoTest extends \Test\TestCase {
$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 b1dd1822690..f6dcf22116a 100644
--- a/tests/lib/Security/HasherTest.php
+++ b/tests/lib/Security/HasherTest.php
@@ -94,12 +94,9 @@ class HasherTest extends \Test\TestCase {
['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 @@ class HasherTest extends \Test\TestCase {
$this->assertSame($expected, $relativePath);
}
-
#[\PHPUnit\Framework\Attributes\DataProvider('hashProviders70_71')]
public function testVerify($password, $hash, $expected): void {
$this->config
@@ -184,7 +180,6 @@ class HasherTest extends \Test\TestCase {
$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 db75252d192..ff10b34a677 100644
--- a/tests/lib/Security/IdentityProof/ManagerTest.php
+++ b/tests/lib/Security/IdentityProof/ManagerTest.php
@@ -227,7 +227,6 @@ class ManagerTest extends TestCase {
$folder
);
-
$expected = new Key('MyNewPublicKey', 'MyNewPrivateKey');
$this->assertEquals($expected, $this->manager->getKey($user));
}
@@ -259,8 +258,6 @@ class ManagerTest extends TestCase {
$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 88ad895cd4f..76a3a3a27a9 100644
--- a/tests/lib/Security/RateLimiting/LimiterTest.php
+++ b/tests/lib/Security/RateLimiting/LimiterTest.php
@@ -37,7 +37,6 @@ class LimiterTest extends TestCase {
);
}
-
public function testRegisterAnonRequestExceeded(): void {
$this->expectException(RateLimitExceededException::class);
$this->expectExceptionMessage('Rate limit exceeded');
@@ -79,7 +78,6 @@ class LimiterTest extends TestCase {
$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 965dbb57f96..a715890d3c1 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 d5691a541cd..3d3e45bb818 100644
--- a/tests/lib/Session/MemoryTest.php
+++ b/tests/lib/Session/MemoryTest.php
@@ -18,7 +18,6 @@ class MemoryTest extends Session {
$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 2fe7838e71b..fde656b4491 100644
--- a/tests/lib/Settings/ManagerTest.php
+++ b/tests/lib/Settings/ManagerTest.php
@@ -200,7 +200,6 @@ class ManagerTest extends TestCase {
$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 1119c5ed0d9..76fa765163b 100644
--- a/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php
+++ b/tests/lib/SetupCheck/CheckServerResponseTraitImplementation.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 64e1b499c4b..46fe78d2d6b 100644
--- a/tests/lib/SetupCheck/CheckServerResponseTraitTest.php
+++ b/tests/lib/SetupCheck/CheckServerResponseTraitTest.php
@@ -6,6 +6,7 @@ declare(strict_types=1);
* 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 a5a867c1288..3def0ff69e1 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -120,7 +120,6 @@ class SetupTest extends \Test\TestCase {
$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 1881c02c83d..5cc71a9f536 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -187,9 +187,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
return $qb->getLastInsertId();
}
-
-
-
public function testGetShareByIdNotExist(): void {
$this->expectException(ShareNotFound::class);
@@ -1639,7 +1636,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->assertEquals('user2', $share2['share_with']);
}
-
public function testDeleteFromSelfGroupUserNotInGroup(): void {
$qb = $this->dbConn->getQueryBuilder();
$stmt = $qb->insert('share')
@@ -1682,7 +1678,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->provider->deleteFromSelf($share, 'user2');
}
-
public function testDeleteFromSelfGroupDoesNotExist(): void {
$this->expectException(ProviderException::class);
$this->expectExceptionMessage('Group "group" does not exist');
@@ -1773,7 +1768,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->assertCount(0, $shares);
}
-
public function testDeleteFromSelfUserNotRecipient(): void {
$this->expectException(ProviderException::class);
$this->expectExceptionMessage('Recipient does not match');
@@ -1816,7 +1810,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->provider->deleteFromSelf($share, $user3);
}
-
public function testDeleteFromSelfLink(): void {
$this->expectException(ProviderException::class);
$this->expectExceptionMessage('Invalid shareType');
@@ -2204,7 +2197,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->assertSame('user5', $shares[1]['uid_owner']);
$this->assertSame(0, (int)$shares[1]['permissions']);
-
$stmt->closeCursor();
}
@@ -3033,7 +3025,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
$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 5987cb96020..15c0dbc2f0a 100644
--- a/tests/lib/Share20/LegacyHooksTest.php
+++ b/tests/lib/Share20/LegacyHooksTest.php
@@ -225,7 +225,6 @@ class LegacyHooksTest extends TestCase {
->setPassword('password')
->setToken('token');
-
$hookListner = $this->getMockBuilder(Dummy::class)->onlyMethods(['preShare'])->getMock();
Util::connectHook('OCP\Share', 'pre_shared', $hookListner, 'preShare');
@@ -273,7 +272,6 @@ class LegacyHooksTest extends TestCase {
->setPassword('password')
->setToken('token');
-
$hookListner = $this->getMockBuilder(Dummy::class)->onlyMethods(['preShare'])->getMock();
Util::connectHook('OCP\Share', 'pre_shared', $hookListner, 'preShare');
@@ -329,7 +327,6 @@ class LegacyHooksTest extends TestCase {
->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 21098e7f38a..b29638856b8 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -787,7 +787,6 @@ class ManagerTest extends \Test\TestCase {
$this->assertEquals($share, $this->manager->getShareById('default:42'));
}
-
public function testGetExpiredShareById(): void {
$this->expectException(ShareNotFound::class);
@@ -814,7 +813,6 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$this->assertNull($result);
}
-
public function testVerifyPasswordHookFails(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('password not accepted');
@@ -1199,7 +1196,6 @@ class ManagerTest extends \Test\TestCase {
->willReturnArgument(0);
$this->rootFolder->method('getUserFolder')->willReturn($userFolder);
-
try {
self::invokePrivate($this->manager, 'generalCreateChecks', [$share]);
$thrown = false;
@@ -1214,7 +1210,6 @@ class ManagerTest extends \Test\TestCase {
$this->assertSame($exception, $thrown);
}
-
public function testGeneralCheckShareRoot(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('You cannot share your root folder');
@@ -2061,7 +2056,6 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
self::invokePrivate($this->manager, 'linkCreateChecks', [$share]);
}
-
#[\PHPUnit\Framework\Attributes\DoesNotPerformAssertions]
public function testFileLinkCreateChecksNoPublicUpload(): void {
$share = $this->manager->newShare();
@@ -2447,7 +2434,6 @@ class ManagerTest extends \Test\TestCase {
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 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$manager->getShareByToken('expiredToken');
}
-
public function testGetShareByTokenExpired(): void {
$this->expectException(ShareNotFound::class);
$this->expectExceptionMessage('The requested share does not exist anymore');
@@ -3427,7 +3410,6 @@ class ManagerTest extends \Test\TestCase {
$this->assertSame($share, $res);
}
-
public function testGetShareByTokenWithPublicLinksDisabled(): void {
$this->expectException(ShareNotFound::class);
@@ -3611,7 +3593,6 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$manager->updateShare($share);
}
-
public function testUpdateShareCantChangeRecipientForGroupShare(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Can only update recipient on user shares');
@@ -3667,7 +3647,6 @@ class ManagerTest extends \Test\TestCase {
$manager->updateShare($share);
}
-
public function testUpdateShareCantShareWithOwner(): void {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('Cannot share with the share owner');
@@ -3882,7 +3861,6 @@ class ManagerTest extends \Test\TestCase {
Util::connectHook('OCP\Share', 'post_update_permissions', $hookListener3, 'post');
$hookListener3->expects($this->never())->method('post');
-
$manager->updateShare($share);
}
@@ -4278,7 +4256,6 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$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 @@ class ManagerTest extends \Test\TestCase {
$this->manager->moveShare($share, 'recipient');
}
-
public function testMoveShareUserNotRecipient(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid share recipient');
@@ -4686,7 +4660,6 @@ class ManagerTest extends \Test\TestCase {
$this->manager->moveShare($share, 'recipient');
}
-
public function testMoveShareGroupNotRecipient(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid share recipient');
@@ -4706,7 +4679,6 @@ class ManagerTest extends \Test\TestCase {
$this->manager->moveShare($share, 'recipient');
}
-
public function testMoveShareGroupNull(): void {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Group "shareWith" does not exist');
@@ -4848,7 +4820,6 @@ class ManagerTest extends \Test\TestCase {
], $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 0be3d350142..9bf39bd90be 100644
--- a/tests/lib/Support/Subscription/RegistryTest.php
+++ b/tests/lib/Support/Subscription/RegistryTest.php
@@ -57,7 +57,6 @@ class RegistryTest extends TestCase {
$this->addToAssertionCount(1);
}
-
public function testDoubleRegistration(): void {
$this->expectException(AlreadyRegisteredException::class);
@@ -106,7 +105,6 @@ class RegistryTest extends TestCase {
$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 ad9e0a81abd..80f327fafb9 100644
--- a/tests/lib/SystemTag/SystemTagManagerTest.php
+++ b/tests/lib/SystemTag/SystemTagManagerTest.php
@@ -271,14 +271,12 @@ class SystemTagManagerTest extends TestCase {
$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 @@ class SystemTagManagerTest extends TestCase {
$this->tagManager->getTagsByIds([$tag1->getId(), 100, 101]);
}
-
public function testGetInvalidTagIdFormat(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -373,7 +370,6 @@ class SystemTagManagerTest extends TestCase {
$this->assertEmpty($this->tagManager->getAllTags());
}
-
public function testDeleteNonExistingTag(): void {
$this->expectException(TagNotFoundException::class);
@@ -577,7 +573,6 @@ class SystemTagManagerTest extends TestCase {
\OC::$CLI = $oldCli;
}
-
/**
* @param ISystemTag $tag1
* @param ISystemTag $tag2
diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php
index d0efd419770..b28e69b1c1c 100644
--- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php
+++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php
@@ -178,7 +178,6 @@ class SystemTagObjectMapperTest extends TestCase {
], $objectIds);
}
-
public function testGetObjectsForTagsLimitWithMultipleTags(): void {
$this->expectException(\InvalidArgumentException::class);
@@ -202,7 +201,6 @@ class SystemTagObjectMapperTest extends TestCase {
], $objectIds);
}
-
public function testGetObjectsForNonExistingTag(): void {
$this->expectException(TagNotFoundException::class);
@@ -270,7 +268,6 @@ class SystemTagObjectMapperTest extends TestCase {
$this->assertTrue(true, 'No error when reassigning/unassigning');
}
-
public function testAssignNonExistingTags(): void {
$this->expectException(TagNotFoundException::class);
@@ -297,7 +294,6 @@ class SystemTagObjectMapperTest extends TestCase {
], $tagIdMapping, 'None of the tags got assigned');
}
-
public function testUnassignNonExistingTags(): void {
$this->expectException(TagNotFoundException::class);
@@ -428,7 +424,6 @@ class SystemTagObjectMapperTest extends TestCase {
);
}
-
public function testHaveTagNonExisting(): void {
$this->expectException(TagNotFoundException::class);
diff --git a/tests/lib/TaskProcessing/TaskProcessingTest.php b/tests/lib/TaskProcessing/TaskProcessingTest.php
index d557bcbed09..3bfc586240c 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 @@ class SuccessfulSyncProvider implements IProvider, ISynchronousProvider {
}
}
-
-
class FailingSyncProvider implements IProvider, ISynchronousProvider {
public const ERROR_MESSAGE = 'Failure';
#[\Override]
@@ -305,7 +304,6 @@ class FailingSyncProvider implements IProvider, ISynchronousProvider {
}
}
-
class FailingSyncProviderWithUserFacingError implements IProvider, ISynchronousProvider {
public const ERROR_MESSAGE = 'Failure';
public const USER_FACING_ERROR_MESSAGE = 'User-facing Failure';
@@ -596,7 +594,6 @@ class ExternalProvider implements IProvider {
}
}
-
class ExternalTriggerableProvider implements ITriggerableProvider {
public const ID = 'event:external:provider:triggerable';
public const TASK_TYPE_ID = TextToText::ID;
@@ -893,7 +890,6 @@ class TaskProcessingTest extends \Test\TestCase {
$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 @@ class TaskProcessingTest extends \Test\TestCase {
$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 3d0b6bc445a..d3fd8444e11 100644
--- a/tests/lib/Template/JSCombinerTest.php
+++ b/tests/lib/Template/JSCombinerTest.php
@@ -416,7 +416,6 @@ var b = \'world\';
$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 4b4497a070b..653aab8e611 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -97,7 +97,6 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
unset($container[$oldService]);
}
-
unset($this->services[$name]);
return true;
}
diff --git a/tests/lib/TestMoveableMountPoint.php b/tests/lib/TestMoveableMountPoint.php
index 728be5ef117..7469857b705 100644
--- a/tests/lib/TestMoveableMountPoint.php
+++ b/tests/lib/TestMoveableMountPoint.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 8fd744c5749..5b27927f522 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 @@ class ReleaseMetadataTest extends \Test\TestCase {
->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 77ca868da4b..734825c9aa7 100644
--- a/tests/lib/User/AvatarUserDummy.php
+++ b/tests/lib/User/AvatarUserDummy.php
@@ -7,6 +7,7 @@ declare(strict_types=1);
* 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 aed21e05825..4f70b642b7e 100644
--- a/tests/lib/User/DatabaseTest.php
+++ b/tests/lib/User/DatabaseTest.php
@@ -73,7 +73,6 @@ class DatabaseTest extends Backend {
$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 acb35bf7cf7..66fea97fbda 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -60,7 +60,6 @@ class ManagerTest extends TestCase {
$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 @@ class ManagerTest extends TestCase {
->with(\OC\User\Backend::CREATE_USER)
->willReturn(true);
-
$this->manager->registerBackend($backend);
$this->expectException(\InvalidArgumentException::class, $exception);
@@ -343,7 +341,6 @@ class ManagerTest extends TestCase {
$this->assertEquals('foo', $user->getUID());
}
-
public function testCreateUserSingleBackendExists(): void {
$this->expectException(\Exception::class);
@@ -386,7 +383,6 @@ class ManagerTest extends TestCase {
$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 @@ class ManagerTest extends TestCase {
$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 d21522f0c2a..721d93e122f 100644
--- a/tests/lib/User/SessionTest.php
+++ b/tests/lib/User/SessionTest.php
@@ -226,7 +226,6 @@ class SessionTest extends \Test\TestCase {
$this->assertEquals($user, $userSession->getUser());
}
-
public function testLoginValidPasswordDisabled(): void {
$this->expectException(LoginException::class);
@@ -518,7 +517,6 @@ class SessionTest extends \Test\TestCase {
$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 6bf93e62681..d12e230c5dc 100644
--- a/themes/example/defaults.php
+++ b/themes/example/defaults.php
@@ -102,7 +102,6 @@ class OC_Theme {
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 8d492f58961..fe0fb585d0f 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"
}