summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-11-23 10:22:34 +0100
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2023-11-23 10:36:13 +0100
commitaa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch)
tree843203cd1346158aab3515687e37a90e78c929e9 /apps
parent272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff)
downloadnextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz
nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/admin_audit/lib/Actions/Action.php9
-rw-r--r--apps/admin_audit/lib/Actions/UserManagement.php2
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php14
-rwxr-xr-xapps/admin_audit/lib/BackgroundJobs/Rotate.php2
-rw-r--r--apps/cloud_federation_api/appinfo/routes.php12
-rw-r--r--apps/cloud_federation_api/lib/ResponseDefinitions.php1
-rw-r--r--apps/comments/lib/AppInfo/Application.php4
-rw-r--r--apps/comments/lib/Controller/NotificationsController.php2
-rw-r--r--apps/comments/lib/Search/LegacyProvider.php2
-rw-r--r--apps/contactsinteraction/lib/Db/CardSearchDao.php6
-rw-r--r--apps/contactsinteraction/lib/Db/RecentContactMapper.php6
-rw-r--r--apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php2
-rw-r--r--apps/dashboard/lib/Controller/DashboardApiController.php13
-rw-r--r--apps/dashboard/lib/ResponseDefinitions.php1
-rw-r--r--apps/dav/appinfo/v1/caldav.php2
-rw-r--r--apps/dav/lib/AppInfo/Application.php26
-rw-r--r--apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php8
-rw-r--r--apps/dav/lib/BackgroundJob/CalendarRetentionJob.php2
-rw-r--r--apps/dav/lib/BackgroundJob/EventReminderJob.php4
-rw-r--r--apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php4
-rw-r--r--apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php4
-rw-r--r--apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php4
-rw-r--r--apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php56
-rw-r--r--apps/dav/lib/BackgroundJob/UploadCleanup.php1
-rw-r--r--apps/dav/lib/BackgroundJob/UserStatusAutomation.php10
-rw-r--r--apps/dav/lib/BulkUpload/BulkUploadPlugin.php8
-rw-r--r--apps/dav/lib/BulkUpload/MultipartRequestParser.php4
-rw-r--r--apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php3
-rw-r--r--apps/dav/lib/CalDAV/AppCalendar/AppCalendarPlugin.php1
-rw-r--r--apps/dav/lib/CalDAV/AppCalendar/CalendarObject.php1
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php40
-rw-r--r--apps/dav/lib/CalDAV/CalendarImpl.php5
-rw-r--r--apps/dav/lib/CalDAV/CalendarObject.php4
-rw-r--r--apps/dav/lib/CalDAV/EventComparisonService.php6
-rw-r--r--apps/dav/lib/CalDAV/FreeBusy/FreeBusyGenerator.php3
-rw-r--r--apps/dav/lib/CalDAV/PublicCalendarRoot.php2
-rw-r--r--apps/dav/lib/CalDAV/Publishing/PublishPlugin.php96
-rw-r--r--apps/dav/lib/CalDAV/Reminder/Backend.php26
-rw-r--r--apps/dav/lib/CalDAV/Reminder/INotificationProvider.php6
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php12
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php24
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php16
-rw-r--r--apps/dav/lib/CalDAV/Reminder/Notifier.php8
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php34
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php20
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php8
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php8
-rw-r--r--apps/dav/lib/CalDAV/RetentionService.php4
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php20
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipService.php18
-rw-r--r--apps/dav/lib/CalDAV/Schedule/Plugin.php2
-rw-r--r--apps/dav/lib/CalDAV/Status/Status.php3
-rw-r--r--apps/dav/lib/CalDAV/Status/StatusService.php15
-rw-r--r--apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php6
-rw-r--r--apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php2
-rw-r--r--apps/dav/lib/CalDAV/Trashbin/Plugin.php2
-rw-r--r--apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php2
-rw-r--r--apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php2
-rw-r--r--apps/dav/lib/CardDAV/Activity/Backend.php8
-rw-r--r--apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php10
-rw-r--r--apps/dav/lib/CardDAV/Activity/Provider/Base.php4
-rw-r--r--apps/dav/lib/CardDAV/Activity/Provider/Card.php12
-rw-r--r--apps/dav/lib/CardDAV/AddressBookImpl.php8
-rw-r--r--apps/dav/lib/CardDAV/AddressBookRoot.php10
-rw-r--r--apps/dav/lib/CardDAV/Card.php3
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php22
-rw-r--r--apps/dav/lib/CardDAV/Converter.php2
-rw-r--r--apps/dav/lib/CardDAV/PhotoCache.php2
-rw-r--r--apps/dav/lib/CardDAV/SyncService.php15
-rw-r--r--apps/dav/lib/CardDAV/SystemAddressbook.php2
-rw-r--r--apps/dav/lib/CardDAV/UserAddressBooks.php14
-rw-r--r--apps/dav/lib/Command/CreateAddressBook.php8
-rw-r--r--apps/dav/lib/Comments/CommentsPlugin.php2
-rw-r--r--apps/dav/lib/Connector/PublicAuth.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php39
-rw-r--r--apps/dav/lib/Connector/Sabre/Auth.php12
-rw-r--r--apps/dav/lib/Connector/Sabre/BearerAuth.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php3
-rw-r--r--apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php2
-rw-r--r--apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/Exception/Forbidden.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php6
-rw-r--r--apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php1
-rw-r--r--apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php12
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesReportPlugin.php16
-rw-r--r--apps/dav/lib/Connector/Sabre/Principal.php20
-rw-r--r--apps/dav/lib/Connector/Sabre/RequestIdHeaderPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/ServerFactory.php10
-rw-r--r--apps/dav/lib/Connector/Sabre/SharesPlugin.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/TagsPlugin.php2
-rw-r--r--apps/dav/lib/Controller/BirthdayCalendarController.php8
-rw-r--r--apps/dav/lib/Controller/DirectController.php19
-rw-r--r--apps/dav/lib/Controller/InvitationResponseController.php4
-rw-r--r--apps/dav/lib/DAV/GroupPrincipalBackend.php2
-rw-r--r--apps/dav/lib/DAV/Sharing/Backend.php4
-rw-r--r--apps/dav/lib/DAV/Sharing/Plugin.php2
-rw-r--r--apps/dav/lib/DAV/ViewOnlyPlugin.php4
-rw-r--r--apps/dav/lib/Direct/ServerFactory.php12
-rw-r--r--apps/dav/lib/Events/AddressBookCreatedEvent.php2
-rw-r--r--apps/dav/lib/Events/AddressBookDeletedEvent.php4
-rw-r--r--apps/dav/lib/Events/AddressBookShareUpdatedEvent.php8
-rw-r--r--apps/dav/lib/Events/AddressBookUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php6
-rw-r--r--apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarCreatedEvent.php2
-rw-r--r--apps/dav/lib/Events/CalendarDeletedEvent.php4
-rw-r--r--apps/dav/lib/Events/CalendarMovedToTrashEvent.php4
-rw-r--r--apps/dav/lib/Events/CalendarObjectCreatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarObjectDeletedEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarObjectMovedEvent.php12
-rw-r--r--apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarObjectRestoredEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarObjectUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CalendarPublishedEvent.php4
-rw-r--r--apps/dav/lib/Events/CalendarRestoredEvent.php4
-rw-r--r--apps/dav/lib/Events/CalendarShareUpdatedEvent.php8
-rw-r--r--apps/dav/lib/Events/CalendarUnpublishedEvent.php2
-rw-r--r--apps/dav/lib/Events/CalendarUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CardCreatedEvent.php6
-rw-r--r--apps/dav/lib/Events/CardDeletedEvent.php6
-rw-r--r--apps/dav/lib/Events/CardMovedEvent.php12
-rw-r--r--apps/dav/lib/Events/CardUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Events/SubscriptionCreatedEvent.php2
-rw-r--r--apps/dav/lib/Events/SubscriptionDeletedEvent.php4
-rw-r--r--apps/dav/lib/Events/SubscriptionUpdatedEvent.php6
-rw-r--r--apps/dav/lib/Files/FileSearchBackend.php4
-rw-r--r--apps/dav/lib/Files/LazySearchBackend.php1
-rw-r--r--apps/dav/lib/HookManager.php8
-rw-r--r--apps/dav/lib/Listener/ActivityUpdaterListener.php2
-rw-r--r--apps/dav/lib/Listener/AddressbookListener.php2
-rw-r--r--apps/dav/lib/Listener/CalendarContactInteractionListener.php8
-rw-r--r--apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php2
-rw-r--r--apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php6
-rw-r--r--apps/dav/lib/Listener/CalendarPublicationListener.php2
-rw-r--r--apps/dav/lib/Listener/CalendarShareUpdateListener.php2
-rw-r--r--apps/dav/lib/Listener/CardListener.php4
-rw-r--r--apps/dav/lib/Listener/OutOfOfficeListener.php8
-rw-r--r--apps/dav/lib/Listener/SubscriptionListener.php2
-rw-r--r--apps/dav/lib/Migration/BuildCalendarSearchIndex.php4
-rw-r--r--apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php8
-rw-r--r--apps/dav/lib/Migration/BuildSocialSearchIndex.php4
-rw-r--r--apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php8
-rw-r--r--apps/dav/lib/Migration/ChunkCleanup.php6
-rw-r--r--apps/dav/lib/Migration/RegenerateBirthdayCalendars.php2
-rw-r--r--apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php4
-rw-r--r--apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php16
-rw-r--r--apps/dav/lib/Migration/Version1005Date20180413093149.php4
-rw-r--r--apps/dav/lib/Migration/Version1005Date20180530124431.php2
-rw-r--r--apps/dav/lib/Migration/Version1006Date20180619154313.php2
-rw-r--r--apps/dav/lib/Migration/Version1006Date20180628111625.php2
-rw-r--r--apps/dav/lib/Migration/Version1008Date20181030113700.php2
-rw-r--r--apps/dav/lib/Migration/Version1008Date20181105104826.php2
-rw-r--r--apps/dav/lib/Migration/Version1008Date20181105110300.php2
-rw-r--r--apps/dav/lib/Migration/Version1011Date20190725113607.php2
-rw-r--r--apps/dav/lib/Migration/Version1011Date20190806104428.php2
-rw-r--r--apps/dav/lib/Migration/Version1012Date20190808122342.php6
-rw-r--r--apps/dav/lib/Migration/Version1027Date20230504122946.php9
-rw-r--r--apps/dav/lib/Profiler/ProfilerPlugin.php4
-rw-r--r--apps/dav/lib/RootCollection.php1
-rw-r--r--apps/dav/lib/Search/ACalendarSearchProvider.php6
-rw-r--r--apps/dav/lib/Search/EventsSearchProvider.php2
-rw-r--r--apps/dav/lib/Service/AbsenceService.php1
-rw-r--r--apps/dav/lib/Settings/AvailabilitySettings.php10
-rw-r--r--apps/dav/lib/Settings/CalDAVSettings.php2
-rw-r--r--apps/dav/lib/SystemTag/SystemTagPlugin.php6
-rw-r--r--apps/dav/lib/Upload/RootCollection.php4
-rw-r--r--apps/dav/lib/UserMigration/CalendarMigrator.php2
-rw-r--r--apps/dav/lib/UserMigration/ContactsMigrator.php4
-rw-r--r--apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php2
-rw-r--r--apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php3
-rw-r--r--apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php16
-rw-r--r--apps/dav/tests/unit/CalDAV/PublicCalendarTest.php4
-rw-r--r--apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php3
-rw-r--r--apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php3
-rw-r--r--apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php30
-rw-r--r--apps/dav/tests/unit/CardDAV/AddressBookTest.php1
-rw-r--r--apps/dav/tests/unit/CardDAV/ConverterTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/PublicAuthTest.php6
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php4
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php2
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/NodeTest.php3
-rw-r--r--apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php8
-rw-r--r--apps/dav/tests/unit/Files/FileSearchBackendTest.php2
-rw-r--r--apps/dav/tests/unit/Files/MultipartRequestParserTest.php4
-rw-r--r--apps/dav/tests/unit/Search/EventsSearchProviderTest.php2
-rw-r--r--apps/dav/tests/unit/Settings/CalDAVSettingsTest.php12
-rw-r--r--apps/dav/tests/unit/Upload/AssemblyStreamTest.php4
-rw-r--r--apps/encryption/lib/Command/DisableMasterKey.php4
-rw-r--r--apps/encryption/lib/Command/EnableMasterKey.php4
-rw-r--r--apps/encryption/lib/Command/FixKeyLocation.php2
-rw-r--r--apps/encryption/lib/Command/RecoverUser.php6
-rw-r--r--apps/encryption/lib/Command/ScanLegacyFormat.php6
-rw-r--r--apps/encryption/lib/Controller/RecoveryController.php8
-rw-r--r--apps/encryption/lib/Controller/SettingsController.php20
-rw-r--r--apps/encryption/lib/Controller/StatusController.php10
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php2
-rw-r--r--apps/encryption/lib/Hooks/UserHooks.php6
-rw-r--r--apps/encryption/lib/Recovery.php10
-rw-r--r--apps/encryption/lib/Users/Setup.php2
-rw-r--r--apps/encryption/templates/settings-admin.php8
-rw-r--r--apps/encryption/templates/settings-personal.php6
-rw-r--r--apps/encryption/tests/Crypto/CryptTest.php2
-rw-r--r--apps/encryption/tests/Hooks/UserHooksTest.php2
-rw-r--r--apps/encryption/tests/KeyManagerTest.php2
-rw-r--r--apps/encryption/tests/Settings/AdminTest.php2
-rw-r--r--apps/federatedfilesharing/lib/AppInfo/Application.php2
-rw-r--r--apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php30
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php24
-rw-r--r--apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php4
-rw-r--r--apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php2
-rw-r--r--apps/federatedfilesharing/lib/Settings/Personal.php2
-rw-r--r--apps/federatedfilesharing/tests/AddressHandlerTest.php2
-rw-r--r--apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php16
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php24
-rw-r--r--apps/federation/lib/BackgroundJob/GetSharedSecret.php6
-rw-r--r--apps/federation/lib/Command/SyncFederationAddressBooks.php2
-rw-r--r--apps/federation/lib/Controller/SettingsController.php6
-rw-r--r--apps/federation/lib/DbHandler.php4
-rw-r--r--apps/federation/lib/Migration/Version1010Date20200630191302.php2
-rw-r--r--apps/federation/lib/SyncFederationAddressBooks.php6
-rw-r--r--apps/federation/lib/SyncJob.php2
-rw-r--r--apps/federation/lib/TrustedServers.php5
-rw-r--r--apps/federation/tests/Middleware/AddServerMiddlewareTest.php2
-rw-r--r--apps/federation/tests/SyncFederationAddressbooksTest.php2
-rw-r--r--apps/federation/tests/TrustedServersTest.php4
-rw-r--r--apps/files/lib/Activity/Provider.php14
-rw-r--r--apps/files/lib/AppInfo/Application.php4
-rw-r--r--apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php2
-rw-r--r--apps/files/lib/BackgroundJob/CleanupFileLocks.php2
-rw-r--r--apps/files/lib/BackgroundJob/DeleteExpiredOpenLocalEditor.php1
-rw-r--r--apps/files/lib/BackgroundJob/TransferOwnership.php2
-rw-r--r--apps/files/lib/Collaboration/Resources/Listener.php2
-rw-r--r--apps/files/lib/Collaboration/Resources/ResourceProvider.php4
-rw-r--r--apps/files/lib/Command/Copy.php1
-rw-r--r--apps/files/lib/Command/Get.php1
-rw-r--r--apps/files/lib/Command/Move.php2
-rw-r--r--apps/files/lib/Command/Object/Delete.php2
-rw-r--r--apps/files/lib/Command/Object/Get.php1
-rw-r--r--apps/files/lib/Command/Object/Put.php3
-rw-r--r--apps/files/lib/Command/Put.php1
-rw-r--r--apps/files/lib/Command/Scan.php6
-rw-r--r--apps/files/lib/Command/TransferOwnership.php4
-rw-r--r--apps/files/lib/Controller/ApiController.php18
-rw-r--r--apps/files/lib/Controller/DirectEditingController.php2
-rw-r--r--apps/files/lib/Controller/TemplateController.php2
-rw-r--r--apps/files/lib/Controller/TransferOwnershipController.php18
-rw-r--r--apps/files/lib/Controller/ViewController.php9
-rw-r--r--apps/files/lib/Event/LoadAdditionalScriptsEvent.php3
-rw-r--r--apps/files/lib/Migration/Version12101Date20221011153334.php2
-rw-r--r--apps/files/lib/Notification/Notifier.php10
-rw-r--r--apps/files/lib/ResponseDefinitions.php1
-rw-r--r--apps/files/lib/Search/FilesSearchProvider.php16
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php68
-rw-r--r--apps/files/lib/Service/UserConfig.php6
-rw-r--r--apps/files/lib/Service/ViewConfig.php10
-rw-r--r--apps/files/list.php4
-rw-r--r--apps/files/templates/appnavigation.php12
-rw-r--r--apps/files/tests/Activity/ProviderTest.php1
-rw-r--r--apps/files_external/lib/BackgroundJob/CredentialsCleanup.php2
-rw-r--r--apps/files_external/lib/Command/Create.php2
-rw-r--r--apps/files_external/lib/Command/Verify.php2
-rw-r--r--apps/files_external/lib/Config/ConfigAdapter.php3
-rw-r--r--apps/files_external/lib/Config/ExternalMountPoint.php2
-rw-r--r--apps/files_external/lib/Config/SystemMountPoint.php1
-rw-r--r--apps/files_external/lib/Controller/AjaxController.php10
-rw-r--r--apps/files_external/lib/Controller/StoragesController.php1
-rw-r--r--apps/files_external/lib/Lib/Auth/AuthMechanism.php4
-rw-r--r--apps/files_external/lib/Lib/Backend/Backend.php4
-rw-r--r--apps/files_external/lib/Lib/Backend/LegacyBackend.php24
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php7
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php3
-rw-r--r--apps/files_external/lib/Lib/Storage/Swift.php2
-rw-r--r--apps/files_external/lib/Listener/LoadAdditionalListener.php5
-rw-r--r--apps/files_external/lib/Migration/Version1011Date20200630192246.php2
-rw-r--r--apps/files_external/lib/ResponseDefinitions.php1
-rw-r--r--apps/files_external/templates/settings.php119
-rw-r--r--apps/files_external/tests/Controller/GlobalStoragesControllerTest.php1
-rw-r--r--apps/files_external/tests/Controller/UserStoragesControllerTest.php1
-rw-r--r--apps/files_external/tests/Listener/StorePasswordListenerTest.php2
-rw-r--r--apps/files_external/tests/PersonalMountTest.php4
-rw-r--r--apps/files_external/tests/sso-setup/apps.config.php9
-rw-r--r--apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php3
-rw-r--r--apps/files_reminders/lib/Listener/NodeDeletedListener.php3
-rw-r--r--apps/files_reminders/lib/Listener/UserDeletedListener.php3
-rw-r--r--apps/files_reminders/lib/Notification/Notifier.php3
-rw-r--r--apps/files_reminders/lib/Service/ReminderService.php3
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Base.php12
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Groups.php14
-rw-r--r--apps/files_sharing/lib/Activity/Providers/RemoteShares.php12
-rw-r--r--apps/files_sharing/lib/AppInfo/Application.php5
-rw-r--r--apps/files_sharing/lib/Cache.php2
-rw-r--r--apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php1
-rw-r--r--apps/files_sharing/lib/Command/DeleteOrphanShares.php3
-rw-r--r--apps/files_sharing/lib/Command/ExiprationNotification.php8
-rw-r--r--apps/files_sharing/lib/Controller/DeletedShareAPIController.php16
-rw-r--r--apps/files_sharing/lib/Controller/PublicPreviewController.php8
-rw-r--r--apps/files_sharing/lib/Controller/SettingsController.php4
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php8
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php10
-rw-r--r--apps/files_sharing/lib/Controller/ShareInfoController.php4
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php8
-rw-r--r--apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php3
-rw-r--r--apps/files_sharing/lib/External/MountProvider.php2
-rw-r--r--apps/files_sharing/lib/Listener/LoadAdditionalListener.php2
-rw-r--r--apps/files_sharing/lib/Listener/LoadSidebarListener.php15
-rw-r--r--apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php2
-rw-r--r--apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php12
-rw-r--r--apps/files_sharing/lib/Migration/OwncloudGuestShareType.php2
-rw-r--r--apps/files_sharing/lib/Migration/Version11300Date20201120141438.php2
-rw-r--r--apps/files_sharing/lib/Migration/Version21000Date20201223143245.php2
-rw-r--r--apps/files_sharing/lib/Migration/Version24000Date20220208195521.php2
-rw-r--r--apps/files_sharing/lib/MountProvider.php2
-rw-r--r--apps/files_sharing/lib/Notification/Notifier.php10
-rw-r--r--apps/files_sharing/lib/ResponseDefinitions.php1
-rw-r--r--apps/files_sharing/lib/SharedMount.php2
-rw-r--r--apps/files_sharing/lib/SharedStorage.php10
-rw-r--r--apps/files_sharing/lib/Updater.php2
-rw-r--r--apps/files_sharing/templates/public.php2
-rw-r--r--apps/files_sharing/tests/ApiTest.php1
-rw-r--r--apps/files_sharing/tests/ApplicationTest.php8
-rw-r--r--apps/files_sharing/tests/CacheTest.php4
-rw-r--r--apps/files_sharing/tests/Controller/ExternalShareControllerTest.php6
-rw-r--r--apps/files_sharing/tests/Controller/ShareAPIControllerTest.php23
-rw-r--r--apps/files_sharing/tests/Controller/ShareControllerTest.php12
-rw-r--r--apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php2
-rw-r--r--apps/files_sharing/tests/SharedMountTest.php4
-rw-r--r--apps/files_sharing/tests/TestCase.php2
-rw-r--r--apps/files_trashbin/lib/AppInfo/Application.php2
-rw-r--r--apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php1
-rw-r--r--apps/files_trashbin/lib/Command/ExpireTrash.php2
-rw-r--r--apps/files_trashbin/lib/Expiration.php2
-rw-r--r--apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php3
-rw-r--r--apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php2
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashbinPlugin.php4
-rw-r--r--apps/files_trashbin/lib/Trash/LegacyTrashBackend.php2
-rw-r--r--apps/files_trashbin/lib/Trash/TrashItem.php1
-rw-r--r--apps/files_trashbin/lib/Trashbin.php4
-rw-r--r--apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php2
-rw-r--r--apps/files_trashbin/tests/ExpirationTest.php2
-rw-r--r--apps/files_versions/lib/AppInfo/Application.php4
-rw-r--r--apps/files_versions/lib/Db/VersionsMapper.php4
-rw-r--r--apps/files_versions/lib/Expiration.php8
-rw-r--r--apps/files_versions/lib/Sabre/Plugin.php2
-rw-r--r--apps/files_versions/lib/Sabre/VersionFile.php1
-rw-r--r--apps/files_versions/lib/Storage.php10
-rw-r--r--apps/files_versions/lib/Versions/LegacyVersionsBackend.php1
-rw-r--r--apps/files_versions/lib/Versions/VersionManager.php5
-rw-r--r--apps/files_versions/tests/StorageTest.php1
-rw-r--r--apps/lookup_server_connector/lib/AppInfo/Application.php4
-rw-r--r--apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php10
-rw-r--r--apps/lookup_server_connector/lib/UpdateLookupServer.php2
-rw-r--r--apps/oauth2/lib/Controller/LoginRedirectorController.php14
-rw-r--r--apps/oauth2/lib/Controller/SettingsController.php4
-rw-r--r--apps/oauth2/lib/Migration/SetTokenExpiration.php4
-rw-r--r--apps/oauth2/lib/Settings/Admin.php2
-rw-r--r--apps/oauth2/tests/Controller/SettingsControllerTest.php3
-rw-r--r--apps/provisioning_api/lib/Controller/AUserData.php14
-rw-r--r--apps/provisioning_api/lib/Controller/AppConfigController.php14
-rw-r--r--apps/provisioning_api/lib/Controller/GroupsController.php16
-rw-r--r--apps/provisioning_api/lib/ResponseDefinitions.php1
-rw-r--r--apps/settings/lib/Activity/GroupProvider.php8
-rw-r--r--apps/settings/lib/Activity/Provider.php6
-rw-r--r--apps/settings/lib/BackgroundJobs/VerifyUserData.php10
-rw-r--r--apps/settings/lib/Controller/AISettingsController.php6
-rw-r--r--apps/settings/lib/Controller/AppSettingsController.php24
-rw-r--r--apps/settings/lib/Controller/AuthSettingsController.php18
-rw-r--r--apps/settings/lib/Controller/AuthorizedGroupController.php4
-rw-r--r--apps/settings/lib/Controller/ChangePasswordController.php14
-rw-r--r--apps/settings/lib/Controller/HelpController.php2
-rw-r--r--apps/settings/lib/Controller/MailSettingsController.php26
-rw-r--r--apps/settings/lib/Controller/TwoFactorSettingsController.php4
-rw-r--r--apps/settings/lib/Controller/UsersController.php28
-rw-r--r--apps/settings/lib/Hooks.php16
-rw-r--r--apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php4
-rw-r--r--apps/settings/lib/Mailer/NewUserMailHelper.php18
-rw-r--r--apps/settings/lib/Middleware/SubadminMiddleware.php4
-rw-r--r--apps/settings/lib/Search/SectionSearch.php6
-rw-r--r--apps/settings/lib/Service/AuthorizedGroupService.php6
-rw-r--r--apps/settings/lib/Settings/Admin/Delegation.php2
-rw-r--r--apps/settings/lib/Settings/Admin/Security.php10
-rw-r--r--apps/settings/lib/Settings/Admin/Server.php12
-rw-r--r--apps/settings/lib/Settings/Personal/PersonalInfo.php2
-rw-r--r--apps/settings/lib/Settings/Personal/Security/Authtokens.php14
-rw-r--r--apps/settings/lib/Settings/Personal/Security/Password.php2
-rw-r--r--apps/settings/lib/Settings/Personal/Security/TwoFactor.php16
-rw-r--r--apps/settings/lib/Settings/Personal/Security/WebAuthn.php6
-rw-r--r--apps/settings/lib/Settings/Personal/ServerDevNotice.php10
-rw-r--r--apps/settings/templates/help.php12
-rw-r--r--apps/settings/templates/settings/additional.php2
-rw-r--r--apps/settings/templates/settings/admin/additional-mail.php52
-rw-r--r--apps/settings/templates/settings/admin/overview.php8
-rw-r--r--apps/settings/templates/settings/empty.php2
-rw-r--r--apps/settings/templates/settings/frame.php4
-rw-r--r--apps/settings/templates/settings/personal/development.notice.php2
-rw-r--r--apps/settings/templates/settings/personal/security/twofactor.php20
-rw-r--r--apps/settings/tests/Controller/MailSettingsControllerTest.php2
-rw-r--r--apps/settings/tests/Controller/UsersControllerTest.php10
-rw-r--r--apps/settings/tests/Settings/Admin/SecurityTest.php2
-rw-r--r--apps/settings/tests/Settings/Admin/ServerTest.php2
-rw-r--r--apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php2
-rw-r--r--apps/sharebymail/lib/Capabilities.php4
-rw-r--r--apps/systemtags/lib/Activity/Listener.php16
-rw-r--r--apps/systemtags/lib/AppInfo/Application.php2
-rw-r--r--apps/systemtags/lib/Capabilities.php1
-rw-r--r--apps/systemtags/lib/Search/TagSearchProvider.php19
-rw-r--r--apps/testing/lib/AppInfo/Application.php2
-rw-r--r--apps/testing/lib/Controller/ConfigController.php4
-rw-r--r--apps/testing/lib/Controller/LockingController.php12
-rw-r--r--apps/testing/lib/Locking/FakeDBLockingProvider.php3
-rw-r--r--apps/theming/lib/Capabilities.php5
-rw-r--r--apps/theming/lib/Controller/IconController.php2
-rw-r--r--apps/theming/lib/Controller/ThemingController.php11
-rw-r--r--apps/theming/lib/Controller/UserThemeController.php12
-rw-r--r--apps/theming/lib/ITheme.php5
-rw-r--r--apps/theming/lib/IconBuilder.php8
-rw-r--r--apps/theming/lib/Listener/BeforeTemplateRenderedListener.php8
-rw-r--r--apps/theming/lib/Migration/MigrateAdminConfig.php3
-rw-r--r--apps/theming/lib/Migration/MigrateUserConfig.php16
-rw-r--r--apps/theming/lib/ResponseDefinitions.php1
-rw-r--r--apps/theming/lib/Service/BackgroundService.php8
-rw-r--r--apps/theming/lib/Service/JSDataService.php1
-rw-r--r--apps/theming/lib/Service/ThemeInjectionService.php13
-rw-r--r--apps/theming/lib/Service/ThemesService.php46
-rw-r--r--apps/theming/lib/Settings/Admin.php2
-rw-r--r--apps/theming/lib/Settings/Personal.php4
-rw-r--r--apps/theming/lib/Settings/PersonalSection.php4
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php5
-rw-r--r--apps/theming/lib/Themes/DarkHighContrastTheme.php3
-rw-r--r--apps/theming/lib/Themes/DarkTheme.php1
-rw-r--r--apps/theming/lib/Themes/DefaultTheme.php15
-rw-r--r--apps/theming/lib/Themes/DyslexiaFont.php2
-rw-r--r--apps/theming/lib/Themes/HighContrastTheme.php3
-rw-r--r--apps/theming/lib/Themes/LightTheme.php8
-rw-r--r--apps/theming/lib/ThemingDefaults.php16
-rw-r--r--apps/theming/lib/Util.php2
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php2
-rw-r--r--apps/theming/tests/Controller/UserThemeControllerTest.php2
-rw-r--r--apps/theming/tests/IconBuilderTest.php2
-rw-r--r--apps/theming/tests/Service/ThemesServiceTest.php4
-rw-r--r--apps/theming/tests/Settings/PersonalTest.php2
-rw-r--r--apps/theming/tests/Themes/DyslexiaFontTest.php1
-rw-r--r--apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php8
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php8
-rw-r--r--apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php6
-rw-r--r--apps/updatenotification/lib/Controller/APIController.php14
-rw-r--r--apps/updatenotification/lib/Controller/AdminController.php12
-rw-r--r--apps/updatenotification/lib/ResetTokenBackgroundJob.php4
-rw-r--r--apps/updatenotification/lib/ResponseDefinitions.php1
-rw-r--r--apps/updatenotification/lib/Settings/Admin.php6
-rw-r--r--apps/updatenotification/templates/admin.php2
-rw-r--r--apps/updatenotification/tests/Settings/AdminTest.php16
-rw-r--r--apps/user_ldap/ajax/clearMappings.php2
-rw-r--r--apps/user_ldap/lib/Access.php12
-rw-r--r--apps/user_ldap/lib/AppInfo/Application.php2
-rw-r--r--apps/user_ldap/lib/Command/CheckUser.php18
-rw-r--r--apps/user_ldap/lib/Command/DeleteConfig.php8
-rw-r--r--apps/user_ldap/lib/Command/Search.php42
-rw-r--r--apps/user_ldap/lib/Command/SetConfig.php24
-rw-r--r--apps/user_ldap/lib/Command/ShowConfig.php30
-rw-r--r--apps/user_ldap/lib/Command/UpdateUUID.php27
-rw-r--r--apps/user_ldap/lib/DataCollector/LdapDataCollector.php4
-rw-r--r--apps/user_ldap/lib/GroupPluginManager.php2
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php2
-rw-r--r--apps/user_ldap/lib/Helper.php2
-rw-r--r--apps/user_ldap/lib/Jobs/CleanUp.php4
-rw-r--r--apps/user_ldap/lib/Jobs/UpdateGroups.php2
-rw-r--r--apps/user_ldap/lib/LDAP.php4
-rw-r--r--apps/user_ldap/lib/Migration/GroupMappingMigration.php2
-rw-r--r--apps/user_ldap/lib/Migration/SetDefaultProvider.php2
-rw-r--r--apps/user_ldap/lib/Migration/UUIDFixUser.php2
-rw-r--r--apps/user_ldap/lib/Migration/Version1010Date20200630192842.php2
-rw-r--r--apps/user_ldap/lib/Migration/Version1120Date20210917155206.php1
-rw-r--r--apps/user_ldap/lib/User/Manager.php2
-rw-r--r--apps/user_ldap/lib/User/User.php4
-rw-r--r--apps/user_ldap/lib/User_Proxy.php2
-rw-r--r--apps/user_ldap/lib/Wizard.php6
-rw-r--r--apps/user_ldap/tests/Group_LDAPTest.php2
-rw-r--r--apps/user_ldap/tests/Migration/UUIDFixInsertTest.php4
-rw-r--r--apps/user_ldap/tests/UserLDAPPluginTest.php4
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php2
-rw-r--r--apps/user_status/lib/AppInfo/Application.php2
-rw-r--r--apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php2
-rw-r--r--apps/user_status/lib/Connector/UserStatus.php2
-rw-r--r--apps/user_status/lib/Connector/UserStatusProvider.php2
-rw-r--r--apps/user_status/lib/ContactsMenu/StatusProvider.php2
-rw-r--r--apps/user_status/lib/Controller/HeartbeatController.php12
-rw-r--r--apps/user_status/lib/Controller/PredefinedStatusController.php4
-rw-r--r--apps/user_status/lib/Controller/StatusesController.php4
-rw-r--r--apps/user_status/lib/Controller/UserStatusController.php6
-rw-r--r--apps/user_status/lib/Dashboard/UserStatusWidget.php16
-rw-r--r--apps/user_status/lib/Db/UserStatusMapper.php2
-rw-r--r--apps/user_status/lib/Listener/UserDeletedListener.php2
-rw-r--r--apps/user_status/lib/Listener/UserLiveStatusListener.php8
-rw-r--r--apps/user_status/lib/Migration/Version0001Date20200602134824.php2
-rw-r--r--apps/user_status/lib/ResponseDefinitions.php1
-rw-r--r--apps/user_status/lib/Service/JSDataService.php2
-rw-r--r--apps/user_status/lib/Service/StatusService.php39
-rw-r--r--apps/user_status/tests/Unit/Connector/UserStatusTest.php2
-rw-r--r--apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php44
-rw-r--r--apps/user_status/tests/Unit/Db/UserStatusMapperTest.php2
-rw-r--r--apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php14
-rw-r--r--apps/user_status/tests/Unit/Service/StatusServiceTest.php54
-rw-r--r--apps/weather_status/lib/AppInfo/Application.php2
-rw-r--r--apps/weather_status/lib/Capabilities.php4
-rw-r--r--apps/weather_status/lib/ResponseDefinitions.php1
-rw-r--r--apps/workflowengine/lib/AppInfo/Application.php4
-rw-r--r--apps/workflowengine/lib/BackgroundJobs/Rotate.php2
-rw-r--r--apps/workflowengine/lib/Check/FileSystemTags.php2
-rw-r--r--apps/workflowengine/lib/Listener/LoadAdditionalSettingsScriptsListener.php2
-rw-r--r--apps/workflowengine/lib/Manager.php2
-rw-r--r--apps/workflowengine/lib/Migration/Version2000Date20190808074233.php2
523 files changed, 1832 insertions, 1909 deletions
diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php
index bfd67f474f9..238ed10e4d9 100644
--- a/apps/admin_audit/lib/Actions/Action.php
+++ b/apps/admin_audit/lib/Actions/Action.php
@@ -34,7 +34,8 @@ class Action {
public function __construct(
private IAuditLogger $logger,
- ) {}
+ ) {
+ }
/**
* Log a single action with a log level of info
@@ -45,9 +46,9 @@ class Action {
* @param bool $obfuscateParameters
*/
public function log(string $text,
- array $params,
- array $elements,
- bool $obfuscateParameters = false): void {
+ array $params,
+ array $elements,
+ bool $obfuscateParameters = false): void {
foreach ($elements as $element) {
if (!isset($params[$element])) {
if ($obfuscateParameters) {
diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php
index 02d5b60d2fa..c66793d8a5b 100644
--- a/apps/admin_audit/lib/Actions/UserManagement.php
+++ b/apps/admin_audit/lib/Actions/UserManagement.php
@@ -61,7 +61,7 @@ class UserManagement extends Action {
*/
public function assign(string $uid): void {
$this->log(
- 'UserID assigned: "%s"',
+ 'UserID assigned: "%s"',
[ 'uid' => $uid ],
[ 'uid' ]
);
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
index 1daf9f18ef0..d034e79e0c2 100644
--- a/apps/admin_audit/lib/AppInfo/Application.php
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -101,7 +101,7 @@ class Application extends App implements IBootstrap {
* Register hooks in order to log them
*/
private function registerHooks(IAuditLogger $logger,
- ContainerInterface $serverContainer): void {
+ ContainerInterface $serverContainer): void {
$this->userManagementHooks($logger, $serverContainer->get(IUserSession::class));
$this->groupHooks($logger, $serverContainer->get(IGroupManager::class));
$this->authHooks($logger);
@@ -122,7 +122,7 @@ class Application extends App implements IBootstrap {
}
private function userManagementHooks(IAuditLogger $logger,
- IUserSession $userSession): void {
+ IUserSession $userSession): void {
$userActions = new UserManagement($logger);
Util::connectHook('OC_User', 'post_createUser', $userActions, 'create');
@@ -136,7 +136,7 @@ class Application extends App implements IBootstrap {
}
private function groupHooks(IAuditLogger $logger,
- IGroupManager $groupManager): void {
+ IGroupManager $groupManager): void {
$groupActions = new GroupManagement($logger);
assert($groupManager instanceof GroupManager);
@@ -167,7 +167,7 @@ class Application extends App implements IBootstrap {
}
private function appHooks(IAuditLogger $logger,
- IEventDispatcher $eventDispatcher): void {
+ IEventDispatcher $eventDispatcher): void {
$eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) {
$appActions = new AppManagement($logger);
$appActions->enableApp($event->getAppID());
@@ -183,7 +183,7 @@ class Application extends App implements IBootstrap {
}
private function consoleHooks(IAuditLogger $logger,
- IEventDispatcher $eventDispatcher): void {
+ IEventDispatcher $eventDispatcher): void {
$eventDispatcher->addListener(ConsoleEvent::class, function (ConsoleEvent $event) use ($logger) {
$appActions = new Console($logger);
$appActions->runCommand($event->getArguments());
@@ -191,7 +191,7 @@ class Application extends App implements IBootstrap {
}
private function fileHooks(IAuditLogger $logger,
- IEventDispatcher $eventDispatcher): void {
+ IEventDispatcher $eventDispatcher): void {
$fileActions = new Files($logger);
$eventDispatcher->addListener(
BeforePreviewFetchedEvent::class,
@@ -264,7 +264,7 @@ class Application extends App implements IBootstrap {
}
private function securityHooks(IAuditLogger $logger,
- IEventDispatcher $eventDispatcher): void {
+ IEventDispatcher $eventDispatcher): void {
$eventDispatcher->addListener(TwoFactorProviderChallengePassed::class, function (TwoFactorProviderChallengePassed $event) use ($logger) {
$security = new Security($logger);
$security->twofactorSuccess($event->getUser(), $event->getProvider());
diff --git a/apps/admin_audit/lib/BackgroundJobs/Rotate.php b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
index ce441be11f6..4482a45df4e 100755
--- a/apps/admin_audit/lib/BackgroundJobs/Rotate.php
+++ b/apps/admin_audit/lib/BackgroundJobs/Rotate.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
*/
namespace OCA\AdminAudit\BackgroundJobs;
-use OCP\BackgroundJob\TimedJob;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;
use OCP\Log\RotationTrait;
diff --git a/apps/cloud_federation_api/appinfo/routes.php b/apps/cloud_federation_api/appinfo/routes.php
index 966ff2ce3a1..ad508e13277 100644
--- a/apps/cloud_federation_api/appinfo/routes.php
+++ b/apps/cloud_federation_api/appinfo/routes.php
@@ -38,11 +38,11 @@ return [
'verb' => 'POST',
'root' => '/ocm',
],
-// [
-// 'name' => 'RequestHandler#inviteAccepted',
-// 'url' => '/invite-accepted',
-// 'verb' => 'POST',
-// 'root' => '/ocm',
-// ]
+ // [
+ // 'name' => 'RequestHandler#inviteAccepted',
+ // 'url' => '/invite-accepted',
+ // 'verb' => 'POST',
+ // 'root' => '/ocm',
+ // ]
],
];
diff --git a/apps/cloud_federation_api/lib/ResponseDefinitions.php b/apps/cloud_federation_api/lib/ResponseDefinitions.php
index 7f916d6c6cd..69090e6196f 100644
--- a/apps/cloud_federation_api/lib/ResponseDefinitions.php
+++ b/apps/cloud_federation_api/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php
index db147970a64..a6d6d9fb78d 100644
--- a/apps/comments/lib/AppInfo/Application.php
+++ b/apps/comments/lib/AppInfo/Application.php
@@ -34,8 +34,8 @@ use OCA\Comments\Listener\LoadAdditionalScripts;
use OCA\Comments\Listener\LoadSidebarScripts;
use OCA\Comments\MaxAutoCompleteResultsInitialState;
use OCA\Comments\Notification\Notifier;
-use OCA\Comments\Search\LegacyProvider;
use OCA\Comments\Search\CommentsSearchProvider;
+use OCA\Comments\Search\LegacyProvider;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSidebar;
use OCP\AppFramework\App;
@@ -43,9 +43,9 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Comments\CommentsEntityEvent;
+use OCP\Comments\ICommentsManager;
use OCP\ISearch;
use OCP\IServerContainer;
-use OCP\Comments\ICommentsManager;
class Application extends App implements IBootstrap {
public const APP_ID = 'comments';
diff --git a/apps/comments/lib/Controller/NotificationsController.php b/apps/comments/lib/Controller/NotificationsController.php
index b0255e62639..cc37dc628be 100644
--- a/apps/comments/lib/Controller/NotificationsController.php
+++ b/apps/comments/lib/Controller/NotificationsController.php
@@ -25,10 +25,10 @@
namespace OCA\Comments\Controller;
use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\RedirectResponse;
-use OCP\AppFramework\Http;
use OCP\Comments\IComment;
use OCP\Comments\ICommentsManager;
use OCP\Files\IRootFolder;
diff --git a/apps/comments/lib/Search/LegacyProvider.php b/apps/comments/lib/Search/LegacyProvider.php
index bb67b30c077..55f7ef8eeb9 100644
--- a/apps/comments/lib/Search/LegacyProvider.php
+++ b/apps/comments/lib/Search/LegacyProvider.php
@@ -26,12 +26,12 @@ declare(strict_types=1);
namespace OCA\Comments\Search;
use OCP\Comments\IComment;
+use OCP\Comments\ICommentsManager;
use OCP\Files\Folder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\IUser;
use OCP\Search\Provider;
-use OCP\Comments\ICommentsManager;
use function count;
class LegacyProvider extends Provider {
diff --git a/apps/contactsinteraction/lib/Db/CardSearchDao.php b/apps/contactsinteraction/lib/Db/CardSearchDao.php
index 6bd6538257c..7fd8cb2ab3c 100644
--- a/apps/contactsinteraction/lib/Db/CardSearchDao.php
+++ b/apps/contactsinteraction/lib/Db/CardSearchDao.php
@@ -39,9 +39,9 @@ class CardSearchDao {
}
public function findExisting(IUser $user,
- ?string $uid,
- ?string $email,
- ?string $cloudId): ?string {
+ ?string $uid,
+ ?string $email,
+ ?string $cloudId): ?string {
$addressbooksQuery = $this->db->getQueryBuilder();
$cardQuery = $this->db->getQueryBuilder();
$propQuery = $this->db->getQueryBuilder();
diff --git a/apps/contactsinteraction/lib/Db/RecentContactMapper.php b/apps/contactsinteraction/lib/Db/RecentContactMapper.php
index 49a705af570..257c888e818 100644
--- a/apps/contactsinteraction/lib/Db/RecentContactMapper.php
+++ b/apps/contactsinteraction/lib/Db/RecentContactMapper.php
@@ -74,9 +74,9 @@ class RecentContactMapper extends QBMapper {
* @return RecentContact[]
*/
public function findMatch(IUser $user,
- ?string $uid,
- ?string $email,
- ?string $cloudId): array {
+ ?string $uid,
+ ?string $email,
+ ?string $cloudId): array {
$qb = $this->db->getQueryBuilder();
$or = $qb->expr()->orX();
diff --git a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
index 499a9f28ca5..58be052d2f3 100644
--- a/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
+++ b/apps/contactsinteraction/lib/Listeners/ContactInteractionListener.php
@@ -38,9 +38,7 @@ use OCP\IL10N;
use OCP\IUserManager;
use Psr\Log\LoggerInterface;
use Sabre\VObject\Component\VCard;
-use Sabre\VObject\Reader;
use Sabre\VObject\UUIDUtil;
-use Throwable;
class ContactInteractionListener implements IEventListener {
diff --git a/apps/dashboard/lib/Controller/DashboardApiController.php b/apps/dashboard/lib/Controller/DashboardApiController.php
index e62c21bcc4a..35db52225da 100644
--- a/apps/dashboard/lib/Controller/DashboardApiController.php
+++ b/apps/dashboard/lib/Controller/DashboardApiController.php
@@ -29,25 +29,24 @@ declare(strict_types=1);
namespace OCA\Dashboard\Controller;
use OCA\Dashboard\ResponseDefinitions;
-use OCP\AppFramework\OCSController;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\OCSController;
+use OCP\Dashboard\IAPIWidget;
+use OCP\Dashboard\IAPIWidgetV2;
use OCP\Dashboard\IButtonWidget;
use OCP\Dashboard\IIconWidget;
-use OCP\Dashboard\IOptionWidget;
use OCP\Dashboard\IManager;
+use OCP\Dashboard\IOptionWidget;
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\IConfig;
use OCP\IRequest;
-use OCP\Dashboard\IAPIWidget;
-use OCP\Dashboard\IAPIWidgetV2;
-use OCP\Dashboard\Model\WidgetItem;
-use OCP\Dashboard\Model\WidgetItems;
-
/**
* @psalm-import-type DashboardWidget from ResponseDefinitions
* @psalm-import-type DashboardWidgetItem from ResponseDefinitions
diff --git a/apps/dashboard/lib/ResponseDefinitions.php b/apps/dashboard/lib/ResponseDefinitions.php
index b35531be2a7..5592af1a324 100644
--- a/apps/dashboard/lib/ResponseDefinitions.php
+++ b/apps/dashboard/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php
index 24a81e9af94..8ea9c5dcb4e 100644
--- a/apps/dav/appinfo/v1/caldav.php
+++ b/apps/dav/appinfo/v1/caldav.php
@@ -28,8 +28,8 @@
// Backends
use OC\KnownUser\KnownUserService;
use OCA\DAV\CalDAV\CalDavBackend;
-use OCA\DAV\Connector\LegacyDAVACL;
use OCA\DAV\CalDAV\CalendarRoot;
+use OCA\DAV\Connector\LegacyDAVACL;
use OCA\DAV\Connector\Sabre\Auth;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
use OCA\DAV\Connector\Sabre\MaintenancePlugin;
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index 52f44ee0235..1284e7cae75 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -69,10 +69,6 @@ use OCA\DAV\Events\CardDeletedEvent;
use OCA\DAV\Events\CardUpdatedEvent;
use OCA\DAV\Events\SubscriptionCreatedEvent;
use OCA\DAV\Events\SubscriptionDeletedEvent;
-use OCA\DAV\Listener\OutOfOfficeListener;
-use OCP\Accounts\UserUpdatedEvent;
-use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCA\DAV\HookManager;
use OCA\DAV\Listener\ActivityUpdaterListener;
use OCA\DAV\Listener\AddressbookListener;
@@ -84,6 +80,7 @@ use OCA\DAV\Listener\CalendarPublicationListener;
use OCA\DAV\Listener\CalendarShareUpdateListener;
use OCA\DAV\Listener\CardListener;
use OCA\DAV\Listener\ClearPhotoCacheListener;
+use OCA\DAV\Listener\OutOfOfficeListener;
use OCA\DAV\Listener\SubscriptionListener;
use OCA\DAV\Listener\TrustedServerRemovedListener;
use OCA\DAV\Listener\UserPreferenceListener;
@@ -93,6 +90,7 @@ use OCA\DAV\Search\TasksSearchProvider;
use OCA\DAV\SetupChecks\NeedsSystemAddressBookSync;
use OCA\DAV\UserMigration\CalendarMigrator;
use OCA\DAV\UserMigration\ContactsMigrator;
+use OCP\Accounts\UserUpdatedEvent;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
@@ -102,6 +100,8 @@ use OCP\Calendar\IManager as ICalendarManager;
use OCP\Config\BeforePreferenceDeletedEvent;
use OCP\Config\BeforePreferenceSetEvent;
use OCP\Contacts\IManager as IContactsManager;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCP\Files\AppData\IAppDataFactory;
use OCP\IUser;
use OCP\User\Events\OutOfOfficeChangedEvent;
@@ -224,8 +224,8 @@ class Application extends App implements IBootstrap {
}
public function registerHooks(HookManager $hm,
- IEventDispatcher $dispatcher,
- IAppContainer $container) {
+ IEventDispatcher $dispatcher,
+ IAppContainer $container) {
$hm->setup();
// first time login event setup
@@ -268,8 +268,8 @@ class Application extends App implements IBootstrap {
}
private function setupContactsProvider(IContactsManager $contactsManager,
- IAppContainer $container,
- string $userID): void {
+ IAppContainer $container,
+ string $userID): void {
/** @var ContactsManager $cm */
$cm = $container->query(ContactsManager::class);
$urlGenerator = $container->getServer()->getURLGenerator();
@@ -277,7 +277,7 @@ class Application extends App implements IBootstrap {
}
private function setupSystemContactsProvider(IContactsManager $contactsManager,
- IAppContainer $container): void {
+ IAppContainer $container): void {
/** @var ContactsManager $cm */
$cm = $container->query(ContactsManager::class);
$urlGenerator = $container->getServer()->getURLGenerator();
@@ -285,7 +285,7 @@ class Application extends App implements IBootstrap {
}
public function registerCalendarManager(ICalendarManager $calendarManager,
- IAppContainer $container): void {
+ IAppContainer $container): void {
$calendarManager->register(function () use ($container, $calendarManager) {
$user = \OC::$server->getUserSession()->getUser();
if ($user !== null) {
@@ -295,14 +295,14 @@ class Application extends App implements IBootstrap {
}
private function setupCalendarProvider(ICalendarManager $calendarManager,
- IAppContainer $container,
- $userId) {
+ IAppContainer $container,
+ $userId) {
$cm = $container->query(CalendarManager::class);
$cm->setupCalendarProvider($calendarManager, $userId);
}
public function registerCalendarReminders(NotificationProviderManager $manager,
- LoggerInterface $logger): void {
+ LoggerInterface $logger): void {
try {
$manager->registerProvider(AudioProvider::class);
$manager->registerProvider(EmailProvider::class);
diff --git a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php
index a2607ca13c4..d1cafbf57c2 100644
--- a/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/BuildReminderIndexBackgroundJob.php
@@ -59,10 +59,10 @@ class BuildReminderIndexBackgroundJob extends QueuedJob {
* BuildReminderIndexBackgroundJob constructor.
*/
public function __construct(IDBConnection $db,
- ReminderService $reminderService,
- LoggerInterface $logger,
- IJobList $jobList,
- ITimeFactory $timeFactory) {
+ ReminderService $reminderService,
+ LoggerInterface $logger,
+ IJobList $jobList,
+ ITimeFactory $timeFactory) {
parent::__construct($timeFactory);
$this->db = $db;
$this->reminderService = $reminderService;
diff --git a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php
index b57ed07d5c2..96ceb644489 100644
--- a/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php
+++ b/apps/dav/lib/BackgroundJob/CalendarRetentionJob.php
@@ -34,7 +34,7 @@ class CalendarRetentionJob extends TimedJob {
private $service;
public function __construct(ITimeFactory $time,
- RetentionService $service) {
+ RetentionService $service) {
parent::__construct($time);
$this->service = $service;
diff --git a/apps/dav/lib/BackgroundJob/EventReminderJob.php b/apps/dav/lib/BackgroundJob/EventReminderJob.php
index 55cecf5519d..f628a728404 100644
--- a/apps/dav/lib/BackgroundJob/EventReminderJob.php
+++ b/apps/dav/lib/BackgroundJob/EventReminderJob.php
@@ -40,8 +40,8 @@ class EventReminderJob extends TimedJob {
private $config;
public function __construct(ITimeFactory $time,
- ReminderService $reminderService,
- IConfig $config) {
+ ReminderService $reminderService,
+ IConfig $config) {
parent::__construct($time);
$this->reminderService = $reminderService;
$this->config = $config;
diff --git a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php
index 8e72e8f076c..220050b3927 100644
--- a/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/GenerateBirthdayCalendarBackgroundJob.php
@@ -39,8 +39,8 @@ class GenerateBirthdayCalendarBackgroundJob extends QueuedJob {
private $config;
public function __construct(ITimeFactory $time,
- BirthdayService $birthdayService,
- IConfig $config) {
+ BirthdayService $birthdayService,
+ IConfig $config) {
parent::__construct($time);
$this->birthdayService = $birthdayService;
diff --git a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php
index deca55a26cb..74969069387 100644
--- a/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php
+++ b/apps/dav/lib/BackgroundJob/PruneOutdatedSyncTokensJob.php
@@ -25,11 +25,11 @@ declare(strict_types=1);
*/
namespace OCA\DAV\BackgroundJob;
-use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\BackgroundJob\TimedJob;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CardDAV\CardDavBackend;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;
use Psr\Log\LoggerInterface;
diff --git a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php
index 85da81b3b91..8c0b5e3ea45 100644
--- a/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php
+++ b/apps/dav/lib/BackgroundJob/RegisterRegenerateBirthdayCalendars.php
@@ -49,8 +49,8 @@ class RegisterRegenerateBirthdayCalendars extends QueuedJob {
* @param IJobList $jobList
*/
public function __construct(ITimeFactory $time,
- IUserManager $userManager,
- IJobList $jobList) {
+ IUserManager $userManager,
+ IJobList $jobList) {
parent::__construct($time);
$this->userManager = $userManager;
$this->jobList = $jobList;
diff --git a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
index f0ff16d3f2f..b4571e2509d 100644
--- a/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
+++ b/apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php
@@ -55,10 +55,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
private $calDavBackend;
public function __construct(ITimeFactory $time,
- IResourceManager $resourceManager,
- IRoomManager $roomManager,
- IDBConnection $dbConnection,
- CalDavBackend $calDavBackend) {
+ IResourceManager $resourceManager,
+ IRoomManager $roomManager,
+ IDBConnection $dbConnection,
+ CalDavBackend $calDavBackend) {
parent::__construct($time);
$this->resourceManager = $resourceManager;
$this->roomManager = $roomManager;
@@ -101,10 +101,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param string $principalPrefix
*/
private function runForBackend($backendManager,
- string $dbTable,
- string $dbTableMetadata,
- string $foreignKey,
- string $principalPrefix): void {
+ string $dbTable,
+ string $dbTableMetadata,
+ string $foreignKey,
+ string $principalPrefix): void {
$backends = $backendManager->getBackends();
foreach ($backends as $backend) {
@@ -194,8 +194,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @return int Insert id
*/
private function addToCache(string $table,
- string $backendId,
- $remote): int {
+ string $backendId,
+ $remote): int {
$query = $this->dbConnection->getQueryBuilder();
$query->insert($table)
->values([
@@ -219,9 +219,9 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param array $metadata
*/
private function addMetadataToCache(string $table,
- string $foreignKey,
- int $foreignId,
- array $metadata): void {
+ string $foreignKey,
+ int $foreignId,
+ array $metadata): void {
foreach ($metadata as $key => $value) {
$query = $this->dbConnection->getQueryBuilder();
$query->insert($table)
@@ -241,7 +241,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param int $id
*/
private function deleteFromCache(string $table,
- int $id): void {
+ int $id): void {
$query = $this->dbConnection->getQueryBuilder();
$query->delete($table)
->where($query->expr()->eq('id', $query->createNamedParameter($id)))
@@ -254,8 +254,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param int $id
*/
private function deleteMetadataFromCache(string $table,
- string $foreignKey,
- int $id): void {
+ string $foreignKey,
+ int $id): void {
$query = $this->dbConnection->getQueryBuilder();
$query->delete($table)
->where($query->expr()->eq($foreignKey, $query->createNamedParameter($id)))
@@ -270,8 +270,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param IResource|IRoom $remote
*/
private function updateCache(string $table,
- int $id,
- $remote): void {
+ int $id,
+ $remote): void {
$query = $this->dbConnection->getQueryBuilder();
$query->update($table)
->set('email', $query->createNamedParameter($remote->getEMail()))
@@ -292,10 +292,10 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param array $cachedMetadata
*/
private function updateMetadataCache(string $dbTable,
- string $foreignKey,
- int $id,
- array $metadata,
- array $cachedMetadata): void {
+ string $foreignKey,
+ int $id,
+ array $metadata,
+ array $cachedMetadata): void {
$newMetadata = array_diff_key($metadata, $cachedMetadata);
$deletedMetadata = array_diff_key($cachedMetadata, $metadata);
@@ -371,8 +371,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @return array
*/
private function getAllMetadataOfCache(string $table,
- string $foreignKey,
- int $id): array {
+ string $foreignKey,
+ int $id): array {
$query = $this->dbConnection->getQueryBuilder();
$query->select(['key', 'value'])
->from($table)
@@ -398,7 +398,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @return array
*/
private function getAllCachedByBackend(string $tableName,
- string $backendId): array {
+ string $backendId): array {
$query = $this->dbConnection->getQueryBuilder();
$query->select('resource_id')
->from($tableName)
@@ -417,7 +417,7 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @param $principalUri
*/
private function deleteCalendarDataForResource(string $principalPrefix,
- string $principalUri): void {
+ string $principalUri): void {
$calendar = $this->calDavBackend->getCalendarByUri(
implode('/', [$principalPrefix, $principalUri]),
CalDavBackend::RESOURCE_BOOKING_CALENDAR_URI);
@@ -438,8 +438,8 @@ class UpdateCalendarResourcesRoomsBackgroundJob extends TimedJob {
* @return int
*/
private function getIdForBackendAndResource(string $table,
- string $backendId,
- string $resourceId): int {
+ string $backendId,
+ string $resourceId): int {
$query = $this->dbConnection->getQueryBuilder();
$query->select('id')
->from($table)
diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php
index 3a6f296deaf..c35aff4d15a 100644
--- a/apps/dav/lib/BackgroundJob/UploadCleanup.php
+++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php
@@ -32,7 +32,6 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\TimedJob;
-use OCP\Files\Node;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
diff --git a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php
index 43fccbf233e..53184be6f25 100644
--- a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php
+++ b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php
@@ -46,11 +46,11 @@ class UserStatusAutomation extends TimedJob {
protected IConfig $config;
public function __construct(ITimeFactory $timeFactory,
- IDBConnection $connection,
- IJobList $jobList,
- LoggerInterface $logger,
- IManager $manager,
- IConfig $config) {
+ IDBConnection $connection,
+ IJobList $jobList,
+ LoggerInterface $logger,
+ IManager $manager,
+ IConfig $config) {
parent::__construct($timeFactory);
$this->connection = $connection;
$this->jobList = $jobList;
diff --git a/apps/dav/lib/BulkUpload/BulkUploadPlugin.php b/apps/dav/lib/BulkUpload/BulkUploadPlugin.php
index dab4bbffc6e..66e2a9efa2e 100644
--- a/apps/dav/lib/BulkUpload/BulkUploadPlugin.php
+++ b/apps/dav/lib/BulkUpload/BulkUploadPlugin.php
@@ -23,15 +23,15 @@
namespace OCA\DAV\BulkUpload;
+use OCA\DAV\Connector\Sabre\MtimeSanitizer;
+use OCP\AppFramework\Http;
+use OCP\Files\DavUtil;
+use OCP\Files\Folder;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use OCP\Files\DavUtil;
-use OCP\Files\Folder;
-use OCP\AppFramework\Http;
-use OCA\DAV\Connector\Sabre\MtimeSanitizer;
class BulkUploadPlugin extends ServerPlugin {
private Folder $userFolder;
diff --git a/apps/dav/lib/BulkUpload/MultipartRequestParser.php b/apps/dav/lib/BulkUpload/MultipartRequestParser.php
index 16c83fee64e..930e86c28b5 100644
--- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php
+++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php
@@ -22,11 +22,11 @@
namespace OCA\DAV\BulkUpload;
-use Sabre\HTTP\RequestInterface;
+use OCP\AppFramework\Http;
use Sabre\DAV\Exception;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\LengthRequired;
-use OCP\AppFramework\Http;
+use Sabre\HTTP\RequestInterface;
class MultipartRequestParser {
diff --git a/apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php b/apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php
index d67f1f5a816..68b71404371 100644
--- a/apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php
+++ b/apps/dav/lib/CalDAV/AppCalendar/AppCalendar.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
@@ -25,8 +26,8 @@ declare(strict_types=1);
namespace OCA\DAV\CalDAV\AppCalendar;
-use OCA\DAV\CalDAV\Plugin;
use OCA\DAV\CalDAV\Integration\ExternalCalendar;
+use OCA\DAV\CalDAV\Plugin;
use OCP\Calendar\ICalendar;
use OCP\Calendar\ICreateFromString;
use OCP\Constants;
diff --git a/apps/dav/lib/CalDAV/AppCalendar/AppCalendarPlugin.php b/apps/dav/lib/CalDAV/AppCalendar/AppCalendarPlugin.php
index cdf7cb9059a..ddf76e27f3a 100644
--- a/apps/dav/lib/CalDAV/AppCalendar/AppCalendarPlugin.php
+++ b/apps/dav/lib/CalDAV/AppCalendar/AppCalendarPlugin.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/dav/lib/CalDAV/AppCalendar/CalendarObject.php b/apps/dav/lib/CalDAV/AppCalendar/CalendarObject.php
index 985b137c955..bfcab35f74e 100644
--- a/apps/dav/lib/CalDAV/AppCalendar/CalendarObject.php
+++ b/apps/dav/lib/CalDAV/AppCalendar/CalendarObject.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index 70b2e859f89..95176283f11 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -67,11 +67,11 @@ class BirthdayService {
* BirthdayService constructor.
*/
public function __construct(CalDavBackend $calDavBackEnd,
- CardDavBackend $cardDavBackEnd,
- GroupPrincipalBackend $principalBackend,
- IConfig $config,
- IDBConnection $dbConnection,
- IL10N $l10n) {
+ CardDavBackend $cardDavBackEnd,
+ GroupPrincipalBackend $principalBackend,
+ IConfig $config,
+ IDBConnection $dbConnection,
+ IL10N $l10n) {
$this->calDavBackEnd = $calDavBackEnd;
$this->cardDavBackEnd = $cardDavBackEnd;
$this->principalBackend = $principalBackend;
@@ -81,8 +81,8 @@ class BirthdayService {
}
public function onCardChanged(int $addressBookId,
- string $cardUri,
- string $cardData): void {
+ string $cardUri,
+ string $cardData): void {
if (!$this->isGloballyEnabled()) {
return;
}
@@ -117,7 +117,7 @@ class BirthdayService {
}
public function onCardDeleted(int $addressBookId,
- string $cardUri): void {
+ string $cardUri): void {
if (!$this->isGloballyEnabled()) {
return;
}
@@ -164,9 +164,9 @@ class BirthdayService {
* @throws InvalidDataException
*/
public function buildDateFromContact(string $cardData,
- string $dateField,
- string $postfix,
- ?string $reminderOffset):?VCalendar {
+ string $dateField,
+ string $postfix,
+ ?string $reminderOffset):?VCalendar {
if (empty($cardData)) {
return null;
}
@@ -322,7 +322,7 @@ class BirthdayService {
* @return bool
*/
public function birthdayEvenChanged(string $existingCalendarData,
- VCalendar $newCalendarData):bool {
+ VCalendar $newCalendarData):bool {
try {
$existingBirthday = Reader::read($existingCalendarData);
} catch (Exception $ex) {
@@ -366,11 +366,11 @@ class BirthdayService {
* @throws \Sabre\DAV\Exception\BadRequest
*/
private function updateCalendar(string $cardUri,
- string $cardData,
- array $book,
- int $calendarId,
- array $type,
- ?string $reminderOffset):void {
+ string $cardData,
+ array $book,
+ int $calendarId,
+ array $type,
+ ?string $reminderOffset):void {
$objectUri = $book['uri'] . '-' . $cardUri . $type['postfix'] . '.ics';
$calendarData = $this->buildDateFromContact($cardData, $type['field'], $type['postfix'], $reminderOffset);
$existing = $this->calDavBackEnd->getCalendarObject($calendarId, $objectUri);
@@ -469,9 +469,9 @@ class BirthdayService {
* @return string The formatted title
*/
private function formatTitle(string $field,
- string $name,
- int $year = null,
- bool $supports4Byte = true):string {
+ string $name,
+ int $year = null,
+ bool $supports4Byte = true):string {
if ($supports4Byte) {
switch ($field) {
case 'BDAY':
diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php
index de20c9ac3ae..397cff38037 100644
--- a/apps/dav/lib/CalDAV/CalendarImpl.php
+++ b/apps/dav/lib/CalDAV/CalendarImpl.php
@@ -33,7 +33,6 @@ use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer;
use OCP\Calendar\Exceptions\CalendarException;
use OCP\Calendar\ICreateFromString;
use OCP\Calendar\IHandleImipMessage;
-use OCP\Calendar\ISchedulingInformation;
use OCP\Constants;
use Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp;
use Sabre\DAV\Exception\Conflict;
@@ -52,8 +51,8 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage {
private array $calendarInfo;
public function __construct(Calendar $calendar,
- array $calendarInfo,
- CalDavBackend $backend) {
+ array $calendarInfo,
+ CalDavBackend $backend) {
$this->calendar = $calendar;
$this->calendarInfo = $calendarInfo;
$this->backend = $backend;
diff --git a/apps/dav/lib/CalDAV/CalendarObject.php b/apps/dav/lib/CalDAV/CalendarObject.php
index 32bcff900c2..7f4bd9054e0 100644
--- a/apps/dav/lib/CalDAV/CalendarObject.php
+++ b/apps/dav/lib/CalDAV/CalendarObject.php
@@ -45,8 +45,8 @@ class CalendarObject extends \Sabre\CalDAV\CalendarObject {
* @param array $objectData
*/
public function __construct(CalDavBackend $caldavBackend, IL10N $l10n,
- array $calendarInfo,
- array $objectData) {
+ array $calendarInfo,
+ array $objectData) {
parent::__construct($caldavBackend, $calendarInfo, $objectData);
if ($this->isShared()) {
diff --git a/apps/dav/lib/CalDAV/EventComparisonService.php b/apps/dav/lib/CalDAV/EventComparisonService.php
index d8d6ea07ed2..0f9914dcf98 100644
--- a/apps/dav/lib/CalDAV/EventComparisonService.php
+++ b/apps/dav/lib/CalDAV/EventComparisonService.php
@@ -25,15 +25,9 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CalDAV;
-use OCA\DAV\AppInfo\Application;
use OCA\DAV\CalDAV\Schedule\IMipService;
-use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\IConfig;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;
-use Sabre\VObject\Component\VTimeZone;
-use Sabre\VObject\Component\VTodo;
-use function max;
class EventComparisonService {
diff --git a/apps/dav/lib/CalDAV/FreeBusy/FreeBusyGenerator.php b/apps/dav/lib/CalDAV/FreeBusy/FreeBusyGenerator.php
index 29daca4e092..84dd05dfa55 100644
--- a/apps/dav/lib/CalDAV/FreeBusy/FreeBusyGenerator.php
+++ b/apps/dav/lib/CalDAV/FreeBusy/FreeBusyGenerator.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/*
* *
@@ -25,8 +26,6 @@ declare(strict_types=1);
namespace OCA\DAV\CalDAV\FreeBusy;
-use DateTimeInterface;
-use DateTimeZone;
use Sabre\VObject\Component\VCalendar;
/**
diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php
index 4f7dfea2682..a652b6ef1e5 100644
--- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php
+++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php
@@ -52,7 +52,7 @@ class PublicCalendarRoot extends Collection {
* @param IConfig $config
*/
public function __construct(CalDavBackend $caldavBackend, IL10N $l10n,
- IConfig $config, LoggerInterface $logger) {
+ IConfig $config, LoggerInterface $logger) {
$this->caldavBackend = $caldavBackend;
$this->l10n = $l10n;
$this->config = $config;
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
index 1d8505af8ae..fedd918e6a4 100644
--- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
+++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
@@ -114,7 +114,7 @@ class PublishPlugin extends ServerPlugin {
$this->server = $server;
$this->server->on('method:POST', [$this, 'httpPost']);
- $this->server->on('propFind', [$this, 'propFind']);
+ $this->server->on('propFind', [$this, 'propFind']);
}
public function propFind(PropFind $propFind, INode $node) {
@@ -184,72 +184,72 @@ class PublishPlugin extends ServerPlugin {
case '{'.self::NS_CALENDARSERVER.'}publish-calendar':
- // We can only deal with IShareableCalendar objects
- if (!$node instanceof Calendar) {
- return;
- }
- $this->server->transactionType = 'post-publish-calendar';
+ // We can only deal with IShareableCalendar objects
+ if (!$node instanceof Calendar) {
+ return;
+ }
+ $this->server->transactionType = 'post-publish-calendar';
- // Getting ACL info
- $acl = $this->server->getPlugin('acl');
+ // Getting ACL info
+ $acl = $this->server->getPlugin('acl');
- // If there's no ACL support, we allow everything
- if ($acl) {
- /** @var \Sabre\DAVACL\Plugin $acl */
- $acl->checkPrivileges($path, '{DAV:}write');
+ // If there's no ACL support, we allow everything
+ if ($acl) {
+ /** @var \Sabre\DAVACL\Plugin $acl */
+ $acl->checkPrivileges($path, '{DAV:}write');
- $limitSharingToOwner = $this->config->getAppValue('dav', 'limitAddressBookAndCalendarSharingToOwner', 'no') === 'yes';
- $isOwner = $acl->getCurrentUserPrincipal() === $node->getOwner();
- if ($limitSharingToOwner && !$isOwner) {
- return;
+ $limitSharingToOwner = $this->config->getAppValue('dav', 'limitAddressBookAndCalendarSharingToOwner', 'no') === 'yes';
+ $isOwner = $acl->getCurrentUserPrincipal() === $node->getOwner();
+ if ($limitSharingToOwner && !$isOwner) {
+ return;
+ }
}
- }
- $node->setPublishStatus(true);
+ $node->setPublishStatus(true);
- // iCloud sends back the 202, so we will too.
- $response->setStatus(202);
+ // iCloud sends back the 202, so we will too.
+ $response->setStatus(202);
- // Adding this because sending a response body may cause issues,
- // and I wanted some type of indicator the response was handled.
- $response->setHeader('X-Sabre-Status', 'everything-went-well');
+ // Adding this because sending a response body may cause issues,
+ // and I wanted some type of indicator the response was handled.
+ $response->setHeader('X-Sabre-Status', 'everything-went-well');
- // Breaking the event chain
- return false;
+ // Breaking the event chain
+ return false;
case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar':
- // We can only deal with IShareableCalendar objects
- if (!$node instanceof Calendar) {
- return;
- }
- $this->server->transactionType = 'post-unpublish-calendar';
+ // We can only deal with IShareableCalendar objects
+ if (!$node instanceof Calendar) {
+ return;
+ }
+ $this->server->transactionType = 'post-unpublish-calendar';
- // Getting ACL info
- $acl = $this->server->getPlugin('acl');
+ // Getting ACL info
+ $acl = $this->server->getPlugin('acl');
- // If there's no ACL support, we allow everything
- if ($acl) {
- /** @var \Sabre\DAVACL\Plugin $acl */
- $acl->checkPrivileges($path, '{DAV:}write');
+ // If there's no ACL support, we allow everything
+ if ($acl) {
+ /** @var \Sabre\DAVACL\Plugin $acl */
+ $acl->checkPrivileges($path, '{DAV:}write');
- $limitSharingToOwner = $this->config->getAppValue('dav', 'limitAddressBookAndCalendarSharingToOwner', 'no') === 'yes';
- $isOwner = $acl->getCurrentUserPrincipal() === $node->getOwner();
- if ($limitSharingToOwner && !$isOwner) {
- return;
+ $limitSharingToOwner = $this->config->getAppValue('dav', 'limitAddressBookAndCalendarSharingToOwner', 'no') === 'yes';
+ $isOwner = $acl->getCurrentUserPrincipal() === $node->getOwner();
+ if ($limitSharingToOwner && !$isOwner) {
+ return;
+ }
}
- }
- $node->setPublishStatus(false);
+ $node->setPublishStatus(false);
- $response->setStatus(200);
+ $response->setStatus(200);
- // Adding this because sending a response body may cause issues,
- // and I wanted some type of indicator the response was handled.
- $response->setHeader('X-Sabre-Status', 'everything-went-well');
+ // Adding this because sending a response body may cause issues,
+ // and I wanted some type of indicator the response was handled.
+ $response->setHeader('X-Sabre-Status', 'everything-went-well');
- // Breaking the event chain
- return false;
+ // Breaking the event chain
+ return false;
}
}
diff --git a/apps/dav/lib/CalDAV/Reminder/Backend.php b/apps/dav/lib/CalDAV/Reminder/Backend.php
index b0476e9594c..f1f5d8c4ac3 100644
--- a/apps/dav/lib/CalDAV/Reminder/Backend.php
+++ b/apps/dav/lib/CalDAV/Reminder/Backend.php
@@ -51,7 +51,7 @@ class Backend {
* @param ITimeFactory $timeFactory
*/
public function __construct(IDBConnection $db,
- ITimeFactory $timeFactory) {
+ ITimeFactory $timeFactory) {
$this->db = $db;
$this->timeFactory = $timeFactory;
}
@@ -114,17 +114,17 @@ class Backend {
* @return int The insert id
*/
public function insertReminder(int $calendarId,
- int $objectId,
- string $uid,
- bool $isRecurring,
- int $recurrenceId,
- bool $isRecurrenceException,
- string $eventHash,
- string $alarmHash,
- string $type,
- bool $isRelative,
- int $notificationDate,
- bool $isRepeatBased):int {
+ int $objectId,
+ string $uid,
+ bool $isRecurring,
+ int $recurrenceId,
+ bool $isRecurrenceException,
+ string $eventHash,
+ string $alarmHash,
+ string $type,
+ bool $isRelative,
+ int $notificationDate,
+ bool $isRepeatBased):int {
$query = $this->db->getQueryBuilder();
$query->insert('calendar_reminders')
->values([
@@ -153,7 +153,7 @@ class Backend {
* @param int $newNotificationDate
*/
public function updateReminder(int $reminderId,
- int $newNotificationDate):void {
+ int $newNotificationDate):void {
$query = $this->db->getQueryBuilder();
$query->update('calendar_reminders')
->set('notification_date', $query->createNamedParameter($newNotificationDate))
diff --git a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
index e8cbfdd0ab3..1eb3932e611 100644
--- a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
@@ -48,7 +48,7 @@ interface INotificationProvider {
* @return void
*/
public function send(VEvent $vevent,
- ?string $calendarDisplayName,
- array $principalEmailAddresses,
- array $users = []): void;
+ ?string $calendarDisplayName,
+ array $principalEmailAddresses,
+ array $users = []): void;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
index bccbec5fe3c..52c994554cc 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
@@ -69,9 +69,9 @@ abstract class AbstractProvider implements INotificationProvider {
protected $config;
public function __construct(LoggerInterface $logger,
- L10NFactory $l10nFactory,
- IURLGenerator $urlGenerator,
- IConfig $config) {
+ L10NFactory $l10nFactory,
+ IURLGenerator $urlGenerator,
+ IConfig $config) {
$this->logger = $logger;
$this->l10nFactory = $l10nFactory;
$this->urlGenerator = $urlGenerator;
@@ -88,9 +88,9 @@ abstract class AbstractProvider implements INotificationProvider {
* @return void
*/
abstract public function send(VEvent $vevent,
- ?string $calendarDisplayName,
- array $principalEmailAddresses,
- array $users = []): void;
+ ?string $calendarDisplayName,
+ array $principalEmailAddresses,
+ array $users = []): void;
/**
* @return string
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
index da275efdcf1..262ceb479f0 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -58,10 +58,10 @@ class EmailProvider extends AbstractProvider {
private IMailer $mailer;
public function __construct(IConfig $config,
- IMailer $mailer,
- LoggerInterface $logger,
- L10NFactory $l10nFactory,
- IURLGenerator $urlGenerator) {
+ IMailer $mailer,
+ LoggerInterface $logger,
+ L10NFactory $l10nFactory,
+ IURLGenerator $urlGenerator) {
parent::__construct($logger, $l10nFactory, $urlGenerator, $config);
$this->mailer = $mailer;
}
@@ -76,9 +76,9 @@ class EmailProvider extends AbstractProvider {
* @throws \Exception
*/
public function send(VEvent $vevent,
- ?string $calendarDisplayName,
- array $principalEmailAddresses,
- array $users = []):void {
+ ?string $calendarDisplayName,
+ array $principalEmailAddresses,
+ array $users = []):void {
$fallbackLanguage = $this->getFallbackLanguage();
$organizerEmailAddress = null;
@@ -162,9 +162,9 @@ class EmailProvider extends AbstractProvider {
* @param array $eventData
*/
private function addBulletList(IEMailTemplate $template,
- IL10N $l10n,
- string $calendarDisplayName,
- VEvent $vevent):void {
+ IL10N $l10n,
+ string $calendarDisplayName,
+ VEvent $vevent):void {
$template->addBodyListItem($calendarDisplayName, $l10n->t('Calendar:'),
$this->getAbsoluteImagePath('actions/info.png'));
@@ -220,7 +220,7 @@ class EmailProvider extends AbstractProvider {
* @return array<string, string[]>
*/
private function sortEMailAddressesByLanguage(array $emails,
- string $defaultLanguage):array {
+ string $defaultLanguage):array {
$sortedByLanguage = [];
foreach ($emails as $emailAddress => $parameters) {
@@ -435,7 +435,7 @@ class EmailProvider extends AbstractProvider {
}
private function isDayEqual(DateTime $dtStart,
- DateTime $dtEnd):bool {
+ DateTime $dtEnd):bool {
return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d');
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index ab7f12c570a..79e4e44e6d8 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -59,11 +59,11 @@ class PushProvider extends AbstractProvider {
private $timeFactory;
public function __construct(IConfig $config,
- IManager $manager,
- LoggerInterface $logger,
- L10NFactory $l10nFactory,
- IURLGenerator $urlGenerator,
- ITimeFactory $timeFactory) {
+ IManager $manager,
+ LoggerInterface $logger,
+ L10NFactory $l10nFactory,
+ IURLGenerator $urlGenerator,
+ ITimeFactory $timeFactory) {
parent::__construct($logger, $l10nFactory, $urlGenerator, $config);
$this->manager = $manager;
$this->timeFactory = $timeFactory;
@@ -79,9 +79,9 @@ class PushProvider extends AbstractProvider {
* @throws \Exception
*/
public function send(VEvent $vevent,
- ?string $calendarDisplayName,
- array $principalEmailAddresses,
- array $users = []):void {
+ ?string $calendarDisplayName,
+ array $principalEmailAddresses,
+ array $users = []):void {
if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'yes') !== 'yes') {
return;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/Notifier.php b/apps/dav/lib/CalDAV/Reminder/Notifier.php
index c658ef2ff01..271d8e88fa7 100644
--- a/apps/dav/lib/CalDAV/Reminder/Notifier.php
+++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php
@@ -66,8 +66,8 @@ class Notifier implements INotifier {
* @param ITimeFactory $timeFactory
*/
public function __construct(IFactory $factory,
- IURLGenerator $urlGenerator,
- ITimeFactory $timeFactory) {
+ IURLGenerator $urlGenerator,
+ ITimeFactory $timeFactory) {
$this->l10nFactory = $factory;
$this->urlGenerator = $urlGenerator;
$this->timeFactory = $timeFactory;
@@ -102,7 +102,7 @@ class Notifier implements INotifier {
* @throws \Exception
*/
public function prepare(INotification $notification,
- string $languageCode):INotification {
+ string $languageCode):INotification {
if ($notification->getApp() !== Application::APP_ID) {
throw new \InvalidArgumentException('Notification not from this app');
}
@@ -289,7 +289,7 @@ class Notifier implements INotifier {
* @return bool
*/
private function isDayEqual(DateTime $dtStart,
- DateTime $dtEnd):bool {
+ DateTime $dtEnd):bool {
return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d');
}
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index d4b22911099..9ededb8d015 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -98,14 +98,14 @@ class ReminderService {
];
public function __construct(Backend $backend,
- NotificationProviderManager $notificationProviderManager,
- IUserManager $userManager,
- IGroupManager $groupManager,
- CalDavBackend $caldavBackend,
- ITimeFactory $timeFactory,
- IConfig $config,
- LoggerInterface $logger,
- Principal $principalConnector) {
+ NotificationProviderManager $notificationProviderManager,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ CalDavBackend $caldavBackend,
+ ITimeFactory $timeFactory,
+ IConfig $config,
+ LoggerInterface $logger,
+ Principal $principalConnector) {
$this->backend = $backend;
$this->notificationProviderManager = $notificationProviderManager;
$this->userManager = $userManager;
@@ -390,12 +390,12 @@ class ReminderService {
* @return array
*/
private function getRemindersForVAlarm(VAlarm $valarm,
- array $objectData,
- DateTimeZone $calendarTimeZone,
- string $eventHash = null,
- string $alarmHash = null,
- bool $isRecurring = false,
- bool $isRecurrenceException = false):array {
+ array $objectData,
+ DateTimeZone $calendarTimeZone,
+ string $eventHash = null,
+ string $alarmHash = null,
+ bool $isRecurring = false,
+ bool $isRecurrenceException = false):array {
if ($eventHash === null) {
$eventHash = $this->getEventHash($valarm->parent);
}
@@ -490,7 +490,7 @@ class ReminderService {
* @param VEvent $vevent
*/
private function deleteOrProcessNext(array $reminder,
- VObject\Component\VEvent $vevent):void {
+ VObject\Component\VEvent $vevent):void {
if ($reminder['is_repeat_based'] ||
!$reminder['is_recurring'] ||
!$reminder['is_relative'] ||
@@ -673,8 +673,8 @@ class ReminderService {
* @return VEvent|null
*/
private function getVEventByRecurrenceId(VObject\Component\VCalendar $vcalendar,
- int $recurrenceId,
- bool $isRecurrenceException):?VEvent {
+ int $recurrenceId,
+ bool $isRecurrenceException):?VEvent {
$vevents = $this->getAllVEventsFromVCalendar($vcalendar);
if (count($vevents) === 0) {
return null;
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
index 32642bee195..92c61e72780 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
@@ -75,13 +75,13 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
private $cuType;
public function __construct(IDBConnection $dbConnection,
- IUserSession $userSession,
- IGroupManager $groupManager,
- LoggerInterface $logger,
- ProxyMapper $proxyMapper,
- string $principalPrefix,
- string $dbPrefix,
- string $cuType) {
+ IUserSession $userSession,
+ IGroupManager $groupManager,
+ LoggerInterface $logger,
+ ProxyMapper $proxyMapper,
+ string $principalPrefix,
+ string $dbPrefix,
+ string $cuType) {
$this->db = $dbConnection;
$this->userSession = $userSession;
$this->groupManager = $groupManager;
@@ -165,7 +165,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
}
[, $name] = \Sabre\Uri\split($path);
- [$backendId, $resourceId] = explode('-', $name, 2);
+ [$backendId, $resourceId] = explode('-', $name, 2);
$query = $this->db->getQueryBuilder();
$query->select(['id', 'backend_id', 'resource_id', 'email', 'displayname'])
@@ -309,7 +309,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
case IRoomMetadata::CAPACITY:
case IResourceMetadata::VEHICLE_SEATING_CAPACITY:
- $results[] = $this->searchPrincipalsByCapacity($prop,$value);
+ $results[] = $this->searchPrincipalsByCapacity($prop, $value);
break;
default:
@@ -470,7 +470,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
}
[, $name] = \Sabre\Uri\split($path);
- [$backendId, $resourceId] = explode('-', $name, 2);
+ [$backendId, $resourceId] = explode('-', $name, 2);
$query = $this->db->getQueryBuilder();
$query->select(['id', 'backend_id', 'resource_id', 'email', 'displayname', 'group_restrictions'])
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
index 20fdadbca0c..45795377e11 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
@@ -39,10 +39,10 @@ class ResourcePrincipalBackend extends AbstractPrincipalBackend {
* ResourcePrincipalBackend constructor.
*/
public function __construct(IDBConnection $dbConnection,
- IUserSession $userSession,
- IGroupManager $groupManager,
- LoggerInterface $logger,
- ProxyMapper $proxyMapper) {
+ IUserSession $userSession,
+ IGroupManager $groupManager,
+ LoggerInterface $logger,
+ ProxyMapper $proxyMapper) {
parent::__construct($dbConnection, $userSession, $groupManager, $logger,
$proxyMapper, 'principals/calendar-resources', 'resource', 'RESOURCE');
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
index 931635d632f..829ca7d6033 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
@@ -39,10 +39,10 @@ class RoomPrincipalBackend extends AbstractPrincipalBackend {
* RoomPrincipalBackend constructor.
*/
public function __construct(IDBConnection $dbConnection,
- IUserSession $userSession,
- IGroupManager $groupManager,
- LoggerInterface $logger,
- ProxyMapper $proxyMapper) {
+ IUserSession $userSession,
+ IGroupManager $groupManager,
+ LoggerInterface $logger,
+ ProxyMapper $proxyMapper) {
parent::__construct($dbConnection, $userSession, $groupManager, $logger,
$proxyMapper, 'principals/calendar-rooms', 'room', 'ROOM');
}
diff --git a/apps/dav/lib/CalDAV/RetentionService.php b/apps/dav/lib/CalDAV/RetentionService.php
index 1d92d847641..9a43d5bdc91 100644
--- a/apps/dav/lib/CalDAV/RetentionService.php
+++ b/apps/dav/lib/CalDAV/RetentionService.php
@@ -44,8 +44,8 @@ class RetentionService {
private $calDavBackend;
public function __construct(IConfig $config,
- ITimeFactory $time,
- CalDavBackend $calDavBackend) {
+ ITimeFactory $time,
+ CalDavBackend $calDavBackend) {
$this->config = $config;
$this->time = $time;
$this->calDavBackend = $calDavBackend;
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index 437a135e38c..fcc2ae1e166 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -86,14 +86,14 @@ class IMipPlugin extends SabreIMipPlugin {
private EventComparisonService $eventComparisonService;
public function __construct(IConfig $config,
- IMailer $mailer,
- LoggerInterface $logger,
- ITimeFactory $timeFactory,
- Defaults $defaults,
- IUserManager $userManager,
- $userId,
- IMipService $imipService,
- EventComparisonService $eventComparisonService) {
+ IMailer $mailer,
+ LoggerInterface $logger,
+ ITimeFactory $timeFactory,
+ Defaults $defaults,
+ IUserManager $userManager,
+ $userId,
+ IMipService $imipService,
+ EventComparisonService $eventComparisonService) {
parent::__construct('');
$this->userId = $userId;
$this->config = $config;
@@ -305,9 +305,9 @@ class IMipPlugin extends SabreIMipPlugin {
$itip_msg = $iTipMessage->message->serialize();
$message->attachInline(
- $itip_msg,
+ $itip_msg,
'event.ics',
- 'text/calendar; method=' . $iTipMessage->method,
+ 'text/calendar; method=' . $iTipMessage->method,
);
try {
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php
index 1e7b0bc3b02..4cd859d79ac 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipService.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/*
* DAV App
@@ -57,10 +58,10 @@ class IMipService {
];
public function __construct(URLGenerator $urlGenerator,
- IConfig $config,
- IDBConnection $db,
- ISecureRandom $random,
- L10NFactory $l10nFactory) {
+ IConfig $config,
+ IDBConnection $db,
+ ISecureRandom $random,
+ L10NFactory $l10nFactory) {
$this->urlGenerator = $urlGenerator;
$this->config = $config;
$this->db = $db;
@@ -99,7 +100,7 @@ class IMipService {
return $default;
}
$newstring = $vevent->$property->getValue();
- if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring ) {
+ if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring) {
$oldstring = $oldVEvent->$property->getValue();
return sprintf($strikethrough, $oldstring, $newstring);
}
@@ -162,7 +163,7 @@ class IMipService {
if(!empty($oldVEvent)) {
$oldMeetingWhen = $this->generateWhenString($oldVEvent);
- $data['meeting_title_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'SUMMARY', $data['meeting_title']);
+ $data['meeting_title_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'SUMMARY', $data['meeting_title']);
$data['meeting_description_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'DESCRIPTION', $data['meeting_description']);
$data['meeting_location_html'] = $this->generateLinkifiedDiffString($vEvent, $oldVEvent, 'LOCATION', $data['meeting_location']);
@@ -281,7 +282,8 @@ class IMipService {
$strikethrough = "<span style='text-decoration: line-through'>%s</span>";
$newMeetingWhen = $this->generateWhenString($vEvent);
- $newSummary = isset($vEvent->SUMMARY) && (string)$vEvent->SUMMARY !== '' ? (string)$vEvent->SUMMARY : $this->l10n->t('Untitled event');;
+ $newSummary = isset($vEvent->SUMMARY) && (string)$vEvent->SUMMARY !== '' ? (string)$vEvent->SUMMARY : $this->l10n->t('Untitled event');
+ ;
$newDescription = isset($vEvent->DESCRIPTION) && (string)$vEvent->DESCRIPTION !== '' ? (string)$vEvent->DESCRIPTION : $defaultVal;
$newUrl = isset($vEvent->URL) && (string)$vEvent->URL !== '' ? sprintf('<a href="%1$s">%1$s</a>', $vEvent->URL) : $defaultVal;
$newLocation = isset($vEvent->LOCATION) && (string)$vEvent->LOCATION !== '' ? (string)$vEvent->LOCATION : $defaultVal;
@@ -483,7 +485,7 @@ class IMipService {
htmlspecialchars($organizer->getNormalizedValue()),
htmlspecialchars($organizerName ?: $organizerEmail));
$organizerText = sprintf('%s <%s>', $organizerName, $organizerEmail);
- if(isset($organizer['PARTSTAT']) ) {
+ if(isset($organizer['PARTSTAT'])) {
/** @var Parameter $partstat */
$partstat = $organizer['PARTSTAT'];
if(strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) {
diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php
index 16acc72d988..2845ccdf6c2 100644
--- a/apps/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php
@@ -36,7 +36,6 @@ use OCA\DAV\CalDAV\CalendarHome;
use OCP\IConfig;
use Psr\Log\LoggerInterface;
use Sabre\CalDAV\ICalendar;
-use Sabre\CalDAV\Schedule\IOutbox;
use Sabre\DAV\INode;
use Sabre\DAV\IProperties;
use Sabre\DAV\PropFind;
@@ -45,7 +44,6 @@ use Sabre\DAV\Xml\Property\LocalHref;
use Sabre\DAVACL\IPrincipal;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use Sabre\VObject;
use Sabre\VObject\Component;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;
diff --git a/apps/dav/lib/CalDAV/Status/Status.php b/apps/dav/lib/CalDAV/Status/Status.php
index 8857d0f14e7..d1c35002fcd 100644
--- a/apps/dav/lib/CalDAV/Status/Status.php
+++ b/apps/dav/lib/CalDAV/Status/Status.php
@@ -27,7 +27,8 @@ namespace OCA\DAV\CalDAV\Status;
class Status {
- public function __construct(private string $status = '', private ?string $message = null, private ?string $customMessage = null){}
+ public function __construct(private string $status = '', private ?string $message = null, private ?string $customMessage = null) {
+ }
public function getStatus(): string {
return $this->status;
diff --git a/apps/dav/lib/CalDAV/Status/StatusService.php b/apps/dav/lib/CalDAV/Status/StatusService.php
index 92554f800c3..1dce2c4c3a3 100644
--- a/apps/dav/lib/CalDAV/Status/StatusService.php
+++ b/apps/dav/lib/CalDAV/Status/StatusService.php
@@ -48,16 +48,13 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CalDAV\Status;
-use DateTimeZone;
use OC\Calendar\CalendarQuery;
use OCA\DAV\CalDAV\CalendarImpl;
use OCA\DAV\CalDAV\FreeBusy\FreeBusyGenerator;
use OCA\DAV\CalDAV\InvitationResponse\InvitationResponseServer;
-use OCA\DAV\CalDAV\IUser;
use OCA\DAV\CalDAV\Schedule\Plugin as SchedulePlugin;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Calendar\IManager;
-use OCP\Calendar\ISchedulingInformation;
use OCP\IL10N;
use OCP\IUser as User;
use OCP\UserStatus\IUserStatus;
@@ -66,7 +63,6 @@ use Sabre\DAV\Exception\NotAuthenticated;
use Sabre\DAVACL\Exception\NeedPrivileges;
use Sabre\DAVACL\Plugin as AclPlugin;
use Sabre\VObject\Component;
-use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;
use Sabre\VObject\Parameter;
use Sabre\VObject\Property;
@@ -74,10 +70,11 @@ use Sabre\VObject\Reader;
class StatusService {
public function __construct(private ITimeFactory $timeFactory,
- private IManager $calendarManager,
- private InvitationResponseServer $server,
- private IL10N $l10n,
- private FreeBusyGenerator $generator){}
+ private IManager $calendarManager,
+ private InvitationResponseServer $server,
+ private IL10N $l10n,
+ private FreeBusyGenerator $generator) {
+ }
public function processCalendarAvailability(User $user, ?string $availability): ?Status {
$userId = $user->getUID();
@@ -172,7 +169,7 @@ class StatusService {
foreach ($calendarEvents as $calendarEvent) {
$vEvent = new VEvent($calendar, 'VEVENT');
foreach($calendarEvent['objects'] as $component) {
- foreach ($component as $key => $value) {
+ foreach ($component as $key => $value) {
$vEvent->add($key, $value[0]);
}
}
diff --git a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php
index 5730b7a1002..b1a3fea21b7 100644
--- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php
+++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObject.php
@@ -48,9 +48,9 @@ class DeletedCalendarObject implements IACL, ICalendarObject, IRestorable {
private $calDavBackend;
public function __construct(string $name,
- array $objectData,
- string $principalUri,
- CalDavBackend $calDavBackend) {
+ array $objectData,
+ string $principalUri,
+ CalDavBackend $calDavBackend) {
$this->name = $name;
$this->objectData = $objectData;
$this->calDavBackend = $calDavBackend;
diff --git a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
index 20d05c047b1..f7f0bd7b512 100644
--- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
+++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
@@ -45,7 +45,7 @@ class DeletedCalendarObjectsCollection implements ICalendarObjectContainer {
private $principalInfo;
public function __construct(CalDavBackend $caldavBackend,
- array $principalInfo) {
+ array $principalInfo) {
$this->caldavBackend = $caldavBackend;
$this->principalInfo = $principalInfo;
}
diff --git a/apps/dav/lib/CalDAV/Trashbin/Plugin.php b/apps/dav/lib/CalDAV/Trashbin/Plugin.php
index 58ff76beca1..8a661732f19 100644
--- a/apps/dav/lib/CalDAV/Trashbin/Plugin.php
+++ b/apps/dav/lib/CalDAV/Trashbin/Plugin.php
@@ -56,7 +56,7 @@ class Plugin extends ServerPlugin {
private $server;
public function __construct(IRequest $request,
- RetentionService $retentionService) {
+ RetentionService $retentionService) {
$this->disableTrashbin = $request->getHeader('X-NC-CalDAV-No-Trashbin') === '1';
$this->retentionService = $retentionService;
}
diff --git a/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php b/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php
index 34d11e51eb3..e9bf6da19e8 100644
--- a/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php
+++ b/apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php
@@ -50,7 +50,7 @@ class TrashbinHome implements IACL, ICollection, IProperties {
private $principalInfo;
public function __construct(CalDavBackend $caldavBackend,
- array $principalInfo) {
+ array $principalInfo) {
$this->caldavBackend = $caldavBackend;
$this->principalInfo = $principalInfo;
}
diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
index 8928d05b93c..4035f345876 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
@@ -46,9 +46,9 @@ use Sabre\DAV\Xml\Property\Href;
use Sabre\VObject\Component;
use Sabre\VObject\DateTimeParser;
use Sabre\VObject\InvalidDataException;
-use Sabre\VObject\Recur\NoInstancesException;
use Sabre\VObject\ParseException;
use Sabre\VObject\Reader;
+use Sabre\VObject\Recur\NoInstancesException;
use Sabre\VObject\Splitter\ICalendar;
use Sabre\VObject\UUIDUtil;
use function count;
diff --git a/apps/dav/lib/CardDAV/Activity/Backend.php b/apps/dav/lib/CardDAV/Activity/Backend.php
index 53639f84f84..f0a5ee05e82 100644
--- a/apps/dav/lib/CardDAV/Activity/Backend.php
+++ b/apps/dav/lib/CardDAV/Activity/Backend.php
@@ -55,10 +55,10 @@ class Backend {
protected $userManager;
public function __construct(IActivityManager $activityManager,
- IGroupManager $groupManager,
- IUserSession $userSession,
- IAppManager $appManager,
- IUserManager $userManager) {
+ IGroupManager $groupManager,
+ IUserSession $userSession,
+ IAppManager $appManager,
+ IUserManager $userManager) {
$this->activityManager = $activityManager;
$this->groupManager = $groupManager;
$this->userSession = $userSession;
diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
index 0f4acaaa434..a9ed767ffc7 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Addressbook.php
@@ -53,11 +53,11 @@ class Addressbook extends Base {
protected $eventMerger;
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- IGroupManager $groupManager,
- IEventMerger $eventMerger) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ IEventMerger $eventMerger) {
parent::__construct($userManager, $groupManager, $url);
$this->languageFactory = $languageFactory;
$this->activityManager = $activityManager;
diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Base.php b/apps/dav/lib/CardDAV/Activity/Provider/Base.php
index a59c3b57262..f475f9d76b7 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Base.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Base.php
@@ -51,8 +51,8 @@ abstract class Base implements IProvider {
protected $url;
public function __construct(IUserManager $userManager,
- IGroupManager $groupManager,
- IURLGenerator $urlGenerator) {
+ IGroupManager $groupManager,
+ IURLGenerator $urlGenerator) {
$this->userManager = $userManager;
$this->groupManager = $groupManager;
$this->url = $urlGenerator;
diff --git a/apps/dav/lib/CardDAV/Activity/Provider/Card.php b/apps/dav/lib/CardDAV/Activity/Provider/Card.php
index e2abdda161a..8f205942d4b 100644
--- a/apps/dav/lib/CardDAV/Activity/Provider/Card.php
+++ b/apps/dav/lib/CardDAV/Activity/Provider/Card.php
@@ -53,12 +53,12 @@ class Card extends Base {
protected $appManager;
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- IGroupManager $groupManager,
- IEventMerger $eventMerger,
- IAppManager $appManager) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ IEventMerger $eventMerger,
+ IAppManager $appManager) {
parent::__construct($userManager, $groupManager, $url);
$this->languageFactory = $languageFactory;
$this->activityManager = $activityManager;
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php
index c385d0e7b86..79720429479 100644
--- a/apps/dav/lib/CardDAV/AddressBookImpl.php
+++ b/apps/dav/lib/CardDAV/AddressBookImpl.php
@@ -63,10 +63,10 @@ class AddressBookImpl implements IAddressBook {
* @param IUrlGenerator $urlGenerator
*/
public function __construct(
- AddressBook $addressBook,
- array $addressBookInfo,
- CardDavBackend $backend,
- IURLGenerator $urlGenerator) {
+ AddressBook $addressBook,
+ array $addressBookInfo,
+ CardDavBackend $backend,
+ IURLGenerator $urlGenerator) {
$this->addressBook = $addressBook;
$this->addressBookInfo = $addressBookInfo;
$this->backend = $backend;
diff --git a/apps/dav/lib/CardDAV/AddressBookRoot.php b/apps/dav/lib/CardDAV/AddressBookRoot.php
index c82943d2879..f450dbe2ef9 100644
--- a/apps/dav/lib/CardDAV/AddressBookRoot.php
+++ b/apps/dav/lib/CardDAV/AddressBookRoot.php
@@ -41,11 +41,11 @@ class AddressBookRoot extends \Sabre\CardDAV\AddressBookRoot {
* @param string $principalPrefix
*/
public function __construct(\Sabre\DAVACL\PrincipalBackend\BackendInterface $principalBackend,
- \Sabre\CardDAV\Backend\BackendInterface $carddavBackend,
- PluginManager $pluginManager,
- ?IUser $user,
- ?IGroupManager $groupManager,
- string $principalPrefix = 'principals') {
+ \Sabre\CardDAV\Backend\BackendInterface $carddavBackend,
+ PluginManager $pluginManager,
+ ?IUser $user,
+ ?IGroupManager $groupManager,
+ string $principalPrefix = 'principals') {
parent::__construct($principalBackend, $carddavBackend, $principalPrefix);
$this->pluginManager = $pluginManager;
$this->user = $user;
diff --git a/apps/dav/lib/CardDAV/Card.php b/apps/dav/lib/CardDAV/Card.php
index 72a9bd88c1e..093255392e0 100644
--- a/apps/dav/lib/CardDAV/Card.php
+++ b/apps/dav/lib/CardDAV/Card.php
@@ -24,8 +24,7 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CardDAV;
-class Card extends \Sabre\CardDAV\Card
-{
+class Card extends \Sabre\CardDAV\Card {
public function getId(): int {
return (int) $this->cardData['id'];
}
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php
index 8be0bd8050c..c1f0fe0c93c 100644
--- a/apps/dav/lib/CardDAV/CardDavBackend.php
+++ b/apps/dav/lib/CardDAV/CardDavBackend.php
@@ -35,6 +35,7 @@
*/
namespace OCA\DAV\CardDAV;
+use OC\Search\Filter\DateTimeFilter;
use OCA\DAV\Connector\Sabre\Principal;
use OCA\DAV\DAV\Sharing\Backend;
use OCA\DAV\DAV\Sharing\IShareable;
@@ -53,7 +54,6 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\IDBConnection;
use OCP\IGroupManager;
use OCP\IUserManager;
-use OC\Search\Filter\DateTimeFilter;
use PDO;
use Sabre\CardDAV\Backend\BackendInterface;
use Sabre\CardDAV\Backend\SyncSupport;
@@ -98,10 +98,10 @@ class CardDavBackend implements BackendInterface, SyncSupport {
* @param IEventDispatcher $dispatcher
*/
public function __construct(IDBConnection $db,
- Principal $principalBackend,
- IUserManager $userManager,
- IGroupManager $groupManager,
- IEventDispatcher $dispatcher) {
+ Principal $principalBackend,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ IEventDispatcher $dispatcher) {
$this->db = $db;
$this->principalBackend = $principalBackend;
$this->userManager = $userManager;
@@ -1093,9 +1093,9 @@ class CardDavBackend implements BackendInterface, SyncSupport {
* @return array
*/
public function searchPrincipalUri(string $principalUri,
- string $pattern,
- array $searchProperties,
- array $options = []): array {
+ string $pattern,
+ array $searchProperties,
+ array $options = []): array {
return $this->atomic(function () use ($principalUri, $pattern, $searchProperties, $options) {
$addressBookIds = array_map(static function ($row):int {
return (int) $row['id'];
@@ -1123,9 +1123,9 @@ class CardDavBackend implements BackendInterface, SyncSupport {
* @return array
*/
private function searchByAddressBookIds(array $addressBookIds,
- string $pattern,
- array $searchProperties,
- array $options = []): array {
+ string $pattern,
+ array $searchProperties,
+ array $options = []): array {
if (empty($addressBookIds)) {
return [];
}
diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php
index e19b52b4783..8ea75fbef74 100644
--- a/apps/dav/lib/CardDAV/Converter.php
+++ b/apps/dav/lib/CardDAV/Converter.php
@@ -29,8 +29,8 @@ namespace OCA\DAV\CardDAV;
use Exception;
use OCP\Accounts\IAccountManager;
-use OCP\IURLGenerator;
use OCP\IImage;
+use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use Sabre\VObject\Component\VCard;
diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php
index 0d31f1f5239..9f05ec2354a 100644
--- a/apps/dav/lib/CardDAV/PhotoCache.php
+++ b/apps/dav/lib/CardDAV/PhotoCache.php
@@ -34,12 +34,12 @@ use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder;
+use Psr\Log\LoggerInterface;
use Sabre\CardDAV\Card;
use Sabre\VObject\Document;
use Sabre\VObject\Parameter;
use Sabre\VObject\Property\Binary;
use Sabre\VObject\Reader;
-use Psr\Log\LoggerInterface;
class PhotoCache {
diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php
index 09c31683069..66927d35e04 100644
--- a/apps/dav/lib/CardDAV/SyncService.php
+++ b/apps/dav/lib/CardDAV/SyncService.php
@@ -30,7 +30,6 @@
*/
namespace OCA\DAV\CardDAV;
-use OC\Accounts\AccountManager;
use OCP\AppFramework\Db\TTransactional;
use OCP\AppFramework\Http;
use OCP\IDBConnection;
@@ -57,10 +56,10 @@ class SyncService {
protected string $certPath;
public function __construct(CardDavBackend $backend,
- IUserManager $userManager,
- IDBConnection $dbConnection,
- LoggerInterface $logger,
- Converter $converter) {
+ IUserManager $userManager,
+ IDBConnection $dbConnection,
+ LoggerInterface $logger,
+ Converter $converter) {
$this->backend = $backend;
$this->userManager = $userManager;
$this->logger = $logger;
@@ -97,7 +96,7 @@ class SyncService {
$cardUri = basename($resource);
if (isset($status[200])) {
$vCard = $this->download($url, $userName, $sharedSecret, $resource);
- $this->atomic(function() use ($addressBookId, $cardUri, $vCard) {
+ $this->atomic(function () use ($addressBookId, $cardUri, $vCard) {
$existingCard = $this->backend->getCard($addressBookId, $cardUri);
if ($existingCard === false) {
$this->backend->createCard($addressBookId, $cardUri, $vCard['body']);
@@ -117,7 +116,7 @@ class SyncService {
* @throws \Sabre\DAV\Exception\BadRequest
*/
public function ensureSystemAddressBookExists(string $principal, string $uri, array $properties): ?array {
- return $this->atomic(function() use ($principal, $uri, $properties) {
+ return $this->atomic(function () use ($principal, $uri, $properties) {
$book = $this->backend->getAddressBooksByUri($principal, $uri);
if (!is_null($book)) {
return $book;
@@ -226,7 +225,7 @@ class SyncService {
$cardId = self::getCardUri($user);
if ($user->isEnabled()) {
- $this->atomic(function() use ($addressBookId, $cardId, $user) {
+ $this->atomic(function () use ($addressBookId, $cardId, $user) {
$card = $this->backend->getCard($addressBookId, $cardId);
if ($card === false) {
$vCard = $this->converter->createCardFromUser($user);
diff --git a/apps/dav/lib/CardDAV/SystemAddressbook.php b/apps/dav/lib/CardDAV/SystemAddressbook.php
index 498c4e95be7..dc5ee0e1f21 100644
--- a/apps/dav/lib/CardDAV/SystemAddressbook.php
+++ b/apps/dav/lib/CardDAV/SystemAddressbook.php
@@ -36,8 +36,8 @@ use OCP\IGroupManager;
use OCP\IL10N;
use OCP\IRequest;
use OCP\IUserSession;
-use Sabre\CardDAV\Backend\SyncSupport;
use Sabre\CardDAV\Backend\BackendInterface;
+use Sabre\CardDAV\Backend\SyncSupport;
use Sabre\CardDAV\Card;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
diff --git a/apps/dav/lib/CardDAV/UserAddressBooks.php b/apps/dav/lib/CardDAV/UserAddressBooks.php
index 02e500acc86..2d129410067 100644
--- a/apps/dav/lib/CardDAV/UserAddressBooks.php
+++ b/apps/dav/lib/CardDAV/UserAddressBooks.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
namespace OCA\DAV\CardDAV;
use OCA\DAV\AppInfo\PluginManager;
-use OCA\DAV\CardDAV\Integration\IAddressBookProvider;
use OCA\DAV\CardDAV\Integration\ExternalAddressBook;
+use OCA\DAV\CardDAV\Integration\IAddressBookProvider;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\QueryException;
use OCP\IConfig;
@@ -42,10 +42,10 @@ use OCP\IUserSession;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Sabre\CardDAV\Backend;
-use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\CardDAV\IAddressBook;
-use function array_map;
+use Sabre\DAV\Exception\MethodNotAllowed;
use Sabre\DAV\MkCol;
+use function array_map;
class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
/** @var IL10N */
@@ -60,10 +60,10 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
private ?IGroupManager $groupManager;
public function __construct(Backend\BackendInterface $carddavBackend,
- string $principalUri,
- PluginManager $pluginManager,
- ?IUser $user,
- ?IGroupManager $groupManager) {
+ string $principalUri,
+ PluginManager $pluginManager,
+ ?IUser $user,
+ ?IGroupManager $groupManager) {
parent::__construct($carddavBackend, $principalUri);
$this->pluginManager = $pluginManager;
$this->user = $user;
diff --git a/apps/dav/lib/Command/CreateAddressBook.php b/apps/dav/lib/Command/CreateAddressBook.php
index 9dfc539a25d..27ecb5973e4 100644
--- a/apps/dav/lib/Command/CreateAddressBook.php
+++ b/apps/dav/lib/Command/CreateAddressBook.php
@@ -44,11 +44,11 @@ class CreateAddressBook extends Command {
->setName('dav:create-addressbook')
->setDescription('Create a dav addressbook')
->addArgument('user',
- InputArgument::REQUIRED,
- 'User for whom the addressbook will be created')
+ InputArgument::REQUIRED,
+ 'User for whom the addressbook will be created')
->addArgument('name',
- InputArgument::REQUIRED,
- 'Name of the addressbook');
+ InputArgument::REQUIRED,
+ 'Name of the addressbook');
}
protected function execute(InputInterface $input, OutputInterface $output): int {
diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php
index 58de3e36139..1cfaa8b4e16 100644
--- a/apps/dav/lib/Comments/CommentsPlugin.php
+++ b/apps/dav/lib/Comments/CommentsPlugin.php
@@ -247,7 +247,7 @@ class CommentsPlugin extends ServerPlugin {
throw new BadRequest('Invalid input values', 0, $e);
} catch (\OCP\Comments\MessageTooLongException $e) {
$msg = 'Message exceeds allowed character limit of ';
- throw new BadRequest($msg . \OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e);
+ throw new BadRequest($msg . \OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e);
}
}
}
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php
index 6f58e89f1c0..d613a5a188f 100644
--- a/apps/dav/lib/Connector/PublicAuth.php
+++ b/apps/dav/lib/Connector/PublicAuth.php
@@ -51,9 +51,9 @@ class PublicAuth extends AbstractBasic {
private IThrottler $throttler;
public function __construct(IRequest $request,
- IManager $shareManager,
- ISession $session,
- IThrottler $throttler) {
+ IManager $shareManager,
+ ISession $session,
+ IThrottler $throttler) {
$this->request = $request;
$this->shareManager = $shareManager;
$this->session = $session;
diff --git a/apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php b/apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php
index 6c50f5682b7..db0f4e56b2e 100644
--- a/apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php
@@ -50,40 +50,37 @@ class AppleQuirksPlugin extends ServerPlugin {
private $isMacOSDavAgent = false;
/**
- * Sets up the plugin.
- *
- * This method is automatically called by the server class.
+ * Sets up the plugin.
+ *
+ * This method is automatically called by the server class.
*
* @return void
- */
- public function initialize(Server $server)
- {
+ */
+ public function initialize(Server $server) {
$server->on('beforeMethod:REPORT', [$this, 'beforeReport'], 0);
$server->on('report', [$this, 'report'], 0);
}
/**
- * Triggered before any method is handled.
+ * Triggered before any method is handled.
*
* @return void
- */
- public function beforeReport(RequestInterface $request, ResponseInterface $response)
- {
+ */
+ public function beforeReport(RequestInterface $request, ResponseInterface $response) {
$userAgent = $request->getRawServerValue('HTTP_USER_AGENT') ?? 'unknown';
$this->isMacOSDavAgent = $this->isMacOSUserAgent($userAgent);
}
/**
- * This method handles HTTP REPORT requests.
- *
- * @param string $reportName
- * @param mixed $report
- * @param mixed $path
+ * This method handles HTTP REPORT requests.
+ *
+ * @param string $reportName
+ * @param mixed $report
+ * @param mixed $path
*
* @return bool
- */
- public function report($reportName, $report, $path)
- {
+ */
+ public function report($reportName, $report, $path) {
if ($reportName == '{DAV:}principal-property-search' && $this->isMacOSDavAgent) {
/** @var \Sabre\DAVACL\Xml\Request\PrincipalPropertySearchReport $report */
$report->applyToPrincipalCollectionSet = true;
@@ -98,8 +95,7 @@ class AppleQuirksPlugin extends ServerPlugin {
*
* @return bool
*/
- protected function isMacOSUserAgent(string $userAgent):bool
- {
+ protected function isMacOSUserAgent(string $userAgent):bool {
return str_starts_with(self::OSX_AGENT_PREFIX, $userAgent);
}
@@ -110,8 +106,7 @@ class AppleQuirksPlugin extends ServerPlugin {
*
* @return null|array
*/
- protected function decodeMacOSAgentString(string $userAgent):?array
- {
+ protected function decodeMacOSAgentString(string $userAgent):?array {
// OSX agent string is like: macOS/13.2.1 (22D68) dataaccessd/1.0
if (preg_match('|^' . self::OSX_AGENT_PREFIX . '/([0-9]+)\\.([0-9]+)\\.([0-9]+)\s+\((\w+)\)\s+([^/]+)/([0-9]+)(?:\\.([0-9]+))?(?:\\.([0-9]+))?$|i', $userAgent, $matches)) {
return [
diff --git a/apps/dav/lib/Connector/Sabre/Auth.php b/apps/dav/lib/Connector/Sabre/Auth.php
index 29e39349704..243b92e63f7 100644
--- a/apps/dav/lib/Connector/Sabre/Auth.php
+++ b/apps/dav/lib/Connector/Sabre/Auth.php
@@ -61,11 +61,11 @@ class Auth extends AbstractBasic {
private IThrottler $throttler;
public function __construct(ISession $session,
- Session $userSession,
- IRequest $request,
- Manager $twoFactorManager,
- IThrottler $throttler,
- string $principalPrefix = 'principals/users/') {
+ Session $userSession,
+ IRequest $request,
+ Manager $twoFactorManager,
+ IThrottler $throttler,
+ string $principalPrefix = 'principals/users/') {
$this->session = $session;
$this->userSession = $userSession;
$this->twoFactorManager = $twoFactorManager;
@@ -223,7 +223,7 @@ class Auth extends AbstractBasic {
if (!$this->userSession->isLoggedIn() && in_array('XMLHttpRequest', explode(',', $request->getHeader('X-Requested-With') ?? ''))) {
// do not re-authenticate over ajax, use dummy auth name to prevent browser popup
- $response->addHeader('WWW-Authenticate','DummyBasic realm="' . $this->realm . '"');
+ $response->addHeader('WWW-Authenticate', 'DummyBasic realm="' . $this->realm . '"');
$response->setStatus(401);
throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls');
}
diff --git a/apps/dav/lib/Connector/Sabre/BearerAuth.php b/apps/dav/lib/Connector/Sabre/BearerAuth.php
index 5a69d07b002..4d9599b97a3 100644
--- a/apps/dav/lib/Connector/Sabre/BearerAuth.php
+++ b/apps/dav/lib/Connector/Sabre/BearerAuth.php
@@ -37,9 +37,9 @@ class BearerAuth extends AbstractBearer {
private string $principalPrefix;
public function __construct(IUserSession $userSession,
- ISession $session,
- IRequest $request,
- $principalPrefix = 'principals/users/') {
+ ISession $session,
+ IRequest $request,
+ $principalPrefix = 'principals/users/') {
$this->userSession = $userSession;
$this->session = $session;
$this->request = $request;
diff --git a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
index 5d3f7104d6a..eda2399a780 100644
--- a/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/BlockLegacyClientPlugin.php
@@ -27,9 +27,9 @@ namespace OCA\DAV\Connector\Sabre;
use OCP\IConfig;
use OCP\IRequest;
+use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
-use Sabre\DAV\Server;
/**
* Class BlockLegacyClientPlugin is used to detect old legacy sync clients and
diff --git a/apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php b/apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php
index c222923bc8e..d68ced83616 100644
--- a/apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ChecksumUpdatePlugin.php
@@ -23,10 +23,10 @@ declare(strict_types=1);
namespace OCA\DAV\Connector\Sabre;
+use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use Sabre\DAV\Server;
class ChecksumUpdatePlugin extends ServerPlugin {
protected ?Server $server = null;
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
index eaa7f1bc2d2..94f9e167aae 100644
--- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
@@ -29,8 +30,8 @@ namespace OCA\DAV\Connector\Sabre;
use OCP\Comments\ICommentsManager;
use OCP\IUserSession;
use Sabre\DAV\PropFind;
-use Sabre\DAV\ServerPlugin;
use Sabre\DAV\Server;
+use Sabre\DAV\ServerPlugin;
class CommentPropertiesPlugin extends ServerPlugin {
public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href';
diff --git a/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php b/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php
index f3ea94be3b6..0533dcab4d9 100644
--- a/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php
@@ -25,9 +25,9 @@
namespace OCA\DAV\Connector\Sabre;
use Sabre\DAV\Exception\NotFound;
+use Sabre\DAV\Server;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use Sabre\DAV\Server;
/**
* Copies the "Etag" header to "OC-Etag" after any request.
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index ab321a363a2..441e6ea8f57 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -49,6 +49,7 @@ use OCP\IRequest;
use OCP\L10N\IFactory;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
+use OCP\Share\IManager as IShareManager;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\Locked;
@@ -56,7 +57,6 @@ use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\IFile;
use Sabre\DAV\INode;
-use OCP\Share\IManager as IShareManager;
class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget, \Sabre\DAV\ICopyTarget {
/**
diff --git a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php
index 8e35afe2e7c..2019c77ad35 100644
--- a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php
+++ b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php
@@ -26,9 +26,9 @@
*/
namespace OCA\DAV\Connector\Sabre;
+use Sabre\DAV\Server;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use Sabre\DAV\Server;
/**
* Class DummyGetResponsePlugin is a plugin used to not show a "Not implemented"
@@ -63,7 +63,7 @@ class DummyGetResponsePlugin extends \Sabre\DAV\ServerPlugin {
public function httpGet(RequestInterface $request, ResponseInterface $response) {
$string = 'This is the WebDAV interface. It can only be accessed by ' .
'WebDAV clients such as the Nextcloud desktop sync client.';
- $stream = fopen('php://memory','r+');
+ $stream = fopen('php://memory', 'r+');
fwrite($stream, $string);
rewind($stream);
diff --git a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
index aabd5fda2fb..a5eed911701 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/Forbidden.php
@@ -48,17 +48,17 @@ class Forbidden extends \Sabre\DAV\Exception\Forbidden {
* @param \DOMElement $errorNode
* @return void
*/
- public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) {
+ public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) {
// set ownCloud namespace
$errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD);
// adding the retry node
- $error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true));
+ $error = $errorNode->ownerDocument->createElementNS('o:', 'o:retry', var_export($this->retry, true));
$errorNode->appendChild($error);
// adding the message node
- $error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage());
+ $error = $errorNode->ownerDocument->createElementNS('o:', 'o:reason', $this->getMessage());
$errorNode->appendChild($error);
}
}
diff --git a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
index c504483d45a..9d1fda339a2 100644
--- a/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
+++ b/apps/dav/lib/Connector/Sabre/Exception/InvalidPath.php
@@ -60,17 +60,17 @@ class InvalidPath extends Exception {
* @param \DOMElement $errorNode
* @return void
*/
- public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) {
+ public function serialize(\Sabre\DAV\Server $server, \DOMElement $errorNode) {
// set ownCloud namespace
$errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD);
// adding the retry node
- $error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true));
+ $error = $errorNode->ownerDocument->createElementNS('o:', 'o:retry', var_export($this->retry, true));
$errorNode->appendChild($error);
// adding the message node
- $error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage());
+ $error = $errorNode->ownerDocument->createElementNS('o:', 'o:reason', $this->getMessage());
$errorNode->appendChild($error);
}
}
diff --git a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
index ebf3e4021eb..a195b5722f5 100644
--- a/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/ExceptionLoggerPlugin.php
@@ -42,7 +42,6 @@ use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\NotImplemented;
use Sabre\DAV\Exception\PreconditionFailed;
use Sabre\DAV\Exception\RequestedRangeNotSatisfiable;
-use Sabre\DAV\Exception\ServiceUnavailable;
class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
protected $nonFatalExceptions = [
diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
index 7209450745c..b61e9dc0c39 100644
--- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
@@ -125,7 +125,7 @@ class FakeLockerPlugin extends ServerPlugin {
* @return bool
*/
public function fakeLockProvider(RequestInterface $request,
- ResponseInterface $response) {
+ ResponseInterface $response) {
$lockInfo = new LockInfo();
$lockInfo->token = md5($request->getPath());
$lockInfo->uri = $request->getPath();
@@ -151,7 +151,7 @@ class FakeLockerPlugin extends ServerPlugin {
* @return bool
*/
public function fakeUnlockProvider(RequestInterface $request,
- ResponseInterface $response) {
+ ResponseInterface $response) {
$response->setStatus(204);
$response->setHeader('Content-Length', '0');
return false;
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 8c467f11d0c..81cdfa464b5 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -105,12 +105,12 @@ class FilesPlugin extends ServerPlugin {
private IPreview $previewManager;
public function __construct(Tree $tree,
- IConfig $config,
- IRequest $request,
- IPreview $previewManager,
- IUserSession $userSession,
- bool $isPublic = false,
- bool $downloadAttachment = true) {
+ IConfig $config,
+ IRequest $request,
+ IPreview $previewManager,
+ IUserSession $userSession,
+ bool $isPublic = false,
+ bool $downloadAttachment = true) {
$this->tree = $tree;
$this->config = $config;
$this->request = $request;
diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
index 18998d9c5cb..e43fb740cac 100644
--- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
@@ -119,14 +119,14 @@ class FilesReportPlugin extends ServerPlugin {
* @param IAppManager $appManager
*/
public function __construct(Tree $tree,
- View $view,
- ISystemTagManager $tagManager,
- ISystemTagObjectMapper $tagMapper,
- ITagManager $fileTagger,
- IUserSession $userSession,
- IGroupManager $groupManager,
- Folder $userFolder,
- IAppManager $appManager
+ View $view,
+ ISystemTagManager $tagManager,
+ ISystemTagObjectMapper $tagMapper,
+ ITagManager $fileTagger,
+ IUserSession $userSession,
+ IGroupManager $groupManager,
+ Folder $userFolder,
+ IAppManager $appManager
) {
$this->tree = $tree;
$this->fileView = $view;
diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php
index 823eafe8fdb..df1de17fe20 100644
--- a/apps/dav/lib/Connector/Sabre/Principal.php
+++ b/apps/dav/lib/Connector/Sabre/Principal.php
@@ -100,16 +100,16 @@ class Principal implements BackendInterface {
private $languageFactory;
public function __construct(IUserManager $userManager,
- IGroupManager $groupManager,
- IAccountManager $accountManager,
- IShareManager $shareManager,
- IUserSession $userSession,
- IAppManager $appManager,
- ProxyMapper $proxyMapper,
- KnownUserService $knownUserService,
- IConfig $config,
- IFactory $languageFactory,
- string $principalPrefix = 'principals/users/') {
+ IGroupManager $groupManager,
+ IAccountManager $accountManager,
+ IShareManager $shareManager,
+ IUserSession $userSession,
+ IAppManager $appManager,
+ ProxyMapper $proxyMapper,
+ KnownUserService $knownUserService,
+ IConfig $config,
+ IFactory $languageFactory,
+ string $principalPrefix = 'principals/users/') {
$this->userManager = $userManager;
$this->groupManager = $groupManager;
$this->accountManager = $accountManager;
diff --git a/apps/dav/lib/Connector/Sabre/RequestIdHeaderPlugin.php b/apps/dav/lib/Connector/Sabre/RequestIdHeaderPlugin.php
index b281a1053b8..df82db59f1d 100644
--- a/apps/dav/lib/Connector/Sabre/RequestIdHeaderPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/RequestIdHeaderPlugin.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types=1);
+<?php
+
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Robin Appelman <robin@icewind.nl>
*
diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php
index d0cc8aab5d0..828977fd812 100644
--- a/apps/dav/lib/Connector/Sabre/ServerFactory.php
+++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php
@@ -31,11 +31,11 @@
*/
namespace OCA\DAV\Connector\Sabre;
-use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Files\Folder;
use OCA\DAV\AppInfo\PluginManager;
use OCA\DAV\DAV\ViewOnlyPlugin;
use OCA\DAV\Files\BrowserErrorPagePlugin;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Files\Folder;
use OCP\Files\Mount\IMountManager;
use OCP\IConfig;
use OCP\IDBConnection;
@@ -88,9 +88,9 @@ class ServerFactory {
* @param callable $viewCallBack callback that should return the view for the dav endpoint
*/
public function createServer(string $baseUri,
- string $requestUri,
- Plugin $authPlugin,
- callable $viewCallBack): Server {
+ string $requestUri,
+ Plugin $authPlugin,
+ callable $viewCallBack): Server {
// Fire up server
$objectTree = new \OCA\DAV\Connector\Sabre\ObjectTree();
$server = new \OCA\DAV\Connector\Sabre\Server($objectTree);
diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
index 3d52a44b6a6..4cda346af01 100644
--- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php
@@ -33,11 +33,11 @@ use OCP\Files\Folder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\IUserSession;
-use OCP\Share\IShare;
use OCP\Share\IManager;
+use OCP\Share\IShare;
use Sabre\DAV\PropFind;
-use Sabre\DAV\Tree;
use Sabre\DAV\Server;
+use Sabre\DAV\Tree;
/**
* Sabre Plugin to provide share-related properties
diff --git a/apps/dav/lib/Connector/Sabre/TagsPlugin.php b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
index da5dd874905..dc2b6b0c339 100644
--- a/apps/dav/lib/Connector/Sabre/TagsPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/TagsPlugin.php
@@ -222,7 +222,7 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin {
&& $propFind->getDepth() !== 0
&& (!is_null($propFind->getStatus(self::TAGS_PROPERTYNAME))
|| !is_null($propFind->getStatus(self::FAVORITE_PROPERTYNAME))
- )) {
+ )) {
// note: pre-fetching only supported for depth <= 1
$folderContent = $node->getChildren();
$fileIds[] = (int)$node->getId();
diff --git a/apps/dav/lib/Controller/BirthdayCalendarController.php b/apps/dav/lib/Controller/BirthdayCalendarController.php
index 4305d6daaef..5df13cefe97 100644
--- a/apps/dav/lib/Controller/BirthdayCalendarController.php
+++ b/apps/dav/lib/Controller/BirthdayCalendarController.php
@@ -74,10 +74,10 @@ class BirthdayCalendarController extends Controller {
* @param CalDavBackend $calDavBackend
*/
public function __construct($appName, IRequest $request,
- IDBConnection $db, IConfig $config,
- IJobList $jobList,
- IUserManager $userManager,
- CalDavBackend $calDavBackend) {
+ IDBConnection $db, IConfig $config,
+ IJobList $jobList,
+ IUserManager $userManager,
+ CalDavBackend $calDavBackend) {
parent::__construct($appName, $request);
$this->db = $db;
$this->config = $config;
diff --git a/apps/dav/lib/Controller/DirectController.php b/apps/dav/lib/Controller/DirectController.php
index 1a7b3b57626..0f618e46b22 100644
--- a/apps/dav/lib/Controller/DirectController.php
+++ b/apps/dav/lib/Controller/DirectController.php
@@ -32,11 +32,10 @@ use OCA\DAV\Db\DirectMapper;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
-use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCS\OCSForbiddenException;
+use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCSController;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\EventDispatcher\GenericEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\BeforeDirectFileDownloadEvent;
use OCP\Files\File;
@@ -69,14 +68,14 @@ class DirectController extends OCSController {
private $eventDispatcher;
public function __construct(string $appName,
- IRequest $request,
- IRootFolder $rootFolder,
- string $userId,
- DirectMapper $mapper,
- ISecureRandom $random,
- ITimeFactory $timeFactory,
- IURLGenerator $urlGenerator,
- IEventDispatcher $eventDispatcher) {
+ IRequest $request,
+ IRootFolder $rootFolder,
+ string $userId,
+ DirectMapper $mapper,
+ ISecureRandom $random,
+ ITimeFactory $timeFactory,
+ IURLGenerator $urlGenerator,
+ IEventDispatcher $eventDispatcher) {
parent::__construct($appName, $request);
$this->rootFolder = $rootFolder;
diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php
index 0ec630883dc..69d6bea4e5b 100644
--- a/apps/dav/lib/Controller/InvitationResponseController.php
+++ b/apps/dav/lib/Controller/InvitationResponseController.php
@@ -60,8 +60,8 @@ class InvitationResponseController extends Controller {
* @param InvitationResponseServer $responseServer
*/
public function __construct(string $appName, IRequest $request,
- IDBConnection $db, ITimeFactory $timeFactory,
- InvitationResponseServer $responseServer) {
+ IDBConnection $db, ITimeFactory $timeFactory,
+ InvitationResponseServer $responseServer) {
parent::__construct($appName, $request);
$this->db = $db;
$this->timeFactory = $timeFactory;
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php
index 9acc7c4b05b..8c126e6b71c 100644
--- a/apps/dav/lib/DAV/GroupPrincipalBackend.php
+++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php
@@ -104,7 +104,7 @@ class GroupPrincipalBackend implements BackendInterface {
* @return array
*/
public function getPrincipalByPath($path) {
- $elements = explode('/', $path, 3);
+ $elements = explode('/', $path, 3);
if ($elements[0] !== 'principals') {
return null;
}
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php
index 74b34b81b22..b115ef61313 100644
--- a/apps/dav/lib/DAV/Sharing/Backend.php
+++ b/apps/dav/lib/DAV/Sharing/Backend.php
@@ -31,10 +31,10 @@ namespace OCA\DAV\DAV\Sharing;
use OCA\DAV\Connector\Sabre\Principal;
use OCP\AppFramework\Db\TTransactional;
use OCP\Cache\CappedMemoryCache;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\IGroupManager;
use OCP\IUserManager;
-use OCP\DB\QueryBuilder\IQueryBuilder;
class Backend {
use TTransactional;
@@ -211,7 +211,7 @@ class Backend {
}
public function preloadShares(array $resourceIds): void {
- $resourceIds = array_filter($resourceIds, function(int $resourceId) {
+ $resourceIds = array_filter($resourceIds, function (int $resourceId) {
return !isset($this->shareCache[$resourceId]);
});
if (count($resourceIds) === 0) {
diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php
index c7d8691ab06..78e086bc907 100644
--- a/apps/dav/lib/DAV/Sharing/Plugin.php
+++ b/apps/dav/lib/DAV/Sharing/Plugin.php
@@ -113,7 +113,7 @@ class Plugin extends ServerPlugin {
$this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}invite'] = Invite::class;
$this->server->on('method:POST', [$this, 'httpPost']);
- $this->server->on('propFind', [$this, 'propFind']);
+ $this->server->on('propFind', [$this, 'propFind']);
}
/**
diff --git a/apps/dav/lib/DAV/ViewOnlyPlugin.php b/apps/dav/lib/DAV/ViewOnlyPlugin.php
index 51e3622142d..27e4a06f718 100644
--- a/apps/dav/lib/DAV/ViewOnlyPlugin.php
+++ b/apps/dav/lib/DAV/ViewOnlyPlugin.php
@@ -26,10 +26,10 @@ use OCA\DAV\Connector\Sabre\File as DavFile;
use OCA\Files_Versions\Sabre\VersionFile;
use OCP\Files\NotFoundException;
use Psr\Log\LoggerInterface;
+use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
-use Sabre\DAV\Exception\NotFound;
/**
* Sabre plugin for restricting file share receiver download:
@@ -74,7 +74,7 @@ class ViewOnlyPlugin extends ServerPlugin {
if ($davNode instanceof DavFile) {
// Restrict view-only to nodes which are shared
$node = $davNode->getNode();
- } else if ($davNode instanceof VersionFile) {
+ } elseif ($davNode instanceof VersionFile) {
$node = $davNode->getVersion()->getSourceFile();
} else {
return true;
diff --git a/apps/dav/lib/Direct/ServerFactory.php b/apps/dav/lib/Direct/ServerFactory.php
index ce689b1e88e..f9914a5cb36 100644
--- a/apps/dav/lib/Direct/ServerFactory.php
+++ b/apps/dav/lib/Direct/ServerFactory.php
@@ -53,12 +53,12 @@ class ServerFactory {
}
public function createServer(string $baseURI,
- string $requestURI,
- IRootFolder $rootFolder,
- DirectMapper $mapper,
- ITimeFactory $timeFactory,
- IThrottler $throttler,
- IRequest $request): Server {
+ string $requestURI,
+ IRootFolder $rootFolder,
+ DirectMapper $mapper,
+ ITimeFactory $timeFactory,
+ IThrottler $throttler,
+ IRequest $request): Server {
$home = new DirectHome($rootFolder, $mapper, $timeFactory, $throttler, $request, $this->eventDispatcher);
$server = new Server($home);
diff --git a/apps/dav/lib/Events/AddressBookCreatedEvent.php b/apps/dav/lib/Events/AddressBookCreatedEvent.php
index 86c4cd23640..396c246289c 100644
--- a/apps/dav/lib/Events/AddressBookCreatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookCreatedEvent.php
@@ -49,7 +49,7 @@ class AddressBookCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData) {
+ array $addressBookData) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/AddressBookDeletedEvent.php b/apps/dav/lib/Events/AddressBookDeletedEvent.php
index 3c8da6b7bf0..79785f5f0fa 100644
--- a/apps/dav/lib/Events/AddressBookDeletedEvent.php
+++ b/apps/dav/lib/Events/AddressBookDeletedEvent.php
@@ -53,8 +53,8 @@ class AddressBookDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares) {
+ array $addressBookData,
+ array $shares) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
index f9f8ff99d40..da3c2701abd 100644
--- a/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookShareUpdatedEvent.php
@@ -61,10 +61,10 @@ class AddressBookShareUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $oldShares,
- array $added,
- array $removed) {
+ array $addressBookData,
+ array $oldShares,
+ array $added,
+ array $removed) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/AddressBookUpdatedEvent.php b/apps/dav/lib/Events/AddressBookUpdatedEvent.php
index c632f1817a8..d651e569467 100644
--- a/apps/dav/lib/Events/AddressBookUpdatedEvent.php
+++ b/apps/dav/lib/Events/AddressBookUpdatedEvent.php
@@ -57,9 +57,9 @@ class AddressBookUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $mutations) {
+ array $addressBookData,
+ array $shares,
+ array $mutations) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
index 29e11ddc146..64d9b6dd2c7 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectCreatedEvent.php
@@ -57,9 +57,9 @@ class CachedCalendarObjectCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ array $subscriptionData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
index eaf98df60bf..183e8e8bcf9 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectDeletedEvent.php
@@ -57,9 +57,9 @@ class CachedCalendarObjectDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ array $subscriptionData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
index d47d75ec1d8..62781483def 100644
--- a/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
+++ b/apps/dav/lib/Events/CachedCalendarObjectUpdatedEvent.php
@@ -57,9 +57,9 @@ class CachedCalendarObjectUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $objectData) {
+ array $subscriptionData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Events/CalendarCreatedEvent.php b/apps/dav/lib/Events/CalendarCreatedEvent.php
index ba51002f829..649a242a1d2 100644
--- a/apps/dav/lib/Events/CalendarCreatedEvent.php
+++ b/apps/dav/lib/Events/CalendarCreatedEvent.php
@@ -49,7 +49,7 @@ class CalendarCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData) {
+ array $calendarData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarDeletedEvent.php b/apps/dav/lib/Events/CalendarDeletedEvent.php
index d6207ac6ee2..97d522cde7c 100644
--- a/apps/dav/lib/Events/CalendarDeletedEvent.php
+++ b/apps/dav/lib/Events/CalendarDeletedEvent.php
@@ -53,8 +53,8 @@ class CalendarDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ array $calendarData,
+ array $shares) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
index c04b383d5bf..5fb2f48a75c 100644
--- a/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
+++ b/apps/dav/lib/Events/CalendarMovedToTrashEvent.php
@@ -48,8 +48,8 @@ class CalendarMovedToTrashEvent extends Event {
* @since 22.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ array $calendarData,
+ array $shares) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectCreatedEvent.php b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
index 294c778335e..123f7fc229f 100644
--- a/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectCreatedEvent.php
@@ -57,9 +57,9 @@ class CalendarObjectCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ array $calendarData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectDeletedEvent.php b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
index 7a621994b80..8c5834ff050 100644
--- a/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectDeletedEvent.php
@@ -57,9 +57,9 @@ class CalendarObjectDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ array $calendarData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectMovedEvent.php b/apps/dav/lib/Events/CalendarObjectMovedEvent.php
index 0143dad9a96..402a9adf979 100644
--- a/apps/dav/lib/Events/CalendarObjectMovedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectMovedEvent.php
@@ -46,12 +46,12 @@ class CalendarObjectMovedEvent extends Event {
* @since 25.0.0
*/
public function __construct(int $sourceCalendarId,
- array $sourceCalendarData,
- int $targetCalendarId,
- array $targetCalendarData,
- array $sourceShares,
- array $targetShares,
- array $objectData) {
+ array $sourceCalendarData,
+ int $targetCalendarId,
+ array $targetCalendarData,
+ array $sourceShares,
+ array $targetShares,
+ array $objectData) {
parent::__construct();
$this->sourceCalendarId = $sourceCalendarId;
$this->sourceCalendarData = $sourceCalendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php b/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
index d7a3b99de82..b963d1321a4 100644
--- a/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectMovedToTrashEvent.php
@@ -52,9 +52,9 @@ class CalendarObjectMovedToTrashEvent extends Event {
* @since 22.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ array $calendarData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectRestoredEvent.php b/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
index 42f296e64cc..76589725986 100644
--- a/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectRestoredEvent.php
@@ -52,9 +52,9 @@ class CalendarObjectRestoredEvent extends Event {
* @since 22.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ array $calendarData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
index 84157afd20a..45d66370137 100644
--- a/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarObjectUpdatedEvent.php
@@ -57,9 +57,9 @@ class CalendarObjectUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $objectData) {
+ array $calendarData,
+ array $shares,
+ array $objectData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarPublishedEvent.php b/apps/dav/lib/Events/CalendarPublishedEvent.php
index a95e9f294c1..b92d17901f7 100644
--- a/apps/dav/lib/Events/CalendarPublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarPublishedEvent.php
@@ -48,8 +48,8 @@ class CalendarPublishedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- string $publicUri) {
+ array $calendarData,
+ string $publicUri) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarRestoredEvent.php b/apps/dav/lib/Events/CalendarRestoredEvent.php
index ef477ac1d48..b44b3607969 100644
--- a/apps/dav/lib/Events/CalendarRestoredEvent.php
+++ b/apps/dav/lib/Events/CalendarRestoredEvent.php
@@ -48,8 +48,8 @@ class CalendarRestoredEvent extends Event {
* @since 22.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares) {
+ array $calendarData,
+ array $shares) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
index dedd9f8a566..ebde62a8be2 100644
--- a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php
@@ -61,10 +61,10 @@ class CalendarShareUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $oldShares,
- array $added,
- array $removed) {
+ array $calendarData,
+ array $oldShares,
+ array $added,
+ array $removed) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarUnpublishedEvent.php b/apps/dav/lib/Events/CalendarUnpublishedEvent.php
index b2536fc7aef..ede60aeb904 100644
--- a/apps/dav/lib/Events/CalendarUnpublishedEvent.php
+++ b/apps/dav/lib/Events/CalendarUnpublishedEvent.php
@@ -46,7 +46,7 @@ class CalendarUnpublishedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData) {
+ array $calendarData) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CalendarUpdatedEvent.php b/apps/dav/lib/Events/CalendarUpdatedEvent.php
index ec33412b478..c39d22b281c 100644
--- a/apps/dav/lib/Events/CalendarUpdatedEvent.php
+++ b/apps/dav/lib/Events/CalendarUpdatedEvent.php
@@ -57,9 +57,9 @@ class CalendarUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $calendarId,
- array $calendarData,
- array $shares,
- array $mutations) {
+ array $calendarData,
+ array $shares,
+ array $mutations) {
parent::__construct();
$this->calendarId = $calendarId;
$this->calendarData = $calendarData;
diff --git a/apps/dav/lib/Events/CardCreatedEvent.php b/apps/dav/lib/Events/CardCreatedEvent.php
index 4c6b1714721..138cccd6862 100644
--- a/apps/dav/lib/Events/CardCreatedEvent.php
+++ b/apps/dav/lib/Events/CardCreatedEvent.php
@@ -57,9 +57,9 @@ class CardCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ array $addressBookData,
+ array $shares,
+ array $cardData) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/CardDeletedEvent.php b/apps/dav/lib/Events/CardDeletedEvent.php
index f4d7e21fab1..e0a92a2076a 100644
--- a/apps/dav/lib/Events/CardDeletedEvent.php
+++ b/apps/dav/lib/Events/CardDeletedEvent.php
@@ -57,9 +57,9 @@ class CardDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ array $addressBookData,
+ array $shares,
+ array $cardData) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/CardMovedEvent.php b/apps/dav/lib/Events/CardMovedEvent.php
index 07139cfdecf..38a66ed08b6 100644
--- a/apps/dav/lib/Events/CardMovedEvent.php
+++ b/apps/dav/lib/Events/CardMovedEvent.php
@@ -46,12 +46,12 @@ class CardMovedEvent extends Event {
* @since 27.0.0
*/
public function __construct(int $sourceAddressBookId,
- array $sourceAddressBookData,
- int $targetAddressBookId,
- array $targetAddressBookData,
- array $sourceShares,
- array $targetShares,
- array $objectData) {
+ array $sourceAddressBookData,
+ int $targetAddressBookId,
+ array $targetAddressBookData,
+ array $sourceShares,
+ array $targetShares,
+ array $objectData) {
parent::__construct();
$this->sourceAddressBookId = $sourceAddressBookId;
$this->sourceAddressBookData = $sourceAddressBookData;
diff --git a/apps/dav/lib/Events/CardUpdatedEvent.php b/apps/dav/lib/Events/CardUpdatedEvent.php
index 213419d51a3..40f28713ce6 100644
--- a/apps/dav/lib/Events/CardUpdatedEvent.php
+++ b/apps/dav/lib/Events/CardUpdatedEvent.php
@@ -57,9 +57,9 @@ class CardUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $addressBookId,
- array $addressBookData,
- array $shares,
- array $cardData) {
+ array $addressBookData,
+ array $shares,
+ array $cardData) {
parent::__construct();
$this->addressBookId = $addressBookId;
$this->addressBookData = $addressBookData;
diff --git a/apps/dav/lib/Events/SubscriptionCreatedEvent.php b/apps/dav/lib/Events/SubscriptionCreatedEvent.php
index f7fc2101221..9932e70c4c8 100644
--- a/apps/dav/lib/Events/SubscriptionCreatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionCreatedEvent.php
@@ -49,7 +49,7 @@ class SubscriptionCreatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData) {
+ array $subscriptionData) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Events/SubscriptionDeletedEvent.php b/apps/dav/lib/Events/SubscriptionDeletedEvent.php
index fc31005ac0f..8aa36f4584b 100644
--- a/apps/dav/lib/Events/SubscriptionDeletedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionDeletedEvent.php
@@ -53,8 +53,8 @@ class SubscriptionDeletedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares) {
+ array $subscriptionData,
+ array $shares) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
index 29231d13a7f..eb90177a00d 100644
--- a/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
+++ b/apps/dav/lib/Events/SubscriptionUpdatedEvent.php
@@ -57,9 +57,9 @@ class SubscriptionUpdatedEvent extends Event {
* @since 20.0.0
*/
public function __construct(int $subscriptionId,
- array $subscriptionData,
- array $shares,
- array $mutations) {
+ array $subscriptionData,
+ array $shares,
+ array $mutations) {
parent::__construct();
$this->subscriptionId = $subscriptionId;
$this->subscriptionData = $subscriptionData;
diff --git a/apps/dav/lib/Files/FileSearchBackend.php b/apps/dav/lib/Files/FileSearchBackend.php
index 419a0c5ed3b..fd45491da7e 100644
--- a/apps/dav/lib/Files/FileSearchBackend.php
+++ b/apps/dav/lib/Files/FileSearchBackend.php
@@ -39,7 +39,6 @@ use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
-use OCP\Files\Search\ISearchComparison;
use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchOrder;
use OCP\Files\Search\ISearchQuery;
@@ -372,6 +371,7 @@ class FileSearchBackend implements ISearchBackend {
throw new \InvalidArgumentException('Invalid argument 2 for ' . $trimmedType . ' operation, expected literal');
}
$value = $operator->arguments[1]->value;
+ // no break
case Operator::OPERATION_IS_DEFINED:
if (!($operator->arguments[0] instanceof SearchPropertyDefinition)) {
throw new \InvalidArgumentException('Invalid argument 1 for ' . $trimmedType . ' operation, expected property');
@@ -429,7 +429,7 @@ class FileSearchBackend implements ISearchBackend {
return '';
}
- switch ($property->dataType) {
+ switch ($property->dataType) {
case SearchPropertyDefinition::DATATYPE_BOOLEAN:
return $value === 'yes';
case SearchPropertyDefinition::DATATYPE_DECIMAL:
diff --git a/apps/dav/lib/Files/LazySearchBackend.php b/apps/dav/lib/Files/LazySearchBackend.php
index c3b2f27d72a..ccd6fde14e1 100644
--- a/apps/dav/lib/Files/LazySearchBackend.php
+++ b/apps/dav/lib/Files/LazySearchBackend.php
@@ -22,7 +22,6 @@
*/
namespace OCA\DAV\Files;
-use Sabre\DAV\INode;
use SearchDAV\Backend\ISearchBackend;
use SearchDAV\Query\Query;
diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php
index 9e923440e38..1e7990af32f 100644
--- a/apps/dav/lib/HookManager.php
+++ b/apps/dav/lib/HookManager.php
@@ -67,10 +67,10 @@ class HookManager {
private $themingDefaults;
public function __construct(IUserManager $userManager,
- SyncService $syncService,
- CalDavBackend $calDav,
- CardDavBackend $cardDav,
- Defaults $themingDefaults) {
+ SyncService $syncService,
+ CalDavBackend $calDav,
+ CardDavBackend $cardDav,
+ Defaults $themingDefaults) {
$this->userManager = $userManager;
$this->syncService = $syncService;
$this->calDav = $calDav;
diff --git a/apps/dav/lib/Listener/ActivityUpdaterListener.php b/apps/dav/lib/Listener/ActivityUpdaterListener.php
index ea3ec49c14d..ba0d47f148f 100644
--- a/apps/dav/lib/Listener/ActivityUpdaterListener.php
+++ b/apps/dav/lib/Listener/ActivityUpdaterListener.php
@@ -53,7 +53,7 @@ class ActivityUpdaterListener implements IEventListener {
private $logger;
public function __construct(ActivityBackend $activityBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->activityBackend = $activityBackend;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/AddressbookListener.php b/apps/dav/lib/Listener/AddressbookListener.php
index 3c17d399d4e..489a814d158 100644
--- a/apps/dav/lib/Listener/AddressbookListener.php
+++ b/apps/dav/lib/Listener/AddressbookListener.php
@@ -44,7 +44,7 @@ class AddressbookListener implements IEventListener {
private $logger;
public function __construct(ActivityBackend $activityBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->activityBackend = $activityBackend;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/CalendarContactInteractionListener.php b/apps/dav/lib/Listener/CalendarContactInteractionListener.php
index b27aa53aa11..6787d9316e9 100644
--- a/apps/dav/lib/Listener/CalendarContactInteractionListener.php
+++ b/apps/dav/lib/Listener/CalendarContactInteractionListener.php
@@ -64,10 +64,10 @@ class CalendarContactInteractionListener implements IEventListener {
private $logger;
public function __construct(IEventDispatcher $dispatcher,
- IUserSession $userSession,
- Principal $principalConnector,
- IMailer $mailer,
- LoggerInterface $logger) {
+ IUserSession $userSession,
+ Principal $principalConnector,
+ IMailer $mailer,
+ LoggerInterface $logger) {
$this->dispatcher = $dispatcher;
$this->userSession = $userSession;
$this->principalConnector = $principalConnector;
diff --git a/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php b/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php
index 42dd0dfc0a7..23835f1626e 100644
--- a/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php
+++ b/apps/dav/lib/Listener/CalendarDeletionDefaultUpdaterListener.php
@@ -44,7 +44,7 @@ class CalendarDeletionDefaultUpdaterListener implements IEventListener {
private $logger;
public function __construct(IConfig $config,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->config = $config;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php b/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php
index 3c168f6105c..8b723b95527 100644
--- a/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php
+++ b/apps/dav/lib/Listener/CalendarObjectReminderUpdaterListener.php
@@ -57,9 +57,9 @@ class CalendarObjectReminderUpdaterListener implements IEventListener {
private $logger;
public function __construct(ReminderBackend $reminderBackend,
- ReminderService $reminderService,
- CalDavBackend $calDavBackend,
- LoggerInterface $logger) {
+ ReminderService $reminderService,
+ CalDavBackend $calDavBackend,
+ LoggerInterface $logger) {
$this->reminderBackend = $reminderBackend;
$this->reminderService = $reminderService;
$this->calDavBackend = $calDavBackend;
diff --git a/apps/dav/lib/Listener/CalendarPublicationListener.php b/apps/dav/lib/Listener/CalendarPublicationListener.php
index 1453694d6fb..e86bfa73c55 100644
--- a/apps/dav/lib/Listener/CalendarPublicationListener.php
+++ b/apps/dav/lib/Listener/CalendarPublicationListener.php
@@ -37,7 +37,7 @@ class CalendarPublicationListener implements IEventListener {
private LoggerInterface $logger;
public function __construct(Backend $activityBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->activityBackend = $activityBackend;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/CalendarShareUpdateListener.php b/apps/dav/lib/Listener/CalendarShareUpdateListener.php
index dd046ddd66a..3f4f6f0a316 100644
--- a/apps/dav/lib/Listener/CalendarShareUpdateListener.php
+++ b/apps/dav/lib/Listener/CalendarShareUpdateListener.php
@@ -36,7 +36,7 @@ class CalendarShareUpdateListener implements IEventListener {
private LoggerInterface $logger;
public function __construct(Backend $activityBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->activityBackend = $activityBackend;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/CardListener.php b/apps/dav/lib/Listener/CardListener.php
index 0281127c858..69398435958 100644
--- a/apps/dav/lib/Listener/CardListener.php
+++ b/apps/dav/lib/Listener/CardListener.php
@@ -25,8 +25,8 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Listener;
-use OCA\DAV\CardDAV\Activity\Provider\Card;
use OCA\DAV\CardDAV\Activity\Backend as ActivityBackend;
+use OCA\DAV\CardDAV\Activity\Provider\Card;
use OCA\DAV\Events\CardCreatedEvent;
use OCA\DAV\Events\CardDeletedEvent;
use OCA\DAV\Events\CardUpdatedEvent;
@@ -44,7 +44,7 @@ class CardListener implements IEventListener {
private $logger;
public function __construct(ActivityBackend $activityBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->activityBackend = $activityBackend;
$this->logger = $logger;
}
diff --git a/apps/dav/lib/Listener/OutOfOfficeListener.php b/apps/dav/lib/Listener/OutOfOfficeListener.php
index 645a01a35cf..609c32f5067 100644
--- a/apps/dav/lib/Listener/OutOfOfficeListener.php
+++ b/apps/dav/lib/Listener/OutOfOfficeListener.php
@@ -53,8 +53,8 @@ use function rewind;
*/
class OutOfOfficeListener implements IEventListener {
public function __construct(private ServerFactory $serverFactory,
- private IConfig $appConfig,
- private LoggerInterface $logger) {
+ private IConfig $appConfig,
+ private LoggerInterface $logger) {
}
public function handle(Event $event): void {
@@ -80,7 +80,7 @@ class OutOfOfficeListener implements IEventListener {
} finally {
fclose($stream);
}
- } else if ($event instanceof OutOfOfficeChangedEvent) {
+ } elseif ($event instanceof OutOfOfficeChangedEvent) {
$userId = $event->getData()->getUser()->getUID();
$principal = "principals/users/$userId";
@@ -107,7 +107,7 @@ class OutOfOfficeListener implements IEventListener {
fclose($stream);
}
}
- } else if ($event instanceof OutOfOfficeClearedEvent) {
+ } elseif ($event instanceof OutOfOfficeClearedEvent) {
$userId = $event->getData()->getUser()->getUID();
$principal = "principals/users/$userId";
diff --git a/apps/dav/lib/Listener/SubscriptionListener.php b/apps/dav/lib/Listener/SubscriptionListener.php
index 36db234aa05..c7e1bbfecda 100644
--- a/apps/dav/lib/Listener/SubscriptionListener.php
+++ b/apps/dav/lib/Listener/SubscriptionListener.php
@@ -42,7 +42,7 @@ class SubscriptionListener implements IEventListener {
private LoggerInterface $logger;
public function __construct(IJobList $jobList, RefreshWebcalService $refreshWebcalService, ReminderBackend $reminderBackend,
- LoggerInterface $logger) {
+ LoggerInterface $logger) {
$this->jobList = $jobList;
$this->refreshWebcalService = $refreshWebcalService;
$this->reminderBackend = $reminderBackend;
diff --git a/apps/dav/lib/Migration/BuildCalendarSearchIndex.php b/apps/dav/lib/Migration/BuildCalendarSearchIndex.php
index c8a649f3449..fc9a6d9a559 100644
--- a/apps/dav/lib/Migration/BuildCalendarSearchIndex.php
+++ b/apps/dav/lib/Migration/BuildCalendarSearchIndex.php
@@ -49,8 +49,8 @@ class BuildCalendarSearchIndex implements IRepairStep {
* @param IConfig $config
*/
public function __construct(IDBConnection $db,
- IJobList $jobList,
- IConfig $config) {
+ IJobList $jobList,
+ IConfig $config) {
$this->db = $db;
$this->jobList = $jobList;
$this->config = $config;
diff --git a/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php
index 6a315f2a150..a816e2619a3 100644
--- a/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildCalendarSearchIndexBackgroundJob.php
@@ -55,10 +55,10 @@ class BuildCalendarSearchIndexBackgroundJob extends QueuedJob {
* @param ITimeFactory $timeFactory
*/
public function __construct(IDBConnection $db,
- CalDavBackend $calDavBackend,
- ILogger $logger,
- IJobList $jobList,
- ITimeFactory $timeFactory) {
+ CalDavBackend $calDavBackend,
+ ILogger $logger,
+ IJobList $jobList,
+ ITimeFactory $timeFactory) {
$this->db = $db;
$this->calDavBackend = $calDavBackend;
$this->logger = $logger;
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndex.php b/apps/dav/lib/Migration/BuildSocialSearchIndex.php
index ae2eb084e2b..f3872acc3ab 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndex.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndex.php
@@ -46,8 +46,8 @@ class BuildSocialSearchIndex implements IRepairStep {
* @param IConfig $config
*/
public function __construct(IDBConnection $db,
- IJobList $jobList,
- IConfig $config) {
+ IJobList $jobList,
+ IConfig $config) {
$this->db = $db;
$this->jobList = $jobList;
$this->config = $config;
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
index 98afecc3b7d..231749521be 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndexBackgroundJob.php
@@ -54,10 +54,10 @@ class BuildSocialSearchIndexBackgroundJob extends QueuedJob {
* @param ITimeFactory $timeFactory
*/
public function __construct(IDBConnection $db,
- CardDavBackend $davBackend,
- ILogger $logger,
- IJobList $jobList,
- ITimeFactory $timeFactory) {
+ CardDavBackend $davBackend,
+ ILogger $logger,
+ IJobList $jobList,
+ ITimeFactory $timeFactory) {
$this->db = $db;
$this->davBackend = $davBackend;
$this->logger = $logger;
diff --git a/apps/dav/lib/Migration/ChunkCleanup.php b/apps/dav/lib/Migration/ChunkCleanup.php
index 918023552da..8a4ad5664a4 100644
--- a/apps/dav/lib/Migration/ChunkCleanup.php
+++ b/apps/dav/lib/Migration/ChunkCleanup.php
@@ -48,9 +48,9 @@ class ChunkCleanup implements IRepairStep {
private $jobList;
public function __construct(IConfig $config,
- IUserManager $userManager,
- IRootFolder $rootFolder,
- IJobList $jobList) {
+ IUserManager $userManager,
+ IRootFolder $rootFolder,
+ IJobList $jobList) {
$this->config = $config;
$this->userManager = $userManager;
$this->rootFolder = $rootFolder;
diff --git a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
index 29547b09ff7..a8138d876e9 100644
--- a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
+++ b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
@@ -42,7 +42,7 @@ class RegenerateBirthdayCalendars implements IRepairStep {
* @param IConfig $config
*/
public function __construct(IJobList $jobList,
- IConfig $config) {
+ IConfig $config) {
$this->jobList = $jobList;
$this->config = $config;
}
diff --git a/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php b/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php
index f488d85bde2..0b5062fcf3e 100644
--- a/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php
+++ b/apps/dav/lib/Migration/RegisterBuildReminderIndexBackgroundJob.php
@@ -60,8 +60,8 @@ class RegisterBuildReminderIndexBackgroundJob implements IRepairStep {
* @param IConfig $config
*/
public function __construct(IDBConnection $db,
- IJobList $jobList,
- IConfig $config) {
+ IJobList $jobList,
+ IConfig $config) {
$this->db = $db;
$this->jobList = $jobList;
$this->config = $config;
diff --git a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
index 4789a74d98a..a36d43d29df 100644
--- a/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
+++ b/apps/dav/lib/Migration/RemoveOrphanEventsAndContacts.php
@@ -53,23 +53,23 @@ class RemoveOrphanEventsAndContacts implements IRepairStep {
* @inheritdoc
*/
public function run(IOutput $output) {
- $orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendars', 'calendarid');
+ $orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendars', 'calendarid');
$output->info(sprintf('%d events without a calendar have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('calendarobjects_props', 'calendarobjects', 'objectid');
+ $orphanItems = $this->removeOrphanChildren('calendarobjects_props', 'calendarobjects', 'objectid');
$output->info(sprintf('%d properties without an events have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendars', 'calendarid');
+ $orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendars', 'calendarid');
$output->info(sprintf('%d changes without a calendar have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendarsubscriptions', 'calendarid');
+ $orphanItems = $this->removeOrphanChildren('calendarobjects', 'calendarsubscriptions', 'calendarid');
$output->info(sprintf('%d cached events without a calendar subscription have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendarsubscriptions', 'calendarid');
+ $orphanItems = $this->removeOrphanChildren('calendarchanges', 'calendarsubscriptions', 'calendarid');
$output->info(sprintf('%d changes without a calendar subscription have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('cards', 'addressbooks', 'addressbookid');
+ $orphanItems = $this->removeOrphanChildren('cards', 'addressbooks', 'addressbookid');
$output->info(sprintf('%d contacts without an addressbook have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('cards_properties', 'cards', 'cardid');
+ $orphanItems = $this->removeOrphanChildren('cards_properties', 'cards', 'cardid');
$output->info(sprintf('%d properties without a contact have been cleaned up', $orphanItems));
- $orphanItems = $this->removeOrphanChildren('addressbookchanges', 'addressbooks', 'addressbookid');
+ $orphanItems = $this->removeOrphanChildren('addressbookchanges', 'addressbooks', 'addressbookid');
$output->info(sprintf('%d changes without an addressbook have been cleaned up', $orphanItems));
}
diff --git a/apps/dav/lib/Migration/Version1005Date20180413093149.php b/apps/dav/lib/Migration/Version1005Date20180413093149.php
index 1ee767ce547..6609b2396dd 100644
--- a/apps/dav/lib/Migration/Version1005Date20180413093149.php
+++ b/apps/dav/lib/Migration/Version1005Date20180413093149.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -48,7 +48,7 @@ class Version1005Date20180413093149 extends SimpleMigrationStep {
if (!$schema->hasTable('directlink')) {
$table = $schema->createTable('directlink');
- $table->addColumn('id',Types::BIGINT, [
+ $table->addColumn('id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
'length' => 11,
diff --git a/apps/dav/lib/Migration/Version1005Date20180530124431.php b/apps/dav/lib/Migration/Version1005Date20180530124431.php
index ae057f74599..9b0868f9374 100644
--- a/apps/dav/lib/Migration/Version1005Date20180530124431.php
+++ b/apps/dav/lib/Migration/Version1005Date20180530124431.php
@@ -26,8 +26,8 @@
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1006Date20180619154313.php b/apps/dav/lib/Migration/Version1006Date20180619154313.php
index c607a14c2a9..36e35f615ac 100644
--- a/apps/dav/lib/Migration/Version1006Date20180619154313.php
+++ b/apps/dav/lib/Migration/Version1006Date20180619154313.php
@@ -26,8 +26,8 @@
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1006Date20180628111625.php b/apps/dav/lib/Migration/Version1006Date20180628111625.php
index 7ce2edccc28..8c3a8e4938c 100644
--- a/apps/dav/lib/Migration/Version1006Date20180628111625.php
+++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1008Date20181030113700.php b/apps/dav/lib/Migration/Version1008Date20181030113700.php
index 694f096ff3e..e9751159913 100644
--- a/apps/dav/lib/Migration/Version1008Date20181030113700.php
+++ b/apps/dav/lib/Migration/Version1008Date20181030113700.php
@@ -30,8 +30,8 @@ namespace OCA\DAV\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php
index 86ce4c33ce5..7b0c9861a98 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105104826.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
namespace OCA\DAV\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1008Date20181105110300.php b/apps/dav/lib/Migration/Version1008Date20181105110300.php
index e275b2a8e1e..9a69d106412 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105110300.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
namespace OCA\DAV\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1011Date20190725113607.php b/apps/dav/lib/Migration/Version1011Date20190725113607.php
index 1191f0e8878..a6673378259 100644
--- a/apps/dav/lib/Migration/Version1011Date20190725113607.php
+++ b/apps/dav/lib/Migration/Version1011Date20190725113607.php
@@ -28,8 +28,8 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1011Date20190806104428.php b/apps/dav/lib/Migration/Version1011Date20190806104428.php
index a6f8772ec08..7c41bce87f5 100644
--- a/apps/dav/lib/Migration/Version1011Date20190806104428.php
+++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
namespace OCA\DAV\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/dav/lib/Migration/Version1012Date20190808122342.php b/apps/dav/lib/Migration/Version1012Date20190808122342.php
index 7bb39db6bf1..e72b552cac1 100644
--- a/apps/dav/lib/Migration/Version1012Date20190808122342.php
+++ b/apps/dav/lib/Migration/Version1012Date20190808122342.php
@@ -29,8 +29,8 @@ declare(strict_types=1);
*/
namespace OCA\DAV\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -47,8 +47,8 @@ class Version1012Date20190808122342 extends SimpleMigrationStep {
* @since 17.0.0
*/
public function changeSchema(IOutput $output,
- \Closure $schemaClosure,
- array $options):?ISchemaWrapper {
+ \Closure $schemaClosure,
+ array $options):?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
diff --git a/apps/dav/lib/Migration/Version1027Date20230504122946.php b/apps/dav/lib/Migration/Version1027Date20230504122946.php
index b1aaec0559b..28361011436 100644
--- a/apps/dav/lib/Migration/Version1027Date20230504122946.php
+++ b/apps/dav/lib/Migration/Version1027Date20230504122946.php
@@ -33,16 +33,15 @@ use OCP\IConfig;
use OCP\IUserManager;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
-use Psr\Container\ContainerExceptionInterface;
-use Psr\Container\NotFoundExceptionInterface;
use Psr\Log\LoggerInterface;
use Throwable;
class Version1027Date20230504122946 extends SimpleMigrationStep {
public function __construct(private SyncService $syncService,
- private LoggerInterface $logger,
- private IUserManager $userManager,
- private IConfig $config) {}
+ private LoggerInterface $logger,
+ private IUserManager $userManager,
+ private IConfig $config) {
+ }
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
diff --git a/apps/dav/lib/Profiler/ProfilerPlugin.php b/apps/dav/lib/Profiler/ProfilerPlugin.php
index 672ca4010b7..cc65c2b75e1 100644
--- a/apps/dav/lib/Profiler/ProfilerPlugin.php
+++ b/apps/dav/lib/Profiler/ProfilerPlugin.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types = 1);
+<?php
+
+declare(strict_types = 1);
/**
* @copyright 2021 Carl Schwan <carl@carlschwan.eu>
*
diff --git a/apps/dav/lib/RootCollection.php b/apps/dav/lib/RootCollection.php
index 90be581a2a9..c751a4babf5 100644
--- a/apps/dav/lib/RootCollection.php
+++ b/apps/dav/lib/RootCollection.php
@@ -50,7 +50,6 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\IRootFolder;
use OCP\IConfig;
-use OCP\IGroupManager;
use Psr\Log\LoggerInterface;
use Sabre\DAV\SimpleCollection;
diff --git a/apps/dav/lib/Search/ACalendarSearchProvider.php b/apps/dav/lib/Search/ACalendarSearchProvider.php
index 91904d5e8d6..82c15efec64 100644
--- a/apps/dav/lib/Search/ACalendarSearchProvider.php
+++ b/apps/dav/lib/Search/ACalendarSearchProvider.php
@@ -61,9 +61,9 @@ abstract class ACalendarSearchProvider implements IProvider {
* @param CalDavBackend $backend
*/
public function __construct(IAppManager $appManager,
- IL10N $l10n,
- IURLGenerator $urlGenerator,
- CalDavBackend $backend) {
+ IL10N $l10n,
+ IURLGenerator $urlGenerator,
+ CalDavBackend $backend) {
$this->appManager = $appManager;
$this->l10n = $l10n;
$this->urlGenerator = $urlGenerator;
diff --git a/apps/dav/lib/Search/EventsSearchProvider.php b/apps/dav/lib/Search/EventsSearchProvider.php
index 4a2447c25f9..0cf01742672 100644
--- a/apps/dav/lib/Search/EventsSearchProvider.php
+++ b/apps/dav/lib/Search/EventsSearchProvider.php
@@ -153,7 +153,7 @@ class EventsSearchProvider extends ACalendarSearchProvider implements IFiltering
);
$searchResultIndex = array_combine(
- array_map(fn($event) => $event['calendarid'] . '-' . $event['uri'], $searchResults),
+ array_map(fn ($event) => $event['calendarid'] . '-' . $event['uri'], $searchResults),
array_fill(0, count($searchResults), null),
);
foreach ($attendeeSearchResults as $attendeeResult) {
diff --git a/apps/dav/lib/Service/AbsenceService.php b/apps/dav/lib/Service/AbsenceService.php
index b31a910c4d2..b50dd32e925 100644
--- a/apps/dav/lib/Service/AbsenceService.php
+++ b/apps/dav/lib/Service/AbsenceService.php
@@ -110,4 +110,3 @@ class AbsenceService {
$this->eventDispatcher->dispatchTyped(new OutOfOfficeClearedEvent($eventData));
}
}
-
diff --git a/apps/dav/lib/Settings/AvailabilitySettings.php b/apps/dav/lib/Settings/AvailabilitySettings.php
index c48ebe0255e..f8986ffe5d1 100644
--- a/apps/dav/lib/Settings/AvailabilitySettings.php
+++ b/apps/dav/lib/Settings/AvailabilitySettings.php
@@ -42,11 +42,11 @@ class AvailabilitySettings implements ISettings {
protected ?string $userId;
public function __construct(IConfig $config,
- IInitialState $initialState,
- ?string $userId,
- private LoggerInterface $logger,
- private IAvailabilityCoordinator $coordinator,
- private AbsenceMapper $absenceMapper) {
+ IInitialState $initialState,
+ ?string $userId,
+ private LoggerInterface $logger,
+ private IAvailabilityCoordinator $coordinator,
+ private AbsenceMapper $absenceMapper) {
$this->config = $config;
$this->initialState = $initialState;
$this->userId = $userId;
diff --git a/apps/dav/lib/Settings/CalDAVSettings.php b/apps/dav/lib/Settings/CalDAVSettings.php
index 1938d20c9f5..2985c9fc888 100644
--- a/apps/dav/lib/Settings/CalDAVSettings.php
+++ b/apps/dav/lib/Settings/CalDAVSettings.php
@@ -27,8 +27,8 @@ namespace OCA\DAV\Settings;
use OCA\DAV\AppInfo\Application;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IConfig;
use OCP\AppFramework\Services\IInitialState;
+use OCP\IConfig;
use OCP\IURLGenerator;
use OCP\Settings\IDelegatedSettings;
diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php
index 58f61c13232..34b71ae40f2 100644
--- a/apps/dav/lib/SystemTag/SystemTagPlugin.php
+++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php
@@ -353,11 +353,11 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
}
}
- $tags = array_filter(array_map(function(string $tagId) {
+ $tags = array_filter(array_map(function (string $tagId) {
return $this->cachedTags[$tagId] ?? null;
}, $tagIds));
- $uncachedTagIds = array_filter($tagIds, function(string $tagId): bool {
+ $uncachedTagIds = array_filter($tagIds, function (string $tagId): bool {
return !isset($this->cachedTags[$tagId]);
});
@@ -369,7 +369,7 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
$tags += $retrievedTags;
}
- return array_filter($tags, function(ISystemTag $tag) use ($user) {
+ return array_filter($tags, function (ISystemTag $tag) use ($user) {
return $this->tagManager->canUserSeeTag($tag, $user);
});
}
diff --git a/apps/dav/lib/Upload/RootCollection.php b/apps/dav/lib/Upload/RootCollection.php
index e3ae22af5e9..e05c154c8ea 100644
--- a/apps/dav/lib/Upload/RootCollection.php
+++ b/apps/dav/lib/Upload/RootCollection.php
@@ -35,8 +35,8 @@ class RootCollection extends AbstractPrincipalCollection {
private $cleanupService;
public function __construct(PrincipalBackend\BackendInterface $principalBackend,
- string $principalPrefix,
- CleanupService $cleanupService) {
+ string $principalPrefix,
+ CleanupService $cleanupService) {
parent::__construct($principalBackend, $principalPrefix);
$this->cleanupService = $cleanupService;
}
diff --git a/apps/dav/lib/UserMigration/CalendarMigrator.php b/apps/dav/lib/UserMigration/CalendarMigrator.php
index 7666dc99eea..14ea4459435 100644
--- a/apps/dav/lib/UserMigration/CalendarMigrator.php
+++ b/apps/dav/lib/UserMigration/CalendarMigrator.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OCA\DAV\UserMigration;
-use function substr;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CalDAV\ICSExportPlugin\ICSExportPlugin;
@@ -53,6 +52,7 @@ use Sabre\VObject\UUIDUtil;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
+use function substr;
class CalendarMigrator implements IMigrator, ISizeEstimationMigrator {
diff --git a/apps/dav/lib/UserMigration/ContactsMigrator.php b/apps/dav/lib/UserMigration/ContactsMigrator.php
index 53aac0a4cfa..879642b9dc1 100644
--- a/apps/dav/lib/UserMigration/ContactsMigrator.php
+++ b/apps/dav/lib/UserMigration/ContactsMigrator.php
@@ -26,8 +26,6 @@ declare(strict_types=1);
namespace OCA\DAV\UserMigration;
-use function sort;
-use function substr;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\Plugin as CardDAVPlugin;
@@ -49,6 +47,8 @@ use Sabre\VObject\UUIDUtil;
use Symfony\Component\Console\Output\NullOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
+use function sort;
+use function substr;
class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
diff --git a/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php b/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php
index 3efc5ab1473..92554016376 100644
--- a/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php
+++ b/apps/dav/tests/integration/UserMigration/CalendarMigratorTest.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OCA\DAV\Tests\integration\UserMigration;
-use function scandir;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\UserMigration\CalendarMigrator;
use OCP\AppFramework\App;
@@ -38,6 +37,7 @@ use Sabre\VObject\Reader as VObjectReader;
use Sabre\VObject\UUIDUtil;
use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
+use function scandir;
/**
* @group DB
diff --git a/apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php b/apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php
index 3fa043df285..0eb4801f570 100644
--- a/apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php
+++ b/apps/dav/tests/integration/UserMigration/ContactsMigratorTest.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OCA\DAV\Tests\integration\UserMigration;
-use function scandir;
use OCA\DAV\AppInfo\Application;
use OCA\DAV\UserMigration\ContactsMigrator;
use OCP\AppFramework\App;
@@ -38,6 +37,7 @@ use Sabre\VObject\Splitter\VCard as VCardSplitter;
use Sabre\VObject\UUIDUtil;
use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
+use function scandir;
/**
* @group DB
diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
index b4a414297d7..4dd61c6e307 100644
--- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
+++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php
@@ -27,6 +27,7 @@
*/
namespace OCA\DAV\Tests\unit\CalDAV;
+use OC\KnownUser\KnownUserService;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CalDAV\Proxy\ProxyMapper;
use OCA\DAV\Connector\Sabre\Principal;
@@ -40,7 +41,6 @@ use OCP\IUserSession;
use OCP\L10N\IFactory;
use OCP\Security\ISecureRandom;
use OCP\Share\IManager as ShareManager;
-use OC\KnownUser\KnownUserService;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Sabre\CalDAV\Xml\Property\SupportedCalendarComponentSet;
diff --git a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php
index e7bd2cc0b95..e0fdf16bc39 100644
--- a/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php
+++ b/apps/dav/tests/unit/CalDAV/AppCalendar/CalendarObjectTest.php
@@ -9,7 +9,6 @@ use OCP\Calendar\ICreateFromString;
use OCP\Constants;
use PHPUnit\Framework\MockObject\MockObject;
use Sabre\VObject\Component\VCalendar;
-use Sabre\VObject\Component\VEvent;
use Test\TestCase;
class CalendarObjectTest extends TestCase {
@@ -145,7 +144,7 @@ class CalendarObjectTest extends TestCase {
$backend->expects($this->once())
->method('createFromString')
- ->with('someid.ics', self::callback(fn($data): bool => preg_match('/BEGIN:VEVENT(.|\r\n)+STATUS:CANCELLED/', $data) === 1));
+ ->with('someid.ics', self::callback(fn ($data): bool => preg_match('/BEGIN:VEVENT(.|\r\n)+STATUS:CANCELLED/', $data) === 1));
$calendarObject->delete();
}
diff --git a/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php b/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php
index c21be3065c5..efc9ef32afc 100644
--- a/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/EventComparisonServiceTest.php
@@ -28,21 +28,17 @@ namespace OCA\DAV\Tests\unit\CalDAV;
use OCA\DAV\CalDAV\EventComparisonService;
use Sabre\VObject\Component\VCalendar;
-use Sabre\VObject\Component\VEvent;
use Test\TestCase;
-class EventComparisonServiceTest extends TestCase
-{
+class EventComparisonServiceTest extends TestCase {
/** @var EventComparisonService */
private $eventComparisonService;
- protected function setUp(): void
- {
+ protected function setUp(): void {
$this->eventComparisonService = new EventComparisonService();
}
- public function testNoModifiedEvent(): void
- {
+ public function testNoModifiedEvent(): void {
$vCalendarOld = new VCalendar();
$vCalendarNew = new VCalendar();
@@ -73,8 +69,7 @@ class EventComparisonServiceTest extends TestCase
$this->assertEmpty($result['new']);
}
- public function testNewEvent(): void
- {
+ public function testNewEvent(): void {
$vCalendarOld = null;
$vCalendarNew = new VCalendar();
@@ -94,8 +89,7 @@ class EventComparisonServiceTest extends TestCase
$this->assertEquals([$vEventNew], $result['new']);
}
- public function testModifiedUnmodifiedEvent(): void
- {
+ public function testModifiedUnmodifiedEvent(): void {
$vCalendarOld = new VCalendar();
$vCalendarNew = new VCalendar();
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php
index c409ff92aa4..12a5aa0123b 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php
@@ -68,7 +68,7 @@ class PublicCalendarTest extends CalendarTest {
$config = $this->createMock(IConfig::class);
/** @var MockObject | LoggerInterface $logger */
$logger = $this->createMock(LoggerInterface::class);
- $c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config,$logger);
+ $c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config, $logger);
$children = $c->getChildren();
$this->assertEquals(2, count($children));
$children = $c->getMultipleChildren(['event-0', 'event-1', 'event-2']);
@@ -156,7 +156,7 @@ EOD;
$config = $this->createMock(IConfig::class);
/** @var MockObject | LoggerInterface $logger */
$logger = $this->createMock(LoggerInterface::class);
- $c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config,$logger);
+ $c = new PublicCalendar($backend, $calendarInfo, $this->l10n, $config, $logger);
$this->assertEquals(count($c->getChildren()), 2);
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
index 5ff9dc36cf0..68f1d26f1ba 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/ReminderServiceTest.php
@@ -563,7 +563,8 @@ EOD;
$this->timeFactory->expects($this->once())
->method('getDateTime')
->with()
- ->willReturn(DateTime::createFromFormat(DateTime::ATOM, '2023-02-03T13:28:00+00:00'));;
+ ->willReturn(DateTime::createFromFormat(DateTime::ATOM, '2023-02-03T13:28:00+00:00'));
+ ;
$this->reminderService->onCalendarObjectCreate($objectData);
}
diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
index c5092e5f483..0e459418ae0 100644
--- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php
@@ -45,7 +45,6 @@ use Psr\Log\LoggerInterface;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;
use Sabre\VObject\ITip\Message;
-use Sabre\VObject\Property;
use Test\TestCase;
use function array_merge;
@@ -233,7 +232,7 @@ class IMipPluginTest extends TestCase {
->willReturn('yes');
$this->service->expects(self::once())
->method('createInvitationToken')
- ->with($message,$newVevent, '1496912700')
+ ->with($message, $newVevent, '1496912700')
->willReturn('token');
$this->service->expects(self::once())
->method('addResponseButtons')
diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php
index 000476050c7..14273109826 100644
--- a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php
+++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php
@@ -44,8 +44,7 @@ use Sabre\VObject\Component\VEvent;
use Sabre\VObject\Property\ICalendar\DateTime;
use Test\TestCase;
-class IMipServiceTest extends TestCase
-{
+class IMipServiceTest extends TestCase {
/** @var URLGenerator|MockObject */
private $urlGenerator;
@@ -67,8 +66,7 @@ class IMipServiceTest extends TestCase
/** @var IMipService */
private $service;
- protected function setUp(): void
- {
+ protected function setUp(): void {
$this->urlGenerator = $this->createMock(URLGenerator::class);
$this->config = $this->createMock(IConfig::class);
$this->db = $this->createMock(IDBConnection::class);
@@ -91,8 +89,7 @@ class IMipServiceTest extends TestCase
);
}
- public function testGetFrom(): void
- {
+ public function testGetFrom(): void {
$senderName = "Detective McQueen";
$default = "Twin Lakes Police Department - Darkside Division";
$expected = "Detective McQueen via Twin Lakes Police Department - Darkside Division";
@@ -105,8 +102,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals($expected, $actual);
}
- public function testBuildBodyDataCreated(): void
- {
+ public function testBuildBodyDataCreated(): void {
$vCalendar = new VCalendar();
$oldVevent = null;
$newVevent = new VEvent($vCalendar, 'two', [
@@ -132,8 +128,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals($expected, $actual);
}
- public function testBuildBodyDataUpdate(): void
- {
+ public function testBuildBodyDataUpdate(): void {
$vCalendar = new VCalendar();
$oldVevent = new VEvent($vCalendar, 'two', [
'UID' => 'uid-1234',
@@ -201,8 +196,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals($expected, $actual);
}
- public function testGetLastOccurrenceRRULE(): void
- {
+ public function testGetLastOccurrenceRRULE(): void {
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [
'UID' => 'uid-1234',
@@ -217,8 +211,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals(1454284800, $occurrence);
}
- public function testGetLastOccurrenceEndDate(): void
- {
+ public function testGetLastOccurrenceEndDate(): void {
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [
'UID' => 'uid-1234',
@@ -233,8 +226,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals(1483228800, $occurrence);
}
- public function testGetLastOccurrenceDuration(): void
- {
+ public function testGetLastOccurrenceDuration(): void {
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [
'UID' => 'uid-1234',
@@ -249,8 +241,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals(1458864000, $occurrence);
}
- public function testGetLastOccurrenceAllDay(): void
- {
+ public function testGetLastOccurrenceAllDay(): void {
$vCalendar = new VCalendar();
$vEvent = $vCalendar->add('VEVENT', [
'UID' => 'uid-1234',
@@ -267,8 +258,7 @@ class IMipServiceTest extends TestCase
$this->assertEquals(1451692800, $occurrence);
}
- public function testGetLastOccurrenceFallback(): void
- {
+ public function testGetLastOccurrenceFallback(): void {
$vCalendar = new VCalendar();
$vCalendar->add('VEVENT', [
'UID' => 'uid-1234',
diff --git a/apps/dav/tests/unit/CardDAV/AddressBookTest.php b/apps/dav/tests/unit/CardDAV/AddressBookTest.php
index 06d81662a42..f9cba4e6a83 100644
--- a/apps/dav/tests/unit/CardDAV/AddressBookTest.php
+++ b/apps/dav/tests/unit/CardDAV/AddressBookTest.php
@@ -29,7 +29,6 @@ namespace OCA\DAV\Tests\unit\CardDAV;
use OCA\DAV\CardDAV\AddressBook;
use OCA\DAV\CardDAV\Card;
use OCA\DAV\CardDAV\CardDavBackend;
-use OCA\DAV\DAV\CustomPropertiesBackend;
use OCP\IL10N;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
diff --git a/apps/dav/tests/unit/CardDAV/ConverterTest.php b/apps/dav/tests/unit/CardDAV/ConverterTest.php
index 7205cf56654..2f413876831 100644
--- a/apps/dav/tests/unit/CardDAV/ConverterTest.php
+++ b/apps/dav/tests/unit/CardDAV/ConverterTest.php
@@ -34,8 +34,8 @@ use OCA\DAV\CardDAV\Converter;
use OCP\Accounts\IAccount;
use OCP\Accounts\IAccountManager;
use OCP\Accounts\IAccountProperty;
-use OCP\IURLGenerator;
use OCP\IImage;
+use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
diff --git a/apps/dav/tests/unit/Connector/PublicAuthTest.php b/apps/dav/tests/unit/Connector/PublicAuthTest.php
index 25cad495ce9..4a2ebb496b0 100644
--- a/apps/dav/tests/unit/Connector/PublicAuthTest.php
+++ b/apps/dav/tests/unit/Connector/PublicAuthTest.php
@@ -164,9 +164,9 @@ class PublicAuthTest extends \Test\TestCase {
$this->shareManager->expects($this->once())
->method('checkPassword')->with(
- $this->equalTo($share),
- $this->equalTo('password')
- )->willReturn(true);
+ $this->equalTo($share),
+ $this->equalTo('password')
+ )->willReturn(true);
$result = $this->invokePrivate($this->auth, 'validateUserPass', ['username', 'password']);
diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
index 616e9796ab4..cecd115710d 100644
--- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
@@ -31,8 +31,8 @@ namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin;
use OCP\IConfig;
use PHPUnit\Framework\MockObject\MockObject;
-use Test\TestCase;
use Sabre\HTTP\RequestInterface;
+use Test\TestCase;
/**
* Class BlockLegacyClientPluginTest
diff --git a/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php
index 65a420589f0..4182ebc2f37 100644
--- a/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/Exception/ForbiddenTest.php
@@ -28,9 +28,9 @@ class ForbiddenTest extends \Test\TestCase {
public function testSerialization(): void {
// create xml doc
- $DOM = new \DOMDocument('1.0','utf-8');
+ $DOM = new \DOMDocument('1.0', 'utf-8');
$DOM->formatOutput = true;
- $error = $DOM->createElementNS('DAV:','d:error');
+ $error = $DOM->createElementNS('DAV:', 'd:error');
$error->setAttribute('xmlns:s', \Sabre\DAV\Server::NS_SABREDAV);
$DOM->appendChild($error);
diff --git a/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php
index f202bf573de..b115f72ca79 100644
--- a/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/Exception/InvalidPathTest.php
@@ -29,9 +29,9 @@ class InvalidPathTest extends \Test\TestCase {
public function testSerialization(): void {
// create xml doc
- $DOM = new \DOMDocument('1.0','utf-8');
+ $DOM = new \DOMDocument('1.0', 'utf-8');
$DOM->formatOutput = true;
- $error = $DOM->createElementNS('DAV:','d:error');
+ $error = $DOM->createElementNS('DAV:', 'd:error');
$error->setAttribute('xmlns:s', \Sabre\DAV\Server::NS_SABREDAV);
$DOM->appendChild($error);
diff --git a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
index c198df16f08..8c66c9f3f86 100644
--- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
@@ -28,14 +28,12 @@
*/
namespace OCA\DAV\Tests\unit\Connector\Sabre;
-use OC\Log;
use OC\SystemConfig;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
use OCA\DAV\Exception\ServerMaintenanceMode;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Exception\NotFound;
-use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\Server;
use Test\TestCase;
diff --git a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
index 83765d338f2..3f73e956fde 100644
--- a/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/NodeTest.php
@@ -39,7 +39,6 @@ use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage;
use OCP\ICache;
-use OCP\Share\IAttributes;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -87,7 +86,7 @@ class NodeTest extends \Test\TestCase {
$info->method('getInternalPath')
->willReturn($internalPath);
$info->method('getMountPoint')
- ->willReturnCallback(function() use ($shared) {
+ ->willReturnCallback(function () use ($shared) {
if ($shared) {
return $this->createMock(SharedMount::class);
} else {
diff --git a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php
index e0f6f1302a5..00dde60d234 100644
--- a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php
+++ b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php
@@ -20,11 +20,12 @@
*/
namespace OCA\DAV\Tests\unit\DAV;
+use OCA\DAV\Connector\Sabre\Exception\Forbidden;
+use OCA\DAV\Connector\Sabre\File as DavFile;
use OCA\DAV\DAV\ViewOnlyPlugin;
use OCA\Files_Sharing\SharedStorage;
-use OCA\DAV\Connector\Sabre\File as DavFile;
-use OCA\Files_Versions\Versions\IVersion;
use OCA\Files_Versions\Sabre\VersionFile;
+use OCA\Files_Versions\Versions\IVersion;
use OCP\Files\File;
use OCP\Files\Storage\IStorage;
use OCP\Share\IAttributes;
@@ -32,9 +33,8 @@ use OCP\Share\IShare;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Server;
use Sabre\DAV\Tree;
-use Test\TestCase;
use Sabre\HTTP\RequestInterface;
-use OCA\DAV\Connector\Sabre\Exception\Forbidden;
+use Test\TestCase;
class ViewOnlyPluginTest extends TestCase {
diff --git a/apps/dav/tests/unit/Files/FileSearchBackendTest.php b/apps/dav/tests/unit/Files/FileSearchBackendTest.php
index ea841140201..0240fac3621 100644
--- a/apps/dav/tests/unit/Files/FileSearchBackendTest.php
+++ b/apps/dav/tests/unit/Files/FileSearchBackendTest.php
@@ -30,10 +30,10 @@ namespace OCA\DAV\Tests\Files;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
use OC\Files\View;
-use OCA\DAV\Connector\Sabre\ObjectTree;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\File;
use OCA\DAV\Connector\Sabre\FilesPlugin;
+use OCA\DAV\Connector\Sabre\ObjectTree;
use OCA\DAV\Files\FileSearchBackend;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
diff --git a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
index 4c470f49595..d131ad8e182 100644
--- a/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
+++ b/apps/dav/tests/unit/Files/MultipartRequestParserTest.php
@@ -22,8 +22,8 @@
namespace OCA\DAV\Tests\unit\DAV;
-use Test\TestCase;
use \OCA\DAV\BulkUpload\MultipartRequestParser;
+use Test\TestCase;
class MultipartRequestParserTest extends TestCase {
private function getValidBodyObject() {
@@ -65,7 +65,7 @@ class MultipartRequestParserTest extends TestCase {
$body .= '--'.$boundary."--";
- $stream = fopen('php://temp','r+');
+ $stream = fopen('php://temp', 'r+');
fwrite($stream, $body);
rewind($stream);
diff --git a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
index f012c4a44be..095c995ad9f 100644
--- a/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
+++ b/apps/dav/tests/unit/Search/EventsSearchProviderTest.php
@@ -295,7 +295,7 @@ class EventsSearchProviderTest extends TestCase {
$user->method('getUID')->willReturn('john.doe');
$query = $this->createMock(ISearchQuery::class);
$seachTermFilter = $this->createMock(IFilter::class);
- $query->method('getFilter')->willReturnCallback(function($name) use ($seachTermFilter) {
+ $query->method('getFilter')->willReturnCallback(function ($name) use ($seachTermFilter) {
return match ($name) {
'term' => $seachTermFilter,
default => null,
diff --git a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
index 296f6f9ef8c..03940cd2458 100644
--- a/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
+++ b/apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
@@ -27,8 +27,8 @@ namespace OCA\DAV\Tests\Unit\DAV\Settings;
use OCA\DAV\Settings\CalDAVSettings;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IConfig;
use OCP\AppFramework\Services\IInitialState;
+use OCP\IConfig;
use OCP\IURLGenerator;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -58,11 +58,11 @@ class CalDAVSettingsTest extends TestCase {
public function testGetForm(): void {
$this->config->method('getAppValue')
->withConsecutive(
- ['dav', 'sendInvitations', 'yes'],
- ['dav', 'generateBirthdayCalendar', 'yes'],
- ['dav', 'sendEventReminders', 'yes'],
- ['dav', 'sendEventRemindersToSharedUsers', 'yes'],
- ['dav', 'sendEventRemindersPush', 'yes'],
+ ['dav', 'sendInvitations', 'yes'],
+ ['dav', 'generateBirthdayCalendar', 'yes'],
+ ['dav', 'sendEventReminders', 'yes'],
+ ['dav', 'sendEventRemindersToSharedUsers', 'yes'],
+ ['dav', 'sendEventRemindersPush', 'yes'],
)
->will($this->onConsecutiveCalls('yes', 'no', 'yes', 'yes', 'yes'));
$this->urlGenerator
diff --git a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
index 7dd051f859f..d39aec0915e 100644
--- a/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
+++ b/apps/dav/tests/unit/Upload/AssemblyStreamTest.php
@@ -78,9 +78,9 @@ class AssemblyStreamTest extends \Test\TestCase {
$tonofnodes = [];
$tonofdata = "";
for ($i = 0; $i < 101; $i++) {
- $thisdata = rand(0,100); // variable length and content
+ $thisdata = rand(0, 100); // variable length and content
$tonofdata .= $thisdata;
- array_push($tonofnodes, $this->buildNode($i,$thisdata));
+ array_push($tonofnodes, $this->buildNode($i, $thisdata));
}
return[
diff --git a/apps/encryption/lib/Command/DisableMasterKey.php b/apps/encryption/lib/Command/DisableMasterKey.php
index 6000d6021c8..5a07e294248 100644
--- a/apps/encryption/lib/Command/DisableMasterKey.php
+++ b/apps/encryption/lib/Command/DisableMasterKey.php
@@ -49,8 +49,8 @@ class DisableMasterKey extends Command {
* @param QuestionHelper $questionHelper
*/
public function __construct(Util $util,
- IConfig $config,
- QuestionHelper $questionHelper) {
+ IConfig $config,
+ QuestionHelper $questionHelper) {
$this->util = $util;
$this->config = $config;
$this->questionHelper = $questionHelper;
diff --git a/apps/encryption/lib/Command/EnableMasterKey.php b/apps/encryption/lib/Command/EnableMasterKey.php
index 031f6e3fa4e..7c49988c7fb 100644
--- a/apps/encryption/lib/Command/EnableMasterKey.php
+++ b/apps/encryption/lib/Command/EnableMasterKey.php
@@ -48,8 +48,8 @@ class EnableMasterKey extends Command {
* @param QuestionHelper $questionHelper
*/
public function __construct(Util $util,
- IConfig $config,
- QuestionHelper $questionHelper) {
+ IConfig $config,
+ QuestionHelper $questionHelper) {
$this->util = $util;
$this->config = $config;
$this->questionHelper = $questionHelper;
diff --git a/apps/encryption/lib/Command/FixKeyLocation.php b/apps/encryption/lib/Command/FixKeyLocation.php
index b961b40f572..5001da4bb92 100644
--- a/apps/encryption/lib/Command/FixKeyLocation.php
+++ b/apps/encryption/lib/Command/FixKeyLocation.php
@@ -30,8 +30,8 @@ use OC\Files\View;
use OCP\Encryption\IManager;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IUserMountCache;
-use OCP\Files\Folder;
use OCP\Files\File;
+use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\IUser;
diff --git a/apps/encryption/lib/Command/RecoverUser.php b/apps/encryption/lib/Command/RecoverUser.php
index d3dd4a3612d..97a26b1d404 100644
--- a/apps/encryption/lib/Command/RecoverUser.php
+++ b/apps/encryption/lib/Command/RecoverUser.php
@@ -52,9 +52,9 @@ class RecoverUser extends Command {
* @param QuestionHelper $questionHelper
*/
public function __construct(Util $util,
- IConfig $config,
- IUserManager $userManager,
- QuestionHelper $questionHelper) {
+ IConfig $config,
+ IUserManager $userManager,
+ QuestionHelper $questionHelper) {
$this->util = $util;
$this->questionHelper = $questionHelper;
$this->userManager = $userManager;
diff --git a/apps/encryption/lib/Command/ScanLegacyFormat.php b/apps/encryption/lib/Command/ScanLegacyFormat.php
index 85a99a17845..8e0178af486 100644
--- a/apps/encryption/lib/Command/ScanLegacyFormat.php
+++ b/apps/encryption/lib/Command/ScanLegacyFormat.php
@@ -57,9 +57,9 @@ class ScanLegacyFormat extends Command {
* @param QuestionHelper $questionHelper
*/
public function __construct(Util $util,
- IConfig $config,
- QuestionHelper $questionHelper,
- IUserManager $userManager) {
+ IConfig $config,
+ QuestionHelper $questionHelper,
+ IUserManager $userManager) {
parent::__construct();
$this->util = $util;
diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php
index c5f8a7e8d72..743e17e5eff 100644
--- a/apps/encryption/lib/Controller/RecoveryController.php
+++ b/apps/encryption/lib/Controller/RecoveryController.php
@@ -56,10 +56,10 @@ class RecoveryController extends Controller {
* @param Recovery $recovery
*/
public function __construct($AppName,
- IRequest $request,
- IConfig $config,
- IL10N $l10n,
- Recovery $recovery) {
+ IRequest $request,
+ IConfig $config,
+ IL10N $l10n,
+ Recovery $recovery) {
parent::__construct($AppName, $request);
$this->config = $config;
$this->l = $l10n;
diff --git a/apps/encryption/lib/Controller/SettingsController.php b/apps/encryption/lib/Controller/SettingsController.php
index eedbaea9d9d..fa4c3d2ae2b 100644
--- a/apps/encryption/lib/Controller/SettingsController.php
+++ b/apps/encryption/lib/Controller/SettingsController.php
@@ -75,16 +75,16 @@ class SettingsController extends Controller {
* @param Util $util
*/
public function __construct($AppName,
- IRequest $request,
- IL10N $l10n,
- IUserManager $userManager,
- IUserSession $userSession,
- KeyManager $keyManager,
- Crypt $crypt,
- Session $session,
- ISession $ocSession,
- Util $util
-) {
+ IRequest $request,
+ IL10N $l10n,
+ IUserManager $userManager,
+ IUserSession $userSession,
+ KeyManager $keyManager,
+ Crypt $crypt,
+ Session $session,
+ ISession $ocSession,
+ Util $util
+ ) {
parent::__construct($AppName, $request);
$this->l = $l10n;
$this->userSession = $userSession;
diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php
index d07b4da794a..29582a66ad3 100644
--- a/apps/encryption/lib/Controller/StatusController.php
+++ b/apps/encryption/lib/Controller/StatusController.php
@@ -52,11 +52,11 @@ class StatusController extends Controller {
* @param IManager $encryptionManager
*/
public function __construct($AppName,
- IRequest $request,
- IL10N $l10n,
- Session $session,
- IManager $encryptionManager
- ) {
+ IRequest $request,
+ IL10N $l10n,
+ Session $session,
+ IManager $encryptionManager
+ ) {
parent::__construct($AppName, $request);
$this->l = $l10n;
$this->session = $session;
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index ee01d632be8..2d212c1f055 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -41,8 +41,8 @@ use OCP\Encryption\Exceptions\GenericEncryptionException;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IUserSession;
-use Psr\Log\LoggerInterface;
use phpseclib\Crypt\RC4;
+use Psr\Log\LoggerInterface;
/**
* Class Crypt provides the encryption implementation of the default Nextcloud
diff --git a/apps/encryption/lib/Hooks/UserHooks.php b/apps/encryption/lib/Hooks/UserHooks.php
index 27eba0ad781..487e1089495 100644
--- a/apps/encryption/lib/Hooks/UserHooks.php
+++ b/apps/encryption/lib/Hooks/UserHooks.php
@@ -210,9 +210,9 @@ class UserHooks implements IHook {
$this->logger->error('Encryption could not update users encryption password');
}
- // NOTE: Session does not need to be updated as the
- // private key has not changed, only the passphrase
- // used to decrypt it has changed
+ // NOTE: Session does not need to be updated as the
+ // private key has not changed, only the passphrase
+ // used to decrypt it has changed
} else { // admin changed the password for a different user, create new keys and re-encrypt file keys
$userId = $params['uid'];
$this->initMountPoints($userId);
diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php
index 25738dabf89..66ad59266a5 100644
--- a/apps/encryption/lib/Recovery.php
+++ b/apps/encryption/lib/Recovery.php
@@ -69,11 +69,11 @@ class Recovery {
* @param View $view
*/
public function __construct(IUserSession $userSession,
- Crypt $crypt,
- KeyManager $keyManager,
- IConfig $config,
- IFile $file,
- View $view) {
+ Crypt $crypt,
+ KeyManager $keyManager,
+ IConfig $config,
+ IFile $file,
+ View $view) {
$this->user = ($userSession->isLoggedIn()) ? $userSession->getUser() : null;
$this->crypt = $crypt;
$this->keyManager = $keyManager;
diff --git a/apps/encryption/lib/Users/Setup.php b/apps/encryption/lib/Users/Setup.php
index c28a83d8115..8b0ddaa8cd0 100644
--- a/apps/encryption/lib/Users/Setup.php
+++ b/apps/encryption/lib/Users/Setup.php
@@ -37,7 +37,7 @@ class Setup {
private $keyManager;
public function __construct(Crypt $crypt,
- KeyManager $keyManager) {
+ KeyManager $keyManager) {
$this->crypt = $crypt;
$this->keyManager = $keyManager;
}
diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php
index 1ae93dfb0e2..e9e9a97b900 100644
--- a/apps/encryption/templates/settings-admin.php
+++ b/apps/encryption/templates/settings-admin.php
@@ -12,8 +12,8 @@ style('encryption', 'settings-admin');
<p id="encryptHomeStorageSetting">
<input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage"
value="1" <?php if ($_['encryptHomeStorage']) {
- print_unescaped('checked="checked"');
-} ?> />
+ print_unescaped('checked="checked"');
+ } ?> />
<label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br>
<em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em>
</p>
@@ -44,8 +44,8 @@ style('encryption', 'settings-admin');
<br/><br/>
<p name="changeRecoveryPasswordBlock" id="encryptionChangeRecoveryKey" <?php if ($_['recoveryEnabled'] === '0') {
- print_unescaped('class="hidden"');
-}?>>
+ print_unescaped('class="hidden"');
+ }?>>
<?php p($l->t("Change recovery key password:")); ?>
<span class="msg"></span>
<br/>
diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php
index 899ba4a1747..d44b78b545b 100644
--- a/apps/encryption/templates/settings-personal.php
+++ b/apps/encryption/templates/settings-personal.php
@@ -1,6 +1,6 @@
<?php
- /** @var array $_ */
- /** @var \OCP\IL10N $l */
+/** @var array $_ */
+/** @var \OCP\IL10N $l */
script('encryption', 'settings-personal');
?>
<form id="ocDefaultEncryptionModule" class="section">
@@ -19,7 +19,7 @@ script('encryption', 'settings-personal');
<br />
<?php p($l->t("Set your old private key password to your current log-in password:")); ?>
<?php if ($_["recoveryEnabledForUser"]):
- p($l->t(" If you don't remember your old password you can ask your administrator to recover your files."));
+ p($l->t(" If you don't remember your old password you can ask your administrator to recover your files."));
endif; ?>
<br />
<input
diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php
index 06caa5aba1a..f5a173cca83 100644
--- a/apps/encryption/tests/Crypto/CryptTest.php
+++ b/apps/encryption/tests/Crypto/CryptTest.php
@@ -29,8 +29,8 @@ namespace OCA\Encryption\Tests\Crypto;
use OCA\Encryption\Crypto\Crypt;
use OCP\IConfig;
use OCP\IL10N;
-use Psr\Log\LoggerInterface;
use OCP\IUserSession;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
class CryptTest extends TestCase {
diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php
index add7e375f04..7faa6699e91 100644
--- a/apps/encryption/tests/Hooks/UserHooksTest.php
+++ b/apps/encryption/tests/Hooks/UserHooksTest.php
@@ -34,11 +34,11 @@ use OCA\Encryption\Recovery;
use OCA\Encryption\Session;
use OCA\Encryption\Users\Setup;
use OCA\Encryption\Util;
-use Psr\Log\LoggerInterface;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IUserSession;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
/**
diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php
index 89956b7558c..d51d4dde528 100644
--- a/apps/encryption/tests/KeyManagerTest.php
+++ b/apps/encryption/tests/KeyManagerTest.php
@@ -41,11 +41,11 @@ use OCP\Encryption\Keys\IStorage;
use OCP\Files\Cache\ICache;
use OCP\Files\Storage;
use OCP\IConfig;
-use Psr\Log\LoggerInterface;
use OCP\IUserSession;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
class KeyManagerTest extends TestCase {
diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php
index 055b65e2e28..d675b3030a8 100644
--- a/apps/encryption/tests/Settings/AdminTest.php
+++ b/apps/encryption/tests/Settings/AdminTest.php
@@ -29,10 +29,10 @@ use OCA\Encryption\Settings\Admin;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\IL10N;
-use Psr\Log\LoggerInterface;
use OCP\ISession;
use OCP\IUserManager;
use OCP\IUserSession;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
class AdminTest extends TestCase {
diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php
index fc9d1e5e150..2296f123761 100644
--- a/apps/federatedfilesharing/lib/AppInfo/Application.php
+++ b/apps/federatedfilesharing/lib/AppInfo/Application.php
@@ -53,7 +53,7 @@ class Application extends App implements IBootstrap {
}
private function registerCloudFederationProvider(ICloudFederationProviderManager $manager,
- IAppContainer $appContainer): void {
+ IAppContainer $appContainer): void {
$manager->addCloudFederationProvider('file',
'Federated Files Sharing',
function () use ($appContainer): CloudFederationProviderFiles {
diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
index 98fe20bf46e..1cbf21741d8 100644
--- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
+++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
@@ -50,7 +50,7 @@ class RetryJob extends Job {
private int $interval = 600;
public function __construct(Notifications $notifications,
- ITimeFactory $time) {
+ ITimeFactory $time) {
parent::__construct($time);
$this->notifications = $notifications;
}
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 1f1334e7aee..5855d98f34e 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -30,11 +30,11 @@ namespace OCA\FederatedFileSharing\Controller;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\FederatedFileSharing\Notifications;
+use OCP\App\IAppManager;
use OCP\AppFramework\Http;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCSController;
-use OCP\App\IAppManager;
use OCP\Constants;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\Exceptions\ProviderCouldNotAddShareException;
@@ -89,18 +89,18 @@ class RequestHandlerController extends OCSController {
private $eventDispatcher;
public function __construct(string $appName,
- IRequest $request,
- FederatedShareProvider $federatedShareProvider,
- IDBConnection $connection,
- Share\IManager $shareManager,
- Notifications $notifications,
- AddressHandler $addressHandler,
- IUserManager $userManager,
- ICloudIdManager $cloudIdManager,
- LoggerInterface $logger,
- ICloudFederationFactory $cloudFederationFactory,
- ICloudFederationProviderManager $cloudFederationProviderManager,
- IEventDispatcher $eventDispatcher
+ IRequest $request,
+ FederatedShareProvider $federatedShareProvider,
+ IDBConnection $connection,
+ Share\IManager $shareManager,
+ Notifications $notifications,
+ AddressHandler $addressHandler,
+ IUserManager $userManager,
+ ICloudIdManager $cloudIdManager,
+ LoggerInterface $logger,
+ ICloudFederationFactory $cloudFederationFactory,
+ ICloudFederationProviderManager $cloudFederationProviderManager,
+ IEventDispatcher $eventDispatcher
) {
parent::__construct($appName, $request);
@@ -175,9 +175,9 @@ class RequestHandlerController extends OCSController {
$provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file');
$provider->shareReceived($share);
if ($sharedByFederatedId === $ownerFederatedId) {
- $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was created by "%s" and shared with "%s"', [$name, $ownerFederatedId, $shareWith]));
+ $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was created by "%s" and shared with "%s"', [$name, $ownerFederatedId, $shareWith]));
} else {
- $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was shared by "%s" (resource owner is: "%s") and shared with "%s"', [$name, $sharedByFederatedId, $ownerFederatedId, $shareWith]));
+ $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was shared by "%s" (resource owner is: "%s") and shared with "%s"', [$name, $sharedByFederatedId, $ownerFederatedId, $shareWith]));
}
} catch (ProviderDoesNotExistsException $e) {
throw new OCSException('Server does not support federated cloud sharing', 503);
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 6157bad0335..479b636fd40 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -75,18 +75,18 @@ class FederatedShareProvider implements IShareProvider {
* DefaultShareProvider constructor.
*/
public function __construct(
- private IDBConnection $dbConnection,
- private AddressHandler $addressHandler,
- private Notifications $notifications,
- private TokenHandler $tokenHandler,
- private IL10N $l,
- private IRootFolder $rootFolder,
- private IConfig $config,
- private IUserManager $userManager,
- private ICloudIdManager $cloudIdManager,
- private \OCP\GlobalScale\IConfig $gsConfig,
- private ICloudFederationProviderManager $cloudFederationProviderManager,
- private LoggerInterface $logger,
+ private IDBConnection $dbConnection,
+ private AddressHandler $addressHandler,
+ private Notifications $notifications,
+ private TokenHandler $tokenHandler,
+ private IL10N $l,
+ private IRootFolder $rootFolder,
+ private IConfig $config,
+ private IUserManager $userManager,
+ private ICloudIdManager $cloudIdManager,
+ private \OCP\GlobalScale\IConfig $gsConfig,
+ private ICloudFederationProviderManager $cloudFederationProviderManager,
+ private LoggerInterface $logger,
) {
}
diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
index 9e491f0c533..511b69d4245 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
@@ -28,8 +28,8 @@ declare(strict_types=1);
namespace OCA\FederatedFileSharing\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -55,7 +55,7 @@ class Version1010Date20200630191755 extends SimpleMigrationStep {
'default' => '',
]);
$table->setPrimaryKey(['share_id'], 'federated_res_pk');
-// $table->addUniqueIndex(['share_id'], 'share_id_index');
+ // $table->addUniqueIndex(['share_id'], 'share_id_index');
}
return $schema;
}
diff --git a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
index c1ff209b9c6..3a431872d22 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
@@ -28,8 +28,8 @@ namespace OCA\FederatedFileSharing\Migration;
use Closure;
use Doctrine\DBAL\Types\Type;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php
index 18189f4cde7..944b2f84ab1 100644
--- a/apps/federatedfilesharing/lib/Settings/Personal.php
+++ b/apps/federatedfilesharing/lib/Settings/Personal.php
@@ -33,8 +33,8 @@ use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Defaults;
-use OCP\IUserSession;
use OCP\IURLGenerator;
+use OCP\IUserSession;
use OCP\Settings\ISettings;
class Personal implements ISettings {
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php
index de0a8d259c1..8cfe758a364 100644
--- a/apps/federatedfilesharing/tests/AddressHandlerTest.php
+++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php
@@ -30,11 +30,11 @@ namespace OCA\FederatedFileSharing\Tests;
use OC\Federation\CloudIdManager;
use OCA\FederatedFileSharing\AddressHandler;
use OCP\Contacts\IManager;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\ICacheFactory;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
-use OCP\EventDispatcher\IEventDispatcher;
class AddressHandlerTest extends \Test\TestCase {
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
index 7cc788d3a6c..1508300f685 100644
--- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
@@ -48,8 +48,8 @@ use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Share\IManager;
use OCP\Share\IShare;
-use Psr\Log\LoggerInterface;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
class MountPublicLinkControllerTest extends \Test\TestCase {
/** @var IContactsManager|MockObject */
@@ -145,13 +145,13 @@ class MountPublicLinkControllerTest extends \Test\TestCase {
* @param string $expectedReturnData
*/
public function testCreateFederatedShare($shareWith,
- $outgoingSharesAllowed,
- $validShareWith,
- $token,
- $validToken,
- $createSuccessful,
- $expectedReturnData,
- $permissions
+ $outgoingSharesAllowed,
+ $validShareWith,
+ $token,
+ $validToken,
+ $createSuccessful,
+ $expectedReturnData,
+ $permissions
) {
$this->federatedShareProvider->expects($this->any())
->method('isOutgoingServer2serverShareEnabled')
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index 22e80f875d7..7f9abae1e85 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -29,12 +29,12 @@ namespace OCA\FederatedFileSharing\Tests;
use OCA\FederatedFileSharing\Controller\RequestHandlerController;
use OCP\AppFramework\Http\DataResponse;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProvider;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudFederationShare;
use OCP\Federation\ICloudIdManager;
-use OCP\EventDispatcher\IEventDispatcher;
use OCP\IDBConnection;
use OCP\IRequest;
use OCP\IUserManager;
@@ -153,17 +153,17 @@ class RequestHandlerControllerTest extends \Test\TestCase {
public function testCreateShare() {
$this->cloudFederationFactory->expects($this->once())->method('getCloudFederationShare')
->with(
- $this->user2,
- 'name',
- '',
- 1,
- $this->ownerCloudId,
- $this->owner,
- $this->user1CloudId,
- $this->user1,
- 'token',
- 'user',
- 'file'
+ $this->user2,
+ 'name',
+ '',
+ 1,
+ $this->ownerCloudId,
+ $this->owner,
+ $this->user1CloudId,
+ $this->user1,
+ 'token',
+ 'user',
+ 'file'
)->willReturn($this->cloudFederationShare);
/** @var ICloudFederationProvider|\PHPUnit\Framework\MockObject\MockObject $provider */
diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
index 1f81773cd4d..b4ad46febc2 100644
--- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php
@@ -113,7 +113,7 @@ class GetSharedSecret extends Job {
$deadline = $currentTime - $this->maxLifespan;
if ($created < $deadline) {
$this->retainJob = false;
- $this->trustedServers->setServerStatus($target,TrustedServers::STATUS_FAILURE);
+ $this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
return;
}
@@ -172,8 +172,8 @@ class GetSharedSecret extends Job {
$result = json_decode($body, true);
if (isset($result['ocs']['data']['sharedSecret'])) {
$this->trustedServers->addSharedSecret(
- $target,
- $result['ocs']['data']['sharedSecret']
+ $target,
+ $result['ocs']['data']['sharedSecret']
);
} else {
$this->logger->error(
diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php
index adb0b613680..614dd108a2a 100644
--- a/apps/federation/lib/Command/SyncFederationAddressBooks.php
+++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php
@@ -24,11 +24,11 @@
*/
namespace OCA\Federation\Command;
+use OCA\Federation\SyncFederationAddressBooks as SyncService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use OCA\Federation\SyncFederationAddressBooks as SyncService;
class SyncFederationAddressBooks extends Command {
private SyncService $syncService;
diff --git a/apps/federation/lib/Controller/SettingsController.php b/apps/federation/lib/Controller/SettingsController.php
index 8bcdc769de9..85fabb4c7ff 100644
--- a/apps/federation/lib/Controller/SettingsController.php
+++ b/apps/federation/lib/Controller/SettingsController.php
@@ -35,9 +35,9 @@ class SettingsController extends Controller {
private TrustedServers $trustedServers;
public function __construct(string $AppName,
- IRequest $request,
- IL10N $l10n,
- TrustedServers $trustedServers
+ IRequest $request,
+ IL10N $l10n,
+ TrustedServers $trustedServers
) {
parent::__construct($AppName, $request);
$this->l = $l10n;
diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php
index b91c9963f80..9e63f65986b 100644
--- a/apps/federation/lib/DbHandler.php
+++ b/apps/federation/lib/DbHandler.php
@@ -28,10 +28,10 @@
namespace OCA\Federation;
use OC\Files\Filesystem;
-use OCP\HintException;
-use OCP\IDBConnection;
use OCP\DB\Exception as DBException;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\HintException;
+use OCP\IDBConnection;
use OCP\IL10N;
/**
diff --git a/apps/federation/lib/Migration/Version1010Date20200630191302.php b/apps/federation/lib/Migration/Version1010Date20200630191302.php
index c98d7da137a..d9f2214f96e 100644
--- a/apps/federation/lib/Migration/Version1010Date20200630191302.php
+++ b/apps/federation/lib/Migration/Version1010Date20200630191302.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
namespace OCA\Federation\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php
index e718e1638de..2c598241131 100644
--- a/apps/federation/lib/SyncFederationAddressBooks.php
+++ b/apps/federation/lib/SyncFederationAddressBooks.php
@@ -38,9 +38,9 @@ class SyncFederationAddressBooks {
private LoggerInterface $logger;
public function __construct(DbHandler $dbHandler,
- SyncService $syncService,
- IDiscoveryService $ocsDiscoveryService,
- LoggerInterface $logger
+ SyncService $syncService,
+ IDiscoveryService $ocsDiscoveryService,
+ LoggerInterface $logger
) {
$this->syncService = $syncService;
$this->dbHandler = $dbHandler;
diff --git a/apps/federation/lib/SyncJob.php b/apps/federation/lib/SyncJob.php
index 82063311f10..d084b73c021 100644
--- a/apps/federation/lib/SyncJob.php
+++ b/apps/federation/lib/SyncJob.php
@@ -25,8 +25,8 @@
*/
namespace OCA\Federation;
-use OCP\BackgroundJob\TimedJob;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
use Psr\Log\LoggerInterface;
class SyncJob extends TimedJob {
diff --git a/apps/federation/lib/TrustedServers.php b/apps/federation/lib/TrustedServers.php
index 272161fd881..c27529bd12c 100644
--- a/apps/federation/lib/TrustedServers.php
+++ b/apps/federation/lib/TrustedServers.php
@@ -31,13 +31,12 @@ use OCA\Federation\BackgroundJob\RequestSharedSecret;
use OCP\AppFramework\Http;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
+use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCP\HintException;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
use OCP\Security\ISecureRandom;
-use OCP\DB\Exception as DBException;
-use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Federation\Events\TrustedServerRemovedEvent;
use Psr\Log\LoggerInterface;
class TrustedServers {
diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
index dd1ad500384..43333137e65 100644
--- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
+++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
@@ -31,8 +31,8 @@ use OCA\Federation\Middleware\AddServerMiddleware;
use OCP\AppFramework\Http;
use OCP\HintException;
use OCP\IL10N;
-use Test\TestCase;
use Psr\Log\LoggerInterface;
+use Test\TestCase;
class AddServerMiddlewareTest extends TestCase {
diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php
index a5da446b931..782ca52322a 100644
--- a/apps/federation/tests/SyncFederationAddressbooksTest.php
+++ b/apps/federation/tests/SyncFederationAddressbooksTest.php
@@ -28,11 +28,11 @@
*/
namespace OCA\Federation\Tests;
-use Psr\Log\LoggerInterface;
use OC\OCS\DiscoveryService;
use OCA\Federation\DbHandler;
use OCA\Federation\SyncFederationAddressBooks;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
class SyncFederationAddressbooksTest extends \Test\TestCase {
diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php
index 5b4e303b266..c5c056c7031 100644
--- a/apps/federation/tests/TrustedServersTest.php
+++ b/apps/federation/tests/TrustedServersTest.php
@@ -31,14 +31,14 @@ use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
use OCP\Security\ISecureRandom;
-use OCP\EventDispatcher\IEventDispatcher;
-use Test\TestCase;
use Psr\Log\LoggerInterface;
+use Test\TestCase;
class TrustedServersTest extends TestCase {
/** @var \PHPUnit\Framework\MockObject\MockObject | TrustedServers */
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index 2cfd48ede3b..8b817f92c1e 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -77,13 +77,13 @@ class Provider implements IProvider {
protected $fileIsEncrypted = false;
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- IRootFolder $rootFolder,
- ICloudIdManager $cloudIdManager,
- IContactsManager $contactsManager,
- IEventMerger $eventMerger) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ IRootFolder $rootFolder,
+ ICloudIdManager $cloudIdManager,
+ IContactsManager $contactsManager,
+ IEventMerger $eventMerger) {
$this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
diff --git a/apps/files/lib/AppInfo/Application.php b/apps/files/lib/AppInfo/Application.php
index 9099dbaceb2..5934bc1c7ce 100644
--- a/apps/files/lib/AppInfo/Application.php
+++ b/apps/files/lib/AppInfo/Application.php
@@ -40,7 +40,6 @@ use OCA\Files\Collaboration\Resources\Listener;
use OCA\Files\Collaboration\Resources\ResourceProvider;
use OCA\Files\Controller\ApiController;
use OCA\Files\DirectEditingCapabilities;
-use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSidebar;
use OCA\Files\Listener\LoadSidebarListener;
use OCA\Files\Listener\RenderReferenceEventListener;
@@ -58,10 +57,9 @@ use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\Collaboration\Resources\IProviderManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
-use OCP\IL10N;
use OCP\IPreview;
-use OCP\ISearch;
use OCP\IRequest;
+use OCP\ISearch;
use OCP\IServerContainer;
use OCP\ITagManager;
use OCP\IUserSession;
diff --git a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
index a9b5b1446b2..2f700b8773e 100644
--- a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
+++ b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php
@@ -36,7 +36,7 @@ class CleanupDirectEditingTokens extends TimedJob {
private IManager $manager;
public function __construct(ITimeFactory $time,
- IManager $manager) {
+ IManager $manager) {
parent::__construct($time);
$this->interval = self::INTERVAL_MINUTES;
$this->manager = $manager;
diff --git a/apps/files/lib/BackgroundJob/CleanupFileLocks.php b/apps/files/lib/BackgroundJob/CleanupFileLocks.php
index e0ad72eaaf0..7ff28a50155 100644
--- a/apps/files/lib/BackgroundJob/CleanupFileLocks.php
+++ b/apps/files/lib/BackgroundJob/CleanupFileLocks.php
@@ -23,9 +23,9 @@
*/
namespace OCA\Files\BackgroundJob;
+use OC\Lock\DBLockingProvider;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
-use OC\Lock\DBLockingProvider;
/**
* Clean up all file locks that are expired for the DB file locking provider
diff --git a/apps/files/lib/BackgroundJob/DeleteExpiredOpenLocalEditor.php b/apps/files/lib/BackgroundJob/DeleteExpiredOpenLocalEditor.php
index d96728fc713..9839bcde5b7 100644
--- a/apps/files/lib/BackgroundJob/DeleteExpiredOpenLocalEditor.php
+++ b/apps/files/lib/BackgroundJob/DeleteExpiredOpenLocalEditor.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
namespace OCA\Files\BackgroundJob;
-use OCA\Files\Controller\OpenLocalEditorController;
use OCA\Files\Db\OpenLocalEditorMapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
diff --git a/apps/files/lib/BackgroundJob/TransferOwnership.php b/apps/files/lib/BackgroundJob/TransferOwnership.php
index 9103c307b76..1f182b5e999 100644
--- a/apps/files/lib/BackgroundJob/TransferOwnership.php
+++ b/apps/files/lib/BackgroundJob/TransferOwnership.php
@@ -48,7 +48,7 @@ class TransferOwnership extends QueuedJob {
private NotificationManager $notificationManager,
private TransferOwnershipMapper $mapper,
private IRootFolder $rootFolder,
- ) {
+ ) {
parent::__construct($timeFactory);
}
diff --git a/apps/files/lib/Collaboration/Resources/Listener.php b/apps/files/lib/Collaboration/Resources/Listener.php
index e37bf0e9610..a368016523d 100644
--- a/apps/files/lib/Collaboration/Resources/Listener.php
+++ b/apps/files/lib/Collaboration/Resources/Listener.php
@@ -25,9 +25,9 @@ declare(strict_types=1);
*/
namespace OCA\Files\Collaboration\Resources;
+use OCP\Collaboration\Resources\IManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Server;
-use OCP\Collaboration\Resources\IManager;
use OCP\Share\Events\ShareCreatedEvent;
use OCP\Share\Events\ShareDeletedEvent;
use OCP\Share\Events\ShareDeletedFromSelfEvent;
diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
index 841a2bdd4f7..4c5afc76b2b 100644
--- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php
+++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
@@ -49,8 +49,8 @@ class ResourceProvider implements IProvider {
protected $nodes = [];
public function __construct(IRootFolder $rootFolder,
- IPreview $preview,
- IURLGenerator $urlGenerator) {
+ IPreview $preview,
+ IURLGenerator $urlGenerator) {
$this->rootFolder = $rootFolder;
$this->preview = $preview;
$this->urlGenerator = $urlGenerator;
diff --git a/apps/files/lib/Command/Copy.php b/apps/files/lib/Command/Copy.php
index 678c82a138f..e9a9f764d94 100644
--- a/apps/files/lib/Command/Copy.php
+++ b/apps/files/lib/Command/Copy.php
@@ -25,7 +25,6 @@ namespace OCA\Files\Command;
use OC\Core\Command\Info\FileUtils;
use OCP\Files\Folder;
-use OCP\Files\File;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
diff --git a/apps/files/lib/Command/Get.php b/apps/files/lib/Command/Get.php
index 6b21f94e8cf..e46ce29f08d 100644
--- a/apps/files/lib/Command/Get.php
+++ b/apps/files/lib/Command/Get.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OCA\Files\Command;
-
use OC\Core\Command\Info\FileUtils;
use OCP\Files\File;
use Symfony\Component\Console\Command\Command;
diff --git a/apps/files/lib/Command/Move.php b/apps/files/lib/Command/Move.php
index ac84dfa19b3..af97563c816 100644
--- a/apps/files/lib/Command/Move.php
+++ b/apps/files/lib/Command/Move.php
@@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Files\Command;
use OC\Core\Command\Info\FileUtils;
-use OCP\Files\Folder;
use OCP\Files\File;
+use OCP\Files\Folder;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
diff --git a/apps/files/lib/Command/Object/Delete.php b/apps/files/lib/Command/Object/Delete.php
index 5000eeb6ee5..527292725ab 100644
--- a/apps/files/lib/Command/Object/Delete.php
+++ b/apps/files/lib/Command/Object/Delete.php
@@ -23,8 +23,6 @@ declare(strict_types=1);
namespace OCA\Files\Command\Object;
-use OCP\DB\QueryBuilder\IQueryBuilder;
-use OCP\IDBConnection;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
diff --git a/apps/files/lib/Command/Object/Get.php b/apps/files/lib/Command/Object/Get.php
index cad1f3d98ac..dfd44341638 100644
--- a/apps/files/lib/Command/Object/Get.php
+++ b/apps/files/lib/Command/Object/Get.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OCA\Files\Command\Object;
-use OCP\Files\File;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
diff --git a/apps/files/lib/Command/Object/Put.php b/apps/files/lib/Command/Object/Put.php
index 852d7c2225e..b4a7389fb82 100644
--- a/apps/files/lib/Command/Object/Put.php
+++ b/apps/files/lib/Command/Object/Put.php
@@ -46,7 +46,8 @@ class Put extends Command {
->setDescription('Write a file to the object store')
->addArgument('input', InputArgument::REQUIRED, "Source local path, use - to read from STDIN")
->addArgument('object', InputArgument::REQUIRED, "Object to write")
- ->addOption('bucket', 'b', InputOption::VALUE_REQUIRED, "Bucket where to store the object, only required in cases where it can't be determined from the config");;
+ ->addOption('bucket', 'b', InputOption::VALUE_REQUIRED, "Bucket where to store the object, only required in cases where it can't be determined from the config");
+ ;
}
public function execute(InputInterface $input, OutputInterface $output): int {
diff --git a/apps/files/lib/Command/Put.php b/apps/files/lib/Command/Put.php
index 73261e47fb6..5539c25665a 100644
--- a/apps/files/lib/Command/Put.php
+++ b/apps/files/lib/Command/Put.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OCA\Files\Command;
-
use OC\Core\Command\Info\FileUtils;
use OCP\Files\File;
use OCP\Files\Folder;
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index a78b6cbe8b1..31c410241cf 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -163,13 +163,13 @@ class Scan extends Base {
++$this->errorsCounter;
});
- $this->eventDispatcher->addListener(NodeAddedToCache::class, function() {
+ $this->eventDispatcher->addListener(NodeAddedToCache::class, function () {
++$this->newCounter;
});
- $this->eventDispatcher->addListener(FileCacheUpdated::class, function() {
+ $this->eventDispatcher->addListener(FileCacheUpdated::class, function () {
++$this->updatedCounter;
});
- $this->eventDispatcher->addListener(NodeRemovedFromCache::class, function() {
+ $this->eventDispatcher->addListener(NodeRemovedFromCache::class, function () {
++$this->removedCounter;
});
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php
index 2007c23f256..64f7fbbb95e 100644
--- a/apps/files/lib/Command/TransferOwnership.php
+++ b/apps/files/lib/Command/TransferOwnership.php
@@ -36,9 +36,9 @@ namespace OCA\Files\Command;
use OCA\Files\Exception\TransferOwnershipException;
use OCA\Files\Service\OwnershipTransferService;
+use OCP\IConfig;
use OCP\IUser;
use OCP\IUserManager;
-use OCP\IConfig;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@@ -85,7 +85,7 @@ class TransferOwnership extends Command {
InputOption::VALUE_OPTIONAL,
'transfer incoming user file shares to destination user. Usage: --transfer-incoming-shares=1 (value required)',
'2'
- );
+ );
}
protected function execute(InputInterface $input, OutputInterface $output): int {
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 6e64d68588f..a82fe7078af 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -74,15 +74,15 @@ class ApiController extends Controller {
private ViewConfig $viewConfig;
public function __construct(string $appName,
- IRequest $request,
- IUserSession $userSession,
- TagService $tagService,
- IPreview $previewManager,
- IManager $shareManager,
- IConfig $config,
- ?Folder $userFolder,
- UserConfig $userConfig,
- ViewConfig $viewConfig) {
+ IRequest $request,
+ IUserSession $userSession,
+ TagService $tagService,
+ IPreview $previewManager,
+ IManager $shareManager,
+ IConfig $config,
+ ?Folder $userFolder,
+ UserConfig $userConfig,
+ ViewConfig $viewConfig) {
parent::__construct($appName, $request);
$this->userSession = $userSession;
$this->tagService = $tagService;
diff --git a/apps/files/lib/Controller/DirectEditingController.php b/apps/files/lib/Controller/DirectEditingController.php
index a4b83af3c29..5d2162c69e0 100644
--- a/apps/files/lib/Controller/DirectEditingController.php
+++ b/apps/files/lib/Controller/DirectEditingController.php
@@ -46,7 +46,7 @@ class DirectEditingController extends OCSController {
private IManager $directEditingManager,
private DirectEditingService $directEditingService,
private LoggerInterface $logger
- ) {
+ ) {
parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge);
}
diff --git a/apps/files/lib/Controller/TemplateController.php b/apps/files/lib/Controller/TemplateController.php
index 1b5873e8fe6..697541fec3b 100644
--- a/apps/files/lib/Controller/TemplateController.php
+++ b/apps/files/lib/Controller/TemplateController.php
@@ -103,7 +103,7 @@ class TemplateController extends OCSController {
$templatePath = $this->templateManager->initializeTemplateDirectory($templatePath, null, $copySystemTemplates);
return new DataResponse([
'template_path' => $templatePath,
- 'templates' => array_map(fn(TemplateFileCreator $creator) => $creator->jsonSerialize(), $this->templateManager->listCreators()),
+ 'templates' => array_map(fn (TemplateFileCreator $creator) => $creator->jsonSerialize(), $this->templateManager->listCreators()),
]);
} catch (\Exception $e) {
throw new OCSForbiddenException($e->getMessage());
diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php
index ce68b28349e..2c46b85f9a0 100644
--- a/apps/files/lib/Controller/TransferOwnershipController.php
+++ b/apps/files/lib/Controller/TransferOwnershipController.php
@@ -30,13 +30,13 @@ namespace OCA\Files\Controller;
use OCA\Files\BackgroundJob\TransferOwnership;
use OCA\Files\Db\TransferOwnership as TransferOwnershipEntity;
use OCA\Files\Db\TransferOwnershipMapper;
-use OCP\Files\IHomeStorage;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
+use OCP\Files\IHomeStorage;
use OCP\Files\IRootFolder;
use OCP\IRequest;
use OCP\IUserManager;
@@ -60,14 +60,14 @@ class TransferOwnershipController extends OCSController {
private $rootFolder;
public function __construct(string $appName,
- IRequest $request,
- string $userId,
- NotificationManager $notificationManager,
- ITimeFactory $timeFactory,
- IJobList $jobList,
- TransferOwnershipMapper $mapper,
- IUserManager $userManager,
- IRootFolder $rootFolder) {
+ IRequest $request,
+ string $userId,
+ NotificationManager $notificationManager,
+ ITimeFactory $timeFactory,
+ IJobList $jobList,
+ TransferOwnershipMapper $mapper,
+ IUserManager $userManager,
+ IRootFolder $rootFolder) {
parent::__construct($appName, $request);
$this->userId = $userId;
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 38e3858cd38..ca9ac80b9e2 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -35,7 +35,6 @@
*/
namespace OCA\Files\Controller;
-use OC\AppFramework\Http;
use OCA\Files\Activity\Helper;
use OCA\Files\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
@@ -214,7 +213,8 @@ class ViewController extends Controller {
if ($fileid !== null && $view !== 'trashbin') {
try {
return $this->redirectToFileIfInTrashbin((int) $fileid);
- } catch (NotFoundException $e) {}
+ } catch (NotFoundException $e) {
+ }
}
// Load the files we need
@@ -248,7 +248,7 @@ class ViewController extends Controller {
try {
// If view is files, we use the directory, otherwise we use the root storage
- $storageInfo = $this->getStorageInfo(($view === 'files' && $dir) ? $dir : '/');
+ $storageInfo = $this->getStorageInfo(($view === 'files' && $dir) ? $dir : '/');
} catch(\Exception $e) {
$storageInfo = $this->getStorageInfo();
}
@@ -399,7 +399,8 @@ class ViewController extends Controller {
try {
$this->redirectToFileIfInTrashbin($fileId);
- } catch (NotFoundException $e) {}
+ } catch (NotFoundException $e) {
+ }
if (!empty($nodes)) {
$node = current($nodes);
diff --git a/apps/files/lib/Event/LoadAdditionalScriptsEvent.php b/apps/files/lib/Event/LoadAdditionalScriptsEvent.php
index 1e2080622f4..2e9e4764807 100644
--- a/apps/files/lib/Event/LoadAdditionalScriptsEvent.php
+++ b/apps/files/lib/Event/LoadAdditionalScriptsEvent.php
@@ -34,4 +34,5 @@ use OCP\EventDispatcher\Event;
*
* @since 17.0.0
*/
-class LoadAdditionalScriptsEvent extends Event {} \ No newline at end of file
+class LoadAdditionalScriptsEvent extends Event {
+}
diff --git a/apps/files/lib/Migration/Version12101Date20221011153334.php b/apps/files/lib/Migration/Version12101Date20221011153334.php
index 0c1093f50a6..587616ff2d5 100644
--- a/apps/files/lib/Migration/Version12101Date20221011153334.php
+++ b/apps/files/lib/Migration/Version12101Date20221011153334.php
@@ -38,7 +38,7 @@ class Version12101Date20221011153334 extends SimpleMigrationStep {
$schema = $schemaClosure();
$table = $schema->createTable('open_local_editor');
- $table->addColumn('id',Types::BIGINT, [
+ $table->addColumn('id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
diff --git a/apps/files/lib/Notification/Notifier.php b/apps/files/lib/Notification/Notifier.php
index 90784749b27..0968ae15f54 100644
--- a/apps/files/lib/Notification/Notifier.php
+++ b/apps/files/lib/Notification/Notifier.php
@@ -56,11 +56,11 @@ class Notifier implements INotifier, IDismissableNotifier {
private $timeFactory;
public function __construct(IFactory $l10nFactory,
- IURLGenerator $urlGenerator,
- TransferOwnershipMapper $mapper,
- IManager $notificationManager,
- IUserManager $userManager,
- ITimeFactory $timeFactory) {
+ IURLGenerator $urlGenerator,
+ TransferOwnershipMapper $mapper,
+ IManager $notificationManager,
+ IUserManager $userManager,
+ ITimeFactory $timeFactory) {
$this->l10nFactory = $l10nFactory;
$this->urlGenerator = $urlGenerator;
$this->mapper = $mapper;
diff --git a/apps/files/lib/ResponseDefinitions.php b/apps/files/lib/ResponseDefinitions.php
index 8a27ec4bb2f..9d1e5db61e5 100644
--- a/apps/files/lib/ResponseDefinitions.php
+++ b/apps/files/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/files/lib/Search/FilesSearchProvider.php b/apps/files/lib/Search/FilesSearchProvider.php
index d2a30d10674..b587fdf32de 100644
--- a/apps/files/lib/Search/FilesSearchProvider.php
+++ b/apps/files/lib/Search/FilesSearchProvider.php
@@ -30,30 +30,30 @@ declare(strict_types=1);
namespace OCA\Files\Search;
use InvalidArgumentException;
-use OCP\Files\Search\ISearchOperator;
-use OCP\IPreview;
-use OCP\Search\FilterDefinition;
-use OCP\Search\IFilter;
-use OCP\Search\IFilteringProvider;
-use OCP\Share\IShare;
use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchOrder;
use OC\Files\Search\SearchQuery;
+use OC\Search\Filter\GroupFilter;
+use OC\Search\Filter\UserFilter;
use OCP\Files\FileInfo;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\Search\ISearchComparison;
+use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchOrder;
use OCP\IL10N;
+use OCP\IPreview;
use OCP\IURLGenerator;
use OCP\IUser;
+use OCP\Search\FilterDefinition;
+use OCP\Search\IFilter;
+use OCP\Search\IFilteringProvider;
use OCP\Search\ISearchQuery;
use OCP\Search\SearchResult;
use OCP\Search\SearchResultEntry;
-use OC\Search\Filter\GroupFilter;
-use OC\Search\Filter\UserFilter;
+use OCP\Share\IShare;
class FilesSearchProvider implements IFilteringProvider {
/** @var IL10N */
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index 06c12391df7..3499d809f2c 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -74,10 +74,10 @@ class OwnershipTransferService {
private $userManager;
public function __construct(IEncryptionManager $manager,
- IShareManager $shareManager,
- IMountManager $mountManager,
- IUserMountCache $userMountCache,
- IUserManager $userManager) {
+ IShareManager $shareManager,
+ IMountManager $mountManager,
+ IUserMountCache $userMountCache,
+ IUserManager $userManager) {
$this->encryptionManager = $manager;
$this->shareManager = $shareManager;
$this->mountManager = $mountManager;
@@ -96,12 +96,12 @@ class OwnershipTransferService {
* @throws \OC\User\NoUserException
*/
public function transfer(IUser $sourceUser,
- IUser $destinationUser,
- string $path,
- ?OutputInterface $output = null,
- bool $move = false,
- bool $firstLogin = false,
- bool $transferIncomingShares = false): void {
+ IUser $destinationUser,
+ string $path,
+ ?OutputInterface $output = null,
+ bool $move = false,
+ bool $firstLogin = false,
+ bool $transferIncomingShares = false): void {
$output = $output ?? new NullOutput();
$sourceUid = $sourceUser->getUID();
$destinationUid = $destinationUser->getUID();
@@ -234,10 +234,10 @@ class OwnershipTransferService {
* @throws \Exception
*/
protected function analyse(string $sourceUid,
- string $destinationUid,
- string $sourcePath,
- View $view,
- OutputInterface $output): void {
+ string $destinationUid,
+ string $sourcePath,
+ View $view,
+ OutputInterface $output): void {
$output->writeln('Validating quota');
$size = $view->getFileInfo($sourcePath, false)->getSize(false);
$freeSpace = $view->free_space($destinationUid . '/files/');
@@ -281,9 +281,9 @@ class OwnershipTransferService {
}
private function collectUsersShares(string $sourceUid,
- OutputInterface $output,
- View $view,
- string $path): array {
+ OutputInterface $output,
+ View $view,
+ string $path): array {
$output->writeln("Collecting all share information for files and folders of $sourceUid ...");
$shares = [];
@@ -325,9 +325,9 @@ class OwnershipTransferService {
}
private function collectIncomingShares(string $sourceUid,
- OutputInterface $output,
- View $view,
- bool $addKeys = false): array {
+ OutputInterface $output,
+ View $view,
+ bool $addKeys = false): array {
$output->writeln("Collecting all incoming share information for files and folders of $sourceUid ...");
$shares = [];
@@ -363,10 +363,10 @@ class OwnershipTransferService {
* @throws TransferOwnershipException
*/
protected function transferFiles(string $sourceUid,
- string $sourcePath,
- string $finalTarget,
- View $view,
- OutputInterface $output): void {
+ string $sourcePath,
+ string $finalTarget,
+ View $view,
+ OutputInterface $output): void {
$output->writeln("Transferring files to $finalTarget ...");
// This change will help user to transfer the folder specified using --path option.
@@ -385,9 +385,9 @@ class OwnershipTransferService {
}
private function restoreShares(string $sourceUid,
- string $destinationUid,
- array $shares,
- OutputInterface $output) {
+ string $destinationUid,
+ array $shares,
+ OutputInterface $output) {
$output->writeln("Restoring shares ...");
$progress = new ProgressBar($output, count($shares));
@@ -436,13 +436,13 @@ class OwnershipTransferService {
}
private function transferIncomingShares(string $sourceUid,
- string $destinationUid,
- array $sourceShares,
- array $destinationShares,
- OutputInterface $output,
- string $path,
- string $finalTarget,
- bool $move): void {
+ string $destinationUid,
+ array $sourceShares,
+ array $destinationShares,
+ OutputInterface $output,
+ string $path,
+ string $finalTarget,
+ bool $move): void {
$output->writeln("Restoring incoming shares ...");
$progress = new ProgressBar($output, count($sourceShares));
$prefix = "$destinationUid/files";
diff --git a/apps/files/lib/Service/UserConfig.php b/apps/files/lib/Service/UserConfig.php
index be32dce0d63..00569dc6aeb 100644
--- a/apps/files/lib/Service/UserConfig.php
+++ b/apps/files/lib/Service/UserConfig.php
@@ -28,7 +28,7 @@ use OCP\IUser;
use OCP\IUserSession;
class UserConfig {
- const ALLOWED_CONFIGS = [
+ public const ALLOWED_CONFIGS = [
[
// Whether to crop the files previews or not in the files list
'key' => 'crop_image_previews',
@@ -68,7 +68,7 @@ class UserConfig {
* @return string[]
*/
public function getAllowedConfigKeys(): array {
- return array_map(function($config) {
+ return array_map(function ($config) {
return $config['key'];
}, self::ALLOWED_CONFIGS);
}
@@ -142,7 +142,7 @@ class UserConfig {
}
$userId = $this->user->getUID();
- $userConfigs = array_map(function(string $key) use ($userId) {
+ $userConfigs = array_map(function (string $key) use ($userId) {
$value = $this->config->getUserValue($userId, Application::APP_ID, $key, $this->getDefaultConfigValue($key));
// If the default is expected to be a boolean, we need to cast the value
if (is_bool($this->getDefaultConfigValue($key)) && is_string($value)) {
diff --git a/apps/files/lib/Service/ViewConfig.php b/apps/files/lib/Service/ViewConfig.php
index 51d90ffdb4e..fefc3f6a7de 100644
--- a/apps/files/lib/Service/ViewConfig.php
+++ b/apps/files/lib/Service/ViewConfig.php
@@ -28,8 +28,8 @@ use OCP\IUser;
use OCP\IUserSession;
class ViewConfig {
- const CONFIG_KEY = 'files_views_configs';
- const ALLOWED_CONFIGS = [
+ public const CONFIG_KEY = 'files_views_configs';
+ public const ALLOWED_CONFIGS = [
[
// The default sorting key for the files list view
'key' => 'sorting_mode',
@@ -64,7 +64,7 @@ class ViewConfig {
* @return string[]
*/
public function getAllowedConfigKeys(): array {
- return array_map(function($config) {
+ return array_map(function ($config) {
return $config['key'];
}, self::ALLOWED_CONFIGS);
}
@@ -155,7 +155,7 @@ class ViewConfig {
}
// Extend undefined values with defaults
- return array_reduce(self::ALLOWED_CONFIGS, function($carry, $config) use ($view, $configs) {
+ return array_reduce(self::ALLOWED_CONFIGS, function ($carry, $config) use ($view, $configs) {
$key = $config['key'];
$carry[$key] = $configs[$view][$key] ?? $this->getDefaultConfigValue($key);
return $carry;
@@ -176,7 +176,7 @@ class ViewConfig {
$configs = json_decode($this->config->getUserValue($userId, Application::APP_ID, self::CONFIG_KEY, '[]'), true);
$views = array_keys($configs);
- return array_reduce($views, function($carry, $view) use ($configs) {
+ return array_reduce($views, function ($carry, $view) use ($configs) {
$carry[$view] = $this->getConfig($view);
return $carry;
}, []);
diff --git a/apps/files/list.php b/apps/files/list.php
index c4b93b2e145..5f1bc07f499 100644
--- a/apps/files/list.php
+++ b/apps/files/list.php
@@ -22,10 +22,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-use OCP\Share\IManager;
-use OCP\Server;
use OCP\IConfig;
use OCP\IUserSession;
+use OCP\Server;
+use OCP\Share\IManager;
$config = Server::get(IConfig::class);
$userSession = Server::get(IUserSession::class);
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
index 17409bdb189..d2b57b03eca 100644
--- a/apps/files/templates/appnavigation.php
+++ b/apps/files/templates/appnavigation.php
@@ -3,9 +3,9 @@
<ul class="with-icon" tabindex="0">
<?php
$pinned = 0;
- foreach ($_['navigationItems'] as $item) {
- $pinned = NavigationListElements($item, $l, $pinned);
- }
+ foreach ($_['navigationItems'] as $item) {
+ $pinned = NavigationListElements($item, $l, $pinned);
+ }
?>
</ul>
</div>
@@ -31,8 +31,8 @@ function NavigationListElements($item, $l, $pinned) {
<?php if (isset($item['expandedState'])) { ?> data-expandedstate="<?php p($item['expandedState']); ?>" <?php } ?>
class="nav-<?php p($item['id']) ?>
<?php if (isset($item['classes'])) {
- p($item['classes']);
- } ?>
+ p($item['classes']);
+ } ?>
<?php p($pinned === 1 ? 'first-pinned' : '') ?>
<?php if (isset($item['defaultExpandedState']) && $item['defaultExpandedState']) { ?> open<?php } ?>"
<?php if (isset($item['folderPosition'])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>>
@@ -42,7 +42,7 @@ function NavigationListElements($item, $l, $pinned) {
<?php
- NavigationElementMenu($item);
+ NavigationElementMenu($item);
if (isset($item['sublist'])) {
?>
<button class="collapse app-navigation-noclose" aria-expanded="<?= !empty($item['defaultExpandedState']) ? 'true' : 'false' ?>"
diff --git a/apps/files/tests/Activity/ProviderTest.php b/apps/files/tests/Activity/ProviderTest.php
index 3566d83f415..3598c982ddd 100644
--- a/apps/files/tests/Activity/ProviderTest.php
+++ b/apps/files/tests/Activity/ProviderTest.php
@@ -32,7 +32,6 @@ use OCP\Federation\ICloudId;
use OCP\Federation\ICloudIdManager;
use OCP\Files\IRootFolder;
use OCP\IURLGenerator;
-use OCP\IUser;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use PHPUnit\Framework\MockObject\MockObject;
diff --git a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
index 138d4d7de2d..1b5e7779df4 100644
--- a/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
+++ b/apps/files_external/lib/BackgroundJob/CredentialsCleanup.php
@@ -31,9 +31,9 @@ use OCA\Files_External\Service\UserGlobalStoragesService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
-use OCP\Security\ICredentialsManager;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\Security\ICredentialsManager;
class CredentialsCleanup extends TimedJob {
private $credentialsManager;
diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php
index ea0d98fe467..50f7fb1cb43 100644
--- a/apps/files_external/lib/Command/Create.php
+++ b/apps/files_external/lib/Command/Create.php
@@ -33,8 +33,8 @@ use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
-use OCA\Files_External\Service\UserStoragesService;
use OCA\Files_External\Service\StoragesService;
+use OCA\Files_External\Service\UserStoragesService;
use OCP\IUserManager;
use OCP\IUserSession;
use Symfony\Component\Console\Input\ArrayInput;
diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php
index 625d0c1d515..590206d2099 100644
--- a/apps/files_external/lib/Command/Verify.php
+++ b/apps/files_external/lib/Command/Verify.php
@@ -25,8 +25,6 @@
namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
-use OCA\Files_External\Lib\Auth\AuthMechanism;
-use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php
index 1b83688418c..c06df7765b6 100644
--- a/apps/files_external/lib/Config/ConfigAdapter.php
+++ b/apps/files_external/lib/Config/ConfigAdapter.php
@@ -51,7 +51,8 @@ class ConfigAdapter implements IMountProvider {
private UserStoragesService $userStoragesService,
private UserGlobalStoragesService $userGlobalStoragesService,
private ClockInterface $clock,
- ) {}
+ ) {
+ }
/**
* Process storage ready for mounting
diff --git a/apps/files_external/lib/Config/ExternalMountPoint.php b/apps/files_external/lib/Config/ExternalMountPoint.php
index 07475f961f9..0cda9914f0e 100644
--- a/apps/files_external/lib/Config/ExternalMountPoint.php
+++ b/apps/files_external/lib/Config/ExternalMountPoint.php
@@ -24,8 +24,8 @@
namespace OCA\Files_External\Config;
use OC\Files\Mount\MountPoint;
-use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Lib\Auth\Password\SessionCredentials;
+use OCA\Files_External\Lib\StorageConfig;
class ExternalMountPoint extends MountPoint {
diff --git a/apps/files_external/lib/Config/SystemMountPoint.php b/apps/files_external/lib/Config/SystemMountPoint.php
index 7de07699164..32a39c0e063 100644
--- a/apps/files_external/lib/Config/SystemMountPoint.php
+++ b/apps/files_external/lib/Config/SystemMountPoint.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OCA\Files_External\Config;
-
use OCP\Files\Mount\ISystemMountPoint;
class SystemMountPoint extends ExternalMountPoint implements ISystemMountPoint {
diff --git a/apps/files_external/lib/Controller/AjaxController.php b/apps/files_external/lib/Controller/AjaxController.php
index e41a75a62bc..a03243020e4 100644
--- a/apps/files_external/lib/Controller/AjaxController.php
+++ b/apps/files_external/lib/Controller/AjaxController.php
@@ -55,11 +55,11 @@ class AjaxController extends Controller {
* @param IGroupManager $groupManager
*/
public function __construct($appName,
- IRequest $request,
- RSA $rsaMechanism,
- GlobalAuth $globalAuth,
- IUserSession $userSession,
- IGroupManager $groupManager) {
+ IRequest $request,
+ RSA $rsaMechanism,
+ GlobalAuth $globalAuth,
+ IUserSession $userSession,
+ IGroupManager $groupManager) {
parent::__construct($appName, $request);
$this->rsaMechanism = $rsaMechanism;
$this->globalAuth = $globalAuth;
diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php
index ead6aa9663a..229e2d1930e 100644
--- a/apps/files_external/lib/Controller/StoragesController.php
+++ b/apps/files_external/lib/Controller/StoragesController.php
@@ -30,7 +30,6 @@ namespace OCA\Files_External\Controller;
use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Backend\Backend;
-use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
diff --git a/apps/files_external/lib/Lib/Auth/AuthMechanism.php b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
index e43f6d06b47..5ef5f78acd9 100644
--- a/apps/files_external/lib/Lib/Auth/AuthMechanism.php
+++ b/apps/files_external/lib/Lib/Auth/AuthMechanism.php
@@ -26,11 +26,11 @@ namespace OCA\Files_External\Lib\Auth;
use OCA\Files_External\Lib\FrontendDefinitionTrait;
use OCA\Files_External\Lib\IdentifierTrait;
+use OCA\Files_External\Lib\IFrontendDefinition;
+use OCA\Files_External\Lib\IIdentifier;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageModifierTrait;
use OCA\Files_External\Lib\VisibilityTrait;
-use OCA\Files_External\Lib\IIdentifier;
-use OCA\Files_External\Lib\IFrontendDefinition;
/**
* Authentication mechanism
diff --git a/apps/files_external/lib/Lib/Backend/Backend.php b/apps/files_external/lib/Lib/Backend/Backend.php
index d0058e98b52..48f46b8f55a 100644
--- a/apps/files_external/lib/Lib/Backend/Backend.php
+++ b/apps/files_external/lib/Lib/Backend/Backend.php
@@ -26,12 +26,12 @@ use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\DependencyTrait;
use OCA\Files_External\Lib\FrontendDefinitionTrait;
use OCA\Files_External\Lib\IdentifierTrait;
+use OCA\Files_External\Lib\IFrontendDefinition;
+use OCA\Files_External\Lib\IIdentifier;
use OCA\Files_External\Lib\PriorityTrait;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageModifierTrait;
use OCA\Files_External\Lib\VisibilityTrait;
-use OCA\Files_External\Lib\IIdentifier;
-use OCA\Files_External\Lib\IFrontendDefinition;
use OCP\Files\Storage\IStorage;
/**
diff --git a/apps/files_external/lib/Lib/Backend/LegacyBackend.php b/apps/files_external/lib/Lib/Backend/LegacyBackend.php
index d00c5b0e944..86c21f03434 100644
--- a/apps/files_external/lib/Lib/Backend/LegacyBackend.php
+++ b/apps/files_external/lib/Lib/Backend/LegacyBackend.php
@@ -61,18 +61,18 @@ class LegacyBackend extends Backend {
$placeholder = substr($placeholder, 1);
}
switch ($placeholder[0]) {
- case '!':
- $type = DefinitionParameter::VALUE_BOOLEAN;
- $placeholder = substr($placeholder, 1);
- break;
- case '*':
- $type = DefinitionParameter::VALUE_PASSWORD;
- $placeholder = substr($placeholder, 1);
- break;
- case '#':
- $type = DefinitionParameter::VALUE_HIDDEN;
- $placeholder = substr($placeholder, 1);
- break;
+ case '!':
+ $type = DefinitionParameter::VALUE_BOOLEAN;
+ $placeholder = substr($placeholder, 1);
+ break;
+ case '*':
+ $type = DefinitionParameter::VALUE_PASSWORD;
+ $placeholder = substr($placeholder, 1);
+ break;
+ case '#':
+ $type = DefinitionParameter::VALUE_HIDDEN;
+ $placeholder = substr($placeholder, 1);
+ break;
}
$this->addParameter((new DefinitionParameter($name, $placeholder))
->setType($type)
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index 8e2a6b8ea12..e5fa98313d5 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -39,22 +39,19 @@
*/
namespace OCA\Files_External\Lib\Storage;
-use Aws\Result;
use Aws\S3\Exception\S3Exception;
-use Aws\S3\S3Client;
use Icewind\Streams\CallbackWrapper;
use Icewind\Streams\IteratorDirectory;
-use OCP\Cache\CappedMemoryCache;
use OC\Files\Cache\CacheEntry;
use OC\Files\ObjectStore\S3ConnectionTrait;
use OC\Files\ObjectStore\S3ObjectTrait;
+use OCP\Cache\CappedMemoryCache;
use OCP\Constants;
use OCP\Files\FileInfo;
use OCP\Files\IMimeTypeDetector;
+use OCP\ICache;
use OCP\ICacheFactory;
-use OCP\IMemcache;
use OCP\Server;
-use OCP\ICache;
use Psr\Log\LoggerInterface;
class AmazonS3 extends \OC\Files\Storage\Common {
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php
index 5c4dcca65ce..3fa04209fa0 100644
--- a/apps/files_external/lib/Lib/Storage/SFTP.php
+++ b/apps/files_external/lib/Lib/Storage/SFTP.php
@@ -39,7 +39,6 @@ namespace OCA\Files_External\Lib\Storage;
use Icewind\Streams\CountWrapper;
use Icewind\Streams\IteratorDirectory;
use Icewind\Streams\RetryWrapper;
-use OC\Files\Filesystem;
use OC\Files\Storage\Common;
use OCP\Constants;
use OCP\Files\FileInfo;
@@ -64,7 +63,7 @@ class SFTP extends Common {
protected $client;
private IMimeTypeDetector $mimeTypeDetector;
- const COPY_CHUNK_SIZE = 8 * 1024 * 1024;
+ public const COPY_CHUNK_SIZE = 8 * 1024 * 1024;
/**
* @param string $host protocol://server:port
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php
index 26e6c5315cb..19c83b29bc8 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -296,7 +296,7 @@ class Swift extends \OC\Files\Storage\Common {
$path .= '/';
}
-// $path = str_replace('%23', '#', $path); // the prefix is sent as a query param, so revert the encoding of #
+ // $path = str_replace('%23', '#', $path); // the prefix is sent as a query param, so revert the encoding of #
try {
$files = [];
diff --git a/apps/files_external/lib/Listener/LoadAdditionalListener.php b/apps/files_external/lib/Listener/LoadAdditionalListener.php
index 5f56a14c4ce..6de23eb8284 100644
--- a/apps/files_external/lib/Listener/LoadAdditionalListener.php
+++ b/apps/files_external/lib/Listener/LoadAdditionalListener.php
@@ -25,8 +25,8 @@ declare(strict_types=1);
*/
namespace OCA\Files_External\Listener;
-use OCA\Files_External\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
+use OCA\Files_External\AppInfo\Application;
use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
@@ -41,7 +41,8 @@ class LoadAdditionalListener implements IEventListener {
public function __construct(
private IConfig $config,
private IInitialState $initialState,
- ) {}
+ ) {
+ }
public function handle(Event $event): void {
if (!($event instanceof LoadAdditionalScriptsEvent)) {
diff --git a/apps/files_external/lib/Migration/Version1011Date20200630192246.php b/apps/files_external/lib/Migration/Version1011Date20200630192246.php
index 413c84b4bab..cf0f870e7ec 100644
--- a/apps/files_external/lib/Migration/Version1011Date20200630192246.php
+++ b/apps/files_external/lib/Migration/Version1011Date20200630192246.php
@@ -28,8 +28,8 @@ declare(strict_types=1);
namespace OCA\Files_External\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/files_external/lib/ResponseDefinitions.php b/apps/files_external/lib/ResponseDefinitions.php
index 2c86ed18e55..67c325196f6 100644
--- a/apps/files_external/lib/ResponseDefinitions.php
+++ b/apps/files_external/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index d715e5946f1..e0837ef7b42 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -1,6 +1,6 @@
<?php
-use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
+use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\DefinitionParameter;
use \OCA\Files_External\Service\BackendService;
@@ -8,49 +8,49 @@ use \OCA\Files_External\Service\BackendService;
$canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting'];
- $l->t("Enable encryption");
- $l->t("Enable previews");
- $l->t("Enable sharing");
- $l->t("Check for changes");
- $l->t("Never");
- $l->t("Once every direct access");
- $l->t('Read only');
+$l->t("Enable encryption");
+$l->t("Enable previews");
+$l->t("Enable sharing");
+$l->t("Check for changes");
+$l->t("Never");
+$l->t("Once every direct access");
+$l->t('Read only');
- script('files_external', [
- 'settings',
- 'templates'
- ]);
- style('files_external', 'settings');
+script('files_external', [
+ 'settings',
+ 'templates'
+]);
+style('files_external', 'settings');
- // load custom JS
- foreach ($_['backends'] as $backend) {
- /** @var Backend $backend */
- $scripts = $backend->getCustomJs();
- foreach ($scripts as $script) {
- script('files_external', $script);
- }
+// load custom JS
+foreach ($_['backends'] as $backend) {
+ /** @var Backend $backend */
+ $scripts = $backend->getCustomJs();
+ foreach ($scripts as $script) {
+ script('files_external', $script);
}
- foreach ($_['authMechanisms'] as $authMechanism) {
- /** @var AuthMechanism $authMechanism */
- $scripts = $authMechanism->getCustomJs();
- foreach ($scripts as $script) {
- script('files_external', $script);
- }
+}
+foreach ($_['authMechanisms'] as $authMechanism) {
+ /** @var AuthMechanism $authMechanism */
+ $scripts = $authMechanism->getCustomJs();
+ foreach ($scripts as $script) {
+ script('files_external', $script);
}
+}
- function writeParameterInput($parameter, $options, $classes = []) {
- $value = '';
- if (isset($options[$parameter->getName()])) {
- $value = $options[$parameter->getName()];
- }
- $placeholder = $parameter->getText();
- $is_optional = $parameter->isFlagSet(DefinitionParameter::FLAG_OPTIONAL);
+function writeParameterInput($parameter, $options, $classes = []) {
+ $value = '';
+ if (isset($options[$parameter->getName()])) {
+ $value = $options[$parameter->getName()];
+ }
+ $placeholder = $parameter->getText();
+ $is_optional = $parameter->isFlagSet(DefinitionParameter::FLAG_OPTIONAL);
- switch ($parameter->getType()) {
+ switch ($parameter->getType()) {
case DefinitionParameter::VALUE_PASSWORD: ?>
<?php if ($is_optional) {
- $classes[] = 'optional';
- } ?>
+ $classes[] = 'optional';
+ } ?>
<input type="password"
<?php if (!empty($classes)): ?> class="<?php p(implode(' ', $classes)); ?>"<?php endif; ?>
data-parameter="<?php p($parameter->getName()); ?>"
@@ -58,7 +58,7 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
placeholder="<?php p($placeholder); ?>"
/>
<?php
- break;
+ break;
case DefinitionParameter::VALUE_BOOLEAN: ?>
<?php $checkboxId = uniqid("checkbox_"); ?>
<div>
@@ -84,8 +84,8 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
break;
default: ?>
<?php if ($is_optional) {
- $classes[] = 'optional';
- } ?>
+ $classes[] = 'optional';
+ } ?>
<input type="text"
<?php if (!empty($classes)): ?> class="<?php p(implode(' ', $classes)); ?>"<?php endif; ?>
data-parameter="<?php p($parameter->getName()); ?>"
@@ -93,8 +93,8 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
placeholder="<?php p($placeholder); ?>"
/>
<?php
- }
}
+}
?>
<div class="emptyfilelist emptycontent hidden">
@@ -110,8 +110,8 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
<a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-external-storage')); ?>"></a>
<p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p>
<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) {
- print_unescaped(''.$_['dependencies'].'');
-} ?>
+ print_unescaped(''.$_['dependencies'].'');
+ } ?>
<table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['visibilityType'] === BackendService::VISIBILITY_ADMIN)); ?>'>
<thead>
<tr>
@@ -121,8 +121,8 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
<th><?php p($l->t('Authentication')); ?></th>
<th><?php p($l->t('Configuration')); ?></th>
<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN) {
- print_unescaped('<th>'.$l->t('Available for').'</th>');
-} ?>
+ print_unescaped('<th>'.$l->t('Available for').'</th>');
+ } ?>
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
@@ -152,17 +152,17 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
<?php p($l->t('Add storage')); ?>
</option>
<?php
- $sortedBackends = array_filter($_['backends'], function ($backend) use ($_) {
- return $backend->isVisibleFor($_['visibilityType']);
- });
- uasort($sortedBackends, function ($a, $b) {
- return strcasecmp($a->getText(), $b->getText());
- });
- ?>
+ $sortedBackends = array_filter($_['backends'], function ($backend) use ($_) {
+ return $backend->isVisibleFor($_['visibilityType']);
+ });
+uasort($sortedBackends, function ($a, $b) {
+ return strcasecmp($a->getText(), $b->getText());
+});
+?>
<?php foreach ($sortedBackends as $backend): ?>
<?php if ($backend->getDeprecateTo() || (!$canCreateNewLocalStorage && $backend->getIdentifier() == "local")) {
- continue;
- } // ignore deprecated backends?>
+ continue;
+ } // ignore deprecated backends?>
<option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option>
<?php endforeach; ?>
</select>
@@ -191,8 +191,8 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
<?php if ($_['visibilityType'] === BackendService::VISIBILITY_ADMIN): ?>
<input type="checkbox" name="allowUserMounting" id="allowUserMounting" class="checkbox"
value="1" <?php if ($_['allowUserMounting']) {
- print_unescaped(' checked="checked"');
- } ?> />
+ print_unescaped(' checked="checked"');
+ } ?> />
<label for="allowUserMounting"><?php p($l->t('Allow users to mount external storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
<p id="userMountingBackends"<?php if (!$_['allowUserMounting']): ?> class="hidden"<?php endif; ?>>
@@ -200,14 +200,15 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
$userBackends = array_filter($_['backends'], function ($backend) {
return $backend->isAllowedVisibleFor(BackendService::VISIBILITY_PERSONAL);
});
- ?>
- <?php $i = 0; foreach ($userBackends as $backend): ?>
+ ?>
+ <?php $i = 0;
+ foreach ($userBackends as $backend): ?>
<?php if ($deprecateTo = $backend->getDeprecateTo()): ?>
<input type="hidden" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" data-deprecate-to="<?php p($deprecateTo->getIdentifier()); ?>" />
<?php else: ?>
<input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" class="checkbox" name="allowUserMountingBackends[]" value="<?php p($backend->getIdentifier()); ?>" <?php if ($backend->isVisibleFor(BackendService::VISIBILITY_PERSONAL)) {
- print_unescaped(' checked="checked"');
- } ?> />
+ print_unescaped(' checked="checked"');
+ } ?> />
<label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend->getText()); ?></label> <br />
<?php endif; ?>
<?php $i++; ?>
diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
index 5ce9db68e40..a3c1a7b0dae 100644
--- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php
@@ -35,7 +35,6 @@ use OCP\IL10N;
use OCP\IRequest;
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class GlobalStoragesControllerTest extends StoragesControllerTest {
protected function setUp(): void {
diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
index deb0f6e37bf..793a90c527b 100644
--- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php
+++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php
@@ -38,7 +38,6 @@ use OCP\IL10N;
use OCP\IRequest;
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class UserStoragesControllerTest extends StoragesControllerTest {
diff --git a/apps/files_external/tests/Listener/StorePasswordListenerTest.php b/apps/files_external/tests/Listener/StorePasswordListenerTest.php
index fd7e147aebf..f6521b39410 100644
--- a/apps/files_external/tests/Listener/StorePasswordListenerTest.php
+++ b/apps/files_external/tests/Listener/StorePasswordListenerTest.php
@@ -32,8 +32,8 @@ use OCP\IUser;
use OCP\Security\ICredentialsManager;
use OCP\User\Events\PasswordUpdatedEvent;
use OCP\User\Events\UserLoggedInEvent;
-use Test\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
+use Test\TestCase;
/**
* @group DB
diff --git a/apps/files_external/tests/PersonalMountTest.php b/apps/files_external/tests/PersonalMountTest.php
index 024695b0188..f2b270f087f 100644
--- a/apps/files_external/tests/PersonalMountTest.php
+++ b/apps/files_external/tests/PersonalMountTest.php
@@ -28,10 +28,6 @@ use OC\Files\Mount\Manager;
use OC\Files\SetupManagerFactory;
use OCA\Files_External\Lib\PersonalMount;
use OCA\Files_External\Lib\StorageConfig;
-use OCP\Diagnostics\IEventLogger;
-use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Files\Config\IMountProviderCollection;
-use OCP\IUserManager;
use Test\TestCase;
class PersonalMountTest extends TestCase {
diff --git a/apps/files_external/tests/sso-setup/apps.config.php b/apps/files_external/tests/sso-setup/apps.config.php
index 507d43dd44e..08f1288bd3d 100644
--- a/apps/files_external/tests/sso-setup/apps.config.php
+++ b/apps/files_external/tests/sso-setup/apps.config.php
@@ -1,14 +1,15 @@
<?php
+
$CONFIG = [
"apps_paths" => [
[
- "path" => "/var/www/html/apps",
- "url" => "/apps",
+ "path" => "/var/www/html/apps",
+ "url" => "/apps",
"writable" => false,
],
[
- "path" => "/var/www/html/extra-apps",
- "url" => "/extra-apps",
+ "path" => "/var/www/html/extra-apps",
+ "url" => "/extra-apps",
"writable" => true,
],
],
diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
index bc3aa42ff6c..f95b3da3d61 100644
--- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
+++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
@@ -36,7 +36,8 @@ use OCP\Util;
class LoadAdditionalScriptsListener implements IEventListener {
public function __construct(
private IAppManager $appManager,
- ) {}
+ ) {
+ }
public function handle(Event $event): void {
if (!($event instanceof LoadAdditionalScriptsEvent)) {
diff --git a/apps/files_reminders/lib/Listener/NodeDeletedListener.php b/apps/files_reminders/lib/Listener/NodeDeletedListener.php
index 88aed08bba8..944ce2cbe36 100644
--- a/apps/files_reminders/lib/Listener/NodeDeletedListener.php
+++ b/apps/files_reminders/lib/Listener/NodeDeletedListener.php
@@ -34,7 +34,8 @@ use OCP\Files\Events\Node\NodeDeletedEvent;
class NodeDeletedListener implements IEventListener {
public function __construct(
private ReminderService $reminderService,
- ) {}
+ ) {
+ }
public function handle(Event $event): void {
if (!($event instanceof NodeDeletedEvent)) {
diff --git a/apps/files_reminders/lib/Listener/UserDeletedListener.php b/apps/files_reminders/lib/Listener/UserDeletedListener.php
index b95102c1cc2..4e54a6d9946 100644
--- a/apps/files_reminders/lib/Listener/UserDeletedListener.php
+++ b/apps/files_reminders/lib/Listener/UserDeletedListener.php
@@ -34,7 +34,8 @@ use OCP\User\Events\UserDeletedEvent;
class UserDeletedListener implements IEventListener {
public function __construct(
private ReminderService $reminderService,
- ) {}
+ ) {
+ }
public function handle(Event $event): void {
if (!($event instanceof UserDeletedEvent)) {
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php
index ce46aafb86c..f7ffa0b4437 100644
--- a/apps/files_reminders/lib/Notification/Notifier.php
+++ b/apps/files_reminders/lib/Notification/Notifier.php
@@ -42,7 +42,8 @@ class Notifier implements INotifier {
protected IFactory $l10nFactory,
protected IURLGenerator $urlGenerator,
protected IRootFolder $root,
- ) {}
+ ) {
+ }
public function getID(): string {
return Application::APP_ID;
diff --git a/apps/files_reminders/lib/Service/ReminderService.php b/apps/files_reminders/lib/Service/ReminderService.php
index 4bfa943cb04..fabca65c45a 100644
--- a/apps/files_reminders/lib/Service/ReminderService.php
+++ b/apps/files_reminders/lib/Service/ReminderService.php
@@ -52,7 +52,8 @@ class ReminderService {
protected ReminderMapper $reminderMapper,
protected IRootFolder $root,
protected LoggerInterface $logger,
- ) {}
+ ) {
+ }
/**
* @throws DoesNotExistException
diff --git a/apps/files_sharing/lib/Activity/Providers/Base.php b/apps/files_sharing/lib/Activity/Providers/Base.php
index e9e1d870f9a..01d730242c9 100644
--- a/apps/files_sharing/lib/Activity/Providers/Base.php
+++ b/apps/files_sharing/lib/Activity/Providers/Base.php
@@ -63,12 +63,12 @@ abstract class Base implements IProvider {
protected $displayNames = [];
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- ICloudIdManager $cloudIdManager,
- IContactsManager $contactsManager,
- IEventMerger $eventMerger) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ ICloudIdManager $cloudIdManager,
+ IContactsManager $contactsManager,
+ IEventMerger $eventMerger) {
$this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php
index b9cc2e6b579..a6e6fae3e9b 100644
--- a/apps/files_sharing/lib/Activity/Providers/Groups.php
+++ b/apps/files_sharing/lib/Activity/Providers/Groups.php
@@ -51,13 +51,13 @@ class Groups extends Base {
protected $groupDisplayNames = [];
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- ICloudIdManager $cloudIdManager,
- IContactsManager $contactsManager,
- IEventMerger $eventMerger,
- IGroupManager $groupManager) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ ICloudIdManager $cloudIdManager,
+ IContactsManager $contactsManager,
+ IEventMerger $eventMerger,
+ IGroupManager $groupManager) {
parent::__construct($languageFactory, $url, $activityManager, $userManager, $cloudIdManager, $contactsManager, $eventMerger);
$this->groupManager = $groupManager;
}
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
index e24645f8a26..b46db3105e9 100644
--- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
+++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
@@ -40,12 +40,12 @@ class RemoteShares extends Base {
public const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IManager $activityManager,
- IUserManager $userManager,
- ICloudIdManager $cloudIdManager,
- IContactsManager $contactsManager,
- IEventMerger $eventMerger) {
+ IURLGenerator $url,
+ IManager $activityManager,
+ IUserManager $userManager,
+ ICloudIdManager $cloudIdManager,
+ IContactsManager $contactsManager,
+ IEventMerger $eventMerger) {
parent::__construct($languageFactory, $url, $activityManager, $userManager, $cloudIdManager, $contactsManager, $eventMerger);
}
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php
index 603527310ae..fc305e58dbe 100644
--- a/apps/files_sharing/lib/AppInfo/Application.php
+++ b/apps/files_sharing/lib/AppInfo/Application.php
@@ -32,8 +32,9 @@ namespace OCA\Files_Sharing\AppInfo;
use OC\Group\DisplayNameCache as GroupDisplayNameCache;
use OC\Share\Share;
use OC\User\DisplayNameCache;
+use OCA\Files\Event\LoadAdditionalScriptsEvent;
+use OCA\Files\Event\LoadSidebar;
use OCA\Files_Sharing\Capabilities;
-use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\External\MountProvider as ExternalMountProvider;
use OCA\Files_Sharing\Helper;
@@ -48,8 +49,6 @@ use OCA\Files_Sharing\Middleware\SharingCheckMiddleware;
use OCA\Files_Sharing\MountProvider;
use OCA\Files_Sharing\Notification\Listener;
use OCA\Files_Sharing\Notification\Notifier;
-use OCA\Files\Event\LoadAdditionalScriptsEvent;
-use OCA\Files\Event\LoadSidebar;
use OCA\Files_Sharing\ShareBackend\File;
use OCA\Files_Sharing\ShareBackend\Folder;
use OCA\Files_Sharing\ViewOnly;
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php
index af8e722c609..3011bc64669 100644
--- a/apps/files_sharing/lib/Cache.php
+++ b/apps/files_sharing/lib/Cache.php
@@ -39,8 +39,6 @@ use OCP\Files\Search\ISearchBinaryOperator;
use OCP\Files\Search\ISearchComparison;
use OCP\Files\Search\ISearchOperator;
use OCP\Files\StorageNotAvailableException;
-use OCP\ICacheFactory;
-use OCP\IUserManager;
use OCP\Share\IShare;
/**
diff --git a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php
index 2fd35b20a0f..4ed30f44020 100644
--- a/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php
+++ b/apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php
@@ -24,7 +24,6 @@
namespace OCA\Files_Sharing\Collaboration;
use OCP\Collaboration\AutoComplete\ISorter;
-use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\IUserSession;
diff --git a/apps/files_sharing/lib/Command/DeleteOrphanShares.php b/apps/files_sharing/lib/Command/DeleteOrphanShares.php
index 310f27ebfa3..57158774758 100644
--- a/apps/files_sharing/lib/Command/DeleteOrphanShares.php
+++ b/apps/files_sharing/lib/Command/DeleteOrphanShares.php
@@ -23,14 +23,13 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Command;
-
-use Symfony\Component\Console\Question\ConfirmationQuestion;
use OC\Core\Command\Base;
use OCA\Files_Sharing\OrphanHelper;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\Console\Question\ConfirmationQuestion;
class DeleteOrphanShares extends Base {
private OrphanHelper $orphanHelper;
diff --git a/apps/files_sharing/lib/Command/ExiprationNotification.php b/apps/files_sharing/lib/Command/ExiprationNotification.php
index e77b41b1835..b0311e09221 100644
--- a/apps/files_sharing/lib/Command/ExiprationNotification.php
+++ b/apps/files_sharing/lib/Command/ExiprationNotification.php
@@ -46,9 +46,9 @@ class ExiprationNotification extends Command {
private $shareManager;
public function __construct(ITimeFactory $time,
- NotificationManager $notificationManager,
- IDBConnection $connection,
- ShareManager $shareManager) {
+ NotificationManager $notificationManager,
+ IDBConnection $connection,
+ ShareManager $shareManager) {
parent::__construct();
$this->notificationManager = $notificationManager;
@@ -67,7 +67,7 @@ class ExiprationNotification extends Command {
//Current time
$minTime = $this->time->getDateTime();
$minTime->add(new \DateInterval('P1D'));
- $minTime->setTime(0,0,0);
+ $minTime->setTime(0, 0, 0);
$maxTime = clone $minTime;
$maxTime->setTime(23, 59, 59);
diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
index aec011aa7ac..6b54a3489c6 100644
--- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
@@ -77,14 +77,14 @@ class DeletedShareAPIController extends OCSController {
private $serverContainer;
public function __construct(string $appName,
- IRequest $request,
- ShareManager $shareManager,
- string $UserId,
- IUserManager $userManager,
- IGroupManager $groupManager,
- IRootFolder $rootFolder,
- IAppManager $appManager,
- IServerContainer $serverContainer) {
+ IRequest $request,
+ ShareManager $shareManager,
+ string $UserId,
+ IUserManager $userManager,
+ IGroupManager $groupManager,
+ IRootFolder $rootFolder,
+ IAppManager $appManager,
+ IServerContainer $serverContainer) {
parent::__construct($appName, $request);
$this->shareManager = $shareManager;
diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php
index 089610f711f..54a1a321665 100644
--- a/apps/files_sharing/lib/Controller/PublicPreviewController.php
+++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php
@@ -51,10 +51,10 @@ class PublicPreviewController extends PublicShareController {
private $share;
public function __construct(string $appName,
- IRequest $request,
- ShareManager $shareManger,
- ISession $session,
- IPreview $previewManager) {
+ IRequest $request,
+ ShareManager $shareManger,
+ ISession $session,
+ IPreview $previewManager) {
parent::__construct($appName, $request, $session);
$this->shareManager = $shareManger;
diff --git a/apps/files_sharing/lib/Controller/SettingsController.php b/apps/files_sharing/lib/Controller/SettingsController.php
index 00d627095b8..ff087d4a196 100644
--- a/apps/files_sharing/lib/Controller/SettingsController.php
+++ b/apps/files_sharing/lib/Controller/SettingsController.php
@@ -41,8 +41,8 @@ class SettingsController extends Controller {
private $userId;
public function __construct(IRequest $request,
- IConfig $config,
- string $userId) {
+ IConfig $config,
+ string $userId) {
parent::__construct(Application::APP_ID, $request);
$this->config = $config;
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 5b69d522545..98423e7dd1f 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -260,7 +260,7 @@ class ShareAPIController extends OCSController {
$result['share_with'] = $share->getSharedWith();
$result['share_with_displayname'] = $sharedWith !== null ? $sharedWith->getDisplayName() : $share->getSharedWith();
$result['share_with_displayname_unique'] = $sharedWith !== null ? (
- !empty($sharedWith->getSystemEMailAddress()) ? $sharedWith->getSystemEMailAddress() : $sharedWith->getUID()
+ !empty($sharedWith->getSystemEMailAddress()) ? $sharedWith->getSystemEMailAddress() : $sharedWith->getUID()
) : $share->getSharedWith();
$userStatuses = $this->userStatusManager->getUserStatuses([$share->getSharedWith()]);
@@ -364,7 +364,7 @@ class ShareAPIController extends OCSController {
$result['attributes'] = null;
if ($attributes = $share->getAttributes()) {
- $result['attributes'] = (string)\json_encode($attributes->toArray());
+ $result['attributes'] = (string)\json_encode($attributes->toArray());
}
return $result;
@@ -1314,8 +1314,8 @@ class ShareAPIController extends OCSController {
}
if (!$this->hasPermission($newPermissions, Constants::PERMISSION_READ) && (
- $this->hasPermission($newPermissions, Constants::PERMISSION_UPDATE) || $this->hasPermission($newPermissions, Constants::PERMISSION_DELETE)
- )) {
+ $this->hasPermission($newPermissions, Constants::PERMISSION_UPDATE) || $this->hasPermission($newPermissions, Constants::PERMISSION_DELETE)
+ )) {
throw new OCSBadRequestException($this->l->t('Share must have READ permission if UPDATE or DELETE permission is set'));
}
}
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index dc60463dac7..835d08c446c 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -71,8 +71,8 @@ use OCP\Security\ISecureRandom;
use OCP\Share;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager as ShareManager;
-use OCP\Share\IShare;
use OCP\Share\IPublicShareTemplateFactory;
+use OCP\Share\IShare;
use OCP\Template;
/**
@@ -569,10 +569,10 @@ class ShareController extends AuthPublicShareController {
* @param string $filePath
*/
protected function publishActivity($subject,
- array $parameters,
- $affectedUser,
- $fileId,
- $filePath) {
+ array $parameters,
+ $affectedUser,
+ $fileId,
+ $filePath) {
$event = $this->activityManager->generateEvent();
$event->setApp('files_sharing')
->setType('public_links')
diff --git a/apps/files_sharing/lib/Controller/ShareInfoController.php b/apps/files_sharing/lib/Controller/ShareInfoController.php
index 720705121d2..a1379a63d9a 100644
--- a/apps/files_sharing/lib/Controller/ShareInfoController.php
+++ b/apps/files_sharing/lib/Controller/ShareInfoController.php
@@ -53,8 +53,8 @@ class ShareInfoController extends ApiController {
* @param IManager $shareManager
*/
public function __construct(string $appName,
- IRequest $request,
- IManager $shareManager) {
+ IRequest $request,
+ IManager $shareManager) {
parent::__construct($appName, $request);
$this->shareManager = $shareManager;
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index c151ab53327..00bc85e4a96 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -38,9 +38,6 @@ declare(strict_types=1);
*/
namespace OCA\Files_Sharing\Controller;
-use OCP\Constants;
-use function array_slice;
-use function array_values;
use Generator;
use OC\Collaboration\Collaborators\SearchResult;
use OCA\Files_Sharing\ResponseDefinitions;
@@ -51,11 +48,14 @@ use OCP\AppFramework\OCSController;
use OCP\Collaboration\Collaborators\ISearch;
use OCP\Collaboration\Collaborators\ISearchResult;
use OCP\Collaboration\Collaborators\SearchResultType;
+use OCP\Constants;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IURLGenerator;
-use OCP\Share\IShare;
use OCP\Share\IManager;
+use OCP\Share\IShare;
+use function array_slice;
+use function array_values;
use function usort;
/**
diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
index 9c95428d7b7..8af1c803e18 100644
--- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
+++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php
@@ -39,7 +39,6 @@ use OCP\Defaults;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
-use OCP\Files\NotFoundException;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IPreview;
@@ -47,8 +46,8 @@ use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
-use OCP\Share\IShare;
use OCP\Share\IPublicShareTemplateProvider;
+use OCP\Share\IShare;
use OCP\Template;
use OCP\Util;
diff --git a/apps/files_sharing/lib/External/MountProvider.php b/apps/files_sharing/lib/External/MountProvider.php
index 5b315e81f69..169bf6ed3d7 100644
--- a/apps/files_sharing/lib/External/MountProvider.php
+++ b/apps/files_sharing/lib/External/MountProvider.php
@@ -24,11 +24,11 @@
*/
namespace OCA\Files_Sharing\External;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Federation\ICloudIdManager;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Storage\IStorageFactory;
use OCP\IDBConnection;
-use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IUser;
class MountProvider implements IMountProvider {
diff --git a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php
index e2122cb6ee2..a15eade79fd 100644
--- a/apps/files_sharing/lib/Listener/LoadAdditionalListener.php
+++ b/apps/files_sharing/lib/Listener/LoadAdditionalListener.php
@@ -25,8 +25,8 @@ declare(strict_types=1);
*/
namespace OCA\Files_Sharing\Listener;
-use OCA\Files_Sharing\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
+use OCA\Files_Sharing\AppInfo\Application;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Share\IManager;
diff --git a/apps/files_sharing/lib/Listener/LoadSidebarListener.php b/apps/files_sharing/lib/Listener/LoadSidebarListener.php
index c6a3c4c2683..b88c3ccf0d8 100644
--- a/apps/files_sharing/lib/Listener/LoadSidebarListener.php
+++ b/apps/files_sharing/lib/Listener/LoadSidebarListener.php
@@ -26,26 +26,23 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Listener;
-use OCA\Files_Sharing\AppInfo\Application;
use OCA\Files\Event\LoadSidebar;
+use OCA\Files_Sharing\AppInfo\Application;
+use OCP\AppFramework\Services\IInitialState;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
-use OCP\Util;
-use OCP\AppFramework\Services\IInitialState;
use OCP\Share\IManager;
+use OCP\Util;
/**
* @template-implements IEventListener<Event>
*/
-class LoadSidebarListener implements IEventListener
-{
+class LoadSidebarListener implements IEventListener {
- public function __construct(private IInitialState $initialState, private IManager $shareManager)
- {
+ public function __construct(private IInitialState $initialState, private IManager $shareManager) {
}
- public function handle(Event $event): void
- {
+ public function handle(Event $event): void {
if (!($event instanceof LoadSidebar)) {
return;
}
diff --git a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
index 1c961ffed34..aba6124f415 100644
--- a/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/OCSShareAPIMiddleware.php
@@ -39,7 +39,7 @@ class OCSShareAPIMiddleware extends Middleware {
private $l;
public function __construct(IManager $shareManager,
- IL10N $l) {
+ IL10N $l) {
$this->shareManager = $shareManager;
$this->l = $l;
}
diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
index b9bab169d1d..005fc75c849 100644
--- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
@@ -64,12 +64,12 @@ class SharingCheckMiddleware extends Middleware {
protected $request;
public function __construct(string $appName,
- IConfig $config,
- IAppManager $appManager,
- IControllerMethodReflector $reflector,
- IManager $shareManager,
- IRequest $request
- ) {
+ IConfig $config,
+ IAppManager $appManager,
+ IControllerMethodReflector $reflector,
+ IManager $shareManager,
+ IRequest $request
+ ) {
$this->appName = $appName;
$this->config = $config;
$this->appManager = $appManager;
diff --git a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
index d1ba645f93d..57b441172ee 100644
--- a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
+++ b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
@@ -68,7 +68,7 @@ class OwncloudGuestShareType implements IRepairStep {
$query = $this->connection->getQueryBuilder();
$query->update('share')
- ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST))
+ ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST))
->where($query->expr()->eq('share_type', $query->createNamedParameter(IShare::TYPE_EMAIL)));
$query->execute();
}
diff --git a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php
index 50d0cd9e066..ec514c9154f 100644
--- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php
+++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php
@@ -29,8 +29,8 @@ namespace OCA\Files_Sharing\Migration;
use Closure;
use Doctrine\DBAL\Types\Type;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php
index ff7722eaa58..c393295a367 100644
--- a/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php
+++ b/apps/files_sharing/lib/Migration/Version21000Date20201223143245.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php b/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
index d5f938dde6d..8b95e32eb4f 100644
--- a/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
+++ b/apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
@@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\Files_Sharing\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php
index d4cc13842a3..dce67b7ef98 100644
--- a/apps/files_sharing/lib/MountProvider.php
+++ b/apps/files_sharing/lib/MountProvider.php
@@ -28,9 +28,9 @@
*/
namespace OCA\Files_Sharing;
-use OCP\Cache\CappedMemoryCache;
use OC\Files\View;
use OCA\Files_Sharing\Event\ShareMountedEvent;
+use OCP\Cache\CappedMemoryCache;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Storage\IStorageFactory;
diff --git a/apps/files_sharing/lib/Notification/Notifier.php b/apps/files_sharing/lib/Notification/Notifier.php
index d339c484dd7..20ad9c7e755 100644
--- a/apps/files_sharing/lib/Notification/Notifier.php
+++ b/apps/files_sharing/lib/Notification/Notifier.php
@@ -61,11 +61,11 @@ class Notifier implements INotifier {
protected $url;
public function __construct(IFactory $l10nFactory,
- IManager $shareManager,
- IRootFolder $rootFolder,
- IGroupManager $groupManager,
- IUserManager $userManager,
- IURLGenerator $url) {
+ IManager $shareManager,
+ IRootFolder $rootFolder,
+ IGroupManager $groupManager,
+ IUserManager $userManager,
+ IURLGenerator $url) {
$this->l10nFactory = $l10nFactory;
$this->shareManager = $shareManager;
$this->rootFolder = $rootFolder;
diff --git a/apps/files_sharing/lib/ResponseDefinitions.php b/apps/files_sharing/lib/ResponseDefinitions.php
index 19993572c2e..aa1ee004971 100644
--- a/apps/files_sharing/lib/ResponseDefinitions.php
+++ b/apps/files_sharing/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index a9d5bf82935..7dc24936d6b 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -29,11 +29,11 @@
namespace OCA\Files_Sharing;
-use OCP\Cache\CappedMemoryCache;
use OC\Files\Filesystem;
use OC\Files\Mount\MountPoint;
use OC\Files\Mount\MoveableMount;
use OC\Files\View;
+use OCP\Cache\CappedMemoryCache;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\InvalidateMountCacheEvent;
use OCP\Files\Storage\IStorageFactory;
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index c56bcaebb12..de49e3c4294 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -37,18 +37,18 @@ use OC\Files\Cache\NullWatcher;
use OC\Files\Cache\Watcher;
use OC\Files\ObjectStore\HomeObjectStoreStorage;
use OC\Files\Storage\Common;
-use OC\Files\Storage\Home;
-use OC\User\DisplayNameCache;
-use OCP\Files\Folder;
-use OCP\Files\IHomeStorage;
-use OCP\Files\Node;
use OC\Files\Storage\FailedStorage;
+use OC\Files\Storage\Home;
use OC\Files\Storage\Wrapper\PermissionsMask;
+use OC\User\DisplayNameCache;
use OC\User\NoUserException;
use OCA\Files_External\Config\ExternalMountPoint;
use OCP\Constants;
use OCP\Files\Cache\ICacheEntry;
+use OCP\Files\Folder;
+use OCP\Files\IHomeStorage;
use OCP\Files\IRootFolder;
+use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IDisableEncryptionStorage;
use OCP\Files\Storage\IStorage;
diff --git a/apps/files_sharing/lib/Updater.php b/apps/files_sharing/lib/Updater.php
index 59e06e60299..95a5c9d9166 100644
--- a/apps/files_sharing/lib/Updater.php
+++ b/apps/files_sharing/lib/Updater.php
@@ -28,8 +28,8 @@ namespace OCA\Files_Sharing;
use OC\Files\Mount\MountPoint;
use OCP\Constants;
-use OCP\Share\IShare;
use OCP\Files\Folder;
+use OCP\Share\IShare;
class Updater {
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index fa4d34dd6f1..4d840169b69 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -120,7 +120,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
echo $l->t('By uploading files, you agree to the %1$sterms of service%2$s.', [
'<span id="show-terms-dialog">', '</span>'
]);
- ?>
+ ?>
</div>
<?php } ?>
</div>
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index f77a22dc0ad..a50bfe5bee4 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -37,7 +37,6 @@ namespace OCA\Files_Sharing\Tests;
use OC\Files\Cache\Scanner;
use OC\Files\Filesystem;
-use OC\Files\SetupManager;
use OCA\Files_Sharing\Controller\ShareAPIController;
use OCP\App\IAppManager;
use OCP\AppFramework\OCS\OCSBadRequestException;
diff --git a/apps/files_sharing/tests/ApplicationTest.php b/apps/files_sharing/tests/ApplicationTest.php
index d16aed61bf7..270a56504f9 100644
--- a/apps/files_sharing/tests/ApplicationTest.php
+++ b/apps/files_sharing/tests/ApplicationTest.php
@@ -22,14 +22,13 @@
*/
namespace OCA\Files_Sharing\Tests;
-use OCP\Files\Events\BeforeDirectFileDownloadEvent;
-use OCP\Files\Events\BeforeZipCreatedEvent;
-use Psr\Log\LoggerInterface;
-use OC\Share20\Manager;
use OC\EventDispatcher\EventDispatcher;
+use OC\Share20\Manager;
use OCA\Files_Sharing\AppInfo\Application;
use OCA\Files_Sharing\SharedStorage;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Files\Events\BeforeDirectFileDownloadEvent;
+use OCP\Files\Events\BeforeZipCreatedEvent;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
@@ -39,6 +38,7 @@ use OCP\IUser;
use OCP\IUserSession;
use OCP\Share\IAttributes;
use OCP\Share\IShare;
+use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcher as SymfonyDispatcher;
use Test\TestCase;
diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php
index 50e5433d10f..729b701b1a0 100644
--- a/apps/files_sharing/tests/CacheTest.php
+++ b/apps/files_sharing/tests/CacheTest.php
@@ -244,7 +244,7 @@ class CacheTest extends TestCase {
public function testGetFolderContentsInRoot() {
$results = $this->user2View->getDirectoryContent('/');
- $results = (array_filter($results, function($file) {
+ $results = (array_filter($results, function ($file) {
return $file->getName() !== 'welcome.txt';
}));
@@ -334,7 +334,7 @@ class CacheTest extends TestCase {
self::assertEquals([
'welcome.txt',
'simplefile.txt'
- ], array_map(function($node) {
+ ], array_map(function ($node) {
return $node->getFileInfo()['name'];
}, $recents));
}
diff --git a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php
index ff6001e0ced..c4906b9119b 100644
--- a/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php
@@ -24,14 +24,14 @@
namespace OCA\Files_Sharing\Tests\Controllers;
use OCA\Files_Sharing\Controller\ExternalSharesController;
+use OCA\Files_Sharing\External\Manager;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
+use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
+use OCP\Http\Client\IResponse;
use OCP\IConfig;
use OCP\IRequest;
-use OCP\Http\Client\IResponse;
-use OCP\Http\Client\IClient;
-use OCA\Files_Sharing\External\Manager;
use PHPUnit\Framework\MockObject\MockObject;
/**
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
index a4b77c3ea94..bfc6a97bd86 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -46,7 +46,6 @@ use OCP\Files\IRootFolder;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\NotFoundException;
use OCP\Files\Storage;
-use OCP\Files\Storage\IStorage;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
@@ -62,8 +61,8 @@ use OCP\Share\Exceptions\GenericShareException;
use OCP\Share\IAttributes as IShareAttributes;
use OCP\Share\IManager;
use OCP\Share\IShare;
-use Test\TestCase;
use OCP\UserStatus\IManager as IUserStatusManager;
+use Test\TestCase;
/**
* Class ShareAPIControllerTest
@@ -523,8 +522,8 @@ class ShareAPIControllerTest extends TestCase {
*/
public function createShare($id, $shareType, $sharedWith, $sharedBy, $shareOwner, $path, $permissions,
- $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token = null,
- $password = null, $label = '', $attributes = null) {
+ $shareTime, $expiration, $parent, $target, $mail_send, $note = '', $token = null,
+ $password = null, $label = '', $attributes = null) {
$share = $this->getMockBuilder(IShare::class)->getMock();
$share->method('getId')->willReturn($id);
$share->method('getShareType')->willReturn($shareType);
@@ -2184,7 +2183,7 @@ class ShareAPIControllerTest extends TestCase {
$this->shareManager->expects($this->once())->method('createShare')->with(
$this->callback(function (\OCP\Share\IShare $share) use ($path) {
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
return $share->getNode() === $path &&
$share->getShareType() === IShare::TYPE_LINK &&
@@ -2743,7 +2742,7 @@ class ShareAPIControllerTest extends TestCase {
$this->shareManager->expects($this->once())->method('updateShare')->with(
$this->callback(function (\OCP\Share\IShare $share) {
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
return $share->getPermissions() === (\OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE) &&
$share->getPassword() === 'password' &&
@@ -3029,7 +3028,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
[$userFolder, $node] = $this->getNonSharedUserFolder();
$node->method('getId')->willReturn(42);
@@ -3081,7 +3080,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
[$userFolder, $node] = $this->getNonSharedUserFolder();
$userFolder->method('getById')
@@ -3139,7 +3138,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
[$userFolder, $node] = $this->getNonSharedUserFolder();
$userFolder->method('getById')
@@ -3179,7 +3178,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
[$userFolder, $node] = $this->getNonSharedUserFolder();
$userFolder->method('getById')
@@ -3233,7 +3232,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$date = new \DateTime('2000-01-01');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
[$userFolder, $node] = $this->getNonSharedUserFolder();
$node->method('getId')
@@ -3328,7 +3327,7 @@ class ShareAPIControllerTest extends TestCase {
$this->shareManager->expects($this->once())->method('updateShare')->with(
$this->callback(function (\OCP\Share\IShare $share) {
$date = new \DateTime('2010-12-23');
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
return $share->getPermissions() === \OCP\Constants::PERMISSION_ALL &&
$share->getPassword() === 'password' &&
diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php
index 2a9ab1a3b08..3a73862bf77 100644
--- a/apps/files_sharing/tests/Controller/ShareControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php
@@ -37,19 +37,24 @@ namespace OCA\Files_Sharing\Tests\Controllers;
use OC\Files\Filesystem;
use OC\Files\Node\Folder;
+use OC\Share20\Manager;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\Controller\ShareController;
+use OCA\Files_Sharing\DefaultPublicShareTemplateProvider;
use OCP\Accounts\IAccount;
use OCP\Accounts\IAccountManager;
use OCP\Accounts\IAccountProperty;
+use OCP\Activity\IManager;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\Template\ExternalShareMenuAction;
use OCP\AppFramework\Http\Template\LinkMenuAction;
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
use OCP\AppFramework\Http\Template\SimpleMenuAction;
use OCP\Constants;
+use OCP\Defaults;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\File;
+use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\Storage;
use OCP\IConfig;
@@ -62,14 +67,9 @@ use OCP\IUser;
use OCP\IUserManager;
use OCP\Security\ISecureRandom;
use OCP\Share\Exceptions\ShareNotFound;
+use OCP\Share\IPublicShareTemplateFactory;
use OCP\Share\IShare;
use PHPUnit\Framework\MockObject\MockObject;
-use OCP\Activity\IManager;
-use OCP\Files\IRootFolder;
-use OCP\Defaults;
-use OC\Share20\Manager;
-use OCA\Files_Sharing\DefaultPublicShareTemplateProvider;
-use OCP\Share\IPublicShareTemplateFactory;
/**
* @group DB
diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
index b73b605f410..5953ab0d890 100644
--- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php
@@ -38,8 +38,8 @@ use OCP\Collaboration\Collaborators\ISearch;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IURLGenerator;
-use OCP\Share\IShare;
use OCP\Share\IManager;
+use OCP\Share\IShare;
use PHPUnit\Framework\MockObject\MockObject;
/**
diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php
index 2e169f878ce..e320b85cb22 100644
--- a/apps/files_sharing/tests/SharedMountTest.php
+++ b/apps/files_sharing/tests/SharedMountTest.php
@@ -377,14 +377,14 @@ class SharedMountTest extends TestCase {
$caches = [];
$cacheFactory = $this->createMock(ICacheFactory::class);
$cacheFactory->method('createLocal')
- ->willReturnCallback(function(string $prefix) use (&$caches) {
+ ->willReturnCallback(function (string $prefix) use (&$caches) {
if (!isset($caches[$prefix])) {
$caches[$prefix] = new ArrayCache($prefix);
}
return $caches[$prefix];
});
$cacheFactory->method('createDistributed')
- ->willReturnCallback(function(string $prefix) use (&$caches) {
+ ->willReturnCallback(function (string $prefix) use (&$caches) {
if (!isset($caches[$prefix])) {
$caches[$prefix] = new ArrayCache($prefix);
}
diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php
index 2bd83d6c9c2..84e436b17cd 100644
--- a/apps/files_sharing/tests/TestCase.php
+++ b/apps/files_sharing/tests/TestCase.php
@@ -33,13 +33,13 @@
namespace OCA\Files_Sharing\Tests;
use OC\Files\Filesystem;
+use OC\User\DisplayNameCache;
use OCA\Files_Sharing\AppInfo\Application;
use OCA\Files_Sharing\External\MountProvider as ExternalMountProvider;
use OCA\Files_Sharing\MountProvider;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Share\IShare;
use Test\Traits\MountProviderTrait;
-use OC\User\DisplayNameCache;
/**
* Class TestCase
diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php
index 461eade6802..f83c56a64b0 100644
--- a/apps/files_trashbin/lib/AppInfo/Application.php
+++ b/apps/files_trashbin/lib/AppInfo/Application.php
@@ -33,11 +33,11 @@ use OCA\Files_Trashbin\Listeners\LoadAdditionalScripts;
use OCA\Files_Trashbin\Trash\ITrashManager;
use OCA\Files_Trashbin\Trash\TrashManager;
use OCA\Files_Trashbin\UserMigration\TrashbinMigrator;
+use OCP\App\IAppManager;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
-use OCP\App\IAppManager;
use OCP\ILogger;
use OCP\IServerContainer;
diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
index c76033e0c79..5bbc97a38c9 100644
--- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
+++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
@@ -26,7 +26,6 @@
*/
namespace OCA\Files_Trashbin\BackgroundJob;
-use OCA\Files_Trashbin\AppInfo\Application;
use OCA\Files_Trashbin\Expiration;
use OCA\Files_Trashbin\Helper;
use OCA\Files_Trashbin\Trashbin;
diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php
index bcecbfceeff..e64ef2973f7 100644
--- a/apps/files_trashbin/lib/Command/ExpireTrash.php
+++ b/apps/files_trashbin/lib/Command/ExpireTrash.php
@@ -53,7 +53,7 @@ class ExpireTrash extends Command {
* @param Expiration|null $expiration
*/
public function __construct(IUserManager $userManager = null,
- Expiration $expiration = null) {
+ Expiration $expiration = null) {
parent::__construct();
$this->userManager = $userManager;
diff --git a/apps/files_trashbin/lib/Expiration.php b/apps/files_trashbin/lib/Expiration.php
index 5705fc23b8a..110630cb254 100644
--- a/apps/files_trashbin/lib/Expiration.php
+++ b/apps/files_trashbin/lib/Expiration.php
@@ -50,7 +50,7 @@ class Expiration {
/** @var bool */
private $canPurgeToSaveSpace;
- public function __construct(IConfig $config,ITimeFactory $timeFactory) {
+ public function __construct(IConfig $config, ITimeFactory $timeFactory) {
$this->timeFactory = $timeFactory;
$this->setRetentionObligation($config->getSystemValue('trashbin_retention_obligation', 'auto'));
}
diff --git a/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php b/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php
index 33b1b2de1cc..321b4a54b2c 100644
--- a/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php
+++ b/apps/files_trashbin/lib/Listeners/LoadAdditionalScripts.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
@@ -24,8 +25,8 @@ declare(strict_types=1);
*/
namespace OCA\Files_Trashbin\Listeners;
-use OCA\Files_Trashbin\AppInfo\Application;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
+use OCA\Files_Trashbin\AppInfo\Application;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
diff --git a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php
index 778bd76c218..913c08388e7 100644
--- a/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php
+++ b/apps/files_trashbin/lib/Migration/Version1010Date20200630192639.php
@@ -28,8 +28,8 @@ declare(strict_types=1);
namespace OCA\Files_Trashbin\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
index 0c3ccee2590..72b7332d9b1 100644
--- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
+++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
@@ -27,14 +27,14 @@ declare(strict_types=1);
*/
namespace OCA\Files_Trashbin\Sabre;
+use OCA\DAV\Connector\Sabre\FilesPlugin;
use OCP\IPreview;
use Sabre\DAV\INode;
-use Sabre\DAV\Server;
use Sabre\DAV\PropFind;
+use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
-use OCA\DAV\Connector\Sabre\FilesPlugin;
class TrashbinPlugin extends ServerPlugin {
public const TRASHBIN_FILENAME = '{http://nextcloud.org/ns}trashbin-filename';
diff --git a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php
index 3d1f3c42bc4..3e749169ad2 100644
--- a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php
+++ b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php
@@ -78,7 +78,7 @@ class LegacyTrashBackend implements ITrashBackend {
public function listTrashFolder(ITrashItem $folder): array {
$user = $folder->getUser();
$entries = Helper::getTrashFiles($folder->getTrashPath(), $user->getUID());
- return $this->mapTrashItems($entries, $user ,$folder);
+ return $this->mapTrashItems($entries, $user, $folder);
}
public function restoreItem(ITrashItem $item) {
diff --git a/apps/files_trashbin/lib/Trash/TrashItem.php b/apps/files_trashbin/lib/Trash/TrashItem.php
index 99b2d3a1a2c..5c9775c6876 100644
--- a/apps/files_trashbin/lib/Trash/TrashItem.php
+++ b/apps/files_trashbin/lib/Trash/TrashItem.php
@@ -24,7 +24,6 @@
namespace OCA\Files_Trashbin\Trash;
use OCP\Files\FileInfo;
-use OCP\FilesMetadata\Model\IFilesMetadata;
use OCP\IUser;
class TrashItem implements ITrashItem {
diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php
index 94ad77ac1c5..051665acde1 100644
--- a/apps/files_trashbin/lib/Trashbin.php
+++ b/apps/files_trashbin/lib/Trashbin.php
@@ -44,17 +44,17 @@
*/
namespace OCA\Files_Trashbin;
-use OC_User;
use OC\Files\Cache\Cache;
use OC\Files\Cache\CacheEntry;
use OC\Files\Cache\CacheQueryBuilder;
use OC\Files\Filesystem;
use OC\Files\ObjectStore\ObjectStoreStorage;
use OC\Files\View;
+use OC_User;
use OCA\Files_Trashbin\AppInfo\Application;
use OCA\Files_Trashbin\Command\Expire;
-use OCP\AppFramework\Utility\ITimeFactory;
use OCP\App\IAppManager;
+use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\NotFoundException;
diff --git a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
index 842721eeac9..971d2a7d60b 100644
--- a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
+++ b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
@@ -148,7 +148,7 @@ class TrashbinMigrator implements IMigrator, ISizeEstimationMigrator {
->setParameter('id', $id)
->setParameter('timestamp', $timestamp)
->setParameter('location', $location)
- ;
+ ;
$qb->executeStatement();
}
diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php
index 2f304b17881..b8f37a890b7 100644
--- a/apps/files_trashbin/tests/ExpirationTest.php
+++ b/apps/files_trashbin/tests/ExpirationTest.php
@@ -142,7 +142,7 @@ class ExpirationTest extends \Test\TestCase {
public function testGetMaxAgeAsTimestamp($configValue, $expectedMaxAgeTimestamp) {
$mockedConfig = $this->getMockedConfig($configValue);
$mockedTimeFactory = $this->getMockedTimeFactory(
- self::FAKE_TIME_NOW
+ self::FAKE_TIME_NOW
);
$expiration = new Expiration($mockedConfig, $mockedTimeFactory);
diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php
index a07058d04a7..2556b8e4150 100644
--- a/apps/files_versions/lib/AppInfo/Application.php
+++ b/apps/files_versions/lib/AppInfo/Application.php
@@ -48,11 +48,11 @@ use OCP\Files\Events\Node\BeforeNodeCopiedEvent;
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
use OCP\Files\Events\Node\BeforeNodeTouchedEvent;
+use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
use OCP\Files\Events\Node\NodeCopiedEvent;
+use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeDeletedEvent;
use OCP\Files\Events\Node\NodeRenamedEvent;
-use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
-use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeTouchedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\IConfig;
diff --git a/apps/files_versions/lib/Db/VersionsMapper.php b/apps/files_versions/lib/Db/VersionsMapper.php
index 86a0be82668..bc6e8b264de 100644
--- a/apps/files_versions/lib/Db/VersionsMapper.php
+++ b/apps/files_versions/lib/Db/VersionsMapper.php
@@ -26,10 +26,8 @@ declare(strict_types=1);
namespace OCA\Files_Versions\Db;
-use OCA\Files_Versions\Db\VersionEntity;
-use OCP\IDBConnection;
use OCP\AppFramework\Db\QBMapper;
-use OCP\DB\IResult;
+use OCP\IDBConnection;
/**
* @extends QBMapper<VersionEntity>
diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php
index 40768e90af7..f18a577d80e 100644
--- a/apps/files_versions/lib/Expiration.php
+++ b/apps/files_versions/lib/Expiration.php
@@ -157,16 +157,16 @@ class Expiration {
if (!ctype_digit($minValue) && $minValue !== 'auto') {
$isValid = false;
$this->logger->warning(
- $minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
- ['app' => 'files_versions']
+ $minValue . ' is not a valid value for minimal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
+ ['app' => 'files_versions']
);
}
if (!ctype_digit($maxValue) && $maxValue !== 'auto') {
$isValid = false;
$this->logger->warning(
- $maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
- ['app' => 'files_versions']
+ $maxValue . ' is not a valid value for maximal versions retention obligation. Check versions_retention_obligation in your config.php. Falling back to auto.',
+ ['app' => 'files_versions']
);
}
diff --git a/apps/files_versions/lib/Sabre/Plugin.php b/apps/files_versions/lib/Sabre/Plugin.php
index 5aa64c812c6..de933ecc7d3 100644
--- a/apps/files_versions/lib/Sabre/Plugin.php
+++ b/apps/files_versions/lib/Sabre/Plugin.php
@@ -92,7 +92,7 @@ class Plugin extends ServerPlugin {
public function propFind(PropFind $propFind, INode $node): void {
if ($node instanceof VersionFile) {
- $propFind->handle(self::VERSION_LABEL, fn() => $node->getLabel());
+ $propFind->handle(self::VERSION_LABEL, fn () => $node->getLabel());
$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, fn () => $this->previewManager->isMimeSupported($node->getContentType()));
}
}
diff --git a/apps/files_versions/lib/Sabre/VersionFile.php b/apps/files_versions/lib/Sabre/VersionFile.php
index a03ecd64b46..8fd97b0636f 100644
--- a/apps/files_versions/lib/Sabre/VersionFile.php
+++ b/apps/files_versions/lib/Sabre/VersionFile.php
@@ -31,7 +31,6 @@ use OCA\Files_Versions\Versions\INameableVersion;
use OCA\Files_Versions\Versions\INameableVersionBackend;
use OCA\Files_Versions\Versions\IVersion;
use OCA\Files_Versions\Versions\IVersionManager;
-use OCP\Files\FileInfo;
use OCP\Files\NotFoundException;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 56d9a8343c6..5e33059dcf8 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -40,12 +40,12 @@
namespace OCA\Files_Versions;
+use OC\Files\Filesystem;
use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
-use OC_User;
-use OC\Files\Filesystem;
use OC\Files\View;
+use OC_User;
use OCA\Files_Sharing\SharedMount;
use OCA\Files_Versions\AppInfo\Application;
use OCA\Files_Versions\Command\Expire;
@@ -53,13 +53,13 @@ use OCA\Files_Versions\Db\VersionsMapper;
use OCA\Files_Versions\Events\CreateVersionEvent;
use OCA\Files_Versions\Versions\IVersionManager;
use OCP\AppFramework\Db\DoesNotExistException;
+use OCP\Command\IBus;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
+use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
-use OCP\Command\IBus;
-use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Files\IMimeTypeDetector;
use OCP\Files\NotFoundException;
use OCP\Files\Search\ISearchBinaryOperator;
use OCP\Files\Search\ISearchComparison;
diff --git a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php
index e99ab7d6870..36faf893d66 100644
--- a/apps/files_versions/lib/Versions/LegacyVersionsBackend.php
+++ b/apps/files_versions/lib/Versions/LegacyVersionsBackend.php
@@ -36,7 +36,6 @@ use OCP\Files\FileInfo;
use OCP\Files\Folder;
use OCP\Files\IMimeTypeLoader;
use OCP\Files\IRootFolder;
-use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorage;
use OCP\IUser;
diff --git a/apps/files_versions/lib/Versions/VersionManager.php b/apps/files_versions/lib/Versions/VersionManager.php
index abbbe69e586..5fbfaae4a16 100644
--- a/apps/files_versions/lib/Versions/VersionManager.php
+++ b/apps/files_versions/lib/Versions/VersionManager.php
@@ -31,7 +31,6 @@ use OCP\Files\IRootFolder;
use OCP\Files\Lock\ILock;
use OCP\Files\Lock\ILockManager;
use OCP\Files\Lock\LockContext;
-use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorage;
use OCP\IUser;
use OCP\Lock\ManuallyLockedException;
@@ -100,7 +99,7 @@ class VersionManager implements IVersionManager, INameableVersionBackend, IDelet
public function rollback(IVersion $version) {
$backend = $version->getBackend();
- $result = self::handleAppLocks(fn(): ?bool => $backend->rollback($version));
+ $result = self::handleAppLocks(fn (): ?bool => $backend->rollback($version));
// rollback doesn't have a return type yet and some implementations don't return anything
if ($result === null || $result === true) {
\OC_Hook::emit('\OCP\Versions', 'rollback', [
@@ -197,7 +196,7 @@ class VersionManager implements IVersionManager, INameableVersionBackend, IDelet
$lockContext = new LockContext($root, ILock::TYPE_APP, $owner);
$lockManager = \OC::$server->get(ILockManager::class);
$result = null;
- $lockManager->runInScope($lockContext, function() use ($callback, &$result) {
+ $lockManager->runInScope($lockContext, function () use ($callback, &$result) {
$result = $callback();
});
return $result;
diff --git a/apps/files_versions/tests/StorageTest.php b/apps/files_versions/tests/StorageTest.php
index b319cc2c9c7..ba9bcf0705a 100644
--- a/apps/files_versions/tests/StorageTest.php
+++ b/apps/files_versions/tests/StorageTest.php
@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace OCA\files_versions\tests;
use OCA\Files_Versions\Expiration;
-use OCA\Files_Versions\Hooks;
use OCA\Files_Versions\Storage;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
diff --git a/apps/lookup_server_connector/lib/AppInfo/Application.php b/apps/lookup_server_connector/lib/AppInfo/Application.php
index fbcf54f83de..6a74aaa870d 100644
--- a/apps/lookup_server_connector/lib/AppInfo/Application.php
+++ b/apps/lookup_server_connector/lib/AppInfo/Application.php
@@ -36,9 +36,7 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\EventDispatcher\IEventDispatcher;
-use OCP\IUser;
use Psr\Container\ContainerInterface;
-use Symfony\Component\EventDispatcher\GenericEvent;
class Application extends App implements IBootstrap {
public const APP_ID = 'lookup_server_connector';
@@ -58,7 +56,7 @@ class Application extends App implements IBootstrap {
* @todo move the OCP events and then move the registration to `register`
*/
private function registerEventListeners(IEventDispatcher $dispatcher,
- ContainerInterface $appContainer): void {
+ ContainerInterface $appContainer): void {
$dispatcher->addListener(UserUpdatedEvent::class, function (UserUpdatedEvent $event) use ($appContainer) {
/** @var UpdateLookupServer $updateLookupServer */
$updateLookupServer = $appContainer->get(UpdateLookupServer::class);
diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
index d0ad110cf5b..52464ec7dea 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -61,11 +61,11 @@ class RetryJob extends Job {
* @param Signer $signer
*/
public function __construct(ITimeFactory $time,
- IClientService $clientService,
- IConfig $config,
- IUserManager $userManager,
- IAccountManager $accountManager,
- Signer $signer) {
+ IClientService $clientService,
+ IConfig $config,
+ IUserManager $userManager,
+ IAccountManager $accountManager,
+ Signer $signer) {
parent::__construct($time);
$this->clientService = $clientService;
$this->config = $config;
diff --git a/apps/lookup_server_connector/lib/UpdateLookupServer.php b/apps/lookup_server_connector/lib/UpdateLookupServer.php
index ec528e6effa..7d1b6a1cb63 100644
--- a/apps/lookup_server_connector/lib/UpdateLookupServer.php
+++ b/apps/lookup_server_connector/lib/UpdateLookupServer.php
@@ -50,7 +50,7 @@ class UpdateLookupServer {
* @param IConfig $config
*/
public function __construct(IJobList $jobList,
- IConfig $config) {
+ IConfig $config) {
$this->config = $config;
$this->jobList = $jobList;
}
diff --git a/apps/oauth2/lib/Controller/LoginRedirectorController.php b/apps/oauth2/lib/Controller/LoginRedirectorController.php
index 7b83e39ca86..4c5b905a1ee 100644
--- a/apps/oauth2/lib/Controller/LoginRedirectorController.php
+++ b/apps/oauth2/lib/Controller/LoginRedirectorController.php
@@ -58,11 +58,11 @@ class LoginRedirectorController extends Controller {
* @param IL10N $l
*/
public function __construct(string $appName,
- IRequest $request,
- IURLGenerator $urlGenerator,
- ClientMapper $clientMapper,
- ISession $session,
- IL10N $l) {
+ IRequest $request,
+ IURLGenerator $urlGenerator,
+ ClientMapper $clientMapper,
+ ISession $session,
+ IL10N $l) {
parent::__construct($appName, $request);
$this->urlGenerator = $urlGenerator;
$this->clientMapper = $clientMapper;
@@ -86,8 +86,8 @@ class LoginRedirectorController extends Controller {
* 303: Redirect to login URL
*/
public function authorize($client_id,
- $state,
- $response_type): TemplateResponse|RedirectResponse {
+ $state,
+ $response_type): TemplateResponse|RedirectResponse {
try {
$client = $this->clientMapper->getByIdentifier($client_id);
} catch (ClientNotFoundException $e) {
diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php
index 3dcda337917..d49dd6da038 100644
--- a/apps/oauth2/lib/Controller/SettingsController.php
+++ b/apps/oauth2/lib/Controller/SettingsController.php
@@ -30,13 +30,13 @@ declare(strict_types=1);
*/
namespace OCA\OAuth2\Controller;
-use OCP\Authentication\Token\IProvider as IAuthTokenProvider;
use OCA\OAuth2\Db\AccessTokenMapper;
use OCA\OAuth2\Db\Client;
use OCA\OAuth2\Db\ClientMapper;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
+use OCP\Authentication\Token\IProvider as IAuthTokenProvider;
use OCP\IL10N;
use OCP\IRequest;
use OCP\IUser;
@@ -63,7 +63,7 @@ class SettingsController extends Controller {
}
public function addClient(string $name,
- string $redirectUri): JSONResponse {
+ string $redirectUri): JSONResponse {
if (filter_var($redirectUri, FILTER_VALIDATE_URL) === false) {
return new JSONResponse(['message' => $this->l->t('Your redirect URL needs to be a full URL for example: https://yourdomain.com/path')], Http::STATUS_BAD_REQUEST);
}
diff --git a/apps/oauth2/lib/Migration/SetTokenExpiration.php b/apps/oauth2/lib/Migration/SetTokenExpiration.php
index 7188985f3f5..696d3b7f04a 100644
--- a/apps/oauth2/lib/Migration/SetTokenExpiration.php
+++ b/apps/oauth2/lib/Migration/SetTokenExpiration.php
@@ -46,8 +46,8 @@ class SetTokenExpiration implements IRepairStep {
private $tokenProvider;
public function __construct(IDBConnection $connection,
- ITimeFactory $timeFactory,
- TokenProvider $tokenProvider) {
+ ITimeFactory $timeFactory,
+ TokenProvider $tokenProvider) {
$this->connection = $connection;
$this->time = $timeFactory;
$this->tokenProvider = $tokenProvider;
diff --git a/apps/oauth2/lib/Settings/Admin.php b/apps/oauth2/lib/Settings/Admin.php
index 7b297116a77..5cba6805f7c 100644
--- a/apps/oauth2/lib/Settings/Admin.php
+++ b/apps/oauth2/lib/Settings/Admin.php
@@ -29,9 +29,9 @@ namespace OCA\OAuth2\Settings;
use OCA\OAuth2\Db\ClientMapper;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
+use OCP\IURLGenerator;
use OCP\Security\ICrypto;
use OCP\Settings\ISettings;
-use OCP\IURLGenerator;
use Psr\Log\LoggerInterface;
class Admin implements ISettings {
diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php
index 817747599b7..f34707c554d 100644
--- a/apps/oauth2/tests/Controller/SettingsControllerTest.php
+++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php
@@ -26,14 +26,13 @@
*/
namespace OCA\OAuth2\Tests\Controller;
-use OC\Authentication\Token\IToken;
-use OCP\Authentication\Token\IProvider as IAuthTokenProvider;
use OCA\OAuth2\Controller\SettingsController;
use OCA\OAuth2\Db\AccessTokenMapper;
use OCA\OAuth2\Db\Client;
use OCA\OAuth2\Db\ClientMapper;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
+use OCP\Authentication\Token\IProvider as IAuthTokenProvider;
use OCP\IL10N;
use OCP\IRequest;
use OCP\IUser;
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php
index 584ff9a8cc7..77d7f31c6da 100644
--- a/apps/provisioning_api/lib/Controller/AUserData.php
+++ b/apps/provisioning_api/lib/Controller/AUserData.php
@@ -82,13 +82,13 @@ abstract class AUserData extends OCSController {
protected $l10nFactory;
public function __construct(string $appName,
- IRequest $request,
- IUserManager $userManager,
- IConfig $config,
- IGroupManager $groupManager,
- IUserSession $userSession,
- IAccountManager $accountManager,
- IFactory $l10nFactory) {
+ IRequest $request,
+ IUserManager $userManager,
+ IConfig $config,
+ IGroupManager $groupManager,
+ IUserSession $userSession,
+ IAccountManager $accountManager,
+ IFactory $l10nFactory) {
parent::__construct($appName, $request);
$this->userManager = $userManager;
diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php
index 4cdd350042e..798daedaf6b 100644
--- a/apps/provisioning_api/lib/Controller/AppConfigController.php
+++ b/apps/provisioning_api/lib/Controller/AppConfigController.php
@@ -68,13 +68,13 @@ class AppConfigController extends OCSController {
* @param IAppConfig $appConfig
*/
public function __construct(string $appName,
- IRequest $request,
- IConfig $config,
- IAppConfig $appConfig,
- IUserSession $userSession,
- IL10N $l10n,
- IGroupManager $groupManager,
- IManager $settingManager) {
+ IRequest $request,
+ IConfig $config,
+ IAppConfig $appConfig,
+ IUserSession $userSession,
+ IL10N $l10n,
+ IGroupManager $groupManager,
+ IManager $settingManager) {
parent::__construct($appName, $request);
$this->config = $config;
$this->appConfig = $appConfig;
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php
index 4fde3927916..d140c5d60b1 100644
--- a/apps/provisioning_api/lib/Controller/GroupsController.php
+++ b/apps/provisioning_api/lib/Controller/GroupsController.php
@@ -61,14 +61,14 @@ class GroupsController extends AUserData {
private $logger;
public function __construct(string $appName,
- IRequest $request,
- IUserManager $userManager,
- IConfig $config,
- IGroupManager $groupManager,
- IUserSession $userSession,
- IAccountManager $accountManager,
- IFactory $l10nFactory,
- LoggerInterface $logger) {
+ IRequest $request,
+ IUserManager $userManager,
+ IConfig $config,
+ IGroupManager $groupManager,
+ IUserSession $userSession,
+ IAccountManager $accountManager,
+ IFactory $l10nFactory,
+ LoggerInterface $logger) {
parent::__construct($appName,
$request,
$userManager,
diff --git a/apps/provisioning_api/lib/ResponseDefinitions.php b/apps/provisioning_api/lib/ResponseDefinitions.php
index 43e95c52e06..0b4a3d1ebbc 100644
--- a/apps/provisioning_api/lib/ResponseDefinitions.php
+++ b/apps/provisioning_api/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/settings/lib/Activity/GroupProvider.php b/apps/settings/lib/Activity/GroupProvider.php
index 52798d2e428..32e6438d972 100644
--- a/apps/settings/lib/Activity/GroupProvider.php
+++ b/apps/settings/lib/Activity/GroupProvider.php
@@ -53,10 +53,10 @@ class GroupProvider implements IProvider {
public function __construct(L10nFactory $l10n,
- IURLGenerator $urlGenerator,
- IManager $activityManager,
- IUserManager $userManager,
- IGroupManager $groupManager) {
+ IURLGenerator $urlGenerator,
+ IManager $activityManager,
+ IUserManager $userManager,
+ IGroupManager $groupManager) {
$this->urlGenerator = $urlGenerator;
$this->l10n = $l10n;
$this->activityManager = $activityManager;
diff --git a/apps/settings/lib/Activity/Provider.php b/apps/settings/lib/Activity/Provider.php
index c2ef77f3d9a..001f75ba5e6 100644
--- a/apps/settings/lib/Activity/Provider.php
+++ b/apps/settings/lib/Activity/Provider.php
@@ -66,9 +66,9 @@ class Provider implements IProvider {
private $activityManager;
public function __construct(IFactory $languageFactory,
- IURLGenerator $url,
- IUserManager $userManager,
- IManager $activityManager) {
+ IURLGenerator $url,
+ IUserManager $userManager,
+ IManager $activityManager) {
$this->languageFactory = $languageFactory;
$this->url = $url;
$this->userManager = $userManager;
diff --git a/apps/settings/lib/BackgroundJobs/VerifyUserData.php b/apps/settings/lib/BackgroundJobs/VerifyUserData.php
index ec75f4243be..a9fc1e19a7d 100644
--- a/apps/settings/lib/BackgroundJobs/VerifyUserData.php
+++ b/apps/settings/lib/BackgroundJobs/VerifyUserData.php
@@ -70,11 +70,11 @@ class VerifyUserData extends Job {
private $config;
public function __construct(IAccountManager $accountManager,
- IUserManager $userManager,
- IClientService $clientService,
- ILogger $logger,
- ITimeFactory $timeFactory,
- IConfig $config
+ IUserManager $userManager,
+ IClientService $clientService,
+ ILogger $logger,
+ ITimeFactory $timeFactory,
+ IConfig $config
) {
parent::__construct($timeFactory);
$this->accountManager = $accountManager;
diff --git a/apps/settings/lib/Controller/AISettingsController.php b/apps/settings/lib/Controller/AISettingsController.php
index 8db8fa8b5bb..2676bfcf7e6 100644
--- a/apps/settings/lib/Controller/AISettingsController.php
+++ b/apps/settings/lib/Controller/AISettingsController.php
@@ -23,15 +23,9 @@ declare(strict_types=1);
namespace OCA\Settings\Controller;
use OCP\AppFramework\Controller;
-use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\IConfig;
-use OCP\IL10N;
use OCP\IRequest;
-use OCP\IURLGenerator;
-use OCP\IUserSession;
-use OCP\Mail\IMailer;
-use function GuzzleHttp\Promise\queue;
class AISettingsController extends Controller {
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php
index 403117a9e74..df98a4578c5 100644
--- a/apps/settings/lib/Controller/AppSettingsController.php
+++ b/apps/settings/lib/Controller/AppSettingsController.php
@@ -100,18 +100,18 @@ class AppSettingsController extends Controller {
* @param LoggerInterface $logger
*/
public function __construct(string $appName,
- IRequest $request,
- IL10N $l10n,
- IConfig $config,
- INavigationManager $navigationManager,
- IAppManager $appManager,
- CategoryFetcher $categoryFetcher,
- AppFetcher $appFetcher,
- IFactory $l10nFactory,
- BundleFetcher $bundleFetcher,
- Installer $installer,
- IURLGenerator $urlGenerator,
- LoggerInterface $logger) {
+ IRequest $request,
+ IL10N $l10n,
+ IConfig $config,
+ INavigationManager $navigationManager,
+ IAppManager $appManager,
+ CategoryFetcher $categoryFetcher,
+ AppFetcher $appFetcher,
+ IFactory $l10nFactory,
+ BundleFetcher $bundleFetcher,
+ Installer $installer,
+ IURLGenerator $urlGenerator,
+ LoggerInterface $logger) {
parent::__construct($appName, $request);
$this->l10n = $l10n;
$this->config = $config;
diff --git a/apps/settings/lib/Controller/AuthSettingsController.php b/apps/settings/lib/Controller/AuthSettingsController.php
index 305908e5e0a..c0dc8cbac85 100644
--- a/apps/settings/lib/Controller/AuthSettingsController.php
+++ b/apps/settings/lib/Controller/AuthSettingsController.php
@@ -90,15 +90,15 @@ class AuthSettingsController extends Controller {
* @param LoggerInterface $logger
*/
public function __construct(string $appName,
- IRequest $request,
- IProvider $tokenProvider,
- ISession $session,
- ISecureRandom $random,
- ?string $userId,
- IUserSession $userSession,
- IManager $activityManager,
- RemoteWipe $remoteWipe,
- LoggerInterface $logger) {
+ IRequest $request,
+ IProvider $tokenProvider,
+ ISession $session,
+ ISecureRandom $random,
+ ?string $userId,
+ IUserSession $userSession,
+ IManager $activityManager,
+ RemoteWipe $remoteWipe,
+ LoggerInterface $logger) {
parent::__construct($appName, $request);
$this->tokenProvider = $tokenProvider;
$this->uid = $userId;
diff --git a/apps/settings/lib/Controller/AuthorizedGroupController.php b/apps/settings/lib/Controller/AuthorizedGroupController.php
index dcae5b31332..e771da6c46c 100644
--- a/apps/settings/lib/Controller/AuthorizedGroupController.php
+++ b/apps/settings/lib/Controller/AuthorizedGroupController.php
@@ -26,10 +26,10 @@ namespace OCA\Settings\Controller;
use OC\Settings\AuthorizedGroup;
use OCA\Settings\Service\AuthorizedGroupService;
use OCA\Settings\Service\NotFoundException;
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\DataResponse;
use OCP\DB\Exception;
use OCP\IRequest;
-use OCP\AppFramework\Http\DataResponse;
-use OCP\AppFramework\Controller;
class AuthorizedGroupController extends Controller {
/** @var AuthorizedGroupService $authorizedGroupService */
diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php
index 10ad11935c6..af4cf5969c9 100644
--- a/apps/settings/lib/Controller/ChangePasswordController.php
+++ b/apps/settings/lib/Controller/ChangePasswordController.php
@@ -57,13 +57,13 @@ class ChangePasswordController extends Controller {
private IAppManager $appManager;
public function __construct(string $appName,
- IRequest $request,
- ?string $userId,
- IUserManager $userManager,
- IUserSession $userSession,
- IGroupManager $groupManager,
- IAppManager $appManager,
- IL10N $l) {
+ IRequest $request,
+ ?string $userId,
+ IUserManager $userManager,
+ IUserSession $userSession,
+ IGroupManager $groupManager,
+ IAppManager $appManager,
+ IL10N $l) {
parent::__construct($appName, $request);
$this->userId = $userId;
diff --git a/apps/settings/lib/Controller/HelpController.php b/apps/settings/lib/Controller/HelpController.php
index 3128cbfaa23..94de5cd8d95 100644
--- a/apps/settings/lib/Controller/HelpController.php
+++ b/apps/settings/lib/Controller/HelpController.php
@@ -34,12 +34,12 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
use OCP\INavigationManager;
use OCP\IRequest;
use OCP\IURLGenerator;
-use OCP\IConfig;
#[IgnoreOpenAPI]
class HelpController extends Controller {
diff --git a/apps/settings/lib/Controller/MailSettingsController.php b/apps/settings/lib/Controller/MailSettingsController.php
index 2df79b67731..be662ed641a 100644
--- a/apps/settings/lib/Controller/MailSettingsController.php
+++ b/apps/settings/lib/Controller/MailSettingsController.php
@@ -60,12 +60,12 @@ class MailSettingsController extends Controller {
* @param IMailer $mailer
*/
public function __construct($appName,
- IRequest $request,
- IL10N $l10n,
- IConfig $config,
- IUserSession $userSession,
- IURLGenerator $urlGenerator,
- IMailer $mailer) {
+ IRequest $request,
+ IL10N $l10n,
+ IConfig $config,
+ IUserSession $userSession,
+ IURLGenerator $urlGenerator,
+ IMailer $mailer) {
parent::__construct($appName, $request);
$this->l10n = $l10n;
$this->config = $config;
@@ -90,13 +90,13 @@ class MailSettingsController extends Controller {
* @return DataResponse
*/
public function setMailSettings($mail_domain,
- $mail_from_address,
- $mail_smtpmode,
- $mail_smtpsecure,
- $mail_smtphost,
- $mail_smtpauth,
- $mail_smtpport,
- $mail_sendmailmode) {
+ $mail_from_address,
+ $mail_smtpmode,
+ $mail_smtpsecure,
+ $mail_smtphost,
+ $mail_smtpauth,
+ $mail_smtpport,
+ $mail_sendmailmode) {
$params = get_defined_vars();
$configs = [];
foreach ($params as $key => $value) {
diff --git a/apps/settings/lib/Controller/TwoFactorSettingsController.php b/apps/settings/lib/Controller/TwoFactorSettingsController.php
index 45722767cda..c8541b85905 100644
--- a/apps/settings/lib/Controller/TwoFactorSettingsController.php
+++ b/apps/settings/lib/Controller/TwoFactorSettingsController.php
@@ -37,8 +37,8 @@ class TwoFactorSettingsController extends Controller {
private $mandatoryTwoFactor;
public function __construct(string $appName,
- IRequest $request,
- MandatoryTwoFactor $mandatoryTwoFactor) {
+ IRequest $request,
+ MandatoryTwoFactor $mandatoryTwoFactor) {
parent::__construct($appName, $request);
$this->mandatoryTwoFactor = $mandatoryTwoFactor;
diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php
index 13a91ab45ad..a2619b3cc4a 100644
--- a/apps/settings/lib/Controller/UsersController.php
+++ b/apps/settings/lib/Controller/UsersController.php
@@ -367,20 +367,20 @@ class UsersController extends Controller {
* @return DataResponse
*/
public function setUserSettings(?string $avatarScope = null,
- ?string $displayname = null,
- ?string $displaynameScope = null,
- ?string $phone = null,
- ?string $phoneScope = null,
- ?string $email = null,
- ?string $emailScope = null,
- ?string $website = null,
- ?string $websiteScope = null,
- ?string $address = null,
- ?string $addressScope = null,
- ?string $twitter = null,
- ?string $twitterScope = null,
- ?string $fediverse = null,
- ?string $fediverseScope = null
+ ?string $displayname = null,
+ ?string $displaynameScope = null,
+ ?string $phone = null,
+ ?string $phoneScope = null,
+ ?string $email = null,
+ ?string $emailScope = null,
+ ?string $website = null,
+ ?string $websiteScope = null,
+ ?string $address = null,
+ ?string $addressScope = null,
+ ?string $twitter = null,
+ ?string $twitterScope = null,
+ ?string $fediverse = null,
+ ?string $fediverseScope = null
) {
$user = $this->userSession->getUser();
if (!$user instanceof IUser) {
diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php
index a5be30be53f..30cae96b9f0 100644
--- a/apps/settings/lib/Hooks.php
+++ b/apps/settings/lib/Hooks.php
@@ -60,14 +60,14 @@ class Hooks {
protected $defaults;
public function __construct(IActivityManager $activityManager,
- IGroupManager $groupManager,
- IUserManager $userManager,
- IUserSession $userSession,
- IURLGenerator $urlGenerator,
- IMailer $mailer,
- IConfig $config,
- IFactory $languageFactory,
- Defaults $defaults) {
+ IGroupManager $groupManager,
+ IUserManager $userManager,
+ IUserSession $userSession,
+ IURLGenerator $urlGenerator,
+ IMailer $mailer,
+ IConfig $config,
+ IFactory $languageFactory,
+ Defaults $defaults) {
$this->activityManager = $activityManager;
$this->groupManager = $groupManager;
$this->userManager = $userManager;
diff --git a/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php b/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php
index 587d626ef97..3b075d55a7e 100644
--- a/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php
+++ b/apps/settings/lib/Listener/AppPasswordCreatedActivityListener.php
@@ -48,8 +48,8 @@ class AppPasswordCreatedActivityListener implements IEventListener {
private $logger;
public function __construct(IActivityManager $activityManager,
- IUserSession $userSession,
- LoggerInterface $logger) {
+ IUserSession $userSession,
+ LoggerInterface $logger) {
$this->activityManager = $activityManager;
$this->userSession = $userSession;
$this->logger = $logger;
diff --git a/apps/settings/lib/Mailer/NewUserMailHelper.php b/apps/settings/lib/Mailer/NewUserMailHelper.php
index b91aea4391b..69fb9a8e6cf 100644
--- a/apps/settings/lib/Mailer/NewUserMailHelper.php
+++ b/apps/settings/lib/Mailer/NewUserMailHelper.php
@@ -73,14 +73,14 @@ class NewUserMailHelper {
* @param string $fromAddress
*/
public function __construct(Defaults $themingDefaults,
- IURLGenerator $urlGenerator,
- IFactory $l10nFactory,
- IMailer $mailer,
- ISecureRandom $secureRandom,
- ITimeFactory $timeFactory,
- IConfig $config,
- ICrypto $crypto,
- $fromAddress) {
+ IURLGenerator $urlGenerator,
+ IFactory $l10nFactory,
+ IMailer $mailer,
+ ISecureRandom $secureRandom,
+ ITimeFactory $timeFactory,
+ IConfig $config,
+ ICrypto $crypto,
+ $fromAddress) {
$this->themingDefaults = $themingDefaults;
$this->urlGenerator = $urlGenerator;
$this->l10nFactory = $l10nFactory;
@@ -170,7 +170,7 @@ class NewUserMailHelper {
* @throws \Exception If mail could not be sent
*/
public function sendMail(IUser $user,
- IEMailTemplate $emailTemplate): void {
+ IEMailTemplate $emailTemplate): void {
// Be sure to never try to send to an empty e-mail
$email = $user->getEMailAddress();
diff --git a/apps/settings/lib/Middleware/SubadminMiddleware.php b/apps/settings/lib/Middleware/SubadminMiddleware.php
index c4f3ae3c7c2..782f0155510 100644
--- a/apps/settings/lib/Middleware/SubadminMiddleware.php
+++ b/apps/settings/lib/Middleware/SubadminMiddleware.php
@@ -51,8 +51,8 @@ class SubadminMiddleware extends Middleware {
* @param IL10N $l10n
*/
public function __construct(ControllerMethodReflector $reflector,
- $isSubAdmin,
- IL10N $l10n) {
+ $isSubAdmin,
+ IL10N $l10n) {
$this->reflector = $reflector;
$this->isSubAdmin = $isSubAdmin;
$this->l10n = $l10n;
diff --git a/apps/settings/lib/Search/SectionSearch.php b/apps/settings/lib/Search/SectionSearch.php
index 77b9bc025d6..609b4e2a52e 100644
--- a/apps/settings/lib/Search/SectionSearch.php
+++ b/apps/settings/lib/Search/SectionSearch.php
@@ -53,9 +53,9 @@ class SectionSearch implements IProvider {
protected $l;
public function __construct(IManager $settingsManager,
- IGroupManager $groupManager,
- IURLGenerator $urlGenerator,
- IL10N $l) {
+ IGroupManager $groupManager,
+ IURLGenerator $urlGenerator,
+ IL10N $l) {
$this->settingsManager = $settingsManager;
$this->groupManager = $groupManager;
$this->urlGenerator = $urlGenerator;
diff --git a/apps/settings/lib/Service/AuthorizedGroupService.php b/apps/settings/lib/Service/AuthorizedGroupService.php
index f85c74b0480..d9e4f0f6abb 100644
--- a/apps/settings/lib/Service/AuthorizedGroupService.php
+++ b/apps/settings/lib/Service/AuthorizedGroupService.php
@@ -24,11 +24,11 @@
namespace OCA\Settings\Service;
-use OCP\AppFramework\Db\DoesNotExistException;
-use OCP\AppFramework\Db\MultipleObjectsReturnedException;
-
use OC\Settings\AuthorizedGroup;
use OC\Settings\AuthorizedGroupMapper;
+
+use OCP\AppFramework\Db\DoesNotExistException;
+use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\DB\Exception;
use OCP\IGroup;
diff --git a/apps/settings/lib/Settings/Admin/Delegation.php b/apps/settings/lib/Settings/Admin/Delegation.php
index 1b41fe14edc..4a9194274bc 100644
--- a/apps/settings/lib/Settings/Admin/Delegation.php
+++ b/apps/settings/lib/Settings/Admin/Delegation.php
@@ -28,10 +28,10 @@ use OCA\Settings\Service\AuthorizedGroupService;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\IGroupManager;
+use OCP\IURLGenerator;
use OCP\Settings\IDelegatedSettings;
use OCP\Settings\IManager;
use OCP\Settings\ISettings;
-use OCP\IURLGenerator;
class Delegation implements ISettings {
private IManager $settingManager;
diff --git a/apps/settings/lib/Settings/Admin/Security.php b/apps/settings/lib/Settings/Admin/Security.php
index 63d3137a45c..8d57d95ad06 100644
--- a/apps/settings/lib/Settings/Admin/Security.php
+++ b/apps/settings/lib/Settings/Admin/Security.php
@@ -30,8 +30,8 @@ use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Encryption\IManager;
-use OCP\IUserManager;
use OCP\IURLGenerator;
+use OCP\IUserManager;
use OCP\Settings\ISettings;
class Security implements ISettings {
@@ -42,10 +42,10 @@ class Security implements ISettings {
private IURLGenerator $urlGenerator;
public function __construct(IManager $manager,
- IUserManager $userManager,
- MandatoryTwoFactor $mandatoryTwoFactor,
- IInitialState $initialState,
- IURLGenerator $urlGenerator) {
+ IUserManager $userManager,
+ MandatoryTwoFactor $mandatoryTwoFactor,
+ IInitialState $initialState,
+ IURLGenerator $urlGenerator) {
$this->manager = $manager;
$this->userManager = $userManager;
$this->mandatoryTwoFactor = $mandatoryTwoFactor;
diff --git a/apps/settings/lib/Settings/Admin/Server.php b/apps/settings/lib/Settings/Admin/Server.php
index 0d8ef00a1fd..9aa8b1ed56d 100644
--- a/apps/settings/lib/Settings/Admin/Server.php
+++ b/apps/settings/lib/Settings/Admin/Server.php
@@ -48,12 +48,12 @@ class Server implements IDelegatedSettings {
private IURLGenerator $urlGenerator;
public function __construct(IDBConnection $connection,
- IInitialState $initialStateService,
- ProfileManager $profileManager,
- ITimeFactory $timeFactory,
- IURLGenerator $urlGenerator,
- IConfig $config,
- IL10N $l) {
+ IInitialState $initialStateService,
+ ProfileManager $profileManager,
+ ITimeFactory $timeFactory,
+ IURLGenerator $urlGenerator,
+ IConfig $config,
+ IL10N $l) {
$this->connection = $connection;
$this->initialStateService = $initialStateService;
$this->profileManager = $profileManager;
diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php
index 9fbee6ef62f..8974d54d45e 100644
--- a/apps/settings/lib/Settings/Personal/PersonalInfo.php
+++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php
@@ -36,6 +36,7 @@ declare(strict_types=1);
namespace OCA\Settings\Settings\Personal;
+use OC\Profile\ProfileManager;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\Accounts\IAccount;
use OCP\Accounts\IAccountManager;
@@ -51,7 +52,6 @@ use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
use OCP\L10N\IFactory;
-use OC\Profile\ProfileManager;
use OCP\Notification\IManager;
use OCP\Settings\ISettings;
diff --git a/apps/settings/lib/Settings/Personal/Security/Authtokens.php b/apps/settings/lib/Settings/Personal/Security/Authtokens.php
index 4963f40347d..e713344ce88 100644
--- a/apps/settings/lib/Settings/Personal/Security/Authtokens.php
+++ b/apps/settings/lib/Settings/Personal/Security/Authtokens.php
@@ -25,17 +25,17 @@ declare(strict_types=1);
*/
namespace OCA\Settings\Settings\Personal\Security;
-use OCP\AppFramework\Services\IInitialState;
-use OCP\IUserSession;
-use function array_map;
use OC\Authentication\Exceptions\InvalidTokenException;
use OC\Authentication\Token\INamedToken;
use OC\Authentication\Token\IProvider as IAuthTokenProvider;
use OC\Authentication\Token\IToken;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
use OCP\ISession;
+use OCP\IUserSession;
use OCP\Session\Exceptions\SessionNotAvailableException;
use OCP\Settings\ISettings;
+use function array_map;
class Authtokens implements ISettings {
@@ -55,10 +55,10 @@ class Authtokens implements ISettings {
private $userSession;
public function __construct(IAuthTokenProvider $tokenProvider,
- ISession $session,
- IUserSession $userSession,
- IInitialState $initialState,
- ?string $UserId) {
+ ISession $session,
+ IUserSession $userSession,
+ IInitialState $initialState,
+ ?string $UserId) {
$this->tokenProvider = $tokenProvider;
$this->session = $session;
$this->initialState = $initialState;
diff --git a/apps/settings/lib/Settings/Personal/Security/Password.php b/apps/settings/lib/Settings/Personal/Security/Password.php
index 252311b87ab..366294af4bc 100644
--- a/apps/settings/lib/Settings/Personal/Security/Password.php
+++ b/apps/settings/lib/Settings/Personal/Security/Password.php
@@ -41,7 +41,7 @@ class Password implements ISettings {
private $uid;
public function __construct(IUserManager $userManager,
- ?string $UserId) {
+ ?string $UserId) {
$this->userManager = $userManager;
$this->uid = $UserId;
}
diff --git a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
index c356442a628..803ea106e7c 100644
--- a/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
+++ b/apps/settings/lib/Settings/Personal/Security/TwoFactor.php
@@ -28,17 +28,17 @@ namespace OCA\Settings\Settings\Personal\Security;
use Exception;
use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor;
-use OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider;
-use function array_filter;
-use function array_map;
-use function is_null;
use OC\Authentication\TwoFactorAuth\ProviderLoader;
+use OCA\TwoFactorBackupCodes\Provider\BackupCodesProvider;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Authentication\TwoFactorAuth\IProvider;
use OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings;
use OCP\IConfig;
use OCP\IUserSession;
use OCP\Settings\ISettings;
+use function array_filter;
+use function array_map;
+use function is_null;
class TwoFactor implements ISettings {
@@ -58,10 +58,10 @@ class TwoFactor implements ISettings {
private $config;
public function __construct(ProviderLoader $providerLoader,
- MandatoryTwoFactor $mandatoryTwoFactor,
- IUserSession $userSession,
- IConfig $config,
- ?string $UserId) {
+ MandatoryTwoFactor $mandatoryTwoFactor,
+ IUserSession $userSession,
+ IConfig $config,
+ ?string $UserId) {
$this->providerLoader = $providerLoader;
$this->mandatoryTwoFactor = $mandatoryTwoFactor;
$this->userSession = $userSession;
diff --git a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
index 38241c9a41c..95102e5d6c0 100644
--- a/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
+++ b/apps/settings/lib/Settings/Personal/Security/WebAuthn.php
@@ -47,9 +47,9 @@ class WebAuthn implements ISettings {
private $manager;
public function __construct(PublicKeyCredentialMapper $mapper,
- string $UserId,
- IInitialStateService $initialStateService,
- Manager $manager) {
+ string $UserId,
+ IInitialStateService $initialStateService,
+ Manager $manager) {
$this->mapper = $mapper;
$this->uid = $UserId;
$this->initialStateService = $initialStateService;
diff --git a/apps/settings/lib/Settings/Personal/ServerDevNotice.php b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
index 3cb9a3a972f..8d6b0743127 100644
--- a/apps/settings/lib/Settings/Personal/ServerDevNotice.php
+++ b/apps/settings/lib/Settings/Personal/ServerDevNotice.php
@@ -57,11 +57,11 @@ class ServerDevNotice implements ISettings {
private $urlGenerator;
public function __construct(IRegistry $registry,
- IEventDispatcher $eventDispatcher,
- IRootFolder $rootFolder,
- IUserSession $userSession,
- IInitialState $initialState,
- IURLGenerator $urlGenerator) {
+ IEventDispatcher $eventDispatcher,
+ IRootFolder $rootFolder,
+ IUserSession $userSession,
+ IInitialState $initialState,
+ IURLGenerator $urlGenerator) {
$this->registry = $registry;
$this->eventDispatcher = $eventDispatcher;
$this->rootFolder = $rootFolder;
diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php
index 8bc3acd6e71..649178c15d1 100644
--- a/apps/settings/templates/help.php
+++ b/apps/settings/templates/help.php
@@ -6,8 +6,10 @@
<ul>
<li>
<a class="icon-user <?php if ($_['mode'] === 'user') {
- p('active');
- } ?>" <?php if ($_['mode'] === 'user') { print_unescaped('aria-current="page"'); } ?>
+ p('active');
+ } ?>" <?php if ($_['mode'] === 'user') {
+ print_unescaped('aria-current="page"');
+ } ?>
href="<?php print_unescaped($_['urlUserDocs']); ?>">
<span class="help-list__text">
<?php p($l->t('User documentation')); ?>
@@ -17,8 +19,10 @@
<?php if ($_['admin']) { ?>
<li>
<a class="icon-user-admin <?php if ($_['mode'] === 'admin') {
- p('active');
- } ?>" <?php if ($_['mode'] === 'admin') { print_unescaped('aria-current="page"'); } ?>
+ p('active');
+ } ?>" <?php if ($_['mode'] === 'admin') {
+ print_unescaped('aria-current="page"');
+ } ?>
href="<?php print_unescaped($_['urlAdminDocs']); ?>">
<span class="help-list__text">
<?php p($l->t('Administrator documentation')); ?>
diff --git a/apps/settings/templates/settings/additional.php b/apps/settings/templates/settings/additional.php
index ac6b91e8d76..a9dd6af5c0f 100644
--- a/apps/settings/templates/settings/additional.php
+++ b/apps/settings/templates/settings/additional.php
@@ -30,4 +30,4 @@
if (isset($form['form'])) {?>
<div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div>
<?php }
-} ?>
+ } ?>
diff --git a/apps/settings/templates/settings/admin/additional-mail.php b/apps/settings/templates/settings/admin/additional-mail.php
index c6548d88737..7b88e997369 100644
--- a/apps/settings/templates/settings/admin/additional-mail.php
+++ b/apps/settings/templates/settings/admin/additional-mail.php
@@ -1,25 +1,25 @@
<?php
/**
- * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
+ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
/** @var \OCP\IL10N $l */
/** @var array $_ */
@@ -77,14 +77,14 @@ $mail_sendmailmode = [
<p>
<label id="mail_smtpsecure_label" for="mail_smtpsecure"
<?php if ($_['mail_smtpmode'] !== 'smtp') {
- print_unescaped(' class="hidden"');
- } ?>>
+ print_unescaped(' class="hidden"');
+ } ?>>
<?php p($l->t('Encryption')); ?>
</label>
<select name="mail_smtpsecure" id="mail_smtpsecure"
<?php if ($_['mail_smtpmode'] !== 'smtp') {
- print_unescaped(' class="hidden"');
- } ?>>
+ print_unescaped(' class="hidden"');
+ } ?>>
<?php foreach ($mail_smtpsecure as $secure => $name):
$selected = '';
if ($secure == $_['mail_smtpsecure']):
@@ -143,8 +143,8 @@ $mail_sendmailmode = [
</form>
<form class="mail_settings" id="mail_credentials_settings">
<p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') {
- print_unescaped(' class="hidden"');
- } ?>>
+ print_unescaped(' class="hidden"');
+ } ?>>
<label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label>
<input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>"
value="<?php p($_['mail_smtpname']) ?>" />
diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php
index 7d0ea25872a..db066fc6df3 100644
--- a/apps/settings/templates/settings/admin/overview.php
+++ b/apps/settings/templates/settings/admin/overview.php
@@ -48,10 +48,10 @@
</div>
<div id="postsetupchecks" data-check-wellknown="<?php if ($_['checkForWorkingWellKnownSetup']) {
- p('true');
-} else {
- p('false');
-} ?>">
+ p('true');
+ } else {
+ p('false');
+ } ?>">
<ul class="errors hidden"></ul>
<ul class="warnings hidden"></ul>
<ul class="info hidden"></ul>
diff --git a/apps/settings/templates/settings/empty.php b/apps/settings/templates/settings/empty.php
index 63ebc6f44a1..59e3098e3de 100644
--- a/apps/settings/templates/settings/empty.php
+++ b/apps/settings/templates/settings/empty.php
@@ -21,4 +21,4 @@
*
*/
- # used for Personal/Additional settings as fallback for legacy settings
+# used for Personal/Additional settings as fallback for legacy settings
diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php
index bd562014bea..b0889746173 100644
--- a/apps/settings/templates/settings/frame.php
+++ b/apps/settings/templates/settings/frame.php
@@ -53,7 +53,7 @@ script('files', 'jquery.fileupload');
<?php
}
}
- ?>
+?>
</ul>
</nav>
@@ -80,7 +80,7 @@ script('files', 'jquery.fileupload');
<?php
}
}
- ?>
+?>
</ul>
</nav>
</div>
diff --git a/apps/settings/templates/settings/personal/development.notice.php b/apps/settings/templates/settings/personal/development.notice.php
index 4244bf387a0..ce32639c598 100644
--- a/apps/settings/templates/settings/personal/development.notice.php
+++ b/apps/settings/templates/settings/personal/development.notice.php
@@ -59,7 +59,7 @@
$l->t('Subscribe to our newsletter'),
],
-'{facebookopen}<img width="50" src="{facebookimage}" title="{facebooktext}" alt="{facebooktext}">{linkclose}
+ '{facebookopen}<img width="50" src="{facebookimage}" title="{facebooktext}" alt="{facebooktext}">{linkclose}
{twitteropen}<img width="50" src="{twitterimage}" title="{twittertext}" alt="{twittertext}">{linkclose}
{mastodonopen}<img width="50" src="{mastodonimage}" title="{mastodontext}" alt="{mastodontext}">{linkclose}
{rssopen}<img class="img-circle" width="50" src="{rssimage}" title="{rsstext}" alt="{rsstext}">{linkclose}
diff --git a/apps/settings/templates/settings/personal/security/twofactor.php b/apps/settings/templates/settings/personal/security/twofactor.php
index 3fa63bd6d28..17d1e6e7074 100644
--- a/apps/settings/templates/settings/personal/security/twofactor.php
+++ b/apps/settings/templates/settings/personal/security/twofactor.php
@@ -38,16 +38,16 @@ declare(strict_types=1);
/** @var \OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings $provider */
$provider = $data['provider'];
- //Handle 2FA provider icons and theme
- if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
- $icon = $provider->getDarkIcon();
- //fallback icon if the 2factor provider doesn't provide an icon.
- } else {
- $icon = image_path('core', 'actions/password.svg');
- }
- /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
- $settings = $data['settings'];
- ?>
+ //Handle 2FA provider icons and theme
+ if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
+ $icon = $provider->getDarkIcon();
+ //fallback icon if the 2factor provider doesn't provide an icon.
+ } else {
+ $icon = image_path('core', 'actions/password.svg');
+ }
+ /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
+ $settings = $data['settings'];
+ ?>
<h3>
<img class="two-factor-provider-settings-icon" src="<?php p($icon) ?>" alt="">
<?php p($provider->getDisplayName()) ?>
diff --git a/apps/settings/tests/Controller/MailSettingsControllerTest.php b/apps/settings/tests/Controller/MailSettingsControllerTest.php
index db6043030d3..bfa89fbc0b4 100644
--- a/apps/settings/tests/Controller/MailSettingsControllerTest.php
+++ b/apps/settings/tests/Controller/MailSettingsControllerTest.php
@@ -35,10 +35,10 @@ use OCP\AppFramework\Http;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
+use OCP\IURLGenerator;
use OCP\IUserSession;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
-use OCP\IURLGenerator;
/**
* @package Tests\Settings\Controller
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php
index 6243b85fb2f..eddb290212a 100644
--- a/apps/settings/tests/Controller/UsersControllerTest.php
+++ b/apps/settings/tests/Controller/UsersControllerTest.php
@@ -636,8 +636,8 @@ class UsersControllerTest extends \Test\TestCase {
* @param ?string $oldDisplayName
*/
public function testSaveUserSettings($data,
- $oldEmailAddress,
- $oldDisplayName
+ $oldEmailAddress,
+ $oldDisplayName
) {
$controller = $this->getController();
$user = $this->createMock(IUser::class);
@@ -948,9 +948,9 @@ class UsersControllerTest extends \Test\TestCase {
* @param bool $expected
*/
public function testCanAdminChangeUserPasswords($encryptionEnabled,
- $encryptionModuleLoaded,
- $masterKeyEnabled,
- $expected) {
+ $encryptionModuleLoaded,
+ $masterKeyEnabled,
+ $expected) {
$controller = $this->getController();
$this->encryptionManager->expects($this->any())
diff --git a/apps/settings/tests/Settings/Admin/SecurityTest.php b/apps/settings/tests/Settings/Admin/SecurityTest.php
index 52d113c04fe..1e261399d19 100644
--- a/apps/settings/tests/Settings/Admin/SecurityTest.php
+++ b/apps/settings/tests/Settings/Admin/SecurityTest.php
@@ -32,8 +32,8 @@ use OC\Encryption\Manager;
use OCA\Settings\Settings\Admin\Security;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
-use OCP\IUserManager;
use OCP\IURLGenerator;
+use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php
index 74d9a5d53fd..c070dbe3db1 100644
--- a/apps/settings/tests/Settings/Admin/ServerTest.php
+++ b/apps/settings/tests/Settings/Admin/ServerTest.php
@@ -38,8 +38,8 @@ use OCP\AppFramework\Services\IInitialState;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IConfig;
use OCP\IDBConnection;
-use OCP\IUrlGenerator;
use OCP\IL10N;
+use OCP\IUrlGenerator;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
diff --git a/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php b/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php
index 8e52a85c538..f8e34a77423 100644
--- a/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php
+++ b/apps/settings/tests/SetupChecks/PhpDefaultCharsetTest.php
@@ -28,8 +28,8 @@ namespace OCA\Settings\Tests;
use OCA\Settings\SetupChecks\PhpDefaultCharset;
use OCP\IL10N;
use OCP\SetupCheck\SetupResult;
-use Test\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
+use Test\TestCase;
class PhpDefaultCharsetTest extends TestCase {
/** @var IL10N|MockObject */
diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php
index 2fe8bef653e..e8c9169a544 100644
--- a/apps/sharebymail/lib/Capabilities.php
+++ b/apps/sharebymail/lib/Capabilities.php
@@ -44,8 +44,8 @@ class Capabilities implements ICapability {
private $appManager;
public function __construct(IManager $manager,
- SettingsManager $settingsManager,
- IAppManager $appManager) {
+ SettingsManager $settingsManager,
+ IAppManager $appManager) {
$this->manager = $manager;
$this->settingsManager = $settingsManager;
$this->appManager = $appManager;
diff --git a/apps/systemtags/lib/Activity/Listener.php b/apps/systemtags/lib/Activity/Listener.php
index ab897f3037a..a30198d616f 100644
--- a/apps/systemtags/lib/Activity/Listener.php
+++ b/apps/systemtags/lib/Activity/Listener.php
@@ -76,14 +76,14 @@ class Listener {
* @param IShareHelper $shareHelper
*/
public function __construct(IGroupManager $groupManager,
- IManager $activityManager,
- IUserSession $session,
- IConfig $config,
- ISystemTagManager $tagManager,
- IAppManager $appManager,
- IMountProviderCollection $mountCollection,
- IRootFolder $rootFolder,
- IShareHelper $shareHelper) {
+ IManager $activityManager,
+ IUserSession $session,
+ IConfig $config,
+ ISystemTagManager $tagManager,
+ IAppManager $appManager,
+ IMountProviderCollection $mountCollection,
+ IRootFolder $rootFolder,
+ IShareHelper $shareHelper) {
$this->groupManager = $groupManager;
$this->activityManager = $activityManager;
$this->session = $session;
diff --git a/apps/systemtags/lib/AppInfo/Application.php b/apps/systemtags/lib/AppInfo/Application.php
index 7484438092c..640adb2dbe2 100644
--- a/apps/systemtags/lib/AppInfo/Application.php
+++ b/apps/systemtags/lib/AppInfo/Application.php
@@ -26,9 +26,9 @@ declare(strict_types=1);
namespace OCA\SystemTags\AppInfo;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
-use OCA\SystemTags\Search\TagSearchProvider;
use OCA\SystemTags\Activity\Listener;
use OCA\SystemTags\Capabilities;
+use OCA\SystemTags\Search\TagSearchProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
diff --git a/apps/systemtags/lib/Capabilities.php b/apps/systemtags/lib/Capabilities.php
index 5da70a17758..fb232a83ca0 100644
--- a/apps/systemtags/lib/Capabilities.php
+++ b/apps/systemtags/lib/Capabilities.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/systemtags/lib/Search/TagSearchProvider.php b/apps/systemtags/lib/Search/TagSearchProvider.php
index 2ff5cc984ab..8fb2475999f 100644
--- a/apps/systemtags/lib/Search/TagSearchProvider.php
+++ b/apps/systemtags/lib/Search/TagSearchProvider.php
@@ -30,18 +30,14 @@ declare(strict_types=1);
*/
namespace OCA\SystemTags\Search;
-use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchOrder;
use OC\Files\Search\SearchQuery;
-use OCP\SystemTag\ISystemTag;
-use OCP\SystemTag\ISystemTagManager;
-use OCP\SystemTag\ISystemTagObjectMapper;
use OCP\Files\FileInfo;
use OCP\Files\IMimeTypeDetector;
use OCP\Files\IRootFolder;
-use OCP\Files\Search\ISearchComparison;
use OCP\Files\Node;
+use OCP\Files\Search\ISearchComparison;
use OCP\Files\Search\ISearchOrder;
use OCP\IL10N;
use OCP\IURLGenerator;
@@ -50,6 +46,9 @@ use OCP\Search\IProvider;
use OCP\Search\ISearchQuery;
use OCP\Search\SearchResult;
use OCP\Search\SearchResultEntry;
+use OCP\SystemTag\ISystemTag;
+use OCP\SystemTag\ISystemTagManager;
+use OCP\SystemTag\ISystemTagObjectMapper;
use RecursiveArrayIterator;
use RecursiveIteratorIterator;
@@ -131,13 +130,13 @@ class TagSearchProvider implements IProvider {
// do search
$searchResults = $userFolder->search($fileQuery);
- $resultIds = array_map(function(Node $node) {
+ $resultIds = array_map(function (Node $node) {
return $node->getId();
}, $searchResults);
$matchedTags = $this->objectMapper->getTagIdsForObjects($resultIds, 'files');
// prepare direct tag results
- $tagResults = array_map(function(ISystemTag $tag) {
+ $tagResults = array_map(function (ISystemTag $tag) {
$thumbnailUrl = '';
$link = $this->urlGenerator->linkToRoute(
'files.view.index'
@@ -195,14 +194,14 @@ class TagSearchProvider implements IProvider {
* @var ISystemTag[]
*/
$tags = $this->tagManager->getTagsByIds($tagInfo);
- $tagNames = array_map(function($tag) {
+ $tagNames = array_map(function ($tag) {
return $tag->getName();
- }, array_filter($tags, function($tag) {
+ }, array_filter($tags, function ($tag) {
return $tag->isUserVisible();
}));
// show the tag that you have searched for first
- usort($tagNames, function($tagName) use($query) {
+ usort($tagNames, function ($tagName) use ($query) {
return strpos($tagName, $query->getTerm()) !== false? -1 : 1;
});
diff --git a/apps/testing/lib/AppInfo/Application.php b/apps/testing/lib/AppInfo/Application.php
index a92caeb245a..6e9421a030e 100644
--- a/apps/testing/lib/AppInfo/Application.php
+++ b/apps/testing/lib/AppInfo/Application.php
@@ -26,8 +26,8 @@ namespace OCA\Testing\AppInfo;
use OCA\Testing\AlternativeHomeUserBackend;
use OCA\Testing\Provider\FakeText2ImageProvider;
-use OCA\Testing\Provider\FakeTranslationProvider;
use OCA\Testing\Provider\FakeTextProcessingProvider;
+use OCA\Testing\Provider\FakeTranslationProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
diff --git a/apps/testing/lib/Controller/ConfigController.php b/apps/testing/lib/Controller/ConfigController.php
index 76f1e1a1ee1..bad4be7b4a1 100644
--- a/apps/testing/lib/Controller/ConfigController.php
+++ b/apps/testing/lib/Controller/ConfigController.php
@@ -38,8 +38,8 @@ class ConfigController extends OCSController {
* @param IConfig $config
*/
public function __construct($appName,
- IRequest $request,
- IConfig $config) {
+ IRequest $request,
+ IConfig $config) {
parent::__construct($appName, $request);
$this->config = $config;
}
diff --git a/apps/testing/lib/Controller/LockingController.php b/apps/testing/lib/Controller/LockingController.php
index c01ad218c84..0c084b4f9cd 100644
--- a/apps/testing/lib/Controller/LockingController.php
+++ b/apps/testing/lib/Controller/LockingController.php
@@ -64,12 +64,12 @@ class LockingController extends OCSController {
* @param IRootFolder $rootFolder
*/
public function __construct($appName,
- IRequest $request,
- ILockingProvider $lockingProvider,
- FakeDBLockingProvider $fakeDBLockingProvider,
- IDBConnection $connection,
- IConfig $config,
- IRootFolder $rootFolder) {
+ IRequest $request,
+ ILockingProvider $lockingProvider,
+ FakeDBLockingProvider $fakeDBLockingProvider,
+ IDBConnection $connection,
+ IConfig $config,
+ IRootFolder $rootFolder) {
parent::__construct($appName, $request);
$this->lockingProvider = $lockingProvider;
diff --git a/apps/testing/lib/Locking/FakeDBLockingProvider.php b/apps/testing/lib/Locking/FakeDBLockingProvider.php
index 2556ba29a64..c5ebbc16371 100644
--- a/apps/testing/lib/Locking/FakeDBLockingProvider.php
+++ b/apps/testing/lib/Locking/FakeDBLockingProvider.php
@@ -23,10 +23,9 @@
*/
namespace OCA\Testing\Locking;
+use OC\Lock\DBLockingProvider;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IDBConnection;
-use Psr\Log\LoggerInterface;
-use OC\Lock\DBLockingProvider;
class FakeDBLockingProvider extends DBLockingProvider {
// Lock for 10 hours just to be sure
diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php
index 9a1a224ed78..e19665ffb31 100644
--- a/apps/theming/lib/Capabilities.php
+++ b/apps/theming/lib/Capabilities.php
@@ -27,7 +27,6 @@
*/
namespace OCA\Theming;
-use Exception;
use OCA\Theming\AppInfo\Application;
use OCA\Theming\Service\BackgroundService;
use OCP\Capabilities\IPublicCapability;
@@ -115,10 +114,10 @@ class Capabilities implements IPublicCapability {
if ($backgroundImage === BackgroundService::BACKGROUND_CUSTOM) {
$backgroundPlain = false;
$background = $this->url->linkToRouteAbsolute('theming.userTheme.getBackground');
- } else if (isset(BackgroundService::SHIPPED_BACKGROUNDS[$backgroundImage])) {
+ } elseif (isset(BackgroundService::SHIPPED_BACKGROUNDS[$backgroundImage])) {
$backgroundPlain = false;
$background = $this->url->linkTo(Application::APP_ID, "img/background/$backgroundImage");
- } else if ($backgroundImage !== BackgroundService::BACKGROUND_DEFAULT) {
+ } elseif ($backgroundImage !== BackgroundService::BACKGROUND_DEFAULT) {
$backgroundPlain = true;
$background = $color;
}
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php
index 86b45fbbc03..6ad67c4667a 100644
--- a/apps/theming/lib/Controller/IconController.php
+++ b/apps/theming/lib/Controller/IconController.php
@@ -100,7 +100,7 @@ class IconController extends Controller {
if ($icon === false || $icon === '') {
return new NotFoundResponse();
}
- $iconFileName = $this->imageManager->setCachedImage('icon-' . $app . '-' . $color . str_replace('/', '_', $image), $icon);
+ $iconFileName = $this->imageManager->setCachedImage('icon-' . $app . '-' . $color . str_replace('/', '_', $image), $icon);
}
$response = new FileDisplayResponse($iconFileName, Http::STATUS_OK, ['Content-Type' => 'image/svg+xml']);
$response->cacheFor(86400, false, true);
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index e8f6ec6289b..b4bf6d1c3cd 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -68,7 +68,7 @@ use ScssPhp\ScssPhp\Compiler;
* @package OCA\Theming\Controller
*/
class ThemingController extends Controller {
- const VALID_UPLOAD_KEYS = ['header', 'logo', 'logoheader', 'background', 'favicon'];
+ public const VALID_UPLOAD_KEYS = ['header', 'logo', 'logoheader', 'background', 'favicon'];
private ThemingDefaults $themingDefaults;
private IL10N $l10n;
@@ -414,7 +414,7 @@ class ThemingController extends Controller {
}
$theme = $themes[$themeId];
- $customCss = $theme->getCustomCss();
+ $customCss = $theme->getCustomCss();
// Generate variables
$variables = '';
@@ -429,7 +429,8 @@ class ThemingController extends Controller {
// If not set, we'll rely on the body class
$compiler = new Compiler();
$compiledCss = $compiler->compileString("[data-theme-$themeId] { $variables $customCss }");
- $css = $compiledCss->getCss();;
+ $css = $compiledCss->getCss();
+ ;
}
try {
@@ -486,13 +487,13 @@ class ThemingController extends Controller {
[
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getTouchIcon',
- ['app' => $app]) . '?v=' . $cacheBusterValue,
+ ['app' => $app]) . '?v=' . $cacheBusterValue,
'type' => 'image/png',
'sizes' => '512x512'
],
[
'src' => $this->urlGenerator->linkToRoute('theming.Icon.getFavicon',
- ['app' => $app]) . '?v=' . $cacheBusterValue,
+ ['app' => $app]) . '?v=' . $cacheBusterValue,
'type' => 'image/svg+xml',
'sizes' => '16x16'
]
diff --git a/apps/theming/lib/Controller/UserThemeController.php b/apps/theming/lib/Controller/UserThemeController.php
index acd930fea83..1ccce652908 100644
--- a/apps/theming/lib/Controller/UserThemeController.php
+++ b/apps/theming/lib/Controller/UserThemeController.php
@@ -64,12 +64,12 @@ class UserThemeController extends OCSController {
private BackgroundService $backgroundService;
public function __construct(string $appName,
- IRequest $request,
- IConfig $config,
- IUserSession $userSession,
- ThemesService $themesService,
- ThemingDefaults $themingDefaults,
- BackgroundService $backgroundService) {
+ IRequest $request,
+ IConfig $config,
+ IUserSession $userSession,
+ ThemesService $themesService,
+ ThemingDefaults $themingDefaults,
+ BackgroundService $backgroundService) {
parent::__construct($appName, $request);
$this->config = $config;
$this->userSession = $userSession;
diff --git a/apps/theming/lib/ITheme.php b/apps/theming/lib/ITheme.php
index a5c9cdf26a6..3c3b081aec5 100644
--- a/apps/theming/lib/ITheme.php
+++ b/apps/theming/lib/ITheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
@@ -30,8 +31,8 @@ namespace OCA\Theming;
*/
interface ITheme {
- const TYPE_THEME = 1;
- const TYPE_FONT = 2;
+ public const TYPE_THEME = 1;
+ public const TYPE_FONT = 2;
/**
* Unique theme id
diff --git a/apps/theming/lib/IconBuilder.php b/apps/theming/lib/IconBuilder.php
index fb6909089b5..87a3de1024c 100644
--- a/apps/theming/lib/IconBuilder.php
+++ b/apps/theming/lib/IconBuilder.php
@@ -73,19 +73,19 @@ class IconBuilder {
$icon->setImageFormat("png32");
$clone = clone $icon;
- $clone->scaleImage(16,0);
+ $clone->scaleImage(16, 0);
$favicon->addImage($clone);
$clone = clone $icon;
- $clone->scaleImage(32,0);
+ $clone->scaleImage(32, 0);
$favicon->addImage($clone);
$clone = clone $icon;
- $clone->scaleImage(64,0);
+ $clone->scaleImage(64, 0);
$favicon->addImage($clone);
$clone = clone $icon;
- $clone->scaleImage(128,0);
+ $clone->scaleImage(128, 0);
$favicon->addImage($clone);
$data = $favicon->getImagesBlob();
diff --git a/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php b/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php
index 380527ee024..ccc701f74bc 100644
--- a/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php
+++ b/apps/theming/lib/Listener/BeforeTemplateRenderedListener.php
@@ -96,23 +96,23 @@ class BeforeTemplateRenderedListener implements IEventListener {
$this->config->getUserValue($userId, Application::APP_ID, 'background_color', BackgroundService::DEFAULT_COLOR),
);
- /**
+ /**
* Admin background. `backgroundColor` if disabled,
* mime type if defined and empty by default
*/
$this->initialState->provideInitialState(
'themingDefaultBackground',
- $this->config->getAppValue('theming', 'backgroundMime', ''),
+ $this->config->getAppValue('theming', 'backgroundMime', ''),
);
$this->initialState->provideInitialState(
'defaultShippedBackground',
- BackgroundService::DEFAULT_BACKGROUND_IMAGE,
+ BackgroundService::DEFAULT_BACKGROUND_IMAGE,
);
/** List of all shipped backgrounds */
$this->initialState->provideInitialState(
'shippedBackgrounds',
- BackgroundService::SHIPPED_BACKGROUNDS,
+ BackgroundService::SHIPPED_BACKGROUNDS,
);
}
diff --git a/apps/theming/lib/Migration/MigrateAdminConfig.php b/apps/theming/lib/Migration/MigrateAdminConfig.php
index 285c2f41295..ed5ffb7dab1 100644
--- a/apps/theming/lib/Migration/MigrateAdminConfig.php
+++ b/apps/theming/lib/Migration/MigrateAdminConfig.php
@@ -28,7 +28,6 @@ namespace OCA\Theming\Migration;
use OCP\Files\IAppData;
use OCP\Files\NotFoundException;
-use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IL10N;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
@@ -61,7 +60,7 @@ class MigrateAdminConfig implements IRepairStep {
$images = $this->appData->getFolder('images');
$output->info('Migrating administration images');
- // get or init the global folder if any
+ // get or init the global folder if any
try {
$global = $this->appData->getFolder('global');
} catch (NotFoundException $e) {
diff --git a/apps/theming/lib/Migration/MigrateUserConfig.php b/apps/theming/lib/Migration/MigrateUserConfig.php
index 0f8d982dfa7..e8239bbcdb1 100644
--- a/apps/theming/lib/Migration/MigrateUserConfig.php
+++ b/apps/theming/lib/Migration/MigrateUserConfig.php
@@ -52,12 +52,12 @@ class MigrateUserConfig implements IRepairStep {
* MigrateUserConfig constructor.
*/
public function __construct(IConfig $config,
- IUserManager $userManager,
- ThemesService $themesService,
- DarkTheme $darkTheme,
- DarkHighContrastTheme $darkHighContrastTheme,
- HighContrastTheme $highContrastTheme,
- DyslexiaFont $dyslexiaFont) {
+ IUserManager $userManager,
+ ThemesService $themesService,
+ DarkTheme $darkTheme,
+ DarkHighContrastTheme $darkHighContrastTheme,
+ HighContrastTheme $highContrastTheme,
+ DyslexiaFont $dyslexiaFont) {
$this->config = $config;
$this->userManager = $userManager;
$this->themesService = $themesService;
@@ -98,9 +98,9 @@ class MigrateUserConfig implements IRepairStep {
if ($highcontrast || $theme) {
if ($theme === 'dark' && $highcontrast === 'highcontrast') {
$config[] = $this->darkHighContrastTheme->getId();
- } else if ($theme === 'dark') {
+ } elseif ($theme === 'dark') {
$config[] = $this->darkTheme->getId();
- } else if ($highcontrast === 'highcontrast') {
+ } elseif ($highcontrast === 'highcontrast') {
$config[] = $this->highContrastTheme->getId();
}
}
diff --git a/apps/theming/lib/ResponseDefinitions.php b/apps/theming/lib/ResponseDefinitions.php
index ddd8615e455..f1b0d09790a 100644
--- a/apps/theming/lib/ResponseDefinitions.php
+++ b/apps/theming/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/theming/lib/Service/BackgroundService.php b/apps/theming/lib/Service/BackgroundService.php
index 8e382da3152..b349af73a57 100644
--- a/apps/theming/lib/Service/BackgroundService.php
+++ b/apps/theming/lib/Service/BackgroundService.php
@@ -184,10 +184,10 @@ class BackgroundService {
private ThemingDefaults $themingDefaults;
public function __construct(IRootFolder $rootFolder,
- IAppData $appData,
- IConfig $config,
- ?string $userId,
- ThemingDefaults $themingDefaults) {
+ IAppData $appData,
+ IConfig $config,
+ ?string $userId,
+ ThemingDefaults $themingDefaults) {
if ($userId === null) {
return;
}
diff --git a/apps/theming/lib/Service/JSDataService.php b/apps/theming/lib/Service/JSDataService.php
index 90acd74b868..5dc7b3fd632 100644
--- a/apps/theming/lib/Service/JSDataService.php
+++ b/apps/theming/lib/Service/JSDataService.php
@@ -26,7 +26,6 @@ declare(strict_types=1);
*/
namespace OCA\Theming\Service;
-use OCA\Theming\AppInfo\Application;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
use OCP\IConfig;
diff --git a/apps/theming/lib/Service/ThemeInjectionService.php b/apps/theming/lib/Service/ThemeInjectionService.php
index 8e55f614146..c7560bdf8f8 100644
--- a/apps/theming/lib/Service/ThemeInjectionService.php
+++ b/apps/theming/lib/Service/ThemeInjectionService.php
@@ -22,7 +22,6 @@
*/
namespace OCA\Theming\Service;
-use OCA\Theming\AppInfo\Application;
use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Util;
use OCP\IConfig;
@@ -39,11 +38,11 @@ class ThemeInjectionService {
private ?string $userId;
public function __construct(IURLGenerator $urlGenerator,
- ThemesService $themesService,
- DefaultTheme $defaultTheme,
- Util $util,
- IConfig $config,
- IUserSession $userSession) {
+ ThemesService $themesService,
+ DefaultTheme $defaultTheme,
+ Util $util,
+ IConfig $config,
+ IUserSession $userSession) {
$this->urlGenerator = $urlGenerator;
$this->themesService = $themesService;
$this->defaultTheme = $defaultTheme;
@@ -59,7 +58,7 @@ class ThemeInjectionService {
public function injectHeaders() {
$themes = $this->themesService->getThemes();
$defaultTheme = $themes[$this->defaultTheme->getId()];
- $mediaThemes = array_filter($themes, function($theme) {
+ $mediaThemes = array_filter($themes, function ($theme) {
// Check if the theme provides a media query
return (bool)$theme->getMediaQuery();
});
diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php
index eabd903734a..0d252e96431 100644
--- a/apps/theming/lib/Service/ThemesService.php
+++ b/apps/theming/lib/Service/ThemesService.php
@@ -42,30 +42,30 @@ class ThemesService {
private array $themesProviders;
public function __construct(IUserSession $userSession,
- IConfig $config,
- DefaultTheme $defaultTheme,
- LightTheme $lightTheme,
- DarkTheme $darkTheme,
- HighContrastTheme $highContrastTheme,
- DarkHighContrastTheme $darkHighContrastTheme,
- DyslexiaFont $dyslexiaFont) {
+ IConfig $config,
+ DefaultTheme $defaultTheme,
+ LightTheme $lightTheme,
+ DarkTheme $darkTheme,
+ HighContrastTheme $highContrastTheme,
+ DarkHighContrastTheme $darkHighContrastTheme,
+ DyslexiaFont $dyslexiaFont) {
$this->userSession = $userSession;
$this->config = $config;
// Register themes
$this->themesProviders = [
- $defaultTheme->getId() => $defaultTheme,
- $lightTheme->getId() => $lightTheme,
- $darkTheme->getId() => $darkTheme,
- $highContrastTheme->getId() => $highContrastTheme,
- $darkHighContrastTheme->getId() => $darkHighContrastTheme,
- $dyslexiaFont->getId() => $dyslexiaFont,
+ $defaultTheme->getId() => $defaultTheme,
+ $lightTheme->getId() => $lightTheme,
+ $darkTheme->getId() => $darkTheme,
+ $highContrastTheme->getId() => $highContrastTheme,
+ $darkHighContrastTheme->getId() => $darkHighContrastTheme,
+ $dyslexiaFont->getId() => $dyslexiaFont,
];
}
/**
* Get the list of all registered themes
- *
+ *
* @return ITheme[]
*/
public function getThemes(): array {
@@ -74,7 +74,7 @@ class ThemesService {
/**
* Enable a theme for the logged-in user
- *
+ *
* @param ITheme $theme the theme to enable
* @return string[] the enabled themes
*/
@@ -87,18 +87,18 @@ class ThemesService {
}
/** @var ITheme[] */
- $themes = array_filter(array_map(function($themeId) {
+ $themes = array_filter(array_map(function ($themeId) {
return $this->getThemes()[$themeId];
}, $themesIds));
// Filtering all themes with the same type
- $filteredThemes = array_filter($themes, function(ITheme $t) use ($theme) {
+ $filteredThemes = array_filter($themes, function (ITheme $t) use ($theme) {
return $theme->getType() === $t->getType();
});
// Retrieve IDs only
/** @var string[] */
- $filteredThemesIds = array_map(function(ITheme $t) {
+ $filteredThemesIds = array_map(function (ITheme $t) {
return $t->getId();
}, array_values($filteredThemes));
@@ -110,7 +110,7 @@ class ThemesService {
/**
* Disable a theme for the logged-in user
- *
+ *
* @param ITheme $theme the theme to disable
* @return string[] the enabled themes
*/
@@ -130,7 +130,7 @@ class ThemesService {
/**
* Check whether a theme is enabled or not
* for the logged-in user
- *
+ *
* @return bool
*/
public function isEnabled(ITheme $theme): bool {
@@ -146,7 +146,7 @@ class ThemesService {
/**
* Get the list of all enabled themes IDs
* for the logged-in user
- *
+ *
* @return string[]
*/
public function getEnabledThemes(): array {
@@ -169,9 +169,9 @@ class ThemesService {
}
/**
- * Set the list of enabled themes
+ * Set the list of enabled themes
* for the logged-in user
- *
+ *
* @param string[] $themes the list of enabled themes IDs
*/
private function setEnabledThemes(array $themes): void {
diff --git a/apps/theming/lib/Settings/Admin.php b/apps/theming/lib/Settings/Admin.php
index 9bd92a47c1f..dc5d9a2a6a4 100644
--- a/apps/theming/lib/Settings/Admin.php
+++ b/apps/theming/lib/Settings/Admin.php
@@ -64,7 +64,7 @@ class Admin implements IDelegatedSettings {
$errorMessage = $this->l->t('You are already using a custom theme. Theming app settings might be overwritten by that.');
}
- $allowedMimeTypes = array_reduce(ThemingController::VALID_UPLOAD_KEYS, function($carry, $key) {
+ $allowedMimeTypes = array_reduce(ThemingController::VALID_UPLOAD_KEYS, function ($carry, $key) {
$carry[$key] = $this->imageManager->getSupportedUploadImageFormats($key);
return $carry;
}, []);
diff --git a/apps/theming/lib/Settings/Personal.php b/apps/theming/lib/Settings/Personal.php
index c175416f978..f24aaa2f8f8 100644
--- a/apps/theming/lib/Settings/Personal.php
+++ b/apps/theming/lib/Settings/Personal.php
@@ -51,7 +51,7 @@ class Personal implements ISettings {
public function getForm(): TemplateResponse {
$enforcedTheme = $this->config->getSystemValueString('enforce_theme', '');
- $themes = array_map(function($theme) {
+ $themes = array_map(function ($theme) {
return [
'id' => $theme->getId(),
'type' => $theme->getType(),
@@ -63,7 +63,7 @@ class Personal implements ISettings {
}, $this->themesService->getThemes());
if ($enforcedTheme !== '') {
- $themes = array_filter($themes, function($theme) use ($enforcedTheme) {
+ $themes = array_filter($themes, function ($theme) use ($enforcedTheme) {
return $theme['type'] !== ITheme::TYPE_THEME || $theme['id'] === $enforcedTheme;
});
}
diff --git a/apps/theming/lib/Settings/PersonalSection.php b/apps/theming/lib/Settings/PersonalSection.php
index 4165a733fb2..bfaa8bcaa32 100644
--- a/apps/theming/lib/Settings/PersonalSection.php
+++ b/apps/theming/lib/Settings/PersonalSection.php
@@ -46,8 +46,8 @@ class PersonalSection implements IIconSection {
* @param IL10N $l
*/
public function __construct(string $appName,
- IURLGenerator $urlGenerator,
- IL10N $l) {
+ IURLGenerator $urlGenerator,
+ IL10N $l) {
$this->appName = $appName;
$this->urlGenerator = $urlGenerator;
$this->l = $l;
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index 66775500f65..6f2d31ff6b1 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -24,10 +25,10 @@ declare(strict_types=1);
*/
namespace OCA\Theming\Themes;
-use OCA\Theming\Util;
-use OCA\Theming\ImageManager;
use OCA\Theming\AppInfo\Application;
+use OCA\Theming\ImageManager;
use OCA\Theming\Service\BackgroundService;
+use OCA\Theming\Util;
trait CommonThemeTrait {
public Util $util;
diff --git a/apps/theming/lib/Themes/DarkHighContrastTheme.php b/apps/theming/lib/Themes/DarkHighContrastTheme.php
index 5636dacf1d9..c76818e368f 100644
--- a/apps/theming/lib/Themes/DarkHighContrastTheme.php
+++ b/apps/theming/lib/Themes/DarkHighContrastTheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -56,7 +57,7 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme {
$colorMainText = '#ffffff';
$colorMainBackground = '#000000';
- $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
+ $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
return array_merge(
$defaultVariables,
diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php
index 1def7f378a7..af374a01603 100644
--- a/apps/theming/lib/Themes/DarkTheme.php
+++ b/apps/theming/lib/Themes/DarkTheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php
index e2bd31548ca..44930e457fa 100644
--- a/apps/theming/lib/Themes/DefaultTheme.php
+++ b/apps/theming/lib/Themes/DefaultTheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -51,13 +52,13 @@ class DefaultTheme implements ITheme {
public string $primaryColor;
public function __construct(Util $util,
- ThemingDefaults $themingDefaults,
- IUserSession $userSession,
- IURLGenerator $urlGenerator,
- ImageManager $imageManager,
- IConfig $config,
- IL10N $l,
- IAppManager $appManager) {
+ ThemingDefaults $themingDefaults,
+ IUserSession $userSession,
+ IURLGenerator $urlGenerator,
+ ImageManager $imageManager,
+ IConfig $config,
+ IL10N $l,
+ IAppManager $appManager) {
$this->util = $util;
$this->themingDefaults = $themingDefaults;
$this->userSession = $userSession;
diff --git a/apps/theming/lib/Themes/DyslexiaFont.php b/apps/theming/lib/Themes/DyslexiaFont.php
index 2629ac588c6..3275a005c8d 100644
--- a/apps/theming/lib/Themes/DyslexiaFont.php
+++ b/apps/theming/lib/Themes/DyslexiaFont.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -88,4 +89,3 @@ class DyslexiaFont extends DefaultTheme implements ITheme {
";
}
}
-
diff --git a/apps/theming/lib/Themes/HighContrastTheme.php b/apps/theming/lib/Themes/HighContrastTheme.php
index 4bb77b8c961..1599d45e475 100644
--- a/apps/theming/lib/Themes/HighContrastTheme.php
+++ b/apps/theming/lib/Themes/HighContrastTheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -56,7 +57,7 @@ class HighContrastTheme extends DefaultTheme implements ITheme {
$colorMainText = '#000000';
$colorMainBackground = '#ffffff';
- $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
+ $colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
return array_merge(
$defaultVariables,
diff --git a/apps/theming/lib/Themes/LightTheme.php b/apps/theming/lib/Themes/LightTheme.php
index e988f612226..320f8334147 100644
--- a/apps/theming/lib/Themes/LightTheme.php
+++ b/apps/theming/lib/Themes/LightTheme.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
@@ -24,14 +25,7 @@ declare(strict_types=1);
*/
namespace OCA\Theming\Themes;
-use OCA\Theming\ImageManager;
-use OCA\Theming\ThemingDefaults;
-use OCA\Theming\Util;
use OCA\Theming\ITheme;
-use OCA\Theming\Themes\DefaultTheme;
-use OCP\IConfig;
-use OCP\IL10N;
-use OCP\IURLGenerator;
class LightTheme extends DefaultTheme implements ITheme {
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 1e55a1fb2f9..210029ae636 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -91,14 +91,14 @@ class ThemingDefaults extends \OC_Defaults {
* @param IAppManager $appManager
*/
public function __construct(IConfig $config,
- IL10N $l,
- IUserSession $userSession,
- IURLGenerator $urlGenerator,
- ICacheFactory $cacheFactory,
- Util $util,
- ImageManager $imageManager,
- IAppManager $appManager,
- INavigationManager $navigationManager
+ IL10N $l,
+ IUserSession $userSession,
+ IURLGenerator $urlGenerator,
+ ICacheFactory $cacheFactory,
+ Util $util,
+ ImageManager $imageManager,
+ IAppManager $appManager,
+ INavigationManager $navigationManager
) {
parent::__construct();
$this->config = $config;
diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php
index 635c0026112..951b07bfa2a 100644
--- a/apps/theming/lib/Util.php
+++ b/apps/theming/lib/Util.php
@@ -28,6 +28,7 @@
*/
namespace OCA\Theming;
+use Mexitek\PHPColors\Color;
use OCP\App\AppPathNotFoundException;
use OCP\App\IAppManager;
use OCP\Files\IAppData;
@@ -35,7 +36,6 @@ use OCP\Files\NotFoundException;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\IConfig;
use OCP\IUserSession;
-use Mexitek\PHPColors\Color;
class Util {
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 4931a148b78..5bc27069c6e 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -35,8 +35,8 @@ namespace OCA\Theming\Tests\Controller;
use OC\L10N\L10N;
use OCA\Theming\Controller\ThemingController;
-use OCA\Theming\Service\ThemesService;
use OCA\Theming\ImageManager;
+use OCA\Theming\Service\ThemesService;
use OCA\Theming\ThemingDefaults;
use OCP\App\IAppManager;
use OCP\AppFramework\Http;
diff --git a/apps/theming/tests/Controller/UserThemeControllerTest.php b/apps/theming/tests/Controller/UserThemeControllerTest.php
index 851dbec38eb..500cb807e83 100644
--- a/apps/theming/tests/Controller/UserThemeControllerTest.php
+++ b/apps/theming/tests/Controller/UserThemeControllerTest.php
@@ -26,12 +26,12 @@ use OCA\Theming\AppInfo\Application;
use OCA\Theming\Controller\UserThemeController;
use OCA\Theming\ITheme;
use OCA\Theming\Service\BackgroundService;
+use OCA\Theming\Service\ThemesService;
use OCA\Theming\Themes\DarkHighContrastTheme;
use OCA\Theming\Themes\DarkTheme;
use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Themes\DyslexiaFont;
use OCA\Theming\Themes\HighContrastTheme;
-use OCA\Theming\Service\ThemesService;
use OCA\Theming\Themes\LightTheme;
use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Http\DataResponse;
diff --git a/apps/theming/tests/IconBuilderTest.php b/apps/theming/tests/IconBuilderTest.php
index 5637ce25cb6..ee4705c77dc 100644
--- a/apps/theming/tests/IconBuilderTest.php
+++ b/apps/theming/tests/IconBuilderTest.php
@@ -217,6 +217,6 @@ class IconBuilderTest extends TestCase {
$util->expects($this->once())
->method('getAppImage')
->willReturn('notexistingfile');
- $this->assertFalse($iconBuilder->colorSvg('noapp','noimage'));
+ $this->assertFalse($iconBuilder->colorSvg('noapp', 'noimage'));
}
}
diff --git a/apps/theming/tests/Service/ThemesServiceTest.php b/apps/theming/tests/Service/ThemesServiceTest.php
index ba970b92394..6ed49fd1645 100644
--- a/apps/theming/tests/Service/ThemesServiceTest.php
+++ b/apps/theming/tests/Service/ThemesServiceTest.php
@@ -25,18 +25,18 @@ namespace OCA\Theming\Tests\Service;
use OCA\Theming\AppInfo\Application;
use OCA\Theming\ImageManager;
use OCA\Theming\ITheme;
+use OCA\Theming\Service\ThemesService;
use OCA\Theming\Themes\DarkHighContrastTheme;
use OCA\Theming\Themes\DarkTheme;
use OCA\Theming\Themes\DefaultTheme;
use OCA\Theming\Themes\DyslexiaFont;
use OCA\Theming\Themes\HighContrastTheme;
-use OCA\Theming\Service\ThemesService;
use OCA\Theming\Themes\LightTheme;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
+use OCP\App\IAppManager;
use OCP\IConfig;
use OCP\IL10N;
-use OCP\App\IAppManager;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserSession;
diff --git a/apps/theming/tests/Settings/PersonalTest.php b/apps/theming/tests/Settings/PersonalTest.php
index 15876930179..0a9bf4b59c9 100644
--- a/apps/theming/tests/Settings/PersonalTest.php
+++ b/apps/theming/tests/Settings/PersonalTest.php
@@ -29,6 +29,7 @@ namespace OCA\Theming\Tests\Settings;
use OCA\Theming\AppInfo\Application;
use OCA\Theming\ImageManager;
+use OCA\Theming\ITheme;
use OCA\Theming\Service\ThemesService;
use OCA\Theming\Settings\Personal;
use OCA\Theming\Themes\DarkHighContrastTheme;
@@ -39,7 +40,6 @@ use OCA\Theming\Themes\HighContrastTheme;
use OCA\Theming\Themes\LightTheme;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
-use OCA\Theming\ITheme;
use OCP\App\IAppManager;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
diff --git a/apps/theming/tests/Themes/DyslexiaFontTest.php b/apps/theming/tests/Themes/DyslexiaFontTest.php
index 4714d9751f4..7a55d168fea 100644
--- a/apps/theming/tests/Themes/DyslexiaFontTest.php
+++ b/apps/theming/tests/Themes/DyslexiaFontTest.php
@@ -22,7 +22,6 @@
*/
namespace OCA\Theming\Tests\Service;
-use OC\App\AppManager;
use OC\Route\Router;
use OCA\Theming\ImageManager;
use OCA\Theming\ITheme;
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
index a33e38a1847..92898aecbba 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php
@@ -49,10 +49,10 @@ class RememberBackupCodesJob extends TimedJob {
private $jobList;
public function __construct(IRegistry $registry,
- IUserManager $userManager,
- ITimeFactory $timeFactory,
- IManager $notificationManager,
- IJobList $jobList) {
+ IUserManager $userManager,
+ ITimeFactory $timeFactory,
+ IManager $notificationManager,
+ IJobList $jobList) {
parent::__construct($timeFactory);
$this->registry = $registry;
$this->userManager = $userManager;
diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
index 2629cd92dd0..77d6a15a722 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderDisabled.php
@@ -42,7 +42,7 @@ class ProviderDisabled implements IEventListener {
private $jobList;
public function __construct(IRegistry $registry,
- IJobList $jobList) {
+ IJobList $jobList) {
$this->registry = $registry;
$this->jobList = $jobList;
}
diff --git a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
index 581602d7262..4645b793630 100644
--- a/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
+++ b/apps/twofactor_backupcodes/lib/Listener/ProviderEnabled.php
@@ -42,7 +42,7 @@ class ProviderEnabled implements IEventListener {
private $jobList;
public function __construct(IRegistry $registry,
- IJobList $jobList) {
+ IJobList $jobList) {
$this->registry = $registry;
$this->jobList = $jobList;
}
diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
index a9ef2a2b252..bb5dc53b1e4 100644
--- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
+++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php
@@ -61,10 +61,10 @@ class BackupCodesProvider implements IDeactivatableByAdmin, IProvidesPersonalSet
* @param AppManager $appManager
*/
public function __construct(string $appName,
- BackupCodeStorage $storage,
- IL10N $l10n,
- AppManager $appManager,
- IInitialStateService $initialStateService) {
+ BackupCodeStorage $storage,
+ IL10N $l10n,
+ AppManager $appManager,
+ IInitialStateService $initialStateService) {
$this->appName = $appName;
$this->l10n = $l10n;
$this->storage = $storage;
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
index 4ecff652ae7..9d4b6a28500 100644
--- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
+++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
@@ -52,9 +52,9 @@ class BackupCodeStorage {
private $eventDispatcher;
public function __construct(BackupCodeMapper $mapper,
- ISecureRandom $random,
- IHasher $hasher,
- IEventDispatcher $eventDispatcher) {
+ ISecureRandom $random,
+ IHasher $hasher,
+ IEventDispatcher $eventDispatcher) {
$this->mapper = $mapper;
$this->hasher = $hasher;
$this->random = $random;
diff --git a/apps/updatenotification/lib/Controller/APIController.php b/apps/updatenotification/lib/Controller/APIController.php
index f9e12525053..d684b69024f 100644
--- a/apps/updatenotification/lib/Controller/APIController.php
+++ b/apps/updatenotification/lib/Controller/APIController.php
@@ -74,12 +74,12 @@ class APIController extends OCSController {
];
public function __construct(string $appName,
- IRequest $request,
- IConfig $config,
- IAppManager $appManager,
- AppFetcher $appFetcher,
- IFactory $l10nFactory,
- IUserSession $userSession) {
+ IRequest $request,
+ IConfig $config,
+ IAppManager $appManager,
+ AppFetcher $appFetcher,
+ IFactory $l10nFactory,
+ IUserSession $userSession) {
parent::__construct($appName, $request);
$this->config = $config;
@@ -141,7 +141,7 @@ class APIController extends OCSController {
$this->language = $this->l10nFactory->getUserLanguage($this->userSession->getUser());
// Ignore apps that are deployed from git
- $installedApps = array_filter($installedApps, function(string $appId) {
+ $installedApps = array_filter($installedApps, function (string $appId) {
try {
return !file_exists($this->appManager->getAppPath($appId) . '/.git');
} catch (AppPathNotFoundException $e) {
diff --git a/apps/updatenotification/lib/Controller/AdminController.php b/apps/updatenotification/lib/Controller/AdminController.php
index 74a3a86c7e1..e5a8aa45838 100644
--- a/apps/updatenotification/lib/Controller/AdminController.php
+++ b/apps/updatenotification/lib/Controller/AdminController.php
@@ -61,12 +61,12 @@ class AdminController extends Controller {
* @param IL10N $l10n
*/
public function __construct($appName,
- IRequest $request,
- IJobList $jobList,
- ISecureRandom $secureRandom,
- IConfig $config,
- ITimeFactory $timeFactory,
- IL10N $l10n) {
+ IRequest $request,
+ IJobList $jobList,
+ ISecureRandom $secureRandom,
+ IConfig $config,
+ ITimeFactory $timeFactory,
+ IL10N $l10n) {
parent::__construct($appName, $request);
$this->jobList = $jobList;
$this->secureRandom = $secureRandom;
diff --git a/apps/updatenotification/lib/ResetTokenBackgroundJob.php b/apps/updatenotification/lib/ResetTokenBackgroundJob.php
index 6e80f0fc0bf..723922157b3 100644
--- a/apps/updatenotification/lib/ResetTokenBackgroundJob.php
+++ b/apps/updatenotification/lib/ResetTokenBackgroundJob.php
@@ -26,8 +26,8 @@ declare(strict_types=1);
*/
namespace OCA\UpdateNotification;
-use OCP\BackgroundJob\TimedJob;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;
/**
@@ -47,7 +47,7 @@ class ResetTokenBackgroundJob extends TimedJob {
* @param ITimeFactory $timeFactory
*/
public function __construct(IConfig $config,
- ITimeFactory $timeFactory) {
+ ITimeFactory $timeFactory) {
parent::__construct($timeFactory);
// Run all 10 minutes
parent::setInterval(60 * 10);
diff --git a/apps/updatenotification/lib/ResponseDefinitions.php b/apps/updatenotification/lib/ResponseDefinitions.php
index cb6796aac34..24f0df8ae8d 100644
--- a/apps/updatenotification/lib/ResponseDefinitions.php
+++ b/apps/updatenotification/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/updatenotification/lib/Settings/Admin.php b/apps/updatenotification/lib/Settings/Admin.php
index 7f47a46f8f9..730be5601a2 100644
--- a/apps/updatenotification/lib/Settings/Admin.php
+++ b/apps/updatenotification/lib/Settings/Admin.php
@@ -30,18 +30,18 @@ declare(strict_types=1);
namespace OCA\UpdateNotification\Settings;
use OC\User\Backend;
-use OCP\User\Backend\ICountUsersBackend;
use OCA\UpdateNotification\UpdateChecker;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\IDateTimeFormatter;
use OCP\IGroupManager;
+use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\Settings\ISettings;
use OCP\Support\Subscription\IRegistry;
+use OCP\User\Backend\ICountUsersBackend;
use OCP\Util;
-use OCP\IUserManager;
use Psr\Log\LoggerInterface;
class Admin implements ISettings {
@@ -64,7 +64,7 @@ class Admin implements ISettings {
IRegistry $subscriptionRegistry,
IUserManager $userManager,
LoggerInterface $logger,
- IInitialState $initialState
+ IInitialState $initialState
) {
$this->config = $config;
$this->updateChecker = $updateChecker;
diff --git a/apps/updatenotification/templates/admin.php b/apps/updatenotification/templates/admin.php
index a9bf18b3a4e..6de72628e45 100644
--- a/apps/updatenotification/templates/admin.php
+++ b/apps/updatenotification/templates/admin.php
@@ -9,6 +9,6 @@ declare(strict_types=1);
* later. See the COPYING file.
*/
\OCP\Util::addScript('updatenotification', 'updatenotification');
- ?>
+?>
<div id="updatenotification"></div>
diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php
index 784e56e79ed..bdde25aceca 100644
--- a/apps/updatenotification/tests/Settings/AdminTest.php
+++ b/apps/updatenotification/tests/Settings/AdminTest.php
@@ -29,9 +29,11 @@ declare(strict_types=1);
*/
namespace OCA\UpdateNotification\Tests\Settings;
+use OC\User\Backend;
use OCA\UpdateNotification\Settings\Admin;
use OCA\UpdateNotification\UpdateChecker;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\IDateTimeFormatter;
use OCP\IGroup;
@@ -40,11 +42,9 @@ use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\L10N\ILanguageIterator;
use OCP\Support\Subscription\IRegistry;
-use OCP\UserInterface;
use OCP\User\Backend\ICountUsersBackend;
-use OCP\AppFramework\Services\IInitialState;
+use OCP\UserInterface;
use OCP\Util;
-use OC\User\Backend;
use Psr\Log\LoggerInterface;
use Test\TestCase;
@@ -84,11 +84,11 @@ class AdminTest extends TestCase {
$this->initialState = $this->createMock(IInitialState::class);
$this->admin = new Admin(
- $this->config,
- $this->updateChecker,
- $this->groupManager,
- $this->dateTimeFormatter,
- $this->l10nFactory,
+ $this->config,
+ $this->updateChecker,
+ $this->groupManager,
+ $this->dateTimeFormatter,
+ $this->l10nFactory,
$this->subscriptionRegistry,
$this->userManager,
$this->logger,
diff --git a/apps/user_ldap/ajax/clearMappings.php b/apps/user_ldap/ajax/clearMappings.php
index f8469cc85b1..395e3ec3016 100644
--- a/apps/user_ldap/ajax/clearMappings.php
+++ b/apps/user_ldap/ajax/clearMappings.php
@@ -23,8 +23,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Mapping\GroupMapping;
+use OCA\User_LDAP\Mapping\UserMapping;
// Check user and app status
\OC_JSON::checkAdminUser();
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 90c2d72a2ff..e608d5f80f0 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -2016,12 +2016,12 @@ class Access extends LDAPUtility {
}
$this->logger->debug('Ready for a paged search', ['app' => 'user_ldap']);
return [true, $pageSize, $this->lastCookie];
- /* ++ Fixing RHDS searches with pages with zero results ++
- * We couldn't get paged searches working with our RHDS for login ($limit = 0),
- * due to pages with zero results.
- * So we added "&& !empty($this->lastCookie)" to this test to ignore pagination
- * if we don't have a previous paged search.
- */
+ /* ++ Fixing RHDS searches with pages with zero results ++
+ * We couldn't get paged searches working with our RHDS for login ($limit = 0),
+ * due to pages with zero results.
+ * So we added "&& !empty($this->lastCookie)" to this test to ignore pagination
+ * if we don't have a previous paged search.
+ */
} elseif ($this->lastCookie !== '') {
// a search without limit was requested. However, if we do use
// Paged Search once, we always must do it. This requires us to
diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php
index 459de751812..e46d77b8066 100644
--- a/apps/user_ldap/lib/AppInfo/Application.php
+++ b/apps/user_ldap/lib/AppInfo/Application.php
@@ -40,10 +40,10 @@ use OCA\User_LDAP\ILDAPWrapper;
use OCA\User_LDAP\LDAP;
use OCA\User_LDAP\LoginListener;
use OCA\User_LDAP\Notification\Notifier;
+use OCA\User_LDAP\SetupChecks\LdapInvalidUuids;
use OCA\User_LDAP\User\Manager;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\UserPluginManager;
-use OCA\User_LDAP\SetupChecks\LdapInvalidUuids;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
diff --git a/apps/user_ldap/lib/Command/CheckUser.php b/apps/user_ldap/lib/Command/CheckUser.php
index 6ccfc9c19ea..1174408cb49 100644
--- a/apps/user_ldap/lib/Command/CheckUser.php
+++ b/apps/user_ldap/lib/Command/CheckUser.php
@@ -62,16 +62,16 @@ class CheckUser extends Command {
->setName('ldap:check-user')
->setDescription('checks whether a user exists on LDAP.')
->addArgument(
- 'ocName',
- InputArgument::REQUIRED,
- 'the user name as used in Nextcloud, or the LDAP DN'
- )
+ 'ocName',
+ InputArgument::REQUIRED,
+ 'the user name as used in Nextcloud, or the LDAP DN'
+ )
->addOption(
- 'force',
- null,
- InputOption::VALUE_NONE,
- 'ignores disabled LDAP configuration'
- )
+ 'force',
+ null,
+ InputOption::VALUE_NONE,
+ 'ignores disabled LDAP configuration'
+ )
->addOption(
'update',
null,
diff --git a/apps/user_ldap/lib/Command/DeleteConfig.php b/apps/user_ldap/lib/Command/DeleteConfig.php
index 707fd455611..8da77c29671 100644
--- a/apps/user_ldap/lib/Command/DeleteConfig.php
+++ b/apps/user_ldap/lib/Command/DeleteConfig.php
@@ -47,10 +47,10 @@ class DeleteConfig extends Command {
->setName('ldap:delete-config')
->setDescription('deletes an existing LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::REQUIRED,
- 'the configuration ID'
- )
+ 'configID',
+ InputArgument::REQUIRED,
+ 'the configuration ID'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/Search.php b/apps/user_ldap/lib/Command/Search.php
index 96c4df4b2bf..748bf873e64 100644
--- a/apps/user_ldap/lib/Command/Search.php
+++ b/apps/user_ldap/lib/Command/Search.php
@@ -58,30 +58,30 @@ class Search extends Command {
->setName('ldap:search')
->setDescription('executes a user or group search')
->addArgument(
- 'search',
- InputArgument::REQUIRED,
- 'the search string (can be empty)'
- )
+ 'search',
+ InputArgument::REQUIRED,
+ 'the search string (can be empty)'
+ )
->addOption(
- 'group',
- null,
- InputOption::VALUE_NONE,
- 'searches groups instead of users'
- )
+ 'group',
+ null,
+ InputOption::VALUE_NONE,
+ 'searches groups instead of users'
+ )
->addOption(
- 'offset',
- null,
- InputOption::VALUE_REQUIRED,
- 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.',
- '0'
- )
+ 'offset',
+ null,
+ InputOption::VALUE_REQUIRED,
+ 'The offset of the result set. Needs to be a multiple of limit. defaults to 0.',
+ '0'
+ )
->addOption(
- 'limit',
- null,
- InputOption::VALUE_REQUIRED,
- 'limit the results. 0 means no limit, defaults to 15',
- '15'
- )
+ 'limit',
+ null,
+ InputOption::VALUE_REQUIRED,
+ 'limit the results. 0 means no limit, defaults to 15',
+ '15'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/SetConfig.php b/apps/user_ldap/lib/Command/SetConfig.php
index 2b487787c8a..8cf100ecd0a 100644
--- a/apps/user_ldap/lib/Command/SetConfig.php
+++ b/apps/user_ldap/lib/Command/SetConfig.php
@@ -40,20 +40,20 @@ class SetConfig extends Command {
->setName('ldap:set-config')
->setDescription('modifies an LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::REQUIRED,
- 'the configuration ID'
- )
+ 'configID',
+ InputArgument::REQUIRED,
+ 'the configuration ID'
+ )
->addArgument(
- 'configKey',
- InputArgument::REQUIRED,
- 'the configuration key'
- )
+ 'configKey',
+ InputArgument::REQUIRED,
+ 'the configuration key'
+ )
->addArgument(
- 'configValue',
- InputArgument::REQUIRED,
- 'the new configuration value'
- )
+ 'configValue',
+ InputArgument::REQUIRED,
+ 'the new configuration value'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/ShowConfig.php b/apps/user_ldap/lib/Command/ShowConfig.php
index 4997d9737a5..6ff30739217 100644
--- a/apps/user_ldap/lib/Command/ShowConfig.php
+++ b/apps/user_ldap/lib/Command/ShowConfig.php
@@ -52,23 +52,23 @@ class ShowConfig extends Base {
->setName('ldap:show-config')
->setDescription('shows the LDAP configuration')
->addArgument(
- 'configID',
- InputArgument::OPTIONAL,
- 'will show the configuration of the specified id'
- )
+ 'configID',
+ InputArgument::OPTIONAL,
+ 'will show the configuration of the specified id'
+ )
->addOption(
- 'show-password',
- null,
- InputOption::VALUE_NONE,
- 'show ldap bind password'
- )
+ 'show-password',
+ null,
+ InputOption::VALUE_NONE,
+ 'show ldap bind password'
+ )
->addOption(
- 'output',
- null,
- InputOption::VALUE_OPTIONAL,
- 'Output format (table, plain, json or json_pretty, default is table)',
- 'table'
- )
+ 'output',
+ null,
+ InputOption::VALUE_OPTIONAL,
+ 'Output format (table, plain, json or json_pretty, default is table)',
+ 'table'
+ )
;
}
diff --git a/apps/user_ldap/lib/Command/UpdateUUID.php b/apps/user_ldap/lib/Command/UpdateUUID.php
index 716bc2d0563..57863a11ec8 100644
--- a/apps/user_ldap/lib/Command/UpdateUUID.php
+++ b/apps/user_ldap/lib/Command/UpdateUUID.php
@@ -42,12 +42,12 @@ use Symfony\Component\Console\Output\OutputInterface;
use function sprintf;
class UuidUpdateReport {
- const UNCHANGED = 0;
- const UNKNOWN = 1;
- const UNREADABLE = 2;
- const UPDATED = 3;
- const UNWRITABLE = 4;
- const UNMAPPED = 5;
+ public const UNCHANGED = 0;
+ public const UNKNOWN = 1;
+ public const UNREADABLE = 2;
+ public const UPDATED = 3;
+ public const UNWRITABLE = 4;
+ public const UNMAPPED = 5;
public $id = '';
public $dn = '';
@@ -178,7 +178,7 @@ class UpdateUUID extends Command {
if (!empty($report->id)) {
$output->writeln(sprintf(' %s: %s',
$report->isUser ? 'User' : 'Group', $report->id));
- } else if (!empty($report->dn)) {
+ } elseif (!empty($report->dn)) {
$output->writeln(sprintf(' DN: %s', $report->dn));
}
}
@@ -190,7 +190,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNKNOWN] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
$output->writeln(PHP_EOL . 'Old users can be removed along with their data per occ user:delete.' . PHP_EOL);
}
@@ -201,7 +201,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNREADABLE] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
}
}
@@ -211,7 +211,7 @@ class UpdateUUID extends Command {
if ($output->isVerbose()) {
/** @var UuidUpdateReport $report */
foreach ($this->reports[UuidUpdateReport::UNWRITABLE] as $report) {
- $output->writeln(sprintf(' %s: %s',$report->isUser ? 'User' : 'Group', $report->id));
+ $output->writeln(sprintf(' %s: %s', $report->isUser ? 'User' : 'Group', $report->id));
}
}
}
@@ -222,7 +222,7 @@ class UpdateUUID extends Command {
foreach($this->handleMappingBasedUpdates(false) as $_) {
yield;
}
- } else if ($input->getOption('userId')
+ } elseif ($input->getOption('userId')
|| $input->getOption('groupId')
|| $input->getOption('dn')
) {
@@ -326,8 +326,7 @@ class UpdateUUID extends Command {
foreach ($list as $row) {
$access = $backendProxy->getLDAPAccess($row['name']);
if ($access instanceof Access
- && $dn = $mapping->getDNByName($row['name']))
- {
+ && $dn = $mapping->getDNByName($row['name'])) {
if ($uuid = $access->getUUID($dn, $isUser)) {
if ($uuid !== $row['uuid']) {
if ($this->dryRun || $mapping->setUUIDbyDN($uuid, $dn)) {
@@ -359,7 +358,7 @@ class UpdateUUID extends Command {
protected function estimateNumberOfUpdates(InputInterface $input): int {
if ($input->getOption('all')) {
return $this->userMapping->count() + $this->groupMapping->count();
- } else if ($input->getOption('userId')
+ } elseif ($input->getOption('userId')
|| $input->getOption('groupId')
|| $input->getOption('dn')
) {
diff --git a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
index 833b314b199..8644626d00b 100644
--- a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
+++ b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
@@ -1,4 +1,6 @@
-<?php declare(strict_types = 1);
+<?php
+
+declare(strict_types = 1);
/**
* @copyright 2022 Carl Schwan <carl@carlschwan.eu>
*
diff --git a/apps/user_ldap/lib/GroupPluginManager.php b/apps/user_ldap/lib/GroupPluginManager.php
index 5999409cdba..d99e17d7673 100644
--- a/apps/user_ldap/lib/GroupPluginManager.php
+++ b/apps/user_ldap/lib/GroupPluginManager.php
@@ -164,7 +164,7 @@ class GroupPluginManager {
$plugin = $this->which[GroupInterface::COUNT_USERS];
if ($plugin) {
- return $plugin->countUsersInGroup($gid,$search);
+ return $plugin->countUsersInGroup($gid, $search);
}
throw new \Exception('No plugin implements countUsersInGroup in this LDAP Backend.');
}
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index a388c4acbd5..a7a82eb88ca 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -48,10 +48,10 @@ use Exception;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\User\OfflineUser;
use OCP\Cache\CappedMemoryCache;
-use OCP\GroupInterface;
use OCP\Group\Backend\ABackend;
use OCP\Group\Backend\IDeleteGroupBackend;
use OCP\Group\Backend\IGetDisplayNameBackend;
+use OCP\GroupInterface;
use OCP\IConfig;
use OCP\IUserManager;
use OCP\Server;
diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php
index 6668338d195..057a12cc0b5 100644
--- a/apps/user_ldap/lib/Helper.php
+++ b/apps/user_ldap/lib/Helper.php
@@ -41,7 +41,7 @@ class Helper {
protected CappedMemoryCache $sanitizeDnCache;
public function __construct(IConfig $config,
- IDBConnection $connection) {
+ IDBConnection $connection) {
$this->config = $config;
$this->connection = $connection;
$this->sanitizeDnCache = new CappedMemoryCache(10000);
diff --git a/apps/user_ldap/lib/Jobs/CleanUp.php b/apps/user_ldap/lib/Jobs/CleanUp.php
index be7c09bd961..f4e23446352 100644
--- a/apps/user_ldap/lib/Jobs/CleanUp.php
+++ b/apps/user_ldap/lib/Jobs/CleanUp.php
@@ -25,13 +25,13 @@
*/
namespace OCA\User_LDAP\Jobs;
-use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\BackgroundJob\TimedJob;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\User\DeletedUsersIndex;
use OCA\User_LDAP\User_LDAP;
use OCA\User_LDAP\User_Proxy;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\BackgroundJob\TimedJob;
/**
* Class CleanUp
diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php
index 487f36f4f30..3f7ae8f21d2 100644
--- a/apps/user_ldap/lib/Jobs/UpdateGroups.php
+++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php
@@ -32,11 +32,11 @@ declare(strict_types=1);
*/
namespace OCA\User_LDAP\Jobs;
+use OCA\User_LDAP\Service\UpdateGroupsService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
use OCP\DB\Exception;
use OCP\IConfig;
-use OCA\User_LDAP\Service\UpdateGroupsService;
use Psr\Log\LoggerInterface;
class UpdateGroups extends TimedJob {
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index edaf08a7816..8e63422b1ac 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -33,11 +33,11 @@
*/
namespace OCA\User_LDAP;
-use OCP\IConfig;
-use OCP\Profiler\IProfiler;
use OC\ServerNotAvailableException;
use OCA\User_LDAP\DataCollector\LdapDataCollector;
use OCA\User_LDAP\Exceptions\ConstraintViolationException;
+use OCP\IConfig;
+use OCP\Profiler\IProfiler;
use Psr\Log\LoggerInterface;
class LDAP implements ILDAPWrapper {
diff --git a/apps/user_ldap/lib/Migration/GroupMappingMigration.php b/apps/user_ldap/lib/Migration/GroupMappingMigration.php
index f89bebe57d6..d5d7aa367a1 100644
--- a/apps/user_ldap/lib/Migration/GroupMappingMigration.php
+++ b/apps/user_ldap/lib/Migration/GroupMappingMigration.php
@@ -60,7 +60,7 @@ abstract class GroupMappingMigration extends SimpleMigrationStep {
->setParameter('owncloud_name', $row['owncloud_name'])
->setParameter('directory_uuid', $row['directory_uuid'])
->setParameter('ldap_dn_hash', $row['ldap_dn_hash'])
- ;
+ ;
$insert->executeStatement();
}
diff --git a/apps/user_ldap/lib/Migration/SetDefaultProvider.php b/apps/user_ldap/lib/Migration/SetDefaultProvider.php
index 15dba57e5f3..fd9a79c8494 100644
--- a/apps/user_ldap/lib/Migration/SetDefaultProvider.php
+++ b/apps/user_ldap/lib/Migration/SetDefaultProvider.php
@@ -40,7 +40,7 @@ class SetDefaultProvider implements IRepairStep {
private $helper;
public function __construct(IConfig $config,
- Helper $helper) {
+ Helper $helper) {
$this->config = $config;
$this->helper = $helper;
}
diff --git a/apps/user_ldap/lib/Migration/UUIDFixUser.php b/apps/user_ldap/lib/Migration/UUIDFixUser.php
index 2cb7ac8bdfb..bd6aed44a0a 100644
--- a/apps/user_ldap/lib/Migration/UUIDFixUser.php
+++ b/apps/user_ldap/lib/Migration/UUIDFixUser.php
@@ -22,8 +22,8 @@
*/
namespace OCA\User_LDAP\Migration;
-use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\Mapping\UserMapping;
+use OCA\User_LDAP\User_Proxy;
class UUIDFixUser extends UUIDFix {
public function __construct(UserMapping $mapper, User_Proxy $proxy) {
diff --git a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
index 5c7dc7db95c..8031741bc4d 100644
--- a/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
+++ b/apps/user_ldap/lib/Migration/Version1010Date20200630192842.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
namespace OCA\User_LDAP\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
index b7a9b81d6a0..adc502e6747 100644
--- a/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
+++ b/apps/user_ldap/lib/Migration/Version1120Date20210917155206.php
@@ -31,7 +31,6 @@ use OC\Hooks\PublicEmitter;
use OCP\DB\Exception;
use OCP\DB\ISchemaWrapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
-use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\IUserManager;
use OCP\Migration\IOutput;
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index f904d829c08..9d3ba333e89 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -29,9 +29,9 @@
*/
namespace OCA\User_LDAP\User;
-use OCP\Cache\CappedMemoryCache;
use OCA\User_LDAP\Access;
use OCA\User_LDAP\FilesystemHelper;
+use OCP\Cache\CappedMemoryCache;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\IDBConnection;
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index 214b475e2e4..3b0015380ec 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -37,13 +37,13 @@ use OCA\User_LDAP\Access;
use OCA\User_LDAP\Connection;
use OCA\User_LDAP\Exceptions\AttributeNotSet;
use OCA\User_LDAP\FilesystemHelper;
+use OCP\Accounts\IAccountManager;
+use OCP\Accounts\PropertyDoesNotExistException;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\Image;
use OCP\IUser;
use OCP\IUserManager;
-use OCP\Accounts\IAccountManager;
-use OCP\Accounts\PropertyDoesNotExistException;
use OCP\Notification\IManager as INotificationManager;
use OCP\Server;
use Psr\Log\LoggerInterface;
diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php
index 0449c89bd24..919cddd99be 100644
--- a/apps/user_ldap/lib/User_Proxy.php
+++ b/apps/user_ldap/lib/User_Proxy.php
@@ -38,10 +38,10 @@ use OCP\IConfig;
use OCP\IUserBackend;
use OCP\IUserSession;
use OCP\Notification\IManager as INotificationManager;
-use OCP\UserInterface;
use OCP\User\Backend\ICountMappedUsersBackend;
use OCP\User\Backend\ICountUsersBackend;
use OCP\User\Backend\IProvideEnabledStateBackend;
+use OCP\UserInterface;
use Psr\Log\LoggerInterface;
class User_Proxy extends Proxy implements IUserBackend, UserInterface, IUserLDAP, ICountUsersBackend, ICountMappedUsersBackend, IProvideEnabledStateBackend {
diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php
index 29407ceb0a5..1f4794f164e 100644
--- a/apps/user_ldap/lib/Wizard.php
+++ b/apps/user_ldap/lib/Wizard.php
@@ -193,7 +193,7 @@ class Wizard extends LDAPUtility {
* counts users with a specified attribute
* @return int|false
*/
- public function countUsersWithAttribute(string $attr, bool $existsCheck = false) {
+ public function countUsersWithAttribute(string $attr, bool $existsCheck = false) {
$reqs = ['ldapHost', 'ldapBase', 'ldapUserFilter'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
@@ -399,7 +399,7 @@ class Wizard extends LDAPUtility {
* @return WizardResult|false the instance's WizardResult instance
* @throws \Exception
*/
- private function determineGroups(string $dbKey, string $confKey, bool $testMemberOf = true) {
+ private function determineGroups(string $dbKey, string $confKey, bool $testMemberOf = true) {
$reqs = ['ldapHost', 'ldapBase'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
@@ -636,7 +636,7 @@ class Wizard extends LDAPUtility {
* @return WizardResult|false
* @throws \Exception
*/
- public function testLoginName(string $loginName) {
+ public function testLoginName(string $loginName) {
$reqs = ['ldapHost', 'ldapBase', 'ldapUserFilter'];
if (!$this->configuration->usesLdapi()) {
$reqs[] = 'ldapPort';
diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php
index 936d7db70f8..cc1090bf965 100644
--- a/apps/user_ldap/tests/Group_LDAPTest.php
+++ b/apps/user_ldap/tests/Group_LDAPTest.php
@@ -1030,7 +1030,7 @@ class Group_LDAPTest extends TestCase {
}
[$memberFilter] = explode('&', $filter);
if ($memberFilter === 'member='.$dn) {
- return [$group1, $group2];
+ return [$group1, $group2];
return [];
} elseif ($memberFilter === 'member='.$group2['dn'][0]) {
return [$group3];
diff --git a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
index 49431ec0d9a..6645ccc9431 100644
--- a/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
+++ b/apps/user_ldap/tests/Migration/UUIDFixInsertTest.php
@@ -78,7 +78,7 @@ class UUIDFixInsertTest extends TestCase {
$userBatches = [
0 => array_fill(0, 50, $record),
1 => array_fill(0, 50, $record),
- 2 => array_fill(0, 13, $record),
+ 2 => array_fill(0, 13, $record),
];
$groupBatches = [
@@ -152,7 +152,7 @@ class UUIDFixInsertTest extends TestCase {
$this->userMapper->expects($this->exactly(5))
->method('getList')
->withConsecutive([0, 50], [0, 40], [0, 32], [32, 32], [64, 32])
- ->willReturnOnConsecutiveCalls($userBatches[0], $userBatches[1], $userBatches[2], $userBatches[3], $userBatches[4]);
+ ->willReturnOnConsecutiveCalls($userBatches[0], $userBatches[1], $userBatches[2], $userBatches[3], $userBatches[4]);
$this->groupMapper->expects($this->once())
->method('getList')
diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php
index 98d9c409027..f2bc8bc69d8 100644
--- a/apps/user_ldap/tests/UserLDAPPluginTest.php
+++ b/apps/user_ldap/tests/UserLDAPPluginTest.php
@@ -91,7 +91,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$this->expectExceptionMessage('No plugin implements createUser in this LDAP Backend.');
$pluginManager = $this->getUserPluginManager();
- $pluginManager->createUser('foo','bar');
+ $pluginManager->createUser('foo', 'bar');
}
public function testSetPassword() {
@@ -122,7 +122,7 @@ class UserLDAPPluginTest extends \Test\TestCase {
$this->expectExceptionMessage('No plugin implements setPassword in this LDAP Backend.');
$pluginManager = $this->getUserPluginManager();
- $pluginManager->setPassword('foo','bar');
+ $pluginManager->setPassword('foo', 'bar');
}
public function testGetHome() {
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index b561840b4a5..35c692d634f 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -48,9 +48,9 @@ use OCP\HintException;
use OCP\IConfig;
use OCP\IUser;
use OCP\Notification\IManager as INotificationManager;
-use Test\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
+use Test\TestCase;
/**
* Class Test_User_Ldap_Direct
diff --git a/apps/user_status/lib/AppInfo/Application.php b/apps/user_status/lib/AppInfo/Application.php
index 7a47fc45c95..68e5e6169ee 100644
--- a/apps/user_status/lib/AppInfo/Application.php
+++ b/apps/user_status/lib/AppInfo/Application.php
@@ -27,10 +27,10 @@ namespace OCA\UserStatus\AppInfo;
use OCA\UserStatus\Capabilities;
use OCA\UserStatus\Connector\UserStatusProvider;
+use OCA\UserStatus\Dashboard\UserStatusWidget;
use OCA\UserStatus\Listener\BeforeTemplateRenderedListener;
use OCA\UserStatus\Listener\UserDeletedListener;
use OCA\UserStatus\Listener\UserLiveStatusListener;
-use OCA\UserStatus\Dashboard\UserStatusWidget;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
diff --git a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php
index 8f2ef421597..7118f748f37 100644
--- a/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php
+++ b/apps/user_status/lib/BackgroundJob/ClearOldStatusesBackgroundJob.php
@@ -47,7 +47,7 @@ class ClearOldStatusesBackgroundJob extends TimedJob {
* @param UserStatusMapper $mapper
*/
public function __construct(ITimeFactory $time,
- UserStatusMapper $mapper) {
+ UserStatusMapper $mapper) {
parent::__construct($time);
$this->mapper = $mapper;
diff --git a/apps/user_status/lib/Connector/UserStatus.php b/apps/user_status/lib/Connector/UserStatus.php
index ff05ded9e2b..41dd2513964 100644
--- a/apps/user_status/lib/Connector/UserStatus.php
+++ b/apps/user_status/lib/Connector/UserStatus.php
@@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\UserStatus\Connector;
use DateTimeImmutable;
-use OCP\UserStatus\IUserStatus;
use OCA\UserStatus\Db;
+use OCP\UserStatus\IUserStatus;
class UserStatus implements IUserStatus {
diff --git a/apps/user_status/lib/Connector/UserStatusProvider.php b/apps/user_status/lib/Connector/UserStatusProvider.php
index cc674c9967e..4bc2645dceb 100644
--- a/apps/user_status/lib/Connector/UserStatusProvider.php
+++ b/apps/user_status/lib/Connector/UserStatusProvider.php
@@ -25,9 +25,9 @@ declare(strict_types=1);
*/
namespace OCA\UserStatus\Connector;
+use OC\UserStatus\ISettableProvider;
use OCA\UserStatus\Service\StatusService;
use OCP\UserStatus\IProvider;
-use OC\UserStatus\ISettableProvider;
class UserStatusProvider implements IProvider, ISettableProvider {
diff --git a/apps/user_status/lib/ContactsMenu/StatusProvider.php b/apps/user_status/lib/ContactsMenu/StatusProvider.php
index f1316f02df8..7eb0d7a41e1 100644
--- a/apps/user_status/lib/ContactsMenu/StatusProvider.php
+++ b/apps/user_status/lib/ContactsMenu/StatusProvider.php
@@ -46,7 +46,7 @@ class StatusProvider implements IBulkProvider {
$statuses = $this->statusService->findByUserIds($uids);
/** @var array<string, UserStatus> $indexed */
$indexed = array_combine(
- array_map(fn(UserStatus $status) => $status->getUserId(), $statuses),
+ array_map(fn (UserStatus $status) => $status->getUserId(), $statuses),
$statuses
);
diff --git a/apps/user_status/lib/Controller/HeartbeatController.php b/apps/user_status/lib/Controller/HeartbeatController.php
index c2b1ed57f01..79e12902495 100644
--- a/apps/user_status/lib/Controller/HeartbeatController.php
+++ b/apps/user_status/lib/Controller/HeartbeatController.php
@@ -29,8 +29,6 @@ namespace OCA\UserStatus\Controller;
use OCA\UserStatus\Db\UserStatus;
use OCA\UserStatus\ResponseDefinitions;
use OCA\UserStatus\Service\StatusService;
-use OCP\AppFramework\Controller;
-use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
@@ -59,11 +57,11 @@ class HeartbeatController extends OCSController {
private $service;
public function __construct(string $appName,
- IRequest $request,
- IEventDispatcher $eventDispatcher,
- IUserSession $userSession,
- ITimeFactory $timeFactory,
- StatusService $service) {
+ IRequest $request,
+ IEventDispatcher $eventDispatcher,
+ IUserSession $userSession,
+ ITimeFactory $timeFactory,
+ StatusService $service) {
parent::__construct($appName, $request);
$this->eventDispatcher = $eventDispatcher;
$this->userSession = $userSession;
diff --git a/apps/user_status/lib/Controller/PredefinedStatusController.php b/apps/user_status/lib/Controller/PredefinedStatusController.php
index ec78fedbc0b..99acdca9f79 100644
--- a/apps/user_status/lib/Controller/PredefinedStatusController.php
+++ b/apps/user_status/lib/Controller/PredefinedStatusController.php
@@ -51,8 +51,8 @@ class PredefinedStatusController extends OCSController {
* @param PredefinedStatusService $predefinedStatusService
*/
public function __construct(string $appName,
- IRequest $request,
- PredefinedStatusService $predefinedStatusService) {
+ IRequest $request,
+ PredefinedStatusService $predefinedStatusService) {
parent::__construct($appName, $request);
$this->predefinedStatusService = $predefinedStatusService;
}
diff --git a/apps/user_status/lib/Controller/StatusesController.php b/apps/user_status/lib/Controller/StatusesController.php
index 9e2bea8ff2f..ff9008d1b70 100644
--- a/apps/user_status/lib/Controller/StatusesController.php
+++ b/apps/user_status/lib/Controller/StatusesController.php
@@ -54,8 +54,8 @@ class StatusesController extends OCSController {
* @param StatusService $service
*/
public function __construct(string $appName,
- IRequest $request,
- StatusService $service) {
+ IRequest $request,
+ StatusService $service) {
parent::__construct($appName, $request);
$this->service = $service;
}
diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php
index 5f0647563ca..f2b1537e4f7 100644
--- a/apps/user_status/lib/Controller/UserStatusController.php
+++ b/apps/user_status/lib/Controller/UserStatusController.php
@@ -115,7 +115,7 @@ class UserStatusController extends OCSController {
* 200: The message was updated successfully
*/
public function setPredefinedMessage(string $messageId,
- ?int $clearAt): DataResponse {
+ ?int $clearAt): DataResponse {
try {
$status = $this->service->setPredefinedMessage($this->userId, $messageId, $clearAt);
$this->service->removeBackupUserStatus($this->userId);
@@ -143,8 +143,8 @@ class UserStatusController extends OCSController {
* 200: The message was updated successfully
*/
public function setCustomMessage(?string $statusIcon,
- ?string $message,
- ?int $clearAt): DataResponse {
+ ?string $message,
+ ?int $clearAt): DataResponse {
try {
if (($message !== null && $message !== '') || ($clearAt !== null && $clearAt !== 0)) {
$status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt);
diff --git a/apps/user_status/lib/Dashboard/UserStatusWidget.php b/apps/user_status/lib/Dashboard/UserStatusWidget.php
index 6c0dd356730..127f95d0a0e 100644
--- a/apps/user_status/lib/Dashboard/UserStatusWidget.php
+++ b/apps/user_status/lib/Dashboard/UserStatusWidget.php
@@ -31,7 +31,6 @@ use OCA\UserStatus\Db\UserStatus;
use OCA\UserStatus\Service\StatusService;
use OCP\AppFramework\Services\IInitialState;
use OCP\Dashboard\IAPIWidget;
-use OCP\Dashboard\IButtonWidget;
use OCP\Dashboard\IAPIWidgetV2;
use OCP\Dashboard\IIconWidget;
use OCP\Dashboard\IOptionWidget;
@@ -44,7 +43,6 @@ use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\UserStatus\IUserStatus;
-use OCP\Util;
/**
* Class UserStatusWidget
@@ -72,12 +70,12 @@ class UserStatusWidget implements IAPIWidget, IAPIWidgetV2, IIconWidget, IOption
* @param StatusService $service
*/
public function __construct(IL10N $l10n,
- IDateTimeFormatter $dateTimeFormatter,
- IURLGenerator $urlGenerator,
- IInitialState $initialStateService,
- IUserManager $userManager,
- IUserSession $userSession,
- StatusService $service) {
+ IDateTimeFormatter $dateTimeFormatter,
+ IURLGenerator $urlGenerator,
+ IInitialState $initialStateService,
+ IUserManager $userManager,
+ IUserSession $userSession,
+ StatusService $service) {
$this->l10n = $l10n;
$this->dateTimeFormatter = $dateTimeFormatter;
$this->urlGenerator = $urlGenerator;
@@ -176,7 +174,7 @@ class UserStatusWidget implements IAPIWidget, IAPIWidgetV2, IIconWidget, IOption
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
$widgetItemsData = $this->getWidgetData($userId, $since, $limit);
- return array_map(function(array $widgetData) {
+ return array_map(function (array $widgetData) {
$formattedDate = $this->dateTimeFormatter->formatTimeSpan($widgetData['timestamp']);
return new WidgetItem(
$widgetData['displayName'],
diff --git a/apps/user_status/lib/Db/UserStatusMapper.php b/apps/user_status/lib/Db/UserStatusMapper.php
index c8ffcca5ad9..febee32c821 100644
--- a/apps/user_status/lib/Db/UserStatusMapper.php
+++ b/apps/user_status/lib/Db/UserStatusMapper.php
@@ -26,11 +26,11 @@ declare(strict_types=1);
namespace OCA\UserStatus\Db;
-use Sabre\CalDAV\Schedule\Plugin;
use OCP\AppFramework\Db\QBMapper;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
use OCP\UserStatus\IUserStatus;
+use Sabre\CalDAV\Schedule\Plugin;
/**
* @template-extends QBMapper<UserStatus>
diff --git a/apps/user_status/lib/Listener/UserDeletedListener.php b/apps/user_status/lib/Listener/UserDeletedListener.php
index 0cacc89971a..2840ab0ef39 100644
--- a/apps/user_status/lib/Listener/UserDeletedListener.php
+++ b/apps/user_status/lib/Listener/UserDeletedListener.php
@@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\UserStatus\Listener;
use OCA\UserStatus\Service\StatusService;
-use OCP\EventDispatcher\IEventListener;
use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\IEventListener;
use OCP\User\Events\UserDeletedEvent;
/**
diff --git a/apps/user_status/lib/Listener/UserLiveStatusListener.php b/apps/user_status/lib/Listener/UserLiveStatusListener.php
index 687e01fc3a7..0d0e6e3ebf0 100644
--- a/apps/user_status/lib/Listener/UserLiveStatusListener.php
+++ b/apps/user_status/lib/Listener/UserLiveStatusListener.php
@@ -25,14 +25,14 @@ declare(strict_types=1);
*/
namespace OCA\UserStatus\Listener;
-use OCA\UserStatus\Db\UserStatus;
use OCA\UserStatus\Connector\UserStatus as ConnectorUserStatus;
+use OCA\UserStatus\Db\UserStatus;
use OCA\UserStatus\Db\UserStatusMapper;
use OCA\UserStatus\Service\StatusService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\EventDispatcher\IEventListener;
use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\IEventListener;
use OCP\User\Events\UserLiveStatusEvent;
use OCP\UserStatus\IUserStatus;
@@ -47,8 +47,8 @@ class UserLiveStatusListener implements IEventListener {
private ITimeFactory $timeFactory;
public function __construct(UserStatusMapper $mapper,
- StatusService $statusService,
- ITimeFactory $timeFactory) {
+ StatusService $statusService,
+ ITimeFactory $timeFactory) {
$this->mapper = $mapper;
$this->statusService = $statusService;
$this->timeFactory = $timeFactory;
diff --git a/apps/user_status/lib/Migration/Version0001Date20200602134824.php b/apps/user_status/lib/Migration/Version0001Date20200602134824.php
index 64490cc4207..11e9f8261a4 100644
--- a/apps/user_status/lib/Migration/Version0001Date20200602134824.php
+++ b/apps/user_status/lib/Migration/Version0001Date20200602134824.php
@@ -27,8 +27,8 @@ declare(strict_types=1);
*/
namespace OCA\UserStatus\Migration;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/user_status/lib/ResponseDefinitions.php b/apps/user_status/lib/ResponseDefinitions.php
index 2c20bd9f126..f73e5f3b0d9 100644
--- a/apps/user_status/lib/ResponseDefinitions.php
+++ b/apps/user_status/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/user_status/lib/Service/JSDataService.php b/apps/user_status/lib/Service/JSDataService.php
index c08643ec64f..443389b7192 100644
--- a/apps/user_status/lib/Service/JSDataService.php
+++ b/apps/user_status/lib/Service/JSDataService.php
@@ -44,7 +44,7 @@ class JSDataService implements \JsonSerializable {
* @param StatusService $statusService
*/
public function __construct(IUserSession $userSession,
- StatusService $statusService) {
+ StatusService $statusService) {
$this->userSession = $userSession;
$this->statusService = $statusService;
}
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index 99fafaa6426..829c6c58570 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -38,7 +38,6 @@ use OCA\UserStatus\Exception\InvalidStatusTypeException;
use OCA\UserStatus\Exception\StatusMessageTooLongException;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\Calendar\ISchedulingInformation;
use OCP\DB\Exception;
use OCP\IConfig;
use OCP\IEmojiHelper;
@@ -86,12 +85,12 @@ class StatusService {
public const MAXIMUM_MESSAGE_LENGTH = 80;
public function __construct(private UserStatusMapper $mapper,
- private ITimeFactory $timeFactory,
- private PredefinedStatusService $predefinedStatusService,
- private IEmojiHelper $emojiHelper,
- private IConfig $config,
- private IUserManager $userManager,
- private CalendarStatusService $calendarStatusService) {
+ private ITimeFactory $timeFactory,
+ private PredefinedStatusService $predefinedStatusService,
+ private IEmojiHelper $emojiHelper,
+ private IConfig $config,
+ private IUserManager $userManager,
+ private CalendarStatusService $calendarStatusService) {
$this->shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
$this->shareeEnumerationInGroupOnly = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes';
$this->shareeEnumerationPhone = $this->shareeEnumeration && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_phone', 'no') === 'yes';
@@ -190,9 +189,9 @@ class StatusService {
* @throws InvalidStatusTypeException
*/
public function setStatus(string $userId,
- string $status,
- ?int $statusTimestamp,
- bool $isUserDefined): UserStatus {
+ string $status,
+ ?int $statusTimestamp,
+ bool $isUserDefined): UserStatus {
try {
$userStatus = $this->mapper->findByUserId($userId);
} catch (DoesNotExistException $ex) {
@@ -232,8 +231,8 @@ class StatusService {
* @throws InvalidClearAtException
*/
public function setPredefinedMessage(string $userId,
- string $messageId,
- ?int $clearAt): UserStatus {
+ string $messageId,
+ ?int $clearAt): UserStatus {
try {
$userStatus = $this->mapper->findByUserId($userId);
} catch (DoesNotExistException $ex) {
@@ -276,10 +275,10 @@ class StatusService {
* @throws InvalidMessageIdException
*/
public function setUserStatus(string $userId,
- string $status,
- string $messageId,
- bool $createBackup,
- string $customMessage = null): ?UserStatus {
+ string $status,
+ string $messageId,
+ bool $createBackup,
+ string $customMessage = null): ?UserStatus {
// Check if status-type is valid
if (!in_array($status, self::PRIORITY_ORDERED_STATUSES, true)) {
throw new InvalidStatusTypeException('Status-type "' . $status . '" is not supported');
@@ -339,9 +338,9 @@ class StatusService {
* @throws StatusMessageTooLongException
*/
public function setCustomMessage(string $userId,
- ?string $statusIcon,
- ?string $message,
- ?int $clearAt): UserStatus {
+ ?string $statusIcon,
+ ?string $message,
+ ?int $clearAt): UserStatus {
try {
$userStatus = $this->mapper->findByUserId($userId);
} catch (DoesNotExistException $ex) {
@@ -569,7 +568,7 @@ class StatusService {
if (!$userStatus->getIsBackup()
&& $userStatus->getMessageId() === $messageId) {
$statuesToDelete[$userStatus->getUserId()] = $userStatus->getId();
- } else if ($userStatus->getIsBackup()) {
+ } elseif ($userStatus->getIsBackup()) {
$backups[$userStatus->getUserId()] = $userStatus->getId();
}
}
diff --git a/apps/user_status/tests/Unit/Connector/UserStatusTest.php b/apps/user_status/tests/Unit/Connector/UserStatusTest.php
index 61b5d326287..4a43aede5c0 100644
--- a/apps/user_status/tests/Unit/Connector/UserStatusTest.php
+++ b/apps/user_status/tests/Unit/Connector/UserStatusTest.php
@@ -26,8 +26,8 @@ declare(strict_types=1);
namespace OCA\UserStatus\Tests\Connector;
use OCA\UserStatus\Connector\UserStatus;
-use Test\TestCase;
use OCA\UserStatus\Db;
+use Test\TestCase;
class UserStatusTest extends TestCase {
public function testUserStatus() {
diff --git a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
index b0cd9ef501e..cabcc63b291 100644
--- a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
+++ b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
@@ -110,14 +110,14 @@ class UserStatusControllerTest extends TestCase {
* @dataProvider setStatusDataProvider
*/
public function testSetStatus(string $statusType,
- ?string $statusIcon,
- ?string $message,
- ?int $clearAt,
- bool $expectSuccess,
- bool $expectException,
- ?Throwable $exception,
- bool $expectLogger,
- ?string $expectedLogMessage): void {
+ ?string $statusIcon,
+ ?string $message,
+ ?int $clearAt,
+ bool $expectSuccess,
+ bool $expectException,
+ ?Throwable $exception,
+ bool $expectLogger,
+ ?string $expectedLogMessage): void {
$userStatus = $this->getUserStatus();
if ($expectException) {
@@ -178,12 +178,12 @@ class UserStatusControllerTest extends TestCase {
* @dataProvider setPredefinedMessageDataProvider
*/
public function testSetPredefinedMessage(string $messageId,
- ?int $clearAt,
- bool $expectSuccess,
- bool $expectException,
- ?Throwable $exception,
- bool $expectLogger,
- ?string $expectedLogMessage): void {
+ ?int $clearAt,
+ bool $expectSuccess,
+ bool $expectException,
+ ?Throwable $exception,
+ bool $expectLogger,
+ ?string $expectedLogMessage): void {
$userStatus = $this->getUserStatus();
if ($expectException) {
@@ -248,14 +248,14 @@ class UserStatusControllerTest extends TestCase {
* @dataProvider setCustomMessageDataProvider
*/
public function testSetCustomMessage(?string $statusIcon,
- string $message,
- ?int $clearAt,
- bool $expectSuccess,
- bool $expectException,
- ?Throwable $exception,
- bool $expectLogger,
- ?string $expectedLogMessage,
- bool $expectSuccessAsReset = false): void {
+ string $message,
+ ?int $clearAt,
+ bool $expectSuccess,
+ bool $expectException,
+ ?Throwable $exception,
+ bool $expectLogger,
+ ?string $expectedLogMessage,
+ bool $expectSuccessAsReset = false): void {
$userStatus = $this->getUserStatus();
if ($expectException) {
diff --git a/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php b/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php
index 38913e5f8f5..58267aed5f4 100644
--- a/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php
+++ b/apps/user_status/tests/Unit/Db/UserStatusMapperTest.php
@@ -302,7 +302,7 @@ class UserStatusMapperTest extends TestCase {
$this->assertEquals('_user1', $user1Status->getUserId());
$this->assertEquals(true, $user1Status->getIsBackup());
$this->assertEquals('Current', $user1Status->getCustomMessage());
- } else if ($hasBackup) {
+ } elseif ($hasBackup) {
$user1Status = $this->mapper->findByUserId('user1', true);
$this->assertEquals('_user1', $user1Status->getUserId());
$this->assertEquals(true, $user1Status->getIsBackup());
diff --git a/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php b/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php
index b2d446d912e..5bc60ca71f9 100644
--- a/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php
+++ b/apps/user_status/tests/Unit/Listener/UserLiveStatusListenerTest.php
@@ -72,13 +72,13 @@ class UserLiveStatusListenerTest extends TestCase {
* @dataProvider handleEventWithCorrectEventDataProvider
*/
public function testHandleWithCorrectEvent(string $userId,
- string $previousStatus,
- int $previousTimestamp,
- bool $previousIsUserDefined,
- string $eventStatus,
- int $eventTimestamp,
- bool $expectExisting,
- bool $expectUpdate): void {
+ string $previousStatus,
+ int $previousTimestamp,
+ bool $previousIsUserDefined,
+ string $eventStatus,
+ int $eventTimestamp,
+ bool $expectExisting,
+ bool $expectUpdate): void {
$userStatus = new UserStatus();
if ($expectExisting) {
diff --git a/apps/user_status/tests/Unit/Service/StatusServiceTest.php b/apps/user_status/tests/Unit/Service/StatusServiceTest.php
index d0742a105a3..8789a425622 100644
--- a/apps/user_status/tests/Unit/Service/StatusServiceTest.php
+++ b/apps/user_status/tests/Unit/Service/StatusServiceTest.php
@@ -43,11 +43,9 @@ use OCA\UserStatus\Service\StatusService;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\DB\Exception;
-use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IEmojiHelper;
use OCP\IUser;
-use OCP\IUserBackend;
use OCP\IUserManager;
use OCP\UserStatus\IUserStatus;
use PHPUnit\Framework\MockObject\MockObject;
@@ -274,15 +272,15 @@ class StatusServiceTest extends TestCase {
* @dataProvider setStatusDataProvider
*/
public function testSetStatus(string $userId,
- string $status,
- ?int $statusTimestamp,
- bool $isUserDefined,
- bool $expectExisting,
- bool $expectSuccess,
- bool $expectTimeFactory,
- bool $expectException,
- ?string $expectedExceptionClass,
- ?string $expectedExceptionMessage): void {
+ string $status,
+ ?int $statusTimestamp,
+ bool $isUserDefined,
+ bool $expectExisting,
+ bool $expectSuccess,
+ bool $expectTimeFactory,
+ bool $expectException,
+ ?string $expectedExceptionClass,
+ ?string $expectedExceptionMessage): void {
$userStatus = new UserStatus();
if ($expectExisting) {
@@ -405,14 +403,14 @@ class StatusServiceTest extends TestCase {
* @dataProvider setPredefinedMessageDataProvider
*/
public function testSetPredefinedMessage(string $userId,
- string $messageId,
- bool $isValidMessageId,
- ?int $clearAt,
- bool $expectExisting,
- bool $expectSuccess,
- bool $expectException,
- ?string $expectedExceptionClass,
- ?string $expectedExceptionMessage): void {
+ string $messageId,
+ bool $isValidMessageId,
+ ?int $clearAt,
+ bool $expectExisting,
+ bool $expectSuccess,
+ bool $expectException,
+ ?string $expectedExceptionClass,
+ ?string $expectedExceptionMessage): void {
$userStatus = new UserStatus();
if ($expectExisting) {
@@ -503,15 +501,15 @@ class StatusServiceTest extends TestCase {
* @dataProvider setCustomMessageDataProvider
*/
public function testSetCustomMessage(string $userId,
- ?string $statusIcon,
- bool $supportsEmoji,
- string $message,
- ?int $clearAt,
- bool $expectExisting,
- bool $expectSuccess,
- bool $expectException,
- ?string $expectedExceptionClass,
- ?string $expectedExceptionMessage): void {
+ ?string $statusIcon,
+ bool $supportsEmoji,
+ string $message,
+ ?int $clearAt,
+ bool $expectExisting,
+ bool $expectSuccess,
+ bool $expectException,
+ ?string $expectedExceptionClass,
+ ?string $expectedExceptionMessage): void {
$userStatus = new UserStatus();
if ($expectExisting) {
diff --git a/apps/weather_status/lib/AppInfo/Application.php b/apps/weather_status/lib/AppInfo/Application.php
index e6f40321b3c..e69215148e0 100644
--- a/apps/weather_status/lib/AppInfo/Application.php
+++ b/apps/weather_status/lib/AppInfo/Application.php
@@ -31,8 +31,8 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Dashboard\RegisterWidgetEvent;
-use OCP\EventDispatcher\IEventDispatcher;
use OCP\EventDispatcher\Event;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Util;
/**
diff --git a/apps/weather_status/lib/Capabilities.php b/apps/weather_status/lib/Capabilities.php
index b7362a88688..af1e92b83b3 100644
--- a/apps/weather_status/lib/Capabilities.php
+++ b/apps/weather_status/lib/Capabilities.php
@@ -25,10 +25,10 @@ declare(strict_types=1);
*/
namespace OCA\WeatherStatus;
-use OCP\Capabilities\ICapability;
-
use OCA\WeatherStatus\AppInfo\Application;
+use OCP\Capabilities\ICapability;
+
/**
* Class Capabilities
*
diff --git a/apps/weather_status/lib/ResponseDefinitions.php b/apps/weather_status/lib/ResponseDefinitions.php
index 08f8049b964..27cc19dafb2 100644
--- a/apps/weather_status/lib/ResponseDefinitions.php
+++ b/apps/weather_status/lib/ResponseDefinitions.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
diff --git a/apps/workflowengine/lib/AppInfo/Application.php b/apps/workflowengine/lib/AppInfo/Application.php
index ddf6bf30af6..ee57df56a3d 100644
--- a/apps/workflowengine/lib/AppInfo/Application.php
+++ b/apps/workflowengine/lib/AppInfo/Application.php
@@ -64,8 +64,8 @@ class Application extends App implements IBootstrap {
}
private function registerRuleListeners(IEventDispatcher $dispatcher,
- ContainerInterface $container,
- LoggerInterface $logger): void {
+ ContainerInterface $container,
+ LoggerInterface $logger): void {
/** @var Manager $manager */
$manager = $container->get(Manager::class);
$configuredEvents = $manager->getAllConfiguredEvents();
diff --git a/apps/workflowengine/lib/BackgroundJobs/Rotate.php b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
index ee83f4821f1..e7fe7d47e96 100644
--- a/apps/workflowengine/lib/BackgroundJobs/Rotate.php
+++ b/apps/workflowengine/lib/BackgroundJobs/Rotate.php
@@ -23,9 +23,9 @@
*/
namespace OCA\WorkflowEngine\BackgroundJobs;
+use OCA\WorkflowEngine\AppInfo\Application;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
-use OCA\WorkflowEngine\AppInfo\Application;
use OCP\Log\RotationTrait;
class Rotate extends TimedJob {
diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php
index 351364c5562..ecf0c3471e6 100644
--- a/apps/workflowengine/lib/Check/FileSystemTags.php
+++ b/apps/workflowengine/lib/Check/FileSystemTags.php
@@ -26,6 +26,7 @@
*/
namespace OCA\WorkflowEngine\Check;
+use OC\Files\Storage\Wrapper\Wrapper;
use OCA\Files_Sharing\SharedStorage;
use OCA\WorkflowEngine\Entity\File;
use OCP\Files\Cache\ICache;
@@ -39,7 +40,6 @@ use OCP\SystemTag\ISystemTagObjectMapper;
use OCP\SystemTag\TagNotFoundException;
use OCP\WorkflowEngine\ICheck;
use OCP\WorkflowEngine\IFileCheck;
-use OC\Files\Storage\Wrapper\Wrapper;
class FileSystemTags implements ICheck, IFileCheck {
use TFileCheck;
diff --git a/apps/workflowengine/lib/Listener/LoadAdditionalSettingsScriptsListener.php b/apps/workflowengine/lib/Listener/LoadAdditionalSettingsScriptsListener.php
index a3806799ff0..3973d881cea 100644
--- a/apps/workflowengine/lib/Listener/LoadAdditionalSettingsScriptsListener.php
+++ b/apps/workflowengine/lib/Listener/LoadAdditionalSettingsScriptsListener.php
@@ -30,9 +30,9 @@ use OCA\WorkflowEngine\AppInfo\Application;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Template;
+use OCP\Util;
use function class_exists;
use function function_exists;
-use OCP\Util;
class LoadAdditionalSettingsScriptsListener implements IEventListener {
public function handle(Event $event): void {
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index d8be5e4f8df..d232accd900 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -30,7 +30,6 @@
namespace OCA\WorkflowEngine;
use Doctrine\DBAL\Exception;
-use OCP\Cache\CappedMemoryCache;
use OCA\WorkflowEngine\AppInfo\Application;
use OCA\WorkflowEngine\Check\FileMimeType;
use OCA\WorkflowEngine\Check\FileName;
@@ -46,6 +45,7 @@ use OCA\WorkflowEngine\Helper\ScopeContext;
use OCA\WorkflowEngine\Service\Logger;
use OCA\WorkflowEngine\Service\RuleMatcher;
use OCP\AppFramework\QueryException;
+use OCP\Cache\CappedMemoryCache;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\ICacheFactory;
diff --git a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
index 351c1aa3fa5..ada7046a3d8 100644
--- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
+++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php
@@ -31,9 +31,9 @@ namespace OCA\WorkflowEngine\Migration;
use Closure;
use Doctrine\DBAL\Schema\Table;
-use OCP\DB\Types;
use OCA\WorkflowEngine\Entity\File;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;