From 84afed58c7f3dab999df64d6616fc55db78e33cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:55:07 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump nextcloud/coding-standard in /vendor-bin/cs-fixer Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.2 to 1.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.2...v1.5.0) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-version: 1.5.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- vendor-bin/cs-fixer/composer.lock | 55 ++++++++++++++++++------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/vendor-bin/cs-fixer/composer.lock b/vendor-bin/cs-fixer/composer.lock index 0829b7275..f50b4e2b3 100644 --- a/vendor-bin/cs-fixer/composer.lock +++ b/vendor-bin/cs-fixer/composer.lock @@ -4,31 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a96fb1e4ff8e96b0abbdeff1a02b5808", + "content-hash": "027e49effe795f6f30095f3546cbaa5f", "packages": [], "packages-dev": [ { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.25.0", + "version": "v3.37.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "50e070e5457ca4570e032207d201b3874aaff942" + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/50e070e5457ca4570e032207d201b3874aaff942", - "reference": "50e070e5457ca4570e032207d201b3874aaff942", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/678df979ce743466b42ddb6eea46b3f4c9a7bade", + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade", "shasum": "" }, "require": { "ext-filter": "*", "ext-tokenizer": "*", - "friendsofphp/php-cs-fixer": "^3.61.1", + "friendsofphp/php-cs-fixer": "^3.87", "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.22 || 10.5.45 || ^11.5.7" + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55" }, "type": "library", "autoload": { @@ -49,27 +49,33 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.25.0" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.37.2" }, - "time": "2025-05-06T20:12:43+00:00" + "funding": [ + { + "url": "https://github.com/kubawerlos", + "type": "github" + } + ], + "time": "2026-05-12T16:22:19+00:00" }, { "name": "nextcloud/coding-standard", - "version": "v1.3.2", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d" + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", - "reference": "9c719c4747fa26efc12f2e8b21c14a9a75c6ba6d", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/80547a93236fbb9c783e05f0f0899043851b0dba", + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba", "shasum": "" }, "require": { "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", - "php": "^7.3|^8.0", + "php": "^8.0", "php-cs-fixer/shim": "^3.17" }, "type": "library", @@ -89,24 +95,27 @@ } ], "description": "Nextcloud coding standards for the php cs fixer", + "keywords": [ + "dev" + ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.3.2" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.5.0" }, - "time": "2024-10-14T16:49:05+00:00" + "time": "2026-05-19T18:30:09+00:00" }, { "name": "php-cs-fixer/shim", - "version": "v3.75.0", + "version": "v3.95.12", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "eea219a577085bd13ff0cb644a422c20798316c7" + "reference": "b1b00fc14aa446d6ef0c7a4007a7c52bdad51000" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/eea219a577085bd13ff0cb644a422c20798316c7", - "reference": "eea219a577085bd13ff0cb644a422c20798316c7", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/b1b00fc14aa446d6ef0c7a4007a7c52bdad51000", + "reference": "b1b00fc14aa446d6ef0c7a4007a7c52bdad51000", "shasum": "" }, "require": { @@ -143,9 +152,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.75.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.95.12" }, - "time": "2025-03-31T18:45:02+00:00" + "time": "2026-07-07T13:30:09+00:00" } ], "aliases": [], @@ -158,5 +167,5 @@ "platform-overrides": { "php": "8.1" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } From 92c456ba2ddfce7ccb836e91a21d7143a9d9f3f2 Mon Sep 17 00:00:00 2001 From: Cristian Scheid Date: Wed, 8 Jul 2026 13:11:57 -0300 Subject: [PATCH 2/2] fix: run composer run cs:fix so files respect new version of coding standard Signed-off-by: Cristian Scheid --- appinfo/routes.php | 2 - .../Deprecated/ProviderSubjectMember.php | 9 --- lib/Activity/ProviderParser.php | 1 - lib/Activity/ProviderSubjectMember.php | 9 --- lib/Activity/SettingAsMember.php | 8 +-- lib/Activity/SettingAsNonMember.php | 7 -- lib/Api/v1/Circles.php | 5 -- lib/AppInfo/Application.php | 2 - lib/AppInfo/Capabilities.php | 4 +- lib/Circles/FileSharingBroadcaster.php | 41 +++-------- lib/CirclesManager.php | 22 ------ lib/CirclesQueryHelper.php | 8 --- .../v2/CollaboratorSearchPlugin.php | 5 -- lib/Command/CirclesCheck.php | 4 +- lib/Command/CirclesConfig.php | 3 - lib/Command/CirclesCreate.php | 4 -- lib/Command/CirclesDestroy.php | 4 -- lib/Command/CirclesDetails.php | 5 -- lib/Command/CirclesJoin.php | 4 -- lib/Command/CirclesLeave.php | 4 -- lib/Command/CirclesList.php | 5 -- lib/Command/CirclesMaintenance.php | 1 - lib/Command/CirclesMemberships.php | 10 +-- lib/Command/CirclesRemote.php | 13 ---- lib/Command/CirclesReport.php | 22 +----- lib/Command/CirclesSetting.php | 3 - lib/Command/CirclesSync.php | 4 -- lib/Command/CirclesTest.php | 71 +++---------------- lib/Command/MembersAdd.php | 5 -- lib/Command/MembersDetails.php | 4 -- lib/Command/MembersLevel.php | 4 -- lib/Command/MembersList.php | 11 +-- lib/Command/MembersRemove.php | 4 -- lib/Command/MembersSearch.php | 5 -- lib/Command/MigrateCustomGroups.php | 1 - lib/Command/SharesFiles.php | 5 -- lib/Controller/AdminController.php | 23 ------ lib/Controller/DeprecatedController.php | 1 - lib/Controller/EventWrapperController.php | 4 -- lib/Controller/LocalController.php | 2 - lib/Controller/RemoteController.php | 23 +----- lib/Controller/SettingsController.php | 6 +- lib/Controller/TeamsDashboardController.php | 8 +-- lib/Cron/Maintenance.php | 3 - lib/Cron/MaintenanceHeavy.php | 3 - lib/Dashboard/TeamDashboardWidget.php | 5 +- lib/Db/AccountsRequest.php | 6 -- lib/Db/AccountsRequestBuilder.php | 6 -- lib/Db/CircleRequest.php | 16 ----- lib/Db/CircleRequestBuilder.php | 6 -- lib/Db/CoreQueryBuilder.php | 58 --------------- lib/Db/CoreRequestBuilder.php | 9 --- lib/Db/DeprecatedRequestBuilder.php | 30 +------- lib/Db/EventWrapperRequest.php | 5 -- lib/Db/EventWrapperRequestBuilder.php | 6 -- lib/Db/FileSharesRequest.php | 4 -- lib/Db/FileSharesRequestBuilder.php | 2 - lib/Db/GSSharesRequest.php | 10 --- lib/Db/GSSharesRequestBuilder.php | 10 --- lib/Db/MemberRequest.php | 20 ------ lib/Db/MemberRequestBuilder.php | 6 -- lib/Db/MembershipRequest.php | 9 --- lib/Db/MembershipRequestBuilder.php | 6 -- lib/Db/MountPointRequestBuilder.php | 2 +- lib/Db/MountRequest.php | 6 -- lib/Db/MountRequestBuilder.php | 6 -- lib/Db/RemoteRequest.php | 14 ---- lib/Db/RemoteRequestBuilder.php | 6 -- lib/Db/ShareLockRequest.php | 3 - lib/Db/ShareLockRequestBuilder.php | 6 -- lib/Db/ShareTokenRequest.php | 6 -- lib/Db/ShareTokenRequestBuilder.php | 7 -- lib/Db/ShareWrapperRequest.php | 24 +------ lib/Db/ShareWrapperRequestBuilder.php | 7 -- lib/Db/TokensRequest.php | 7 -- lib/Db/TokensRequestBuilder.php | 6 -- lib/Events/AddingCircleMemberEvent.php | 4 -- lib/Events/CircleCreatedEvent.php | 2 - lib/Events/CircleDestroyedEvent.php | 2 - lib/Events/CircleEditedEvent.php | 2 - lib/Events/CircleGenericEvent.php | 3 - lib/Events/CircleMemberAddedEvent.php | 4 -- lib/Events/CircleMemberEditedEvent.php | 5 -- lib/Events/CircleMemberGenericEvent.php | 4 -- lib/Events/CircleMemberRemovedEvent.php | 4 -- lib/Events/CircleMemberRequestedEvent.php | 4 -- lib/Events/CircleResultGenericEvent.php | 7 -- lib/Events/CreatingCircleEvent.php | 2 - lib/Events/DestroyingCircleEvent.php | 2 - lib/Events/EditingCircleEvent.php | 2 - lib/Events/EditingCircleMemberEvent.php | 6 -- lib/Events/Files/CreatingFileShareEvent.php | 5 -- lib/Events/Files/FileShareCreatedEvent.php | 2 - lib/Events/Files/PreparingFileShareEvent.php | 4 -- lib/Events/MembershipsCreatedEvent.php | 3 - lib/Events/MembershipsEditedEvent.php | 3 - lib/Events/MembershipsRemovedEvent.php | 3 - lib/Events/PreparingCircleMemberEvent.php | 2 - lib/Events/RemovingCircleMemberEvent.php | 4 -- lib/Events/RequestingCircleMemberEvent.php | 4 -- lib/Events/SharedItemsSyncRequestedEvent.php | 8 --- .../CircleNameTooShortException.php | 1 - lib/Exceptions/CircleNotFoundException.php | 1 - .../ContactAddressBookNotFoundException.php | 1 - lib/Exceptions/ContactFormatException.php | 1 - lib/Exceptions/ContactNotFoundException.php | 1 - .../EventWrapperNotFoundException.php | 2 - .../FederatedEventDSyncException.php | 1 - lib/Exceptions/FederatedEventException.php | 2 - .../FederatedItemBadRequestException.php | 2 - .../FederatedItemConflictException.php | 2 - lib/Exceptions/FederatedItemException.php | 7 -- .../FederatedItemForbiddenException.php | 2 - .../FederatedItemNotFoundException.php | 2 - .../FederatedItemRemoteException.php | 2 - .../FederatedItemServerException.php | 2 - .../FederatedItemUnauthorizedException.php | 2 - .../FederatedShareAlreadyLockedException.php | 1 - .../FederatedShareBelongingException.php | 1 - .../FederatedShareNotFoundException.php | 1 - lib/Exceptions/FederatedUserException.php | 2 - .../FederatedUserNotFoundException.php | 2 - lib/Exceptions/FileCacheNotFoundException.php | 1 - lib/Exceptions/FrontendException.php | 1 - lib/Exceptions/GroupNotFoundException.php | 2 - .../InitiatorNotConfirmedException.php | 1 - lib/Exceptions/InitiatorNotFoundException.php | 1 - .../InsufficientPermissionException.php | 2 - lib/Exceptions/InvalidIdException.php | 1 - lib/Exceptions/InvalidModelException.php | 2 - lib/Exceptions/JsonNotRequestedException.php | 1 - lib/Exceptions/MaintenanceException.php | 1 - .../MemberAlreadyExistsException.php | 2 - lib/Exceptions/MemberHelperException.php | 2 - lib/Exceptions/MemberLevelException.php | 2 - lib/Exceptions/MemberNotFoundException.php | 1 - .../MembershipNotFoundException.php | 1 - lib/Exceptions/MigrationException.php | 2 - lib/Exceptions/MountNotFoundException.php | 1 - .../MountPointConstructionException.php | 1 - .../MountPointNotFoundException.php | 1 - lib/Exceptions/OwnerNotFoundException.php | 2 - lib/Exceptions/ParseMemberLevelException.php | 2 - .../RemoteAlreadyExistsException.php | 1 - lib/Exceptions/RemoteCircleException.php | 1 - lib/Exceptions/RemoteInstanceException.php | 2 - lib/Exceptions/RemoteNotFoundException.php | 1 - .../RemoteResourceNotFoundException.php | 1 - lib/Exceptions/RemoteUidException.php | 1 - .../ShareTokenAlreadyExistException.php | 1 - .../ShareTokenNotFoundException.php | 1 - .../ShareWrapperNotFoundException.php | 1 - .../SingleCircleNotFoundException.php | 2 - lib/Exceptions/SuperSessionException.php | 1 - .../UnknownFederatedItemException.php | 3 - lib/Exceptions/UnknownInterfaceException.php | 2 - lib/Exceptions/UnknownRemoteException.php | 2 - lib/Exceptions/UserTypeNotFoundException.php | 2 - lib/FederatedItems/CircleConfig.php | 6 -- lib/FederatedItems/CircleCreate.php | 5 -- lib/FederatedItems/CircleDestroy.php | 6 -- lib/FederatedItems/CircleEdit.php | 6 -- lib/FederatedItems/CircleJoin.php | 11 --- lib/FederatedItems/CircleLeave.php | 7 -- lib/FederatedItems/CircleSetting.php | 5 -- lib/FederatedItems/CircleSettings.php | 6 -- lib/FederatedItems/Files/FileShare.php | 6 -- lib/FederatedItems/Files/FileUnshare.php | 6 -- lib/FederatedItems/ItemLock.php | 7 -- lib/FederatedItems/LoopbackTest.php | 6 -- lib/FederatedItems/MassiveMemberAdd.php | 4 -- lib/FederatedItems/MemberDisplayName.php | 6 -- lib/FederatedItems/MemberLevel.php | 7 -- lib/FederatedItems/MemberRemove.php | 5 -- lib/FederatedItems/SharedItemsSync.php | 6 -- lib/FederatedItems/SingleMemberAdd.php | 14 +--- lib/FileSharingTeamResourceProvider.php | 4 +- lib/IBroadcaster.php | 8 +-- lib/IEntity.php | 2 - lib/IFederatedItem.php | 2 - lib/IFederatedItemAsyncProcess.php | 2 - lib/IFederatedItemCircleCheckNotRequired.php | 2 - lib/IFederatedItemDataRequestOnly.php | 2 - lib/IFederatedItemHighSeverity.php | 2 - ...FederatedItemInitiatorCheckNotRequired.php | 2 - ...atedItemInitiatorMembershipNotRequired.php | 2 - ...tedItemLimitedToInstanceWithMembership.php | 2 - lib/IFederatedItemLoopbackTest.php | 2 - lib/IFederatedItemMemberCheckNotRequired.php | 2 - lib/IFederatedItemMemberEmpty.php | 2 - lib/IFederatedItemMemberOptional.php | 2 - lib/IFederatedItemMemberRequired.php | 2 - ...IFederatedItemMustBeInitializedLocally.php | 2 - lib/IFederatedItemShareManagement.php | 2 - lib/IFederatedItemSharedItem.php | 2 - lib/IFederatedModel.php | 2 - lib/IFederatedSync.php | 2 - lib/IFederatedUser.php | 2 - lib/IQueryProbe.php | 2 - lib/ISearch.php | 2 - lib/Listeners/AccountUpdated.php | 1 - lib/Listeners/DeprecatedListener.php | 3 - .../Examples/ExampleAddingCircleMember.php | 2 - .../Examples/ExampleMembershipsCreated.php | 6 +- .../Examples/ExampleMembershipsRemoved.php | 6 +- .../ExampleRequestingCircleMember.php | 2 - lib/Listeners/Files/AddingMemberSendMail.php | 3 - lib/Listeners/Files/CreatingShareSendMail.php | 3 - lib/Listeners/Files/DestroyingCircle.php | 4 -- lib/Listeners/Files/MemberAddedSendMail.php | 2 - lib/Listeners/Files/MembershipsRemoved.php | 3 - .../Files/PreparingMemberSendMail.php | 3 - .../Files/PreparingShareSendMail.php | 3 - lib/Listeners/Files/RemovingMember.php | 4 -- lib/Listeners/Files/ShareCreatedSendMail.php | 3 - lib/Listeners/GroupCreated.php | 2 - lib/Listeners/GroupDeleted.php | 2 - lib/Listeners/GroupMemberAdded.php | 2 - lib/Listeners/GroupMemberRemoved.php | 2 - lib/Listeners/NodeEventListener.php | 6 +- lib/Listeners/UserCreated.php | 3 - lib/Listeners/UserDeleted.php | 3 - lib/Migration/Migration.php | 5 -- .../Version0022Date20220526111723.php | 2 - .../Version0022Date20220526113601.php | 12 ---- .../Version0022Date20220703115023.php | 11 --- .../Version0023Date20211216113101.php | 2 - .../Version0024Date20220203123901.php | 3 - .../Version0024Date20220203123902.php | 3 - .../Version0024Date20220317190331.php | 2 - .../Version0028Date20230705222601.php | 2 - .../Version0031Date20241105133904.php | 2 - .../Version0032Date20250623120204.php | 2 - lib/Model/BaseCircle.php | 14 ---- lib/Model/BaseMember.php | 20 ------ lib/Model/Circle.php | 36 ---------- lib/Model/DavCard.php | 20 ------ lib/Model/DeprecatedCircle.php | 14 ---- lib/Model/DeprecatedMember.php | 15 ---- lib/Model/Federated/EventWrapper.php | 16 ----- lib/Model/Federated/FederatedEvent.php | 25 ------- lib/Model/Federated/FederatedShare.php | 13 ---- lib/Model/Federated/RemoteInstance.php | 22 ------ lib/Model/FederatedLink.php | 18 ----- lib/Model/FederatedUser.php | 20 ------ lib/Model/FileCacheWrapper.php | 2 - lib/Model/GlobalScale/GSEvent.php | 17 ----- lib/Model/GlobalScale/GSShare.php | 17 ----- lib/Model/GlobalScale/GSShareMountpoint.php | 8 --- lib/Model/GlobalScale/GSWrapper.php | 11 --- lib/Model/Helpers/MemberHelper.php | 10 --- lib/Model/ManagedModel.php | 5 -- lib/Model/Member.php | 39 ---------- lib/Model/Membership.php | 15 ---- lib/Model/ModelManager.php | 19 ----- lib/Model/Mount.php | 16 ----- lib/Model/Mountpoint.php | 2 - lib/Model/Probes/BasicProbe.php | 11 --- lib/Model/Probes/CircleProbe.php | 11 --- lib/Model/Probes/DataProbe.php | 8 --- lib/Model/Probes/MemberProbe.php | 7 -- lib/Model/Report.php | 8 --- lib/Model/ShareToken.php | 15 ---- lib/Model/ShareWrapper.php | 6 -- lib/Model/SharesToken.php | 10 --- lib/Model/SharingFrame.php | 12 ---- lib/MountManager/CircleMount.php | 2 - lib/MountManager/CircleMountProvider.php | 1 - lib/Notification/Notifier.php | 5 -- lib/Search/Contacts.php | 1 - lib/Search/FederatedUsers.php | 2 - lib/Search/GlobalScaleUsers.php | 5 +- lib/Search/LocalUsers.php | 7 +- lib/Search/UnifiedSearchProvider.php | 8 --- lib/Search/UnifiedSearchResult.php | 8 --- lib/Service/CircleService.php | 19 ----- lib/Service/ConfigService.php | 38 +--------- lib/Service/ContactService.php | 9 --- lib/Service/EventService.php | 14 ---- lib/Service/EventWrapperService.php | 11 +-- lib/Service/FederatedEventService.php | 13 +--- lib/Service/FederatedShareService.php | 2 - lib/Service/FederatedUserService.php | 34 +-------- lib/Service/GlobalScaleService.php | 4 -- lib/Service/InterfaceService.php | 19 ----- lib/Service/MaintenanceService.php | 22 +----- lib/Service/MemberService.php | 14 +--- lib/Service/MembershipService.php | 16 ----- lib/Service/MigrationService.php | 28 ++------ lib/Service/MiscService.php | 17 ----- lib/Service/NotificationService.php | 7 -- lib/Service/OutputService.php | 8 --- lib/Service/PermissionService.php | 7 -- lib/Service/RemoteDownstreamService.php | 10 --- lib/Service/RemoteService.php | 11 --- lib/Service/RemoteStreamService.php | 20 ------ lib/Service/RemoteSyncService.php | 1 + lib/Service/RemoteUpstreamService.php | 8 --- lib/Service/SearchService.php | 7 -- lib/Service/SendMailService.php | 8 --- lib/Service/ShareService.php | 3 - lib/Service/ShareTokenService.php | 6 -- lib/Service/SyncService.php | 18 ----- lib/Service/TeamResourceService.php | 17 +++-- lib/Service/TimezoneService.php | 7 +- lib/Service/TrustedServerService.php | 5 +- lib/ShareByCircleProvider.php | 18 +---- lib/StatusCode.php | 2 - lib/Tools/ActivityPub/NCSignature.php | 18 ----- lib/Tools/Db/ExtendedQueryBuilder.php | 34 --------- lib/Tools/Db/IQueryRow.php | 2 - .../Exceptions/ArrayNotFoundException.php | 2 - lib/Tools/Exceptions/DateTimeException.php | 2 - lib/Tools/Exceptions/InvalidItemException.php | 2 - .../Exceptions/InvalidOriginException.php | 2 - .../InvalidRemoteInstanceException.php | 2 - .../Exceptions/ItemNotFoundException.php | 2 - .../Exceptions/MalformedArrayException.php | 2 - .../Exceptions/RequestContentException.php | 2 - .../Exceptions/RequestNetworkException.php | 2 - .../RequestResultNotJsonException.php | 2 - .../Exceptions/RequestResultSizeException.php | 2 - .../Exceptions/RequestServerException.php | 2 - lib/Tools/Exceptions/RowNotFoundException.php | 2 - lib/Tools/Exceptions/SignatoryException.php | 2 - lib/Tools/Exceptions/SignatureException.php | 2 - lib/Tools/Exceptions/UnknownTypeException.php | 2 - .../WellKnownLinkNotFoundException.php | 2 - lib/Tools/IDeserializable.php | 2 - lib/Tools/Model/NCRequest.php | 7 -- lib/Tools/Model/NCRequestResult.php | 14 ---- lib/Tools/Model/NCSignatory.php | 19 +---- lib/Tools/Model/NCSignedRequest.php | 15 ---- lib/Tools/Model/NCWebfinger.php | 8 --- lib/Tools/Model/NCWellKnownLink.php | 10 --- lib/Tools/Model/Request.php | 41 ----------- lib/Tools/Model/SimpleDataStore.php | 18 ----- lib/Tools/Traits/TArrayTools.php | 14 ---- lib/Tools/Traits/TAsync.php | 4 -- lib/Tools/Traits/TConsoleTree.php | 2 - lib/Tools/Traits/TDeserialize.php | 7 -- lib/Tools/Traits/TNCLocalSignatory.php | 5 -- lib/Tools/Traits/TNCLogger.php | 7 -- lib/Tools/Traits/TNCRequest.php | 7 -- lib/Tools/Traits/TNCSetup.php | 4 -- lib/Tools/Traits/TNCSignatory.php | 7 -- lib/Tools/Traits/TNCWellKnown.php | 6 -- lib/Tools/Traits/TStringTools.php | 17 ++--- lib/UnifiedSearch/UnifiedSearchResult.php | 2 - tests/TestSuiteListener.php | 1 - 350 files changed, 98 insertions(+), 2327 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index fce3f8d5b..bd80e59e2 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -6,10 +6,8 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - return [ 'ocs' => [ - // LocalController ['name' => 'Local#circles', 'url' => '/circles', 'verb' => 'GET'], ['name' => 'Local#probeCircles', 'url' => '/probecircles', 'verb' => 'GET'], diff --git a/lib/Activity/Deprecated/ProviderSubjectMember.php b/lib/Activity/Deprecated/ProviderSubjectMember.php index a5ab9a96e..d43249454 100644 --- a/lib/Activity/Deprecated/ProviderSubjectMember.php +++ b/lib/Activity/Deprecated/ProviderSubjectMember.php @@ -65,7 +65,6 @@ private function parseSubjectMemberJoinOnInvite( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -119,7 +118,6 @@ private function parseSubjectMemberAddNotLocalMember( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -146,7 +144,6 @@ private function parseSubjectMemberAddClosedCircle( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -174,7 +171,6 @@ public function parseSubjectMemberLeft( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -201,7 +197,6 @@ private function parseSubjectNonMemberLeftInvite( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -228,7 +223,6 @@ private function parseSubjectNonMemberLeftRequest( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -282,7 +276,6 @@ private function parseSubjectMemberRemoveNotLocalMember( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -357,7 +350,6 @@ public function parseMemberInvited(IEvent $event, Circle $circle, Member $member throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle @@ -386,7 +378,6 @@ public function parseMemberLevel( throw new FakeException(); } - /** * @param IEvent $event * @param Circle $circle diff --git a/lib/Activity/ProviderParser.php b/lib/Activity/ProviderParser.php index 1a86369bf..1e60ae41a 100644 --- a/lib/Activity/ProviderParser.php +++ b/lib/Activity/ProviderParser.php @@ -205,7 +205,6 @@ protected function isViewerTheAuthor(array $initiator, string $userId): bool { return (($initiator['type'] ?? 0) === Member::TYPE_USER && ($initiator['userId'] ?? '') === $userId); } - /** * @param array $member * diff --git a/lib/Activity/ProviderSubjectMember.php b/lib/Activity/ProviderSubjectMember.php index 2118e611f..93ea3eda3 100644 --- a/lib/Activity/ProviderSubjectMember.php +++ b/lib/Activity/ProviderSubjectMember.php @@ -61,7 +61,6 @@ private function parseSubjectMemberJoinOnInvite( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -111,7 +110,6 @@ private function parseSubjectMemberAddNotLocalMember( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -136,7 +134,6 @@ private function parseSubjectMemberAddClosedCircle( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -162,7 +159,6 @@ public function parseSubjectMemberLeft( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -187,7 +183,6 @@ private function parseSubjectNonMemberLeftInvite( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -212,7 +207,6 @@ private function parseSubjectNonMemberLeftRequest( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -262,7 +256,6 @@ private function parseSubjectMemberRemoveNotLocalMember( throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -333,7 +326,6 @@ public function parseMemberInvited(IEvent $event, array $params): void { throw new FakeException(); } - /** * @param IEvent $event * @param array $params @@ -360,7 +352,6 @@ public function parseMemberLevel( throw new FakeException(); } - /** * @param IEvent $event * @param array $params diff --git a/lib/Activity/SettingAsMember.php b/lib/Activity/SettingAsMember.php index 9b364d63a..03e268b56 100644 --- a/lib/Activity/SettingAsMember.php +++ b/lib/Activity/SettingAsMember.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Activity; use OCP\Activity\ISetting; @@ -15,7 +16,6 @@ public function __construct( ) { } - /** * @return string Lowercase a-z and underscore only identifier * @since 11.0.0 @@ -24,7 +24,6 @@ public function getIdentifier() { return 'circles_as_member'; } - /** * @return string A translated string * @since 11.0.0 @@ -33,7 +32,6 @@ public function getName() { return $this->l10n->t('On events happening in a team of which you are a member'); } - /** * @return int whether the filter should be rather on the top or bottom of * the admin section. The filters are arranged in ascending order of the @@ -44,7 +42,6 @@ public function getPriority() { return 60; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 @@ -53,7 +50,6 @@ public function canChangeStream() { return true; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 @@ -62,7 +58,6 @@ public function isDefaultEnabledStream() { return true; } - /** * @return bool True when the option can be changed for the mail * @since 11.0.0 @@ -71,7 +66,6 @@ public function canChangeMail() { return true; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 diff --git a/lib/Activity/SettingAsNonMember.php b/lib/Activity/SettingAsNonMember.php index 5cfc1058b..34fd6a188 100644 --- a/lib/Activity/SettingAsNonMember.php +++ b/lib/Activity/SettingAsNonMember.php @@ -18,7 +18,6 @@ public function __construct( ) { } - /** * @return string Lowercase a-z and underscore only identifier * @since 11.0.0 @@ -27,7 +26,6 @@ public function getIdentifier() { return 'circles_as_non_member'; } - /** * @return string A translated string * @since 11.0.0 @@ -36,7 +34,6 @@ public function getName() { return $this->l10n->t('On global events happening in any team'); } - /** * @return int whether the filter should be rather on the top or bottom of * the admin section. The filters are arranged in ascending order of the @@ -47,7 +44,6 @@ public function getPriority() { return 60; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 @@ -56,7 +52,6 @@ public function canChangeStream() { return true; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 @@ -65,7 +60,6 @@ public function isDefaultEnabledStream() { return false; } - /** * @return bool True when the option can be changed for the mail * @since 11.0.0 @@ -74,7 +68,6 @@ public function canChangeMail() { return true; } - /** * @return bool True when the option can be changed for the stream * @since 11.0.0 diff --git a/lib/Api/v1/Circles.php b/lib/Api/v1/Circles.php index d0df04409..11a018215 100644 --- a/lib/Api/v1/Circles.php +++ b/lib/Api/v1/Circles.php @@ -46,7 +46,6 @@ class Circles { public const LEVEL_ADMIN = Member::LEVEL_ADMIN; public const LEVEL_OWNER = Member::LEVEL_OWNER; - /** * Circles::listCircles(); * @@ -88,7 +87,6 @@ public static function listCircles($type, $name = '', $level = 0, $userId = '', return $circleService->getCircles($probe); } - /** * @param string $userId * @param bool $forceAll @@ -131,7 +129,6 @@ public static function joinedCircles($userId = '', $forceAll = false) { return $circleService->probeCircles($probe); } - /** * @param string $circleUniqueId * @param bool $forceAll @@ -171,7 +168,6 @@ public static function detailsCircle(string $circleUniqueId, bool $forceAll = fa return $circleService->getCircle($circleUniqueId); } - /** * @param string $circleUniqueId * @param string $ident @@ -195,7 +191,6 @@ public static function getMember($circleUniqueId, $ident, $type, $forceAll = fal return $circlesManager->getLink($circleUniqueId, $federatedUser->getSingleId()); } - /** * @param array $circleUniqueIds * diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index f7f5e16a0..e7147506b 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\AppInfo; use OCA\Circles\ConfigLexicon; diff --git a/lib/AppInfo/Capabilities.php b/lib/AppInfo/Capabilities.php index c1d672a29..6210557d2 100644 --- a/lib/AppInfo/Capabilities.php +++ b/lib/AppInfo/Capabilities.php @@ -109,8 +109,8 @@ private function getCapabilitiesCircleConstants(): array { Circle::CFG_FEDERATED => $this->l10n->t('Federated'), Circle::CFG_MOUNTPOINT => $this->l10n->t('Mount point') ], - 'source' => - [ + 'source' + => [ 'core' => [ Member::TYPE_USER => $this->l10n->t('Nextcloud Account'), Member::TYPE_GROUP => $this->l10n->t('Nextcloud Group'), diff --git a/lib/Circles/FileSharingBroadcaster.php b/lib/Circles/FileSharingBroadcaster.php index 88c4c4918..3754e447c 100644 --- a/lib/Circles/FileSharingBroadcaster.php +++ b/lib/Circles/FileSharingBroadcaster.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Circles; use Exception; @@ -90,7 +89,6 @@ class FileSharingBroadcaster implements IBroadcaster { /** @var bool */ private $federatedEnabled = false; - /** * {@inheritdoc} */ @@ -118,21 +116,19 @@ public function init() { } try { - $this->federationNotifications = - Server::get(Notifications::class); + $this->federationNotifications + = Server::get(Notifications::class); $this->federatedEnabled = true; } catch (ContainerExceptionInterface) { } } - /** * {@inheritdoc} */ public function end() { } - /** * {@inheritdoc} */ @@ -144,7 +140,6 @@ public function createShareToCircle(SharingFrame $frame, DeprecatedCircle $circl return true; } - /** * {@inheritdoc} */ @@ -152,7 +147,6 @@ public function deleteShareToCircle(SharingFrame $frame, DeprecatedCircle $circl return true; } - /** * {@inheritdoc} */ @@ -160,7 +154,6 @@ public function editShareToCircle(SharingFrame $frame, DeprecatedCircle $circle) return true; } - /** * {@inheritdoc} * @throws IllegalIDChangeException @@ -207,8 +200,8 @@ public function createShareToMember(SharingFrame $frame, DeprecatedMember $membe // } // } - $sharesToken = - $this->tokensRequest->generateTokenForMember($member, $share->getId(), $password); + $sharesToken + = $this->tokensRequest->generateTokenForMember($member, $share->getId(), $password); $mails = [$member->getUserId()]; if ($member->getType() === DeprecatedMember::TYPE_CONTACT) { $mails = $this->getMailsFromContact($member->getUserId()); @@ -228,7 +221,6 @@ public function createShareToMember(SharingFrame $frame, DeprecatedMember $membe return true; } - /** * {@inheritdoc} */ @@ -236,7 +228,6 @@ public function deleteShareToMember(SharingFrame $frame, DeprecatedMember $membe return true; } - /** * {@inheritdoc} */ @@ -244,7 +235,6 @@ public function editShareToMember(SharingFrame $frame, DeprecatedMember $member) return true; } - /** * @param DeprecatedCircle $circle * @param DeprecatedMember $member @@ -294,7 +284,6 @@ public function sendMailAboutExistingShares(DeprecatedCircle $circle, Deprecated $this->sendMailExitingShares($circle, $unknownShares, $author, $member, $recipient); } - /** * recreate the share from the JSON payload. * @@ -319,7 +308,6 @@ private function generateShare($data): IShare { return $share; } - /** * @param DeprecatedCircle $circle * @param IShare $share @@ -366,7 +354,6 @@ public function sharedByFederated(DeprecatedCircle $circle, IShare $share, strin return false; } - /** * @param DeprecatedCircle $circle * @param IShare $share @@ -400,7 +387,6 @@ private function sharedByMail( } } - /** * @param $fileName * @param string $link @@ -421,8 +407,8 @@ protected function sendMail($fileName, $link, $author, $circleName, $email) { $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); $text = $this->l10n->t('%s shared »%s« with "%s".', [$author, $fileName, $circleName]); - $emailTemplate = - $this->generateEmailTemplate($subject, $text, $fileName, $link, $author, $circleName); + $emailTemplate + = $this->generateEmailTemplate($subject, $text, $fileName, $link, $author, $circleName); $instanceName = $this->defaults->getName(); $senderName = $this->l10n->t('%s on %s', [$author, $instanceName]); @@ -435,7 +421,6 @@ protected function sendMail($fileName, $link, $author, $circleName, $email) { $this->mailer->send($message); } - /** * @param IShare $share * @param string $circleName @@ -461,10 +446,10 @@ protected function sendPasswordByMail(IShare $share, $circleName, $email, $passw $shareWith = $share->getSharedWith(); $initiatorUser = $this->userManager->get($initiator); - $initiatorDisplayName = - ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; - $initiatorEmailAddress = - ($initiatorUser instanceof IUser) ? $initiatorUser->getEMailAddress() : null; + $initiatorDisplayName + = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; + $initiatorEmailAddress + = ($initiatorUser instanceof IUser) ? $initiatorUser->getEMailAddress() : null; $plainBodyPart = $this->l10n->t( "%1\$s shared »%2\$s« with you.\nYou should have already received a separate email with a link to access it.\n", @@ -544,7 +529,6 @@ private function generateEmailTemplate(string $subject, string $text, string $fi return $emailTemplate; } - /** * @param DeprecatedCircle $circle * @param array $unknownShares @@ -583,7 +567,6 @@ public function sendMailExitingShares( } } - /** * @param $author * @param string $email @@ -676,7 +659,6 @@ private function getMailLinkFromShare(array $share, DeprecatedMember $member, st ]; } - /** * @param $author * @param string $circleName @@ -699,7 +681,6 @@ protected function generateMailExitingShares($author, $circleName) { return $emailTemplate; } - /** * @param IEMailTemplate $emailTemplate * @param array $data @@ -718,7 +699,6 @@ protected function fillMailExistingShares(IEMailTemplate $emailTemplate, array $ } } - /** * @param IEMailTemplate $emailTemplate * @param $author @@ -744,7 +724,6 @@ protected function sendMailExistingShares(IEMailTemplate $emailTemplate, $author $this->mailer->send($message); } - /** * @param string $contactId * diff --git a/lib/CirclesManager.php b/lib/CirclesManager.php index 5180eef73..cecd824ac 100644 --- a/lib/CirclesManager.php +++ b/lib/CirclesManager.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Exceptions\CircleNotFoundException; @@ -73,7 +71,6 @@ public function __construct( ) { } - /** * @param string $federatedId * @param int $type @@ -121,7 +118,6 @@ public function getLocalFederatedUser(string $userId): FederatedUser { return $this->getFederatedUser($userId, Member::TYPE_USER); } - /** * @throws FederatedUserNotFoundException * @throws SingleCircleNotFoundException @@ -147,7 +143,6 @@ public function startSuperSession(bool $forceSync = false): void { $this->federatedUserService->bypassCurrentUserCondition(true); } - /** * @param string $appId * @param int $appSerial @@ -196,7 +191,6 @@ public function startOccSession( $this->federatedUserService->commandLineInitiator($userId, $userType, $circleId); } - /** * */ @@ -206,7 +200,6 @@ public function stopSession(): void { $this->forceSync = false; } - /** * @return IFederatedUser * @throws FederatedUserNotFoundException @@ -220,7 +213,6 @@ public function getCurrentFederatedUser(): IFederatedUser { return $current; } - /** * @return CirclesQueryHelper */ @@ -228,7 +220,6 @@ public function getQueryHelper(): CirclesQueryHelper { return $this->circlesQueryHelper; } - /** * @param string $name * @param FederatedUser|null $owner @@ -261,7 +252,6 @@ public function createCircle( return $circle; } - /** * @param string $singleId * @@ -281,7 +271,6 @@ public function destroyCircle(string $singleId): void { $this->circleService->destroy($singleId, $this->forceSync); } - /** * WARNING: This method is not using Cached Memberships meaning that the request can be heavy and should * only be used if probeCircles() does not fit your need. @@ -306,7 +295,6 @@ public function getCircles(?CircleProbe $probe = null, bool $refreshCache = fals return $this->circleService->getCircles($probe, !$refreshCache); } - /** * @param string $singleId * @param CircleProbe|null $probe @@ -338,7 +326,6 @@ public function getCirclesByIds(array $ids, ?DataProbe $dataProbe = null): array return $this->circleService->probeCirclesByIds($ids, $dataProbe); } - /** * @param Circle $circle * @@ -358,7 +345,6 @@ public function updateConfig(Circle $circle): void { $this->circleService->updateConfig($circle->getSingleId(), $circle->getConfig()); } - /** * @param string $circleId * @param bool $enabled @@ -398,7 +384,6 @@ public function flagAsAppManaged(string $circleId, bool $enabled = true): void { $this->circleService->updateConfig($circleId, $config); } - /** * @param string $circleId * @param FederatedUser $federatedUser @@ -431,7 +416,6 @@ public function addMember(string $circleId, FederatedUser $federatedUser): Membe return $member; } - /** * @param string $memberId * @param int $level @@ -457,7 +441,6 @@ public function levelMember(string $memberId, int $level): Member { return $member; } - /** * @param string $memberId * @@ -476,7 +459,6 @@ public function removeMember(string $memberId): void { $this->memberService->removeMember($memberId, $this->forceSync); } - /** * @param string $circleId * @param string $singleId @@ -490,7 +472,6 @@ public function getLink(string $circleId, string $singleId, bool $detailed = fal return $this->membershipService->getMembership($circleId, $singleId, $detailed); } - /** * @param IEntity $circle * @@ -500,7 +481,6 @@ public function getDefinition(IEntity $circle): string { return $this->circleService->getDefinition($circle); } - /** * Returns data about Circles based on cached Memberships. * Meaning that only Circles the current user is a member will be returned. @@ -525,7 +505,6 @@ public function probeCircles(?CircleProbe $circleProbe = null, ?DataProbe $dataP return $this->circleService->probeCircles($circleProbe, $dataProbe); } - /** * WIP * @@ -542,7 +521,6 @@ public function probeCircles(?CircleProbe $circleProbe = null, ?DataProbe $dataP // $this->memberService->getMemberById($circleId, $singleId); // } - /** * WIP * diff --git a/lib/CirclesQueryHelper.php b/lib/CirclesQueryHelper.php index ddfed8fe1..375c59c77 100644 --- a/lib/CirclesQueryHelper.php +++ b/lib/CirclesQueryHelper.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Db\CoreQueryBuilder; @@ -31,7 +29,6 @@ class CirclesQueryHelper { /** @var CoreQueryBuilder&IQueryBuilder */ private $queryBuilder; - /** * CirclesQueryHelper constructor. * @@ -44,7 +41,6 @@ public function __construct( ) { } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -54,7 +50,6 @@ public function getQueryBuilder(): CoreQueryBuilder { return $this->queryBuilder; } - /** * @param string $alias * @param string $field @@ -91,7 +86,6 @@ public function limitToSession( ); } - /** * @param string $alias * @param string $field @@ -149,7 +143,6 @@ public function limitToMemberships( ); } - /** * @param string $field * @param string $alias @@ -171,7 +164,6 @@ public function addCircleDetails( $this->queryBuilder->leftJoinCircle(CoreQueryBuilder::HELPER, null, $field, $alias); } - /** * @param array $data * diff --git a/lib/Collaboration/v2/CollaboratorSearchPlugin.php b/lib/Collaboration/v2/CollaboratorSearchPlugin.php index 4081b01f7..4bbdfbdaa 100644 --- a/lib/Collaboration/v2/CollaboratorSearchPlugin.php +++ b/lib/Collaboration/v2/CollaboratorSearchPlugin.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Collaboration\v2; use Exception; @@ -33,7 +31,6 @@ class CollaboratorSearchPlugin implements ISearchPlugin { use TNCLogger; - /** * CollaboratorSearchPlugin constructor. * @@ -49,7 +46,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param string $search * @param int $limit @@ -115,7 +111,6 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b return false; } - /** * @param Circle $circle * diff --git a/lib/Command/CirclesCheck.php b/lib/Command/CirclesCheck.php index aaf3ea202..4779c9c7a 100644 --- a/lib/Command/CirclesCheck.php +++ b/lib/Command/CirclesCheck.php @@ -288,8 +288,8 @@ private function testLoopback(InputInterface $input, OutputInterface $output): b $test = new FederatedEvent(LoopbackTest::class); $this->federatedEventService->newEvent($test); $output->writeln( - '' . $test->getWrapperToken() . ' ' . - '(took ' . ((string)(round(microtime(true) * 1000.0) - $timer)) . 'ms)' + '' . $test->getWrapperToken() . ' ' + . '(took ' . ((string)(round(microtime(true) * 1000.0) - $timer)) . 'ms)' ); $output->writeln('- Waiting for async process to finish (5s)'); diff --git a/lib/Command/CirclesConfig.php b/lib/Command/CirclesConfig.php index 2e7c31e39..1966c7708 100644 --- a/lib/Command/CirclesConfig.php +++ b/lib/Command/CirclesConfig.php @@ -62,7 +62,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -138,7 +137,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param Circle $circle * @param array $listing @@ -174,7 +172,6 @@ private function generateConfig(Circle $circle, array $listing): int { return $current->getConfig(); } - /** * @param Circle $circle * diff --git a/lib/Command/CirclesCreate.php b/lib/Command/CirclesCreate.php index 6e8685c4f..a281af203 100644 --- a/lib/Command/CirclesCreate.php +++ b/lib/Command/CirclesCreate.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -42,7 +40,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:manage:create') @@ -58,7 +55,6 @@ protected function configure() { ); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/CirclesDestroy.php b/lib/Command/CirclesDestroy.php index c428e929e..ec422ef7c 100644 --- a/lib/Command/CirclesDestroy.php +++ b/lib/Command/CirclesDestroy.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -47,7 +45,6 @@ public function __construct( parent::__construct(); } - /** * */ @@ -61,7 +58,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/CirclesDetails.php b/lib/Command/CirclesDetails.php index 66d1fa538..fefa1d470 100644 --- a/lib/Command/CirclesDetails.php +++ b/lib/Command/CirclesDetails.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -56,7 +54,6 @@ public function __construct( parent::__construct(); } - /** * */ @@ -71,7 +68,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -117,7 +113,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int true ); - $probe = new CircleProbe(); $probe->includeNonVisibleCircles(); diff --git a/lib/Command/CirclesJoin.php b/lib/Command/CirclesJoin.php index 16d2ef7c7..9b9c2c678 100644 --- a/lib/Command/CirclesJoin.php +++ b/lib/Command/CirclesJoin.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -50,7 +48,6 @@ public function __construct( parent::__construct(); } - /** * */ @@ -64,7 +61,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/CirclesLeave.php b/lib/Command/CirclesLeave.php index d0540525e..ffbb85acc 100644 --- a/lib/Command/CirclesLeave.php +++ b/lib/Command/CirclesLeave.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -39,7 +37,6 @@ public function __construct( parent::__construct(); } - /** * */ @@ -53,7 +50,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/CirclesList.php b/lib/Command/CirclesList.php index bc33a643a..7cf09a00e 100644 --- a/lib/Command/CirclesList.php +++ b/lib/Command/CirclesList.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -67,7 +65,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:manage:list') @@ -86,7 +83,6 @@ protected function configure() { ->addOption('all', '', InputOption::VALUE_NONE, 'include all Teams'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -182,7 +178,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param Circle[] $circles */ diff --git a/lib/Command/CirclesMaintenance.php b/lib/Command/CirclesMaintenance.php index 7e2acb049..eefa9e1d8 100644 --- a/lib/Command/CirclesMaintenance.php +++ b/lib/Command/CirclesMaintenance.php @@ -45,7 +45,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:maintenance') diff --git a/lib/Command/CirclesMemberships.php b/lib/Command/CirclesMemberships.php index d8ebbedd4..2fd89760e 100644 --- a/lib/Command/CirclesMemberships.php +++ b/lib/Command/CirclesMemberships.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use Exception; @@ -94,7 +92,6 @@ protected function configure() { ); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -178,7 +175,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param string $id * @param TreeNode $tree @@ -209,7 +205,6 @@ private function generateTree(string $id, TreeNode $tree, array $knownIds = []) } } - /** * @param SimpleDataStore $data * @param int $lineNumber @@ -249,8 +244,8 @@ public function displayLeaf(SimpleDataStore $data, int $lineNumber): string { if (!$this->configService->isLocalInstance($circle->getInstance())) { $line .= '@' . $circle->getInstance(); } - $line .= ' (' . ($this->input->getOption('display-name') ? - $circle->getDisplayName() : $circle->getName()) . ')'; + $line .= ' (' . ($this->input->getOption('display-name') + ? $circle->getDisplayName() : $circle->getName()) . ')'; $line .= ' MemberId: ' . $member->getId(); $line .= ' Level: ' . Member::$DEF_LEVEL[$member->getLevel()]; @@ -277,7 +272,6 @@ public function displayLeaf(SimpleDataStore $data, int $lineNumber): string { return ''; } - /** * @throws FederatedUserNotFoundException * @throws InitiatorNotFoundException diff --git a/lib/Command/CirclesRemote.php b/lib/Command/CirclesRemote.php index b912625f4..6e29066a1 100644 --- a/lib/Command/CirclesRemote.php +++ b/lib/Command/CirclesRemote.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use Exception; @@ -61,7 +59,6 @@ public function __construct( $this->setup('app', 'circles'); } - /** * */ @@ -81,7 +78,6 @@ protected function configure() { ->addOption('all', '', InputOption::VALUE_NONE, 'display all information'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -104,7 +100,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param string $host * @@ -149,7 +144,6 @@ private function requestInstance(string $host): void { $this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); $this->output->writeln(''); - $tempUid = $resource->g('uid'); $this->output->writeln( '- Confirming UID=' . $tempUid . ' from parsed Signatory at ' . $host . '' @@ -236,7 +230,6 @@ private function requestInstance(string $host): void { . ' is already known with this current identity' ); - $this->output->writeln('- updating item'); $this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_ITEM); @@ -274,7 +267,6 @@ private function requestInstance(string $host): void { } } - /** * @param RemoteInstance $remoteSignatory * @@ -306,7 +298,6 @@ private function saveRemote(RemoteInstance $remoteSignatory) { } } - /** * @param RemoteInstance $remoteSignatory * @@ -336,7 +327,6 @@ private function updateRemote(RemoteInstance $remoteSignatory): void { } } - /** * @param string $remote * @param array $payload @@ -386,8 +376,6 @@ private function verifyGSInstances(): void { } } - - private function checkRemoteInstances(): void { $instances = $this->remoteRequest->getAllInstances(); @@ -423,7 +411,6 @@ private function checkRemoteInstances(): void { $table->render(); } - /** * @throws Exception */ diff --git a/lib/Command/CirclesReport.php b/lib/Command/CirclesReport.php index 3171c3707..8f6715e85 100644 --- a/lib/Command/CirclesReport.php +++ b/lib/Command/CirclesReport.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -57,7 +55,6 @@ public function __construct( parent::__construct(); } - /** * */ @@ -69,7 +66,6 @@ protected function configure() { ->addOption('read', '', InputOption::VALUE_REQUIRED, 'File containing the report to read', ''); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -80,7 +76,6 @@ protected function configure() { */ protected function execute(InputInterface $input, OutputInterface $output): int { throw new \Exception('not available'); - $filename = $input->getOption('read'); $local = $input->getOption('local'); $this->output = $output; @@ -108,7 +103,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @throws InitiatorNotFoundException * @throws UnknownInterfaceException @@ -134,7 +128,6 @@ private function generateReport(): Report { return $report; } - /** * @param InputInterface $input * @param Report $report @@ -158,7 +151,6 @@ private function readReport(InputInterface $input, Report $report) { $interactiveShell->run(); } - /** * @param string $source * @param string $field @@ -171,7 +163,6 @@ public function fillCommandList(string $source, string $field): array { return ['abcd', 'abdde', 'erfg']; } - /** * @param string $command */ @@ -179,7 +170,6 @@ public function manageCommand(string $command): void { // echo $command . "\n"; } - /** * @param Circle $circle * @@ -217,11 +207,9 @@ private function obfuscateCircle(Circle $circle): Circle { $circle->setMemberships($memberships); } - return $circle; } - /** * @param Member $member * @@ -274,7 +262,6 @@ private function obfuscateMember(Member $member): Member { return $member; } - /** * @param FederatedUser $federatedUser * @@ -305,7 +292,6 @@ private function obfuscateFederatedUser(FederatedUser $federatedUser): Federated return $federatedUser; } - /** * @param Membership $membership * @@ -326,7 +312,6 @@ private function obfuscateMembership(Membership $membership): Membership { return $membership; } - /** * @param RemoteInstance $remoteInstance * @@ -336,7 +321,6 @@ private function obfuscateRemoteInstance(RemoteInstance $remoteInstance): Remote return $remoteInstance; } - /** * @param string $id * @@ -346,13 +330,12 @@ private function obfuscateId(string $id): string { return substr($id, 0, 5) . '.' . md5(substr($id, 5)); } - /** * @param NC22InteractiveShellSession $session */ public function onNewPrompt(NC22InteractiveShellSession $session): void { - $prompt = - 'Circles Report [' . $this->report->getSource() . ']:%PATH%'; + $prompt + = 'Circles Report [' . $this->report->getSource() . ']:%PATH%'; $commands = []; if ($session->getData()->g('currentStatus') === 'write') { @@ -368,7 +351,6 @@ public function onNewPrompt(NC22InteractiveShellSession $session): void { ->setPrompt($prompt); } - /** * @param NC22InteractiveShellSession $session * @param $command diff --git a/lib/Command/CirclesSetting.php b/lib/Command/CirclesSetting.php index 57fe12120..4ce40c4ec 100644 --- a/lib/Command/CirclesSetting.php +++ b/lib/Command/CirclesSetting.php @@ -66,7 +66,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -143,11 +142,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - private function testPassword(OutputInterface $output, Circle $circle, string $testPassword): void { $output->writeln(''); - $output->write('Password enforced for this Circle: '); if (!$this->configService->enforcePasswordOnSharedFile($circle)) { $output->writeln('no'); diff --git a/lib/Command/CirclesSync.php b/lib/Command/CirclesSync.php index ed79da48a..77fda94f5 100644 --- a/lib/Command/CirclesSync.php +++ b/lib/Command/CirclesSync.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -58,7 +56,6 @@ protected function configure() { ->addOption('global-scale', '', InputOption::VALUE_NONE, 'Sync GlobalScale'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -102,7 +99,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - private function filterSync(InputInterface $input): int { $sync = 0; if ($input->getOption('apps')) { diff --git a/lib/Command/CirclesTest.php b/lib/Command/CirclesTest.php index 0314bda2d..51acfc48e 100644 --- a/lib/Command/CirclesTest.php +++ b/lib/Command/CirclesTest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use Exception; @@ -46,7 +44,6 @@ class CirclesTest extends Base { use TStringTools; use TDeserialize; - public static $INSTANCES = [ 'global-scale-1', 'global-scale-2', @@ -56,12 +53,10 @@ class CirclesTest extends Base { 'trusted' ]; - public static $TEST_CIRCLES = [ 'test_001' ]; - /** @var InputInterface */ private $input; @@ -104,7 +99,6 @@ protected function configure() { ->addOption('only-setup', '', InputOption::VALUE_NONE, 'Stop after Circles Setup, pre-Sync'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -116,12 +110,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->input = $input; $this->output = $output; - // loading CirclesManager $circlesManager = Server::get(CirclesManager::class); // $circlesManager->startSuperSession(); - $federatedUser = $circlesManager->getFederatedUser('test1', Member::TYPE_USER); $circlesManager->startSession($federatedUser); @@ -139,7 +131,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int $circles = $circlesManager->getCircles($probe); - // display result $output = new ConsoleOutput(); $table = new Table($output->section()); @@ -169,7 +160,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int // $federatedUser->getMemberships(); - // get Circles available to test1 $federatedUser = $circlesManager->getFederatedUser('test1', Member::TYPE_USER); $circlesManager->startSession($federatedUser); @@ -178,7 +168,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int null ); - $output = new ConsoleOutput(); $table = new Table($output->section()); $table->setHeaders(['SingleId', 'Circle Name', 'Type']); @@ -195,11 +184,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $table->setRows($rows); $table->render(); - // exit return 0; - - $members = array_map( fn (Member $member): string => $member->getUserId() . ' ' . $member->getSingleId() . ' - ' . $member->getUserType(), $circle->getInheritedMembers() @@ -213,13 +199,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int // return $circle->getDisplayName(); // }, $circlesManager->getCircles()); return 0; - $circlesManager->stopSession(); - //echo json_encode($circles, JSON_PRETTY_PRINT); - // $circle = $circlesManager->createCircle('This is a test2'); // // @@ -242,7 +225,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int // // return 0; - // testing queryHelper; $circlesQueryHelper = $circlesManager->getQueryHelper(); @@ -255,7 +237,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int ) ->from('circles_test', 'test'); - /** @var FederatedUser $federatedUser */ $federatedUser = $circlesManager->getFederatedUser('test1', Member::TYPE_USER); @@ -280,7 +261,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int // // return 0; - if ($input->getOption('are-you-aware-this-will-delete-all-my-data') === 'yes-i-am') { try { $this->testCirclesApp(); @@ -314,7 +294,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @throws CircleNotFoundException * @throws InvalidItemException @@ -365,7 +344,6 @@ private function testCirclesApp() { // } - /** * @throws ItemNotFoundException */ @@ -391,7 +369,6 @@ private function loadConfiguration() { $this->r(true, $this->local); } - /** * @throws ItemNotFoundException */ @@ -426,7 +403,6 @@ private function initEnvironment() { } } - /** * @throws ItemNotFoundException */ @@ -444,7 +420,6 @@ private function reloadCirclesApp() { $this->r(); } - /** * @throws ItemNotFoundException */ @@ -459,7 +434,6 @@ private function configureCirclesApp() { $this->r(); } - /** * @throws ItemNotFoundException * @throws Exception @@ -478,7 +452,6 @@ private function confirmVersion() { $this->r(); } - /** * @throws ItemNotFoundException * @throws Exception @@ -495,7 +468,6 @@ private function confirmEmptyCircles() { $this->r(); } - /** * @throws ItemNotFoundException * @throws Exception @@ -509,7 +481,6 @@ private function syncCircles() { $this->r(); } - /** * @throws CircleNotFoundException * @throws InvalidItemException @@ -637,7 +608,6 @@ private function statusFreshInstances() { } } - /** * */ @@ -654,7 +624,6 @@ private function createRemoteLink() { } } - /** * @throws InvalidItemException * @throws ItemNotFoundException @@ -685,7 +654,6 @@ private function buildingLocalDatabase() { } } - /** * @throws InvalidItemException * @throws ItemNotFoundException @@ -696,8 +664,8 @@ private function circleCreation001() { $localInstanceId = 'global-scale-1'; $name = self::$TEST_CIRCLES[0]; $owner = $this->getInstanceUsers($localInstanceId)[1]; - $dataCreatedCircle001 = - $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name); + $dataCreatedCircle001 + = $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name); /** @var Circle $createdCircle */ $createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class); $this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle; @@ -727,7 +695,6 @@ private function circleCreation001() { $this->confirmCircleData($createdCircle, $compareTo, 'circle', true); $this->r(); - $this->p('Comparing local stored data'); $dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId()); @@ -739,8 +706,8 @@ private function circleCreation001() { $links = $this->getConfigArray('global-scale-1', 'remote'); foreach ($this->getInstances(false) as $instanceId) { $this->p('Comparing data stored on ' . $instanceId); - $dataCircle = - $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false); + $dataCircle + = $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false); if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') { /** @var Circle $tmpCircle */ @@ -760,7 +727,6 @@ private function circleCreation001() { } } - /** * @throws InvalidItemException * @throws ItemNotFoundException @@ -780,7 +746,6 @@ private function addLocalMemberByUserId() { // check test2 } - /** * @throws CircleNotFoundException * @throws InvalidItemException @@ -795,8 +760,8 @@ private function addLocalMemberBySingleId() { $userId = $this->getInstanceUsers($localInstanceId)[6]; $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); $user = $userCircle->getOwner(); - $dataAddedMember = - $this->occ( + $dataAddedMember + = $this->occ( $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() ); /** @var Member $addedMember */ @@ -807,7 +772,6 @@ private function addLocalMemberBySingleId() { // check test6 } - private function addLocalMemberUsingMember() { $this->p('Adding local member using local Member'); $localInstanceId = 'global-scale-1'; @@ -819,8 +783,8 @@ private function addLocalMemberUsingMember() { $userId = $this->getInstanceUsers($localInstanceId)[6]; $userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId); $user = $userCircle->getOwner(); - $dataAddedMember = - $this->occ( + $dataAddedMember + = $this->occ( $localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId() ); /** @var Member $addedMember */ @@ -885,7 +849,6 @@ private function removeLocalMemberUsingRemoteMember() { private function removeLocalMemberUsingRemoteAdmin() { } - private function removeRemoteMemberUsingRemoteMember() { // fail } @@ -991,7 +954,6 @@ private function confirmMemberData( } } - /** * @param string $expected * @param string $compare @@ -1023,7 +985,6 @@ private function compareInt(int $expected, int $compare, string $def, bool $forc } } - /** * @param bool $localIncluded * @@ -1038,7 +999,6 @@ private function getInstances(bool $localIncluded = true): array { return $instances; } - /** * @param array $circles * @param string $userId @@ -1058,7 +1018,6 @@ private function getSingleCircleForMember(array $circles, string $userId, string throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Team'); } - /** * @param string $instanceId * @param string $name @@ -1077,7 +1036,6 @@ private function getCircleByName(string $instanceId, string $name): Circle { ); } - /** * @param array $circles * @param string $name @@ -1097,7 +1055,6 @@ private function getCircleFromList(array $circles, string $name): Circle { ); } - /** * @param string $instance * @param string $key @@ -1124,7 +1081,6 @@ private function getConfigArray(string $instance, string $key): array { return $this->getArray($key, $config); } - /** * @param string $instance * @@ -1141,7 +1097,6 @@ private function getConfigInstance(string $instance): array { throw new ItemNotFoundException($instance . ' not found'); } - /** * @param $instanceId * @@ -1152,7 +1107,6 @@ private function getInstanceUsers($instanceId): array { return $this->getConfigArray($instanceId, 'users'); } - /** * @param string $instance * @param string $cmd @@ -1194,13 +1148,10 @@ private function occ( return $output; } - - // // // - /** * @param string $title */ @@ -1238,7 +1189,6 @@ private function r(bool $result = true, string $info = ''): void { } } - /** * @param string $instanceId * @param string $circleName @@ -1253,15 +1203,14 @@ private function r(bool $result = true, string $info = ''): void { private function processMemberAdd(string $instanceId, string $circleName, string $userId, string $type, ): Member { $circle = $this->getCircleByName($instanceId, $circleName); - $dataAddedMember = - $this->occ( + $dataAddedMember + = $this->occ( $instanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type ); /** @var Member $addedMember */ $addedMember = $this->deserialize($dataAddedMember, Member::class); - echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n"; $federatedUser = $this->federatedUsers[$instanceId][$userId]; diff --git a/lib/Command/MembersAdd.php b/lib/Command/MembersAdd.php index 49bfe8335..04a774f0b 100644 --- a/lib/Command/MembersAdd.php +++ b/lib/Command/MembersAdd.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use Exception; @@ -45,7 +43,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:add') @@ -58,7 +55,6 @@ protected function configure() { ->addOption('type', '', InputOption::VALUE_REQUIRED, 'type of the user', '0'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -102,7 +98,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param string $search * @param string $instance diff --git a/lib/Command/MembersDetails.php b/lib/Command/MembersDetails.php index 44cdd63fe..3770a33f8 100644 --- a/lib/Command/MembersDetails.php +++ b/lib/Command/MembersDetails.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -50,7 +48,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:details') @@ -61,7 +58,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/MembersLevel.php b/lib/Command/MembersLevel.php index c51ad7f67..834880b75 100644 --- a/lib/Command/MembersLevel.php +++ b/lib/Command/MembersLevel.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -53,7 +51,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:level') @@ -66,7 +63,6 @@ protected function configure() { ->addArgument('level', InputArgument::REQUIRED, 'new level'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/MembersList.php b/lib/Command/MembersList.php index 6b88b3692..b84fafaab 100644 --- a/lib/Command/MembersList.php +++ b/lib/Command/MembersList.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use Exception; @@ -61,7 +59,6 @@ class MembersList extends Base { use TConsoleTree; use TStringTools; - /** @var InputInterface */ private $input; @@ -79,7 +76,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:list') @@ -93,7 +89,6 @@ protected function configure() { ->addOption('tree', '', InputOption::VALUE_OPTIONAL, 'display members as a tree', false); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -201,8 +196,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int $member, $this->input->getOption('display-name') ), - ($level > 0) ? Member::$DEF_LEVEL[$level] : - '(' . strtolower($member->getStatus()) . ')', + ($level > 0) ? Member::$DEF_LEVEL[$level] + : '(' . strtolower($member->getStatus()) . ')', ($member->hasInvitedBy()) ? $this->configService->displayFederatedUser( $member->getInvitedBy(), $this->input->getOption('display-name') @@ -216,7 +211,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param string $circleId * @param string $instance @@ -341,7 +335,6 @@ private function getMembers( return $members; } - /** * @param SimpleDataStore $data * @param int $lineNumber diff --git a/lib/Command/MembersRemove.php b/lib/Command/MembersRemove.php index 1260e8cf9..8c8165ec3 100644 --- a/lib/Command/MembersRemove.php +++ b/lib/Command/MembersRemove.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -52,7 +50,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:remove') @@ -62,7 +59,6 @@ protected function configure() { ->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0'); } - /** * @param InputInterface $input * @param OutputInterface $output diff --git a/lib/Command/MembersSearch.php b/lib/Command/MembersSearch.php index 4b32d250d..12451bbe4 100644 --- a/lib/Command/MembersSearch.php +++ b/lib/Command/MembersSearch.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use OC\Core\Command\Base; @@ -37,7 +35,6 @@ public function __construct( parent::__construct(); } - protected function configure() { parent::configure(); $this->setName('circles:members:search') @@ -47,7 +44,6 @@ protected function configure() { ->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -66,7 +62,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } - /** * @param list $result */ diff --git a/lib/Command/MigrateCustomGroups.php b/lib/Command/MigrateCustomGroups.php index 4edf47a69..8718616ef 100644 --- a/lib/Command/MigrateCustomGroups.php +++ b/lib/Command/MigrateCustomGroups.php @@ -223,7 +223,6 @@ private function fixShareChildren(array $shareIds, array $memberIds): void { $this->output->writeln('> ' . ((string)$count) . ' children shares updated'); } - private function getSharedIds(string $groupUri): array { $select = $this->connection->getQueryBuilder(); $select->select('*') diff --git a/lib/Command/SharesFiles.php b/lib/Command/SharesFiles.php index c536548c7..0a2845231 100644 --- a/lib/Command/SharesFiles.php +++ b/lib/Command/SharesFiles.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Command; use InvalidArgumentException; @@ -61,7 +59,6 @@ protected function configure() { ->addOption('all', '', InputOption::VALUE_NONE, 'get all data about the shares'); } - /** * @param InputInterface $input * @param OutputInterface $output @@ -119,7 +116,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int // } } - /** * @param int $fileId * @param string $to @@ -211,7 +207,6 @@ private function displayShares( $table->render(); } - /** * @param int $fileId * @param string $to diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index 71d1d9beb..e0fb11077 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Controller; use Exception; @@ -50,7 +48,6 @@ class AdminController extends OCSController { /** @var ConfigService */ protected $configService; - /** * LocalController constructor. * @@ -81,7 +78,6 @@ public function __construct( $this->setup('app', 'circles'); } - /** * @param string $emulated * @param string $name @@ -115,7 +111,6 @@ public function create( } } - /** * @param string $emulated * @param string $circleId @@ -135,7 +130,6 @@ public function destroy(string $emulated, string $circleId): DataResponse { } } - /** * @param string $emulated * @param string $circleId @@ -176,7 +170,6 @@ public function memberAdd(string $emulated, string $circleId, string $userId, in } } - /** * @param string $emulated * @param string $circleId @@ -213,7 +206,6 @@ public function memberLevel(string $emulated, string $circleId, string $memberId } } - /** * @param string $emulated * @param int $limit @@ -239,7 +231,6 @@ public function circles(string $emulated, int $limit = -1, int $offset = 0): Dat } } - /** * @param string $emulated * @param string $circleId @@ -261,7 +252,6 @@ public function circleDetails(string $emulated, string $circleId): DataResponse } } - /** * @param string $emulated * @param string $circleId @@ -281,7 +271,6 @@ public function circleJoin(string $emulated, string $circleId): DataResponse { } } - /** * @param string $emulated * @param string $circleId @@ -301,7 +290,6 @@ public function circleLeave(string $emulated, string $circleId): DataResponse { } } - /** * @param string $emulated * @param string $circleId @@ -327,7 +315,6 @@ public function memberConfirm(string $emulated, string $circleId, string $member } } - /** * @param string $emulated * @param string $circleId @@ -350,7 +337,6 @@ public function memberRemove(string $emulated, string $circleId, string $memberI } } - /** * @param string $emulated * @param string $circleId @@ -369,7 +355,6 @@ public function members(string $emulated, string $circleId): DataResponse { } } - /** * @param string $emulated * @param string $circleId @@ -391,7 +376,6 @@ public function editName(string $emulated, string $circleId, string $value): Dat } } - /** * @param string $emulated * @param string $circleId @@ -413,7 +397,6 @@ public function editDescription(string $emulated, string $circleId, string $valu } } - /** * @param string $emulated * @param string $circleId @@ -436,10 +419,6 @@ public function editSetting(string $emulated, string $circleId, string $setting, } } - - - - /** * @param string $emulated * @param string $circleId @@ -461,7 +440,6 @@ public function editConfig(string $emulated, string $circleId, int $value): Data } } - /** * @param string $emulated * @param string $circleId @@ -482,7 +460,6 @@ public function link(string $emulated, string $circleId, string $singleId): Data } } - /** * @param string $emulated * diff --git a/lib/Controller/DeprecatedController.php b/lib/Controller/DeprecatedController.php index 732b1891b..623b518db 100644 --- a/lib/Controller/DeprecatedController.php +++ b/lib/Controller/DeprecatedController.php @@ -31,7 +31,6 @@ public function __construct( parent::__construct($appName, $request); } - /** * @NoSubAdminRequired * diff --git a/lib/Controller/EventWrapperController.php b/lib/Controller/EventWrapperController.php index 8c2b21753..aaded07dc 100644 --- a/lib/Controller/EventWrapperController.php +++ b/lib/Controller/EventWrapperController.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Controller; use OCA\Circles\AppInfo\Application; @@ -36,7 +34,6 @@ class EventWrapperController extends Controller { use TStringTools; use TAsync; - /** * EventWrapperController constructor. * @@ -64,7 +61,6 @@ public function __construct( $this->setupInt(self::$SETUP_TIME_LIMIT, 900); } - /** * Called locally. * diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index 709302c81..20a3424c4 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Controller; use Exception; diff --git a/lib/Controller/RemoteController.php b/lib/Controller/RemoteController.php index afc6fdf98..c750fccec 100644 --- a/lib/Controller/RemoteController.php +++ b/lib/Controller/RemoteController.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Controller; use Exception; @@ -87,7 +85,6 @@ public function __construct( $this->setupArray('enforceSignatureHeaders', ['digest', 'content-length']); } - /** * * @param string $test @@ -112,7 +109,6 @@ public function appService(string $test = ''): DataResponse { return new DataResponse($signatory); } - /** * * @return DataResponse @@ -137,7 +133,6 @@ public function event(): DataResponse { } } - /** * * @return DataResponse @@ -162,7 +157,6 @@ public function incoming(): DataResponse { } } - /** * * @return DataResponse @@ -182,7 +176,6 @@ public function test(): DataResponse { } } - /** * * @return DataResponse @@ -215,7 +208,6 @@ public function circles(): DataResponse { } } - /** * * @param string $circleId @@ -240,7 +232,6 @@ public function circle(string $circleId): DataResponse { } } - /** * * @param string $circleId @@ -265,7 +256,6 @@ public function members(string $circleId): DataResponse { } } - /** * ?? TODO: rename /member/ to /federatedUser/ ou /federated/ ? * @@ -304,7 +294,6 @@ public function member(string $type, string $userId): DataResponse { } } - /** * * @param string $circleId @@ -329,7 +318,6 @@ public function inherited(string $circleId): DataResponse { } } - /** * * @param string $circleId @@ -354,7 +342,6 @@ public function memberships(string $circleId): DataResponse { } } - /** * @return FederatedEvent * @throws InvalidItemException @@ -369,8 +356,8 @@ private function extractEventFromRequest(): FederatedEvent { // will throw exception if instance is not configured for this event. $this->interfaceService->setCurrentInterfaceFromRequest($this->request); $iface = $this->interfaceService->getCurrentInterface(); - if ($iface === InterfaceService::IFACE_FRONTAL && - !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { + if ($iface === InterfaceService::IFACE_FRONTAL + && !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { throw new FederatedEventException('frontal interface is not enabled'); } @@ -384,7 +371,6 @@ private function extractEventFromRequest(): FederatedEvent { return $event; } - /** * @return SimpleDataStore * @throws FederatedUserException @@ -434,7 +420,6 @@ private function extractDataFromFromRequest(): SimpleDataStore { return $data; } - /** * @param NCSignedRequest $signedRequest * @@ -461,7 +446,6 @@ private function confirmRemoteInstance(NCSignedRequest $signedRequest): RemoteIn return $signatory; } - /** * @param Exception $e * @param int $httpErrorCode @@ -486,7 +470,6 @@ public function exceptionResponse( ); } - /** * use this one if a method from a Controller is only PublicPage when remote client asking for Json * @@ -509,7 +492,6 @@ private function publicPageJsonLimited(): void { } } - /** * @return bool */ @@ -523,7 +505,6 @@ private function jsonRequested(): bool { )); } - /** * @param array $needles * diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 6bc8bc0b5..ef8be13bb 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -75,9 +75,9 @@ private function getFrontalValue(): ?string { return null; } - return $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_SCHEME) . '://' . - $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_ID) . - $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_PATH) . '/'; + return $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_SCHEME) . '://' + . $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_ID) + . $this->appConfig->getAppValueString(ConfigService::FRONTAL_CLOUD_PATH) . '/'; } private function parseFrontalAddress(string $url): ?array { diff --git a/lib/Controller/TeamsDashboardController.php b/lib/Controller/TeamsDashboardController.php index 91d1b09cd..11a2997c7 100644 --- a/lib/Controller/TeamsDashboardController.php +++ b/lib/Controller/TeamsDashboardController.php @@ -65,16 +65,16 @@ public function getCompleteTeamsData(int $limit = 3, int $offset = 0): DataRespo ->setItemsOffset($offset); $circles = $this->circleService->probeCircles($probe); - + $teams = []; foreach ($circles as $circle) { $members = []; try { $circleMembers = $this->memberService->getMembers($circle->getSingleId(), false); - + // Limit to 5 members for the dashboard widget $limitedMembers = array_slice($circleMembers, 0, 5); - + foreach ($limitedMembers as $member) { $members[] = [ 'singleId' => $member->getSingleId(), @@ -99,7 +99,7 @@ public function getCompleteTeamsData(int $limit = 3, int $offset = 0): DataRespo } catch (\Exception $e) { $this->logger->warning('Failed to fetch resources for circle ' . $circle->getSingleId() . ': ' . $e->getMessage()); } - + $teams[] = [ 'singleId' => $circle->getSingleId(), 'displayName' => $circle->getDisplayName(), diff --git a/lib/Cron/Maintenance.php b/lib/Cron/Maintenance.php index a44b2fdcb..bf0823b25 100644 --- a/lib/Cron/Maintenance.php +++ b/lib/Cron/Maintenance.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Cron; use OCA\Circles\Service\MaintenanceService; @@ -31,7 +29,6 @@ public function __construct( $this->setTimeSensitivity(IJob::TIME_SENSITIVE); } - /** * @param $argument */ diff --git a/lib/Cron/MaintenanceHeavy.php b/lib/Cron/MaintenanceHeavy.php index 934c47e01..141ec6643 100644 --- a/lib/Cron/MaintenanceHeavy.php +++ b/lib/Cron/MaintenanceHeavy.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Cron; use OCA\Circles\Service\MaintenanceService; @@ -31,7 +29,6 @@ public function __construct( $this->setTimeSensitivity(IJob::TIME_INSENSITIVE); } - /** * @param $argument */ diff --git a/lib/Dashboard/TeamDashboardWidget.php b/lib/Dashboard/TeamDashboardWidget.php index ddca138aa..54c608a74 100644 --- a/lib/Dashboard/TeamDashboardWidget.php +++ b/lib/Dashboard/TeamDashboardWidget.php @@ -27,7 +27,6 @@ public function __construct( ) { } - /** * @inheritDoc */ @@ -97,7 +96,7 @@ private function getTeamPage(): string { } public function isEnabled(): bool { - return $this->appManager->isEnabledForUser('contacts') && - $this->configService->getAppValueBool(ConfigService::FRONTEND_ENABLED); + return $this->appManager->isEnabledForUser('contacts') + && $this->configService->getAppValueBool(ConfigService::FRONTEND_ENABLED); } } diff --git a/lib/Db/AccountsRequest.php b/lib/Db/AccountsRequest.php index 2b7d343de..b5234a48f 100644 --- a/lib/Db/AccountsRequest.php +++ b/lib/Db/AccountsRequest.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MemberDoesNotExistException; @@ -14,8 +13,6 @@ class AccountsRequest extends AccountsRequestBuilder { use TStringTools; - - public function getAccountData(string $userId): array { $qb = $this->getAccountsSelectSql(); @@ -32,8 +29,6 @@ public function getAccountData(string $userId): array { return $this->parseAccountsSelectSql($data); } - - /** * @param string $userId * @@ -57,7 +52,6 @@ public function getFromUserId(string $userId): array { return $this->parseAccountsSelectSql($data); } - /** * @deprecated * @return array diff --git a/lib/Db/AccountsRequestBuilder.php b/lib/Db/AccountsRequestBuilder.php index ac0339129..c67e300a7 100644 --- a/lib/Db/AccountsRequestBuilder.php +++ b/lib/Db/AccountsRequestBuilder.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Tools\Traits\TArrayTools; @@ -19,7 +18,6 @@ class AccountsRequestBuilder extends DeprecatedRequestBuilder { use TArrayTools; - /** * Base of the Sql Insert request for Accounts * @@ -32,7 +30,6 @@ protected function getAccountsInsertSql() { return $qb; } - /** * Base of the Sql Update request for Accounts * @@ -45,7 +42,6 @@ protected function getAccountsUpdateSql() { return $qb; } - /** * @return IQueryBuilder */ @@ -61,7 +57,6 @@ protected function getAccountsSelectSql() { return $qb; } - /** * Base of the Sql Delete request * @@ -74,7 +69,6 @@ protected function getAccountsDeleteSql() { return $qb; } - /** * @param array $entry * diff --git a/lib/Db/CircleRequest.php b/lib/Db/CircleRequest.php index 0388c6b4c..5cd18172e 100644 --- a/lib/Db/CircleRequest.php +++ b/lib/Db/CircleRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\CircleNotFoundException; @@ -54,7 +52,6 @@ public function save(Circle $circle): void { $qb->executeStatement(); } - /** * @param Circle $circle */ @@ -86,7 +83,6 @@ public function update(Circle $circle) { $qb->executeStatement(); } - /** * @param Circle $circle * @@ -101,7 +97,6 @@ public function insertOrUpdate(Circle $circle): void { } } - /** * @param string $singleId * @param string $displayName @@ -115,7 +110,6 @@ public function updateDisplayName(string $singleId, string $displayName): void { $qb->executeStatement(); } - /** * @param Circle $circle */ @@ -128,7 +122,6 @@ public function updateConfig(Circle $circle) { $qb->executeStatement(); } - /** * @param Circle $circle */ @@ -140,7 +133,6 @@ public function updateSettings(Circle $circle) { $qb->executeStatement(); } - /** * @param IFederatedUser|null $initiator * @param CircleProbe $probe @@ -183,7 +175,6 @@ public function getCircles(?IFederatedUser $initiator, CircleProbe $probe): arra return $this->getItemsFromRequest($qb); } - /** * get data about single Circle. * @@ -320,7 +311,6 @@ private function buildProbeCircle( return $qb; } - /** * @param array $circleIds * @@ -392,7 +382,6 @@ public function getCircle( return $this->getItemFromRequest($qb); } - /** * @param string $singleId * @@ -418,7 +407,6 @@ public function getFederatedUserBySingleId(string $singleId): FederatedUser { return $federatedUser; } - /** * method that return the single-user Circle based on a FederatedUser. * @@ -449,7 +437,6 @@ public function getSingleCircle(IFederatedUser $initiator): Circle { } } - /** * @param Circle $circle * @param IFederatedUser|null $initiator @@ -497,7 +484,6 @@ public function searchCircle(Circle $circle, ?IFederatedUser $initiator = null): return $this->getItemFromRequest($qb); } - /** * @return Circle[] * @throws RequestBuilderException @@ -511,7 +497,6 @@ public function getFederated(): array { return $this->getItemsFromRequest($qb); } - /** * @param Circle $circle */ @@ -522,7 +507,6 @@ public function delete(Circle $circle): void { $qb->executeStatement(); } - /** * @param IFederatedUser $federatedUser */ diff --git a/lib/Db/CircleRequestBuilder.php b/lib/Db/CircleRequestBuilder.php index 1f5a2bad6..1d5491fb3 100644 --- a/lib/Db/CircleRequestBuilder.php +++ b/lib/Db/CircleRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\CircleNotFoundException; @@ -33,7 +31,6 @@ protected function getCircleInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -44,7 +41,6 @@ protected function getCircleUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param string $alias * @param bool $single @@ -65,7 +61,6 @@ protected function getCircleSelectSql( return $qb; } - /** * Base of the Sql Delete request * @@ -78,7 +73,6 @@ protected function getCircleDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder&IQueryBuilder $qb * diff --git a/lib/Db/CoreQueryBuilder.php b/lib/Db/CoreQueryBuilder.php index 93c4da6f8..f6c76c9cf 100644 --- a/lib/Db/CoreQueryBuilder.php +++ b/lib/Db/CoreQueryBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use Doctrine\DBAL\Query\QueryBuilder; @@ -35,7 +33,6 @@ class CoreQueryBuilder extends ExtendedQueryBuilder { use TArrayTools; - public const SINGLE = 'a'; public const CIRCLE = 'b'; public const MEMBER = 'c'; @@ -60,7 +57,6 @@ class CoreQueryBuilder extends ExtendedQueryBuilder { public const OPTIONS = 'v'; public const HELPER = 'w'; - public static $SQL_PATH = [ self::SINGLE => [ self::MEMBER @@ -210,7 +206,6 @@ class CoreQueryBuilder extends ExtendedQueryBuilder { ] ]; - /** @var ConfigService */ private $configService; @@ -226,7 +221,6 @@ public function __construct() { $this->configService = Server::get(ConfigService::class); } - /** * @param IFederatedModel $federatedModel * @@ -238,7 +232,6 @@ public function getInstance(IFederatedModel $federatedModel): string { return ($this->configService->isLocalInstance($instance)) ? '' : $instance; } - /** * @param string $id */ @@ -289,7 +282,6 @@ public function limitToConfigFlag(int $config, string $alias = ''): void { $this->limitBitwise('config', $config, $alias); } - /** * @param string $singleId */ @@ -297,12 +289,10 @@ public function limitToSingleId(string $singleId, string $alias = ''): void { $this->limit('single_id', $singleId, $alias, true); } - public function limitToUserId(string $userId, string $alias = ''): void { $this->limit('user_id', $userId, $alias, true); } - /** * @param string $itemId */ @@ -310,7 +300,6 @@ public function limitToItemId(string $itemId): void { $this->limit('item_id', $itemId, '', true); } - /** * @param string $host */ @@ -318,7 +307,6 @@ public function limitToInstance(string $host): void { $this->limit('instance', $host, '', false); } - /** * @param int $userType */ @@ -326,7 +314,6 @@ public function limitToUserType(int $userType): void { $this->limitInt('user_type', $userType); } - /** * @param int $shareType */ @@ -334,7 +321,6 @@ public function limitToShareType(int $shareType): void { $this->limitInt('share_type', $shareType); } - /** * @param string $shareWith */ @@ -342,7 +328,6 @@ public function limitToShareWith(string $shareWith): void { $this->limit('share_with', $shareWith, '', true); } - /** * @param int $nodeId */ @@ -381,7 +366,6 @@ public function limitToFileSourceArray(array $files): void { $this->limitInArray('file_source', $files, type: IQueryBuilder::PARAM_INT_ARRAY); } - /** * @param int $shareId */ @@ -389,7 +373,6 @@ public function limitToShareParent(int $shareId): void { $this->limitInt('parent', $shareId); } - /** * filter result on details (ie. displayName, Description, ...) * @@ -424,7 +407,6 @@ public function filterCircleDetails(Circle $circle): void { } } - /** * left join RemoteInstance based on a Member */ @@ -442,7 +424,6 @@ public function leftJoinRemoteInstance(string $alias): void { } } - /** * @param string $alias * @param RemoteInstance $remoteInstance @@ -467,7 +448,6 @@ public function limitToRemoteInstance( $this->limitRemoteVisibility($alias, $filterSensitiveData, $aliasCircle); } - /** * Left join RemoteInstance based on an incoming request * @@ -492,7 +472,6 @@ public function leftJoinRemoteInstanceIncomingRequest( ); } - /** * left join members to check memberships of someone from instance * @@ -526,7 +505,6 @@ private function leftJoinMemberFromInstance( ); } - /** * left join circle is member of a circle from remote instance * @@ -573,7 +551,6 @@ private function leftJoinMemberFromRemoteCircle( ); } - /** * - global_scale: visibility on all Circles * - trusted: visibility on all FEDERATED Circle if owner is local @@ -633,7 +610,6 @@ protected function limitRemoteVisibility(string $alias, bool $sensitive, string $this->andWhere($expr->orX(...$orX)); } - /** * @param string $alias * @param Member $member @@ -660,7 +636,6 @@ public function limitToDirectMembership(string $alias, Member $member): void { $this->filterDirectMembership($aliasMember, $member); } - /** * @param string $alias * @param string $aliasCircle @@ -690,7 +665,6 @@ public function limitToFederatedUserMemberships( ); } - /** * @param string $aliasMember * @param Member $member @@ -727,7 +701,6 @@ public function filterDirectMembership(string $aliasMember, Member $member): voi $this->andWhere($expr->andX(...$andX)); } - /** * @param string $alias * @param IFederatedUser|null $initiator @@ -769,7 +742,6 @@ public function leftJoinCircle( $this->leftJoinOwner($aliasCircle); } - /** * @param string $aliasMember * @@ -796,7 +768,6 @@ public function leftJoinInvitedBy(string $aliasMember): void { $this->leftJoinOwner($aliasInvitedBy); } - /** * @param string $aliasMember * @param IFederatedUser|null $initiator @@ -830,7 +801,6 @@ public function leftJoinBasedOn( } } - /** * @param string $alias * @param string $field @@ -865,7 +835,6 @@ public function leftJoinOwner(string $alias, string $field = 'unique_id'): void $this->leftJoinBasedOn($aliasMember); } - /** * @param CircleProbe $probe * @param string $alias @@ -900,7 +869,6 @@ public function innerJoinMembership( ->innerJoin($alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership, $on); } - /** * @param string $alias * @param string $fieldCircleId @@ -939,7 +907,6 @@ public function leftJoinMember( $this->leftJoinBasedOn($aliasMember); } - /** * if 'getData' is true, will returns 'inheritanceBy': the Member at the end of a sub-chain of * memberships (based on $field for Top Circle's singleId) @@ -984,7 +951,6 @@ public function leftJoinInheritedMembers( $this->leftJoinBasedOn($aliasInheritedBy); } - /** * @throws RequestBuilderException */ @@ -1005,7 +971,6 @@ public function limitToInheritedMemberships(string $alias, string $singleId, str $this->andWhere($orX); } - /** * limit the request to Members and Sub Members of a Circle. * @@ -1031,7 +996,6 @@ public function limitToMembersByInheritance(string $alias, string $singleId, int } } - /** * if 'getData' is true, will returns 'inheritanceFrom': the Circle-As-Member of the Top Circle * that explain the membership of a Member (based on $field for singleId) to a specific Circle @@ -1072,7 +1036,6 @@ public function leftJoinMembersByInheritance(string $alias, string $field = ''): ); } - /** * @param string $alias * @param string $token @@ -1111,7 +1074,6 @@ public function leftJoinShareToken(string $alias, string $field = ''): void { ); } - /** * limit the result to the point of view of a FederatedUser * @@ -1140,7 +1102,6 @@ public function limitToInitiator( return $where; } - /** * @param string $alias */ @@ -1162,7 +1123,6 @@ public function leftJoinCircleConfig(string $alias): void { } } - /** * Left join members to filter userId as initiator. * @@ -1198,7 +1158,6 @@ public function leftJoinInitiator( ) ); - $listMembershipCircleAlias = [$aliasMembership]; if ($this->getBool('initiatorDirectMember', $options, false)) { try { @@ -1252,7 +1211,6 @@ public function leftJoinInitiator( } } - try { $aliasInitiator = $this->generateAlias($alias, self::INITIATOR, $options); $this->leftJoin( @@ -1290,7 +1248,6 @@ public function leftJoinInitiator( } } - public function completeProbeWithInitiator( string $alias, string $field = 'single_id', @@ -1413,7 +1370,6 @@ protected function limitInitiatorVisibility(string $alias): ICompositeExpression return $orX; } - /** * @param string $aliasCircle * @param CircleProbe $probe @@ -1425,7 +1381,6 @@ public function filterCircles(string $aliasCircle, CircleProbe $probe): void { $this->filterBitwise('config', $config, $aliasCircle); } - /** * Limit visibility on Sensitive information when search for members. * @@ -1449,7 +1404,6 @@ private function limitRemoteVisibility_Sensitive_Members(string $alias): ICompos ); } - /** * Link to storage/filecache * @@ -1485,7 +1439,6 @@ public function leftJoinFileCache(string $aliasShare) { ); } - /** * @param string $aliasShare * @param string $aliasShareMemberships @@ -1521,7 +1474,6 @@ public function leftJoinShareChild(string $aliasShare, string $aliasShareMembers return $aliasShareChild; } - /** * @param string $alias * @param FederatedUser $federatedUser @@ -1547,7 +1499,6 @@ public function limitToShareOwner( } } - /** * @param string $aliasMount * @param string $aliasMountMemberships @@ -1574,7 +1525,6 @@ public function leftJoinMountpoint(string $aliasMount, IFederatedUser $federated $this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash'); } - /** * @param list $paths */ @@ -1600,7 +1550,6 @@ public function limitToMountpoints(string $aliasMount, array $paths, bool $forCh $this->andWhere($orX); } - /** * @param string $alias * @param array $default @@ -1635,7 +1584,6 @@ private function generateMemberSelectAlias(string $alias, array $default = []): return $this; } - /** * @param string $alias * @param array $default @@ -1658,7 +1606,6 @@ private function generateMembershipSelectAlias( return $this; } - /** * @param string $alias * @param array $default @@ -1676,7 +1623,6 @@ private function generateRemoteInstanceSelectAlias(string $alias, array $default return $this; } - /** * @param array $path * @param array $options @@ -1694,7 +1640,6 @@ public function setOptions(array $path, array $options): self { return $this; } - /** * @param string $base * @param string $extension @@ -1728,7 +1673,6 @@ public function generateAlias(string $base, string $extension, ?array &$options return $base . '_' . $extension; } - /** * @param string $prefix * @@ -1751,7 +1695,6 @@ public function getAvailablePath(string $prefix): array { return $path; } - /** * @return array */ @@ -1763,7 +1706,6 @@ public function getSqlPath(): array { return $this->sqlPath; } - /** * DataProbe uses this to set which data need to be extracted, based on self::$SQL_PATH. * diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index e02a19dca..f20a5d565 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use Exception; @@ -138,7 +136,6 @@ class CoreRequestBuilder { self::TABLE_GSSHARES_MOUNTPOINT => [] ]; - public static $outsideTables = [ self::TABLE_SHARE => [ 'id', @@ -190,7 +187,6 @@ class CoreRequestBuilder { /** @var ConfigService */ protected $configService; - /** * CoreQueryBuilder constructor. * @@ -202,7 +198,6 @@ public function __construct(TimezoneService $timezoneService, ConfigService $con $this->configService = $configService; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -212,7 +207,6 @@ public function getQueryBuilder(): CoreQueryBuilder { return $qb; } - /** * @param array $ids * @@ -235,7 +229,6 @@ public function confirmValidId(string $id): void { } } - /** * @param bool $shares */ @@ -258,7 +251,6 @@ public function cleanDatabase(bool $shares = false): void { } } - public function uninstall(): void { $this->uninstallAppTables(); $this->uninstallFromMigrations(); @@ -282,7 +274,6 @@ public function uninstallAppTables() { $schema->performDropTableCalls(); } - /** * */ diff --git a/lib/Db/DeprecatedRequestBuilder.php b/lib/Db/DeprecatedRequestBuilder.php index f9dbe982e..2cc4c2a83 100644 --- a/lib/Db/DeprecatedRequestBuilder.php +++ b/lib/Db/DeprecatedRequestBuilder.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Db; use Doctrine\DBAL\Query\QueryBuilder; @@ -47,7 +48,6 @@ class DeprecatedRequestBuilder { self::TABLE_GSSHARES_MOUNTPOINT ]; - /** @var IDBConnection */ protected $dbConnection; @@ -69,7 +69,6 @@ class DeprecatedRequestBuilder { /** @var bool */ protected $leftJoinedNCGroupAndUser = false; - /** * CoreQueryBuilder constructor. * @@ -90,7 +89,6 @@ public function __construct( $this->miscService = $miscService; } - /** * Limit the request by its Id. * @@ -101,7 +99,6 @@ protected function limitToId(IQueryBuilder $qb, $id) { $this->limitToDBField($qb, 'id', $id); } - /** * Limit the request by its UniqueId. * @@ -112,7 +109,6 @@ protected function limitToUniqueId(IQueryBuilder $qb, $uniqueId) { $this->limitToDBField($qb, 'unique_id', $uniqueId); } - /** * Limit the request by its addressbookId. * @@ -123,7 +119,6 @@ protected function limitToAddressBookId(IQueryBuilder $qb, $bookId) { $this->limitToDBField($qb, 'contact_addressbook', (string)$bookId); } - /** * Limit the request by its addressbookId. * @@ -134,7 +129,6 @@ protected function limitToContactGroup(IQueryBuilder $qb, $groupName) { $this->limitToDBField($qb, 'contact_groupname', $groupName); } - /** * Limit the request to the Circle by its Id. * @@ -145,7 +139,6 @@ protected function limitToContactId(IQueryBuilder $qb, $contactId) { $this->limitToDBField($qb, 'contact_id', $contactId); } - /** * Limit the request by its Token. * @@ -156,7 +149,6 @@ protected function limitToToken(IQueryBuilder $qb, $token) { $this->limitToDBField($qb, 'token', $token); } - /** * Limit the request to the User by its Id. * @@ -167,7 +159,6 @@ protected function limitToUserId(IQueryBuilder $qb, $userId) { $this->limitToDBField($qb, 'user_id', $userId); } - /** * Limit the request to the owner * @@ -178,7 +169,6 @@ protected function limitToOwner(IQueryBuilder $qb, $owner) { $this->limitToDBField($qb, 'owner', $owner); } - /** * Limit the request to the Member by its Id. * @@ -189,7 +179,6 @@ protected function limitToMemberId(IQueryBuilder $qb, string $memberId) { $this->limitToDBField($qb, 'member_id', $memberId); } - /** * Limit the request to the Type entry. * @@ -200,7 +189,6 @@ protected function limitToUserType(IQueryBuilder $qb, $type) { $this->limitToDBField($qb, 'user_type', $type); } - /** * Limit the request to the Instance. * @@ -211,7 +199,6 @@ protected function limitToInstance(IQueryBuilder $qb, string $instance) { $this->limitToDBField($qb, 'instance', $instance); } - /** * Limit the request to the Circle by its Id. * @@ -222,7 +209,6 @@ protected function limitToCircleId(IQueryBuilder $qb, $circleUniqueId) { $this->limitToDBField($qb, 'circle_id', $circleUniqueId); } - /** * Limit the request to the Circle by its Id. * @@ -233,7 +219,6 @@ protected function limitToShareId(IQueryBuilder $qb, int $shareId) { $this->limitToDBField($qb, 'share_id', $shareId); } - /** * Limit the request to the Circle by its Id. * @@ -275,7 +260,6 @@ protected function limitToMountpointHash(IQueryBuilder $qb, string $hash) { // // } - /** * Limit the request to the Group by its Id. * @@ -286,7 +270,6 @@ protected function limitToGroupId(IQueryBuilder $qb, $groupId) { $this->limitToDBField($qb, 'group_id', $groupId); } - /** * Limit the search by its Name * @@ -297,7 +280,6 @@ protected function limitToName(IQueryBuilder $qb, $name) { $this->limitToDBField($qb, 'name', $name); } - /** * Limit the search by its Status (or greater) * @@ -308,7 +290,6 @@ protected function limitToStatus(IQueryBuilder $qb, $name) { $this->limitToDBFieldOrGreater($qb, 'status', $name); } - /** * Limit the request by its Id. * @@ -319,7 +300,6 @@ protected function limitToShareType(IQueryBuilder $qb, string $type) { $this->limitToDBField($qb, 'share_type', $type); } - /** * Limit the request by its Id. * @@ -330,7 +310,6 @@ protected function limitToShareWith(IQueryBuilder $qb, string $with) { $this->limitToDBField($qb, 'share_with', $with); } - /** * Limit the request to a minimum member level. * @@ -358,7 +337,6 @@ protected function limitToLevel(IQueryBuilder $qb, int $level, $pf = '') { $qb->andWhere($orX); } - /** * @param IQueryBuilder $qb * @param int $level @@ -380,7 +358,6 @@ private function generateLimitToLevelMultipleTableRequest(IQueryBuilder $qb, int return $expr->orX(...$orX); } - /** * Limit the search to Members and Almost members * @@ -398,7 +375,6 @@ protected function limitToMembersAndAlmost(IQueryBuilder $qb) { )); } - /** * @param IQueryBuilder $qb * @param string $field @@ -410,7 +386,6 @@ public function limitToDBField(IQueryBuilder $qb, $field, $value) { $qb->andWhere($expr->eq($pf . $field, $qb->createNamedParameter($value))); } - /** * @param IQueryBuilder $qb * @param string $field @@ -422,7 +397,6 @@ private function limitToDBFieldOrGreater(IQueryBuilder $qb, $field, $value) { $qb->andWhere($expr->gte($pf . $field, $qb->createNamedParameter($value))); } - /** * link to the groupId/UserId of the NC DB. * If userId is empty, we add the uid of the NCGroup Table in the select list with 'user_id' @@ -447,7 +421,6 @@ protected function limitToNCGroupUser(IQueryBuilder $qb, $userId = '') { $qb->andWhere($and); } - /** * Left Join circle table to get more information about the circle. * @@ -472,7 +445,6 @@ protected function leftJoinCircle(IQueryBuilder $qb) { ); } - /** * link to the groupId/UserId of the NC DB. * diff --git a/lib/Db/EventWrapperRequest.php b/lib/Db/EventWrapperRequest.php index 14e2e9f79..73b5d07df 100644 --- a/lib/Db/EventWrapperRequest.php +++ b/lib/Db/EventWrapperRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Model\Federated\EventWrapper; @@ -68,7 +66,6 @@ public function update(EventWrapper $wrapper): void { $qb->executeStatement(); } - /** * @param string $token * @param int $status @@ -82,7 +79,6 @@ public function updateAll(string $token, int $status): void { $qb->executeStatement(); } - /** * returns unique token not set as FAILED * @@ -109,7 +105,6 @@ public function getFailedEvents(array $retryRange): array { return $this->getItemsFromRequest($qb); } - /** * @param string $token * diff --git a/lib/Db/EventWrapperRequestBuilder.php b/lib/Db/EventWrapperRequestBuilder.php index f025614af..daa5c6808 100644 --- a/lib/Db/EventWrapperRequestBuilder.php +++ b/lib/Db/EventWrapperRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\EventWrapperNotFoundException; @@ -32,7 +30,6 @@ protected function getEventWrapperInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -43,7 +40,6 @@ protected function getEventWrapperUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -59,7 +55,6 @@ protected function getEventWrapperSelectSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -70,7 +65,6 @@ protected function getEventWrapperDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/FileSharesRequest.php b/lib/Db/FileSharesRequest.php index 38811b973..f806fdb33 100644 --- a/lib/Db/FileSharesRequest.php +++ b/lib/Db/FileSharesRequest.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Model\DeprecatedMember; @@ -35,7 +34,6 @@ public function removeSharesFromMember(DeprecatedMember $member): void { $qb->executeStatement(); } - /** * @param string $circleId */ @@ -51,7 +49,6 @@ public function removeSharesToCircleId(string $circleId): void { $qb->executeStatement(); } - /** * @param string $circleId * @@ -73,7 +70,6 @@ public function getSharesForCircle(string $circleId): array { return $shares; } - /** * @return array */ diff --git a/lib/Db/FileSharesRequestBuilder.php b/lib/Db/FileSharesRequestBuilder.php index d99b6ed47..030666a8f 100644 --- a/lib/Db/FileSharesRequestBuilder.php +++ b/lib/Db/FileSharesRequestBuilder.php @@ -32,7 +32,6 @@ protected function getFileSharesDeleteSql(): IQueryBuilder { return $qb; } - /** * @return IQueryBuilder */ @@ -58,7 +57,6 @@ protected function getFileSharesSelectSql(): IQueryBuilder { return $qb; } - /** * @return IQueryBuilder */ diff --git a/lib/Db/GSSharesRequest.php b/lib/Db/GSSharesRequest.php index 6aaa7b221..7aa5487cb 100644 --- a/lib/Db/GSSharesRequest.php +++ b/lib/Db/GSSharesRequest.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Model\DeprecatedMember; @@ -24,7 +23,6 @@ class GSSharesRequest extends GSSharesRequestBuilder { use TStringTools; - /** * @param GSShare $gsShare */ @@ -41,7 +39,6 @@ public function create(GSShare $gsShare): void { $qb->executeStatement(); } - /** * @param string $userId * @@ -63,7 +60,6 @@ public function getForUser(string $userId): array { return $shares; } - /** * @param DeprecatedMember $member */ @@ -76,7 +72,6 @@ public function removeGSSharesFromMember(DeprecatedMember $member) { $qb->executeStatement(); } - /** * @param IQueryBuilder $qb * @param string $userId @@ -95,7 +90,6 @@ private function joinMembership(IQueryBuilder $qb, string $userId) { )); } - private function leftJoinMountPoint(IQueryBuilder $qb, string $userId) { $expr = $qb->expr(); $pf = '' . $this->default_select_alias . '.'; @@ -110,7 +104,6 @@ private function leftJoinMountPoint(IQueryBuilder $qb, string $userId) { ->leftJoin($this->default_select_alias, DeprecatedRequestBuilder::TABLE_GSSHARES_MOUNTPOINT, 'mp', $on); } - /** * @param string $userId * @param string $target @@ -136,7 +129,6 @@ public function getShareMountPointByPath(string $userId, string $target): GSShar return $this->parseGSSharesMountpointSelectSql($data); } - /** * @param int $gsShareId * @param string $userId @@ -160,7 +152,6 @@ public function getShareMountPointById(int $gsShareId, string $userId): GSShareM return $this->parseGSSharesMountpointSelectSql($data); } - /** * @param GSShareMountpoint $mountpoint */ @@ -176,7 +167,6 @@ public function generateShareMountPoint(GSShareMountpoint $mountpoint) { $qb->executeStatement(); } - /** * @param GSShareMountpoint $mountpoint * diff --git a/lib/Db/GSSharesRequestBuilder.php b/lib/Db/GSSharesRequestBuilder.php index dac44d8a2..1da034778 100644 --- a/lib/Db/GSSharesRequestBuilder.php +++ b/lib/Db/GSSharesRequestBuilder.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Model\GlobalScale\GSShare; @@ -31,7 +30,6 @@ protected function getGSSharesInsertSql() { return $qb; } - /** * Base of the Sql Insert request for Shares Mountpoint * @@ -44,7 +42,6 @@ protected function getGSSharesMountpointInsertSql() { return $qb; } - /** * Base of the Sql Update request * @@ -57,7 +54,6 @@ protected function getGSSharesUpdateSql() { return $qb; } - /** * @return IQueryBuilder */ @@ -68,7 +64,6 @@ protected function getGSSharesMountpointUpdateSql() { return $qb; } - /** * @return IQueryBuilder */ @@ -87,7 +82,6 @@ protected function getGSSharesSelectSql() { return $qb; } - /** * @return IQueryBuilder */ @@ -105,7 +99,6 @@ protected function getGSSharesMountpointSelectSql() { return $qb; } - /** * Base of the Sql Delete request * @@ -118,7 +111,6 @@ protected function getGSSharesDeleteSql() { return $qb; } - /** * Base of the Sql Delete request * @@ -131,7 +123,6 @@ protected function getGSSharesMountpointDeleteSql() { return $qb; } - /** * @param array $data * @@ -144,7 +135,6 @@ protected function parseGSSharesSelectSql($data): GSShare { return $share; } - /** * @param array $data * diff --git a/lib/Db/MemberRequest.php b/lib/Db/MemberRequest.php index 2e6b9b3c6..671116537 100644 --- a/lib/Db/MemberRequest.php +++ b/lib/Db/MemberRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\InvalidIdException; @@ -56,7 +54,6 @@ public function save(Member $member): void { $qb->executeStatement(); } - /** * @param Member $member * @@ -80,7 +77,6 @@ public function update(Member $member): void { $qb->executeStatement(); } - /** * @param Member $member * @@ -96,7 +92,6 @@ public function insertOrUpdate(Member $member): void { } } - /** * @param string $singleId * @param string $displayName @@ -115,7 +110,6 @@ public function updateDisplayName(string $singleId, string $displayName, string $qb->executeStatement(); } - /** * @param Member $member */ @@ -127,7 +121,6 @@ public function delete(Member $member) { $qb->executeStatement(); } - /** * @param IFederatedUser $federatedUser */ @@ -140,7 +133,6 @@ public function deleteFederatedUser(IFederatedUser $federatedUser): void { $qb->executeStatement(); } - /** * @param IFederatedUser $federatedUser * @param Circle $circle @@ -153,7 +145,6 @@ public function deleteFederatedUserFromCircle(IFederatedUser $federatedUser, Cir $qb->executeStatement(); } - /** * * @param Circle $circle @@ -170,7 +161,6 @@ public function deleteAllFromCircle(Circle $circle) { $qb->executeStatement(); } - /** * @param Member $member */ @@ -185,7 +175,6 @@ public function updateLevel(Member $member): void { $qb->executeStatement(); } - /** * @param string $singleId * @param IFederatedUser|null $initiator @@ -268,7 +257,6 @@ public function getMembers( return $this->getItemsFromRequest($qb); } - /** * @param string $singleId * @param bool $getData @@ -293,7 +281,6 @@ public function getInheritedMembers(string $singleId, bool $getData = false, int return $this->getItemsFromRequest($qb); } - /** * @param string $circleId * @param string $singleId @@ -315,7 +302,6 @@ public function getMember(string $circleId, string $singleId, ?CircleProbe $prob return $this->getItemFromRequest($qb); } - /** * @param string $memberId * @param FederatedUser|null $initiator @@ -345,7 +331,6 @@ public function getMemberById( return $this->getItemFromRequest($qb); } - /** * @throws MemberNotFoundException * @throws RequestBuilderException @@ -358,7 +343,6 @@ public function getMemberByUserId(string $circleId, string $userId): Member { return $this->getItemFromRequest($qb); } - /** * @param string $circleId * @@ -377,7 +361,6 @@ public function getMemberInstances(string $circleId): array { ); } - /** * @param string $singleId * @@ -393,7 +376,6 @@ public function getMembersBySingleId(string $singleId): array { return $this->getItemsFromRequest($qb); } - /** * @param Member $member * @param FederatedUser|null $initiator @@ -412,7 +394,6 @@ public function searchMember(Member $member, ?FederatedUser $initiator = null): return $this->getItemFromRequest($qb); } - /** * @param string $needle * @@ -426,7 +407,6 @@ public function searchFederatedUsers(string $needle): array { return $this->getItemsFromRequest($qb, true); } - /** * @param IFederatedUser $federatedUser * diff --git a/lib/Db/MemberRequestBuilder.php b/lib/Db/MemberRequestBuilder.php index f5c1906e6..52c0bce2e 100644 --- a/lib/Db/MemberRequestBuilder.php +++ b/lib/Db/MemberRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MemberNotFoundException; @@ -36,7 +34,6 @@ protected function getMemberInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -47,7 +44,6 @@ protected function getMemberUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param IFederatedUser|null $initiator * @param bool $getBasedOn @@ -74,7 +70,6 @@ protected function getMemberSelectSql( return $qb; } - /** * Base of the Sql Delete request * @@ -87,7 +82,6 @@ protected function getMemberDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/MembershipRequest.php b/lib/Db/MembershipRequest.php index a73e0a6cf..5f9fcc080 100644 --- a/lib/Db/MembershipRequest.php +++ b/lib/Db/MembershipRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MembershipNotFoundException; @@ -42,7 +40,6 @@ public function insert(Membership $membership) { $qb->executeStatement(); } - /** * @param Membership $membership */ @@ -63,7 +60,6 @@ public function update(Membership $membership) { $qb->executeStatement(); } - /** * @param string $circleId * @param string $singleId @@ -80,7 +76,6 @@ public function getMembership(string $circleId, string $singleId): Membership { return $this->getItemFromRequest($qb); } - /** * @throws MembershipNotFoundException */ @@ -100,7 +95,6 @@ public function getMembershipByUserId(string $circleId, string $userId): Members return $this->getItemFromRequest($qb); } - /** * @param string $singleId * @@ -114,7 +108,6 @@ public function getMemberships(string $singleId): array { return $this->getItemsFromRequest($qb); } - /** * @param string $singleId * @param int $level @@ -181,7 +174,6 @@ public function removeBySingleId(string $singleId, bool $all = false): void { $qb->executeStatement(); } - /** * @param Membership $membership */ @@ -193,7 +185,6 @@ public function delete(Membership $membership): void { $qb->executeStatement(); } - /** * @param FederatedUser $federatedUser */ diff --git a/lib/Db/MembershipRequestBuilder.php b/lib/Db/MembershipRequestBuilder.php index ab585222d..1987d5685 100644 --- a/lib/Db/MembershipRequestBuilder.php +++ b/lib/Db/MembershipRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MembershipNotFoundException; @@ -32,7 +30,6 @@ protected function getMembershipInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -43,7 +40,6 @@ protected function getMembershipUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -58,7 +54,6 @@ protected function getMembershipSelectSql(): CoreQueryBuilder { return $qb; } - /** * Base of the Sql Delete request * @@ -71,7 +66,6 @@ protected function getMembershipDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/MountPointRequestBuilder.php b/lib/Db/MountPointRequestBuilder.php index 940553b6c..ca99d54d2 100644 --- a/lib/Db/MountPointRequestBuilder.php +++ b/lib/Db/MountPointRequestBuilder.php @@ -2,11 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MountNotFoundException; diff --git a/lib/Db/MountRequest.php b/lib/Db/MountRequest.php index a44982cec..65b820920 100644 --- a/lib/Db/MountRequest.php +++ b/lib/Db/MountRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\RequestBuilderException; @@ -25,7 +23,6 @@ class MountRequest extends MountRequestBuilder { use TStringTools; - /** * @param Mount $mount */ @@ -44,7 +41,6 @@ public function save(Mount $mount): void { $qb->executeStatement(); } - /** * @param string $token */ @@ -55,7 +51,6 @@ public function delete(string $token): void { $qb->executeStatement(); } - /** * @param list $paths * @@ -71,7 +66,6 @@ public function getForUser(IFederatedUser $federatedUser, array $paths = [], boo $qb->limitToMountpoints(CoreQueryBuilder::MOUNT, $paths, $forChildren); return $this->getItemsFromRequest($qb); - // FederatedUser $federatedUser, // int $nodeId, // int $offset, diff --git a/lib/Db/MountRequestBuilder.php b/lib/Db/MountRequestBuilder.php index a285ba5cb..e474b9b80 100644 --- a/lib/Db/MountRequestBuilder.php +++ b/lib/Db/MountRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\MountNotFoundException; @@ -32,7 +30,6 @@ protected function getMountInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -43,7 +40,6 @@ protected function getMountUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param string $alias * @@ -56,7 +52,6 @@ protected function getMountSelectSql(string $alias = CoreQueryBuilder::MOUNT): C return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -67,7 +62,6 @@ protected function getMountDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/RemoteRequest.php b/lib/Db/RemoteRequest.php index dbc09865b..fb4ae0133 100644 --- a/lib/Db/RemoteRequest.php +++ b/lib/Db/RemoteRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\RemoteNotFoundException; @@ -43,7 +41,6 @@ public function save(RemoteInstance $remote): void { $qb->executeStatement(); } - /** * @param RemoteInstance $remote * @@ -62,7 +59,6 @@ public function update(RemoteInstance $remote) { $qb->executeStatement(); } - /** * @param RemoteInstance $remote * @@ -78,7 +74,6 @@ public function updateItem(RemoteInstance $remote) { $qb->executeStatement(); } - /** * @param RemoteInstance $remote * @@ -94,7 +89,6 @@ public function updateInstance(RemoteInstance $remote) { $qb->executeStatement(); } - /** * @param RemoteInstance $remote * @@ -110,7 +104,6 @@ public function updateType(RemoteInstance $remote) { $qb->executeStatement(); } - /** * @param RemoteInstance $remote * @@ -126,7 +119,6 @@ public function updateHref(RemoteInstance $remote) { $qb->executeStatement(); } - /** * @return RemoteInstance[] */ @@ -146,7 +138,6 @@ public function getKnownInstances(): array { return $this->getItemsFromRequest($qb); } - /** * - returns: * - all GLOBAL_SCALE @@ -193,7 +184,6 @@ public function getOutgoingRecipient(Circle $circle, bool $broadcastAsFederated return $this->getItemsFromRequest($qb); } - /** * @param string $host * @@ -207,7 +197,6 @@ public function getFromInstance(string $host): RemoteInstance { return $this->getItemFromRequest($qb); } - /** * @param string $href * @@ -221,7 +210,6 @@ public function getFromHref(string $href): RemoteInstance { return $this->getItemFromRequest($qb); } - /** * @param string $status * @@ -234,7 +222,6 @@ public function getFromType(string $status): array { return $this->getItemsFromRequest($qb); } - /** * @param RemoteInstance $remoteInstance * @@ -252,7 +239,6 @@ public function searchDuplicate(RemoteInstance $remoteInstance): RemoteInstance return $this->getItemFromRequest($qb); } - /** * @param RemoteInstance $remoteInstance */ diff --git a/lib/Db/RemoteRequestBuilder.php b/lib/Db/RemoteRequestBuilder.php index 797c65a8d..4b2ed601f 100644 --- a/lib/Db/RemoteRequestBuilder.php +++ b/lib/Db/RemoteRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\RemoteNotFoundException; @@ -33,7 +31,6 @@ protected function getRemoteInsertSql(): CoreQueryBuilder { return $qb; } - /** * Base of the Sql Update request for Groups * @@ -46,7 +43,6 @@ protected function getRemoteUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param string $alias * @@ -59,7 +55,6 @@ protected function getRemoteSelectSql(string $alias = CoreQueryBuilder::REMOTE): return $qb; } - /** * Base of the Sql Delete request * @@ -72,7 +67,6 @@ protected function getRemoteDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/ShareLockRequest.php b/lib/Db/ShareLockRequest.php index 5a23150b1..41635e449 100644 --- a/lib/Db/ShareLockRequest.php +++ b/lib/Db/ShareLockRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\FederatedShareNotFoundException; @@ -37,7 +35,6 @@ public function save(FederatedShare $share): void { $qb->executeStatement(); } - /** * @param string $itemId * @param string $circleId diff --git a/lib/Db/ShareLockRequestBuilder.php b/lib/Db/ShareLockRequestBuilder.php index e9e49dc39..e392e74ed 100644 --- a/lib/Db/ShareLockRequestBuilder.php +++ b/lib/Db/ShareLockRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\FederatedShareNotFoundException; @@ -32,7 +30,6 @@ protected function getShareLockInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -46,7 +43,6 @@ protected function getShareLockSelectSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -57,7 +53,6 @@ protected function getShareLockUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -68,7 +63,6 @@ protected function getShareDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/ShareTokenRequest.php b/lib/Db/ShareTokenRequest.php index 628b52bc2..c32381bb9 100644 --- a/lib/Db/ShareTokenRequest.php +++ b/lib/Db/ShareTokenRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\ShareTokenNotFoundException; @@ -41,7 +39,6 @@ public function save(ShareToken $token): void { $token->setDbId($id); } - /** * @param ShareToken $shareToken * @@ -57,7 +54,6 @@ public function search(ShareToken $shareToken): ShareToken { return $this->getItemFromRequest($qb); } - /** * @param string $token * @@ -71,7 +67,6 @@ public function getByToken(string $token): ShareToken { return $this->getItemFromRequest($qb); } - /** * @param string $circleId * @param string $hashedPassword @@ -85,7 +80,6 @@ public function updateSharePassword(string $circleId, string $hashedPassword) { $qb->executeStatement(); } - /** * @param string $singleId * @param string $circleId diff --git a/lib/Db/ShareTokenRequestBuilder.php b/lib/Db/ShareTokenRequestBuilder.php index 2aa49fc14..8ed04fa14 100644 --- a/lib/Db/ShareTokenRequestBuilder.php +++ b/lib/Db/ShareTokenRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\ShareTokenNotFoundException; @@ -32,7 +30,6 @@ protected function getTokenInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -43,7 +40,6 @@ protected function getTokenUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param string $alias * @@ -56,7 +52,6 @@ protected function getTokenSelectSql(string $alias = CoreQueryBuilder::TOKEN): C return $qb; } - /** * Base of the Sql Delete request * @@ -69,7 +64,6 @@ protected function getTokenDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * @@ -87,7 +81,6 @@ public function getItemFromRequest(CoreQueryBuilder $qb): ShareToken { return $shareToken; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/ShareWrapperRequest.php b/lib/Db/ShareWrapperRequest.php index b1e4ba3e1..b08298976 100644 --- a/lib/Db/ShareWrapperRequest.php +++ b/lib/Db/ShareWrapperRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use JsonException; @@ -73,7 +71,6 @@ public function save(IShare $share, int $parentId = 0): int { return $id; } - /** * @param ShareWrapper $shareWrapper */ @@ -112,7 +109,6 @@ public function updateChildPermissions(ShareWrapper $shareWrapper): void { $qb->executeStatement(); } - /** * @param Membership $membership */ @@ -124,7 +120,6 @@ public function deleteByMembership(Membership $membership) { $qb->executeStatement(); } - /** * @return array */ @@ -134,7 +129,6 @@ public function getShares(): array { return $this->getItemsFromRequest($qb); } - /** * @param string $circleId * @param FederatedUser|null $shareRecipient @@ -157,8 +151,8 @@ public function getSharesToCircle( $qb->leftJoinCircle(CoreQueryBuilder::SHARE, null, 'share_with'); // TODO: filter direct-shares ? - $aliasUpstreamMembership = - $qb->generateAlias(CoreQueryBuilder::SHARE, CoreQueryBuilder::UPSTREAM_MEMBERSHIPS); + $aliasUpstreamMembership + = $qb->generateAlias(CoreQueryBuilder::SHARE, CoreQueryBuilder::UPSTREAM_MEMBERSHIPS); $qb->limitToInheritedMemberships(CoreQueryBuilder::SHARE, $circleId, 'share_with'); // if (!is_null($shareRecipient)) { @@ -181,7 +175,6 @@ public function getSharesToCircle( return $this->getItemsFromRequest($qb); } - /** * @return ShareWrapper[] * @throws RequestBuilderException @@ -196,8 +189,6 @@ public function getSharesToCircles(array $circleIds, ?string $fileId = null): ar return $this->getItemsFromRequest($qb); } - - /** * @param int $shareId * @param FederatedUser|null $federatedUser @@ -221,7 +212,6 @@ public function getShareById(int $shareId, ?FederatedUser $federatedUser = null) return $this->getItemFromRequest($qb); } - /** * @param string $token * @param FederatedUser|null $federatedUser @@ -245,7 +235,6 @@ public function getShareByToken(string $token, ?FederatedUser $federatedUser = n return $this->getItemFromRequest($qb); } - /** * @param FederatedUser $federatedUser * @param int $shareId @@ -261,7 +250,6 @@ public function getChild(FederatedUser $federatedUser, int $shareId): ShareWrapp return $this->getItemFromRequest($qb); } - /** * @param int $fileId * @param bool $getData @@ -287,7 +275,6 @@ public function getSharesByFileId(int $fileId, bool $getData = false): array { return $this->getItemsFromRequest($qb); } - /** * returns all share, related to a list of fileids. * if $getData is true, will return details about the recipient circle. @@ -315,7 +302,6 @@ public function getSharesByFileIds(array $fileIds, bool $getData = false, bool $ return $this->getItemsFromRequest($qb); } - /** * @param FederatedUser $federatedUser * @param int $nodeId @@ -447,7 +433,6 @@ public function getSharesBy( return $this->getItemsFromRequest($qb); } - /** * @param FederatedUser $federatedUser * @param Folder $node @@ -480,7 +465,6 @@ public function getSharesInFolder( return $this->getItemsFromRequest($qb); } - /** * returns the SQL request to get a specific share from the fileId and circleId * @@ -504,7 +488,6 @@ public function searchShare(string $singleId, int $fileId): ShareWrapper { return $this->getItemFromRequest($qb); } - /** * @param int $shareId */ @@ -540,7 +523,6 @@ public function deleteSharesToCircle(string $circleId, string $initiator = ''): $this->deleteSharesAndChild($ids); } - public function removeOrphanShares(): void { $qb = $this->getShareSelectSql(); $expr = $qb->expr(); @@ -562,7 +544,6 @@ public function removeOrphanShares(): void { $this->deleteSharesAndChild($ids); } - /** * @param array $ids */ @@ -578,7 +559,6 @@ private function deleteSharesAndChild(array $ids): void { $qb->executeStatement(); } - /** * Format IAttributes to database format (JSON string) * based on OC\Share20\DefaultShareProvider::formatShareAttributes(); diff --git a/lib/Db/ShareWrapperRequestBuilder.php b/lib/Db/ShareWrapperRequestBuilder.php index 631873f65..97e6e2adf 100644 --- a/lib/Db/ShareWrapperRequestBuilder.php +++ b/lib/Db/ShareWrapperRequestBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\ShareWrapperNotFoundException; @@ -33,7 +31,6 @@ protected function getShareInsertSql(): CoreQueryBuilder { return $qb; } - /** * @return CoreQueryBuilder&IQueryBuilder */ @@ -44,7 +41,6 @@ protected function getShareUpdateSql(): CoreQueryBuilder { return $qb; } - /** * @param string $alias * @@ -58,7 +54,6 @@ protected function getShareSelectSql(string $alias = CoreQueryBuilder::SHARE): C return $qb; } - /** * Base of the Sql Delete request * @@ -72,7 +67,6 @@ protected function getShareDeleteSql(): CoreQueryBuilder { return $qb; } - /** * @param CoreQueryBuilder $qb * @@ -90,7 +84,6 @@ public function getItemFromRequest(CoreQueryBuilder $qb): ShareWrapper { return $shareWrapper; } - /** * @param CoreQueryBuilder $qb * diff --git a/lib/Db/TokensRequest.php b/lib/Db/TokensRequest.php index ff8e0b48b..5e5fb5229 100644 --- a/lib/Db/TokensRequest.php +++ b/lib/Db/TokensRequest.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Exceptions\TokenDoesNotExistException; @@ -42,7 +41,6 @@ public function getByToken(string $token) { return $this->parseTokensSelectSql($data); } - /** * @param string $shareId * @param string $circleId @@ -67,7 +65,6 @@ public function getTokenFromMember(string $shareId, string $circleId, string $em return $this->parseTokensSelectSql($data); } - /** * @param DeprecatedMember $member * @@ -88,7 +85,6 @@ public function getTokensFromMember(DeprecatedMember $member) { return $shares; } - /** * @param DeprecatedMember $member * @param int $shareId @@ -124,7 +120,6 @@ public function generateTokenForMember(DeprecatedMember $member, int $shareId, s return $this->getTokenFromMember($shareId, $member->getCircleId(), $member->getUserId()); } - /** * @param int $shareId */ @@ -135,7 +130,6 @@ public function removeTokenByShareId(int $shareId) { $qb->executeStatement(); } - /** * @param DeprecatedMember $member */ @@ -147,7 +141,6 @@ public function removeTokensFromMember(DeprecatedMember $member) { $qb->executeStatement(); } - public function updateSinglePassword(string $circleId, string $password) { $qb = $this->getTokensUpdateSql(); diff --git a/lib/Db/TokensRequestBuilder.php b/lib/Db/TokensRequestBuilder.php index 06b968bb2..90bed9f73 100644 --- a/lib/Db/TokensRequestBuilder.php +++ b/lib/Db/TokensRequestBuilder.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Db; use OCA\Circles\Model\SharesToken; @@ -21,7 +20,6 @@ class TokensRequestBuilder extends DeprecatedRequestBuilder { use TArrayTools; - /** * Base of the Sql Insert request for Shares * @@ -34,7 +32,6 @@ protected function getTokensInsertSql() { return $qb; } - /** * Base of the Sql Update request for Groups * @@ -47,7 +44,6 @@ protected function getTokensUpdateSql() { return $qb; } - /** * @return IQueryBuilder */ @@ -63,7 +59,6 @@ protected function getTokensSelectSql() { return $qb; } - /** * Base of the Sql Delete request * @@ -76,7 +71,6 @@ protected function getTokensDeleteSql() { return $qb; } - /** * @param array $data * diff --git a/lib/Events/AddingCircleMemberEvent.php b/lib/Events/AddingCircleMemberEvent.php index d8e794d16..7dad93138 100644 --- a/lib/Events/AddingCircleMemberEvent.php +++ b/lib/Events/AddingCircleMemberEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -33,7 +31,6 @@ class AddingCircleMemberEvent extends CircleMemberGenericEvent { /** @var int */ private $type = 0; - /** * AddingCircleMemberEvent constructor. * @@ -43,7 +40,6 @@ public function __construct(FederatedEvent $federatedEvent) { parent::__construct($federatedEvent); } - /** * @param int $type * diff --git a/lib/Events/CircleCreatedEvent.php b/lib/Events/CircleCreatedEvent.php index a9a87a5f1..fd4212a0b 100644 --- a/lib/Events/CircleCreatedEvent.php +++ b/lib/Events/CircleCreatedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/CircleDestroyedEvent.php b/lib/Events/CircleDestroyedEvent.php index 1f118e0a7..88d1dfb20 100644 --- a/lib/Events/CircleDestroyedEvent.php +++ b/lib/Events/CircleDestroyedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/CircleEditedEvent.php b/lib/Events/CircleEditedEvent.php index 36f277e10..4390bc9e2 100644 --- a/lib/Events/CircleEditedEvent.php +++ b/lib/Events/CircleEditedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/CircleGenericEvent.php b/lib/Events/CircleGenericEvent.php index 07473dc6e..4ef1979cd 100644 --- a/lib/Events/CircleGenericEvent.php +++ b/lib/Events/CircleGenericEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Circle; @@ -34,7 +32,6 @@ public function __construct( $this->circle = $federatedEvent->getCircle(); } - /** * @return FederatedEvent */ diff --git a/lib/Events/CircleMemberAddedEvent.php b/lib/Events/CircleMemberAddedEvent.php index c3f58490d..a7c61ab52 100644 --- a/lib/Events/CircleMemberAddedEvent.php +++ b/lib/Events/CircleMemberAddedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -29,7 +27,6 @@ class CircleMemberAddedEvent extends CircleResultGenericEvent { /** @var int */ private $type = 0; - /** * CircleMemberAddedEvent constructor. * @@ -40,7 +37,6 @@ public function __construct(FederatedEvent $federatedEvent, array $results) { parent::__construct($federatedEvent, $results); } - /** * @param int $type * diff --git a/lib/Events/CircleMemberEditedEvent.php b/lib/Events/CircleMemberEditedEvent.php index 946c286ad..5f40e6d73 100644 --- a/lib/Events/CircleMemberEditedEvent.php +++ b/lib/Events/CircleMemberEditedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -35,7 +33,6 @@ class CircleMemberEditedEvent extends CircleResultGenericEvent { /** @var string */ private $newDisplayName = ''; - /** * CircleMemberEditedEvent constructor. * @@ -64,7 +61,6 @@ public function getType(): int { return $this->type; } - /** * @param int $newLevel * @@ -83,7 +79,6 @@ public function getNewLevel(): int { return $this->newLevel; } - /** * @param string $newDisplayName * diff --git a/lib/Events/CircleMemberGenericEvent.php b/lib/Events/CircleMemberGenericEvent.php index 27cc33299..53ad90927 100644 --- a/lib/Events/CircleMemberGenericEvent.php +++ b/lib/Events/CircleMemberGenericEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -23,7 +21,6 @@ class CircleMemberGenericEvent extends CircleGenericEvent { /** @var Member */ private $member; - /** * CircleMemberAddedEvent constructor. * @@ -35,7 +32,6 @@ public function __construct(FederatedEvent $federatedEvent) { $this->member = $federatedEvent->getMember(); } - /** * @return Member */ diff --git a/lib/Events/CircleMemberRemovedEvent.php b/lib/Events/CircleMemberRemovedEvent.php index 8ebd6b73b..ec634faa0 100644 --- a/lib/Events/CircleMemberRemovedEvent.php +++ b/lib/Events/CircleMemberRemovedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -29,7 +27,6 @@ class CircleMemberRemovedEvent extends CircleResultGenericEvent { /** @var int */ private $type = 0; - /** * CircleMemberRemovedEvent constructor. * @@ -40,7 +37,6 @@ public function __construct(FederatedEvent $federatedEvent, array $results) { parent::__construct($federatedEvent, $results); } - /** * @param int $type * diff --git a/lib/Events/CircleMemberRequestedEvent.php b/lib/Events/CircleMemberRequestedEvent.php index 0700ab975..0be0068e1 100644 --- a/lib/Events/CircleMemberRequestedEvent.php +++ b/lib/Events/CircleMemberRequestedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -29,7 +27,6 @@ class CircleMemberRequestedEvent extends CircleResultGenericEvent { /** @var int */ private $type = 0; - /** * CircleMemberRequestedEvent constructor. * @@ -40,7 +37,6 @@ public function __construct(FederatedEvent $federatedEvent, array $results) { parent::__construct($federatedEvent, $results); } - /** * @param int $type * diff --git a/lib/Events/CircleResultGenericEvent.php b/lib/Events/CircleResultGenericEvent.php index e6180b394..5f03c13af 100644 --- a/lib/Events/CircleResultGenericEvent.php +++ b/lib/Events/CircleResultGenericEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Circle; @@ -29,7 +27,6 @@ class CircleResultGenericEvent extends Event { /** @var Member */ private $member; - /** * CircleResultGenericEvent constructor. * @@ -48,7 +45,6 @@ public function __construct( } } - /** * @return FederatedEvent */ @@ -56,7 +52,6 @@ public function getFederatedEvent(): FederatedEvent { return $this->federatedEvent; } - /** * @return SimpleDataStore[] */ @@ -64,7 +59,6 @@ public function getResults(): array { return $this->results; } - /** * @return Circle */ @@ -72,7 +66,6 @@ public function getCircle(): Circle { return $this->circle; } - /** * @return bool */ diff --git a/lib/Events/CreatingCircleEvent.php b/lib/Events/CreatingCircleEvent.php index fee4f38f0..41226f7e2 100644 --- a/lib/Events/CreatingCircleEvent.php +++ b/lib/Events/CreatingCircleEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/DestroyingCircleEvent.php b/lib/Events/DestroyingCircleEvent.php index 2b3fce6e3..08823a5ba 100644 --- a/lib/Events/DestroyingCircleEvent.php +++ b/lib/Events/DestroyingCircleEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/EditingCircleEvent.php b/lib/Events/EditingCircleEvent.php index d205bec82..e647643ab 100644 --- a/lib/Events/EditingCircleEvent.php +++ b/lib/Events/EditingCircleEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/Events/EditingCircleMemberEvent.php b/lib/Events/EditingCircleMemberEvent.php index 46d84d2cb..4b2507878 100644 --- a/lib/Events/EditingCircleMemberEvent.php +++ b/lib/Events/EditingCircleMemberEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Events; use OCA\Circles\Model\Federated\FederatedEvent; @@ -40,7 +38,6 @@ class EditingCircleMemberEvent extends CircleMemberGenericEvent { /** @var string */ private $displayName = ''; - /** * EditingCircleMemberEvent constructor. * @@ -50,7 +47,6 @@ public function __construct(FederatedEvent $federatedEvent) { parent::__construct($federatedEvent); } - /** * @param int $type * @@ -69,7 +65,6 @@ public function getType(): int { return $this->type; } - /** * @param int $level * @@ -88,7 +83,6 @@ public function getLevel(): int { return $this->level; } - /** * @param string $displayName * diff --git a/lib/Events/Files/CreatingFileShareEvent.php b/lib/Events/Files/CreatingFileShareEvent.php index e8b78d7b1..5e8b9624b 100644 --- a/lib/Events/Files/CreatingFileShareEvent.php +++ b/lib/Events/Files/CreatingFileShareEvent.php @@ -1,15 +1,12 @@ circle = $this->federatedEvent->getCircle(); } - /** * @return FederatedEvent */ @@ -50,7 +45,6 @@ public function getFederatedEvent(): FederatedEvent { return $this->federatedEvent; } - /** * @return Circle */ @@ -58,7 +52,6 @@ public function getCircle(): Circle { return $this->circle; } - /** * @param string $appId * @param string $itemType @@ -79,7 +72,6 @@ public function addSharedArray(string $appId, string $source, array $data): void $this->sharedItems[$appId][$source][] = $data; } - /** * @param string $appId * @param string $itemType diff --git a/lib/Exceptions/CircleNameTooShortException.php b/lib/Exceptions/CircleNameTooShortException.php index 1bf445cc2..cd8ea3597 100644 --- a/lib/Exceptions/CircleNameTooShortException.php +++ b/lib/Exceptions/CircleNameTooShortException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/CircleNotFoundException.php b/lib/Exceptions/CircleNotFoundException.php index 45129a259..7f5b6a805 100644 --- a/lib/Exceptions/CircleNotFoundException.php +++ b/lib/Exceptions/CircleNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ContactAddressBookNotFoundException.php b/lib/Exceptions/ContactAddressBookNotFoundException.php index 2413baf4f..820242cad 100644 --- a/lib/Exceptions/ContactAddressBookNotFoundException.php +++ b/lib/Exceptions/ContactAddressBookNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ContactFormatException.php b/lib/Exceptions/ContactFormatException.php index acc74ae40..793b41e17 100644 --- a/lib/Exceptions/ContactFormatException.php +++ b/lib/Exceptions/ContactFormatException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ContactNotFoundException.php b/lib/Exceptions/ContactNotFoundException.php index 58b70c0b1..89c6090ce 100644 --- a/lib/Exceptions/ContactNotFoundException.php +++ b/lib/Exceptions/ContactNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/EventWrapperNotFoundException.php b/lib/Exceptions/EventWrapperNotFoundException.php index d92a7b414..24a911d66 100644 --- a/lib/Exceptions/EventWrapperNotFoundException.php +++ b/lib/Exceptions/EventWrapperNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class EventWrapperNotFoundException extends \Exception { diff --git a/lib/Exceptions/FederatedEventDSyncException.php b/lib/Exceptions/FederatedEventDSyncException.php index c3786ba98..33473147d 100644 --- a/lib/Exceptions/FederatedEventDSyncException.php +++ b/lib/Exceptions/FederatedEventDSyncException.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/FederatedEventException.php b/lib/Exceptions/FederatedEventException.php index 193dcd2c8..8f2196c3a 100644 --- a/lib/Exceptions/FederatedEventException.php +++ b/lib/Exceptions/FederatedEventException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/FederatedItemBadRequestException.php b/lib/Exceptions/FederatedItemBadRequestException.php index 9c3955bda..3b9d8b285 100644 --- a/lib/Exceptions/FederatedItemBadRequestException.php +++ b/lib/Exceptions/FederatedItemBadRequestException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemBadRequestException extends FederatedItemException { public const STATUS = Http::STATUS_BAD_REQUEST; - /** * FederatedItemBadRequestException constructor. * diff --git a/lib/Exceptions/FederatedItemConflictException.php b/lib/Exceptions/FederatedItemConflictException.php index 060d6f42c..97b3a9ec2 100644 --- a/lib/Exceptions/FederatedItemConflictException.php +++ b/lib/Exceptions/FederatedItemConflictException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemConflictException extends FederatedItemException { public const STATUS = Http::STATUS_CONFLICT; - /** * FederatedItemConflictException constructor. * diff --git a/lib/Exceptions/FederatedItemException.php b/lib/Exceptions/FederatedItemException.php index 20eff6867..7b211cf84 100644 --- a/lib/Exceptions/FederatedItemException.php +++ b/lib/Exceptions/FederatedItemException.php @@ -1,15 +1,12 @@ 0) ? $code : $this->status, $previous); } - /** * @param int $status */ @@ -64,7 +58,6 @@ public function getStatus(): int { return $this->status; } - /** * @return array */ diff --git a/lib/Exceptions/FederatedItemForbiddenException.php b/lib/Exceptions/FederatedItemForbiddenException.php index f60737678..a12f270d8 100644 --- a/lib/Exceptions/FederatedItemForbiddenException.php +++ b/lib/Exceptions/FederatedItemForbiddenException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemForbiddenException extends FederatedItemException { public const STATUS = Http::STATUS_FORBIDDEN; - /** * FederatedItemForbiddenException constructor. * diff --git a/lib/Exceptions/FederatedItemNotFoundException.php b/lib/Exceptions/FederatedItemNotFoundException.php index 3f837509b..a6ac002ab 100644 --- a/lib/Exceptions/FederatedItemNotFoundException.php +++ b/lib/Exceptions/FederatedItemNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemNotFoundException extends FederatedItemException { public const STATUS = Http::STATUS_NOT_FOUND; - /** * FederatedItemNotFoundException constructor. * diff --git a/lib/Exceptions/FederatedItemRemoteException.php b/lib/Exceptions/FederatedItemRemoteException.php index 1dbe471ba..2fbc44147 100644 --- a/lib/Exceptions/FederatedItemRemoteException.php +++ b/lib/Exceptions/FederatedItemRemoteException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemRemoteException extends FederatedItemException { public const STATUS = Http::STATUS_REQUEST_TIMEOUT; - /** * FederatedItemRemoteException constructor. * diff --git a/lib/Exceptions/FederatedItemServerException.php b/lib/Exceptions/FederatedItemServerException.php index 1d64b4513..3af89e9de 100644 --- a/lib/Exceptions/FederatedItemServerException.php +++ b/lib/Exceptions/FederatedItemServerException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemServerException extends FederatedItemException { public const STATUS = Http::STATUS_INTERNAL_SERVER_ERROR; - /** * FederatedItemServerException constructor. * diff --git a/lib/Exceptions/FederatedItemUnauthorizedException.php b/lib/Exceptions/FederatedItemUnauthorizedException.php index 255e0daaf..1904ce5ae 100644 --- a/lib/Exceptions/FederatedItemUnauthorizedException.php +++ b/lib/Exceptions/FederatedItemUnauthorizedException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -21,7 +20,6 @@ class FederatedItemUnauthorizedException extends FederatedItemException { public const STATUS = Http::STATUS_UNAUTHORIZED; - /** * FederatedItemUnauthorizedException constructor. * diff --git a/lib/Exceptions/FederatedShareAlreadyLockedException.php b/lib/Exceptions/FederatedShareAlreadyLockedException.php index aa4ce5ea4..c925eeb3f 100644 --- a/lib/Exceptions/FederatedShareAlreadyLockedException.php +++ b/lib/Exceptions/FederatedShareAlreadyLockedException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/FederatedShareBelongingException.php b/lib/Exceptions/FederatedShareBelongingException.php index 259054470..701af604c 100644 --- a/lib/Exceptions/FederatedShareBelongingException.php +++ b/lib/Exceptions/FederatedShareBelongingException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/FederatedShareNotFoundException.php b/lib/Exceptions/FederatedShareNotFoundException.php index 573b42306..c724dfe82 100644 --- a/lib/Exceptions/FederatedShareNotFoundException.php +++ b/lib/Exceptions/FederatedShareNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/FederatedUserException.php b/lib/Exceptions/FederatedUserException.php index a0f3badf5..f3ed45ae0 100644 --- a/lib/Exceptions/FederatedUserException.php +++ b/lib/Exceptions/FederatedUserException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class FederatedUserException extends FederatedItemServerException { diff --git a/lib/Exceptions/FederatedUserNotFoundException.php b/lib/Exceptions/FederatedUserNotFoundException.php index 3aa62a8c0..784f075b5 100644 --- a/lib/Exceptions/FederatedUserNotFoundException.php +++ b/lib/Exceptions/FederatedUserNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class FederatedUserNotFoundException extends FederatedItemNotFoundException { diff --git a/lib/Exceptions/FileCacheNotFoundException.php b/lib/Exceptions/FileCacheNotFoundException.php index 484ed4e6d..926d82bdb 100644 --- a/lib/Exceptions/FileCacheNotFoundException.php +++ b/lib/Exceptions/FileCacheNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/FrontendException.php b/lib/Exceptions/FrontendException.php index d17a8ebfe..167f9c128 100644 --- a/lib/Exceptions/FrontendException.php +++ b/lib/Exceptions/FrontendException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/GroupNotFoundException.php b/lib/Exceptions/GroupNotFoundException.php index 38ae1c6a3..5f452a29c 100644 --- a/lib/Exceptions/GroupNotFoundException.php +++ b/lib/Exceptions/GroupNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class GroupNotFoundException extends FederatedItemNotFoundException { diff --git a/lib/Exceptions/InitiatorNotConfirmedException.php b/lib/Exceptions/InitiatorNotConfirmedException.php index 6872ece1f..4ca3e7fbc 100644 --- a/lib/Exceptions/InitiatorNotConfirmedException.php +++ b/lib/Exceptions/InitiatorNotConfirmedException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/InitiatorNotFoundException.php b/lib/Exceptions/InitiatorNotFoundException.php index f817f8208..2e3377c9e 100644 --- a/lib/Exceptions/InitiatorNotFoundException.php +++ b/lib/Exceptions/InitiatorNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/InsufficientPermissionException.php b/lib/Exceptions/InsufficientPermissionException.php index 4c163e966..c699e07b9 100644 --- a/lib/Exceptions/InsufficientPermissionException.php +++ b/lib/Exceptions/InsufficientPermissionException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class InsufficientPermissionException extends FederatedItemForbiddenException { diff --git a/lib/Exceptions/InvalidIdException.php b/lib/Exceptions/InvalidIdException.php index 02a4b25d3..f8f196c23 100644 --- a/lib/Exceptions/InvalidIdException.php +++ b/lib/Exceptions/InvalidIdException.php @@ -5,7 +5,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/InvalidModelException.php b/lib/Exceptions/InvalidModelException.php index 5bbb0b59e..c0304a2e1 100644 --- a/lib/Exceptions/InvalidModelException.php +++ b/lib/Exceptions/InvalidModelException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/JsonNotRequestedException.php b/lib/Exceptions/JsonNotRequestedException.php index 3a61ebae9..4a5672d24 100644 --- a/lib/Exceptions/JsonNotRequestedException.php +++ b/lib/Exceptions/JsonNotRequestedException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MaintenanceException.php b/lib/Exceptions/MaintenanceException.php index 46dc45072..100925fa5 100644 --- a/lib/Exceptions/MaintenanceException.php +++ b/lib/Exceptions/MaintenanceException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MemberAlreadyExistsException.php b/lib/Exceptions/MemberAlreadyExistsException.php index 95548b260..e2f63a1d1 100644 --- a/lib/Exceptions/MemberAlreadyExistsException.php +++ b/lib/Exceptions/MemberAlreadyExistsException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/MemberHelperException.php b/lib/Exceptions/MemberHelperException.php index 84a0533b4..24ef8bffb 100644 --- a/lib/Exceptions/MemberHelperException.php +++ b/lib/Exceptions/MemberHelperException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/MemberLevelException.php b/lib/Exceptions/MemberLevelException.php index ac182708b..86dfd7ab3 100644 --- a/lib/Exceptions/MemberLevelException.php +++ b/lib/Exceptions/MemberLevelException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/MemberNotFoundException.php b/lib/Exceptions/MemberNotFoundException.php index d76de29cc..f062181cf 100644 --- a/lib/Exceptions/MemberNotFoundException.php +++ b/lib/Exceptions/MemberNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MembershipNotFoundException.php b/lib/Exceptions/MembershipNotFoundException.php index 48a18abe3..b58e0a2e3 100644 --- a/lib/Exceptions/MembershipNotFoundException.php +++ b/lib/Exceptions/MembershipNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MigrationException.php b/lib/Exceptions/MigrationException.php index ad8ad66ba..cb0b73182 100644 --- a/lib/Exceptions/MigrationException.php +++ b/lib/Exceptions/MigrationException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; use Exception; diff --git a/lib/Exceptions/MountNotFoundException.php b/lib/Exceptions/MountNotFoundException.php index 9b3a6e356..d7189c1ad 100644 --- a/lib/Exceptions/MountNotFoundException.php +++ b/lib/Exceptions/MountNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MountPointConstructionException.php b/lib/Exceptions/MountPointConstructionException.php index 9667a26ee..097922ad0 100644 --- a/lib/Exceptions/MountPointConstructionException.php +++ b/lib/Exceptions/MountPointConstructionException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/MountPointNotFoundException.php b/lib/Exceptions/MountPointNotFoundException.php index 24fac7e68..d1b4bccc2 100644 --- a/lib/Exceptions/MountPointNotFoundException.php +++ b/lib/Exceptions/MountPointNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/OwnerNotFoundException.php b/lib/Exceptions/OwnerNotFoundException.php index 0775cd08a..29b6df8ce 100644 --- a/lib/Exceptions/OwnerNotFoundException.php +++ b/lib/Exceptions/OwnerNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; class OwnerNotFoundException extends FederatedItemServerException { diff --git a/lib/Exceptions/ParseMemberLevelException.php b/lib/Exceptions/ParseMemberLevelException.php index 0e64833da..ef463f5fa 100644 --- a/lib/Exceptions/ParseMemberLevelException.php +++ b/lib/Exceptions/ParseMemberLevelException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/RemoteAlreadyExistsException.php b/lib/Exceptions/RemoteAlreadyExistsException.php index 6bd6f5184..87458a245 100644 --- a/lib/Exceptions/RemoteAlreadyExistsException.php +++ b/lib/Exceptions/RemoteAlreadyExistsException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/RemoteCircleException.php b/lib/Exceptions/RemoteCircleException.php index 350ab63f0..87ce24e71 100644 --- a/lib/Exceptions/RemoteCircleException.php +++ b/lib/Exceptions/RemoteCircleException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/RemoteInstanceException.php b/lib/Exceptions/RemoteInstanceException.php index 601c3efed..232649021 100644 --- a/lib/Exceptions/RemoteInstanceException.php +++ b/lib/Exceptions/RemoteInstanceException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/RemoteNotFoundException.php b/lib/Exceptions/RemoteNotFoundException.php index 0b6f41711..b382de7c5 100644 --- a/lib/Exceptions/RemoteNotFoundException.php +++ b/lib/Exceptions/RemoteNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/RemoteResourceNotFoundException.php b/lib/Exceptions/RemoteResourceNotFoundException.php index 1aa6e1b95..5511459b5 100644 --- a/lib/Exceptions/RemoteResourceNotFoundException.php +++ b/lib/Exceptions/RemoteResourceNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/RemoteUidException.php b/lib/Exceptions/RemoteUidException.php index 40e8ae915..cd93cbd67 100644 --- a/lib/Exceptions/RemoteUidException.php +++ b/lib/Exceptions/RemoteUidException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ShareTokenAlreadyExistException.php b/lib/Exceptions/ShareTokenAlreadyExistException.php index bd662462b..d92ae52fe 100644 --- a/lib/Exceptions/ShareTokenAlreadyExistException.php +++ b/lib/Exceptions/ShareTokenAlreadyExistException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ShareTokenNotFoundException.php b/lib/Exceptions/ShareTokenNotFoundException.php index f92e575df..3c8f17efb 100644 --- a/lib/Exceptions/ShareTokenNotFoundException.php +++ b/lib/Exceptions/ShareTokenNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/ShareWrapperNotFoundException.php b/lib/Exceptions/ShareWrapperNotFoundException.php index 3c25fc0e1..c94353db3 100644 --- a/lib/Exceptions/ShareWrapperNotFoundException.php +++ b/lib/Exceptions/ShareWrapperNotFoundException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/SingleCircleNotFoundException.php b/lib/Exceptions/SingleCircleNotFoundException.php index 60a10f5d6..dddf95778 100644 --- a/lib/Exceptions/SingleCircleNotFoundException.php +++ b/lib/Exceptions/SingleCircleNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Exceptions; /** diff --git a/lib/Exceptions/SuperSessionException.php b/lib/Exceptions/SuperSessionException.php index 1f0bfe3a3..f90cceb15 100644 --- a/lib/Exceptions/SuperSessionException.php +++ b/lib/Exceptions/SuperSessionException.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/lib/Exceptions/UnknownFederatedItemException.php b/lib/Exceptions/UnknownFederatedItemException.php index 039545cca..8cfd21a64 100644 --- a/lib/Exceptions/UnknownFederatedItemException.php +++ b/lib/Exceptions/UnknownFederatedItemException.php @@ -1,15 +1,12 @@ setOutcome($this->serialize($new)); } - /** * @param FederatedEvent $event */ @@ -153,7 +148,6 @@ public function manage(FederatedEvent $event): void { $this->circleRequest->updateConfig($circle); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/CircleCreate.php b/lib/FederatedItems/CircleCreate.php index a693809aa..594544953 100644 --- a/lib/FederatedItems/CircleCreate.php +++ b/lib/FederatedItems/CircleCreate.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OC\User\NoUserException; @@ -52,7 +50,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event */ @@ -62,7 +59,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($circle)); } - /** * @param FederatedEvent $event * @@ -107,7 +103,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->circleCreating($event); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/CircleDestroy.php b/lib/FederatedItems/CircleDestroy.php index acd9fdbb3..6f9df62fb 100644 --- a/lib/FederatedItems/CircleDestroy.php +++ b/lib/FederatedItems/CircleDestroy.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\CircleRequest; @@ -41,7 +39,6 @@ class CircleDestroy implements use TStringTools; use TDeserialize; - /** * CircleDestroy constructor. * @@ -58,7 +55,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -81,7 +77,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($circle)); } - /** * @param FederatedEvent $event * @@ -103,7 +98,6 @@ public function manage(FederatedEvent $event): void { } } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/CircleEdit.php b/lib/FederatedItems/CircleEdit.php index 56be1431a..cec2be945 100644 --- a/lib/FederatedItems/CircleEdit.php +++ b/lib/FederatedItems/CircleEdit.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\CircleRequest; @@ -30,7 +28,6 @@ class CircleEdit implements IFederatedItem { use TDeserialize; - /** * CircleEdit constructor. * @@ -47,7 +44,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -86,7 +82,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($new)); } - /** * @param FederatedEvent $event * @@ -117,7 +112,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->circleEditing($event); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/CircleJoin.php b/lib/FederatedItems/CircleJoin.php index 2e89056f3..b8fdcd169 100644 --- a/lib/FederatedItems/CircleJoin.php +++ b/lib/FederatedItems/CircleJoin.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use Exception; @@ -55,7 +53,6 @@ class CircleJoin implements use TNCLogger; use TDeserialize; - /** * CircleJoin constructor. * @@ -79,7 +76,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -106,7 +102,6 @@ public function verify(FederatedEvent $event): void { ->setOutcome($this->serialize($member)); return; - // // // $federatedId = $member->getUserId() . '@' . $member->getInstance(); @@ -146,7 +141,6 @@ public function verify(FederatedEvent $event): void { // // return; - // $member = $this->membersRequest->getFreshNewMember( // $circle->getUniqueId(), $ident, $eventMember->getType(), $eventMember->getInstance() // ); @@ -175,7 +169,6 @@ public function verify(FederatedEvent $event): void { // ); } - /** * @param FederatedEvent $event * @@ -201,7 +194,6 @@ public function manage(FederatedEvent $event): void { $this->membershipService->updatePopulation($event->getCircle()); } - /** * @param FederatedEvent $event * @param array $results @@ -215,7 +207,6 @@ public function result(FederatedEvent $event, array $results): void { } } - /** * @param Circle $circle * @param Member $member @@ -230,10 +221,8 @@ private function manageMemberStatus(Circle $circle, Member $member) { switch ($knownMember->getStatus()) { case Member::STATUS_BLOCKED: throw new Exception('Blocked'); - case Member::STATUS_REQUEST: throw new MemberAlreadyExistsException(StatusCode::$CIRCLE_JOIN[123], 123); - case Member::STATUS_INVITED: $member->setId($knownMember->getId()); $member->setLevel(Member::LEVEL_MEMBER); diff --git a/lib/FederatedItems/CircleLeave.php b/lib/FederatedItems/CircleLeave.php index 3a8089141..b82ca073f 100644 --- a/lib/FederatedItems/CircleLeave.php +++ b/lib/FederatedItems/CircleLeave.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\AppInfo\Application; @@ -49,7 +47,6 @@ class CircleLeave implements use TDeserialize; use TNCLogger; - /** * CircleLeave constructor. * @@ -69,7 +66,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param FederatedEvent $event * @@ -123,7 +119,6 @@ public function verify(FederatedEvent $event): void { } } - /** * @param FederatedEvent $event * @@ -159,7 +154,6 @@ public function manage(FederatedEvent $event): void { $this->membershipService->updatePopulation($event->getCircle()); } - /** * @param FederatedEvent $event * @param array $results @@ -172,7 +166,6 @@ public function result(FederatedEvent $event, array $results): void { } } - /** * @param Circle $circle * diff --git a/lib/FederatedItems/CircleSetting.php b/lib/FederatedItems/CircleSetting.php index 93bad24a8..a20f02c79 100644 --- a/lib/FederatedItems/CircleSetting.php +++ b/lib/FederatedItems/CircleSetting.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\CircleRequest; @@ -34,7 +32,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event */ @@ -76,7 +73,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($new)); } - /** * @param FederatedEvent $event */ @@ -114,7 +110,6 @@ public function manage(FederatedEvent $event): void { } } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/CircleSettings.php b/lib/FederatedItems/CircleSettings.php index 30f63355e..451f1464c 100644 --- a/lib/FederatedItems/CircleSettings.php +++ b/lib/FederatedItems/CircleSettings.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\CircleRequest; @@ -24,7 +22,6 @@ class CircleSettings implements IFederatedItem { use TDeserialize; - /** * CircleSettings constructor. * @@ -35,7 +32,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event */ @@ -45,14 +41,12 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($new)); } - /** * @param FederatedEvent $event */ public function manage(FederatedEvent $event): void { } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/Files/FileShare.php b/lib/FederatedItems/Files/FileShare.php index d6b5cefbf..d3cabbbfa 100644 --- a/lib/FederatedItems/Files/FileShare.php +++ b/lib/FederatedItems/Files/FileShare.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems\Files; use OCA\Circles\Db\MountRequest; @@ -40,7 +38,6 @@ class FileShare implements use TStringTools; use TNCLogger; - /** * FileShare constructor. * @@ -55,7 +52,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event */ @@ -66,7 +62,6 @@ public function verify(FederatedEvent $event): void { $this->eventService->fileSharePreparing($event); } - /** * @param FederatedEvent $event * @@ -90,7 +85,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->fileShareCreating($event, $mount); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/Files/FileUnshare.php b/lib/FederatedItems/Files/FileUnshare.php index 5e535be5a..63395a9dc 100644 --- a/lib/FederatedItems/Files/FileUnshare.php +++ b/lib/FederatedItems/Files/FileUnshare.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems\Files; use OCA\Circles\Db\MountRequest; @@ -39,7 +37,6 @@ class FileUnshare implements use TStringTools; use TNCLogger; - /** * FileUnshare constructor. * @@ -54,7 +51,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event */ @@ -63,7 +59,6 @@ public function verify(FederatedEvent $event): void { // TODO: Could we use a share lock ? } - /** * @param FederatedEvent $event * @@ -83,7 +78,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->federatedShareDeleted($wrappedShare); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/ItemLock.php b/lib/FederatedItems/ItemLock.php index c89d83d57..90ebc5a5b 100644 --- a/lib/FederatedItems/ItemLock.php +++ b/lib/FederatedItems/ItemLock.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\ShareLockRequest; @@ -30,12 +28,10 @@ class ItemLock implements IFederatedItemDataRequestOnly { use TStringTools; - public const STATUS_LOCKED = 'locked'; public const STATUS_ALREADY_LOCKED = 'already_locked'; public const STATUS_INSTANCE_LOCKED = 'instance_locked'; - /** * ItemLock constructor. * @@ -46,7 +42,6 @@ public function __construct( ) { } - /** * create lock in db if the lock does not exist for this circle. * will fail if the lock already exist for anothr instance, even for another circle @@ -87,7 +82,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome(['federatedShare' => $known]); } - /** * @param FederatedEvent $event */ @@ -97,7 +91,6 @@ public function manage(FederatedEvent $event): void { // $event->setResult(new SimpleDataStore(['shares' => 'ok'])); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/LoopbackTest.php b/lib/FederatedItems/LoopbackTest.php index f5a723f27..f8a87e638 100644 --- a/lib/FederatedItems/LoopbackTest.php +++ b/lib/FederatedItems/LoopbackTest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\IFederatedItem; @@ -29,14 +27,12 @@ class LoopbackTest implements public const VERIFY = 17; public const MANAGE = 42; - /** * LoopbackTest constructor. */ public function __construct() { } - /** * @param FederatedEvent $event */ @@ -44,7 +40,6 @@ public function verify(FederatedEvent $event): void { $event->setData(new SimpleDataStore(['verify' => self::VERIFY])); } - /** * @param FederatedEvent $event */ @@ -52,7 +47,6 @@ public function manage(FederatedEvent $event): void { $event->setResult(new SimpleDataStore(['manage' => self::MANAGE])); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/MassiveMemberAdd.php b/lib/FederatedItems/MassiveMemberAdd.php index f020fdadf..d12b07cf9 100644 --- a/lib/FederatedItems/MassiveMemberAdd.php +++ b/lib/FederatedItems/MassiveMemberAdd.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use Exception; @@ -63,7 +61,6 @@ public function verify(FederatedEvent $event): void { } } - /** * @param FederatedEvent $event */ @@ -87,7 +84,6 @@ public function manage(FederatedEvent $event): void { $this->membershipService->updatePopulation($event->getCircle()); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/MemberDisplayName.php b/lib/FederatedItems/MemberDisplayName.php index ab164ae34..ce30707e9 100644 --- a/lib/FederatedItems/MemberDisplayName.php +++ b/lib/FederatedItems/MemberDisplayName.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\MemberRequest; @@ -38,7 +36,6 @@ class MemberDisplayName implements IFederatedItemMemberEmpty { use TDeserialize; - /** * MemberDisplayName constructor. * @@ -55,7 +52,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -81,7 +77,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($outcomeMember)); } - /** * @param FederatedEvent $event */ @@ -97,7 +92,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->memberNameEditing($event); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/MemberLevel.php b/lib/FederatedItems/MemberLevel.php index 4ec7d09f9..474c1043c 100644 --- a/lib/FederatedItems/MemberLevel.php +++ b/lib/FederatedItems/MemberLevel.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\MemberRequest; @@ -39,7 +37,6 @@ class MemberLevel implements IFederatedItemMemberRequired { use TDeserialize; - /** * MemberAdd constructor. * @@ -56,7 +53,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -99,7 +95,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome($this->serialize($outcomeMember)); } - /** * @param FederatedEvent $event * @@ -122,7 +117,6 @@ public function manage(FederatedEvent $event): void { $this->eventService->memberLevelEditing($event); } - /** * @param FederatedEvent $event * @param array $results @@ -131,7 +125,6 @@ public function result(FederatedEvent $event, array $results): void { $this->eventService->memberLevelEdited($event, $results); } - /** * @param Member $member * @param Member $initiator diff --git a/lib/FederatedItems/MemberRemove.php b/lib/FederatedItems/MemberRemove.php index 09442ea55..f3d4e0463 100644 --- a/lib/FederatedItems/MemberRemove.php +++ b/lib/FederatedItems/MemberRemove.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\Db\MemberRequest; @@ -47,7 +45,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -68,7 +65,6 @@ public function verify(FederatedEvent $event): void { $event->setOutcome([]); } - /** * @param FederatedEvent $event * @@ -85,7 +81,6 @@ public function manage(FederatedEvent $event): void { $this->membershipService->updatePopulation($event->getCircle()); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/SharedItemsSync.php b/lib/FederatedItems/SharedItemsSync.php index 22372b32d..4a3f34254 100644 --- a/lib/FederatedItems/SharedItemsSync.php +++ b/lib/FederatedItems/SharedItemsSync.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OCA\Circles\IFederatedItem; @@ -31,19 +29,16 @@ class SharedItemsSync implements /** @var CircleEventService */ private $circleEventService; - public function __construct(CircleEventService $circleEventService) { $this->circleEventService = $circleEventService; } - /** * @param FederatedEvent $event */ public function verify(FederatedEvent $event): void { } - /** * @param FederatedEvent $event */ @@ -53,7 +48,6 @@ public function manage(FederatedEvent $event): void { $event->setResult(new SimpleDataStore(['shares' => 'ok'])); } - /** * @param FederatedEvent $event * @param array $results diff --git a/lib/FederatedItems/SingleMemberAdd.php b/lib/FederatedItems/SingleMemberAdd.php index 114ef8707..7e122cd20 100644 --- a/lib/FederatedItems/SingleMemberAdd.php +++ b/lib/FederatedItems/SingleMemberAdd.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\FederatedItems; use OC\User\NoUserException; @@ -90,7 +88,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $event * @@ -119,7 +116,6 @@ public function verify(FederatedEvent $event): void { $this->eventService->memberPreparing($event); } - /** * @param FederatedEvent $event * @@ -143,7 +139,6 @@ public function manage(FederatedEvent $event): void { $this->membershipService->updatePopulation($event->getCircle()); } - /** * @param FederatedEvent $event * @param array $results @@ -157,7 +152,6 @@ public function result(FederatedEvent $event, array $results): void { } } - /** * @param FederatedEvent $event * @param Circle $circle @@ -229,8 +223,8 @@ protected function generateMember(FederatedEvent $event, Circle $circle, Member } $remoteInstance = $this->remoteStreamService->getCachedRemoteInstance($member->getInstance()); - if (($remoteInstance->getInterface() === InterfaceService::IFACE_FRONTAL) && - !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { + if (($remoteInstance->getInterface() === InterfaceService::IFACE_FRONTAL) + && !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { throw new FederatedItemBadRequestException(StatusCode::$MEMBER_ADD[133], 133); } } @@ -260,7 +254,6 @@ protected function generateMember(FederatedEvent $event, Circle $circle, Member return $member; } - /** * @param Circle $circle * @param Member $member @@ -281,13 +274,11 @@ private function manageMemberStatus(Circle $circle, Member $member) { } return; - case Member::STATUS_REQUEST: $member->setLevel(Member::LEVEL_MEMBER); $member->setStatus(Member::STATUS_MEMBER); return; - case Member::STATUS_INVITED: throw new FederatedItemBadRequestException(StatusCode::$MEMBER_ADD[123], 123); } @@ -308,7 +299,6 @@ private function manageMemberStatus(Circle $circle, Member $member) { } } - /** * @param FederatedEvent $event * @param Member $member diff --git a/lib/FileSharingTeamResourceProvider.php b/lib/FileSharingTeamResourceProvider.php index 75ea1d6ac..138519110 100644 --- a/lib/FileSharingTeamResourceProvider.php +++ b/lib/FileSharingTeamResourceProvider.php @@ -77,8 +77,8 @@ private function convertWrappedShareToResource(array $shares): array { basename($shareWrapper->getFileTarget()), $this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()), iconSvg: $isFolder ? '' : null, - iconURL: !$isFolder ? - $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ]) + iconURL: !$isFolder + ? $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ]) : null, ); }, $shares); diff --git a/lib/IBroadcaster.php b/lib/IBroadcaster.php index 915a485fe..5cbfed3ed 100644 --- a/lib/IBroadcaster.php +++ b/lib/IBroadcaster.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles; use OCA\Circles\Model\DeprecatedCircle; @@ -16,13 +17,11 @@ interface IBroadcaster { */ public function init(); - /** * Init the broadcaster */ public function end(); - /** * broadcast a creation of a Share to a circle. * @@ -31,7 +30,6 @@ public function end(); */ public function createShareToCircle(SharingFrame $frame, DeprecatedCircle $circle); - /** * broadcast an edition of $share to $circleId. * @@ -40,7 +38,6 @@ public function createShareToCircle(SharingFrame $frame, DeprecatedCircle $circl */ public function editShareToCircle(SharingFrame $frame, DeprecatedCircle $circle); - /** * broadcast a destruction of $share to $circleId. * @@ -49,7 +46,6 @@ public function editShareToCircle(SharingFrame $frame, DeprecatedCircle $circle) */ public function deleteShareToCircle(SharingFrame $frame, DeprecatedCircle $circle); - /** * broadcast a creation of a Share to a $userId. * @@ -58,7 +54,6 @@ public function deleteShareToCircle(SharingFrame $frame, DeprecatedCircle $circl */ public function createShareToMember(SharingFrame $frame, DeprecatedMember $member); - /** * broadcast an edition of $share to $userId. * @@ -67,7 +62,6 @@ public function createShareToMember(SharingFrame $frame, DeprecatedMember $membe */ public function editShareToMember(SharingFrame $frame, DeprecatedMember $member); - /** * broadcast a destruction of $share to $userId. * diff --git a/lib/IEntity.php b/lib/IEntity.php index 6501c3e56..f4f125c31 100644 --- a/lib/IEntity.php +++ b/lib/IEntity.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Exceptions\MembershipNotFoundException; diff --git a/lib/IFederatedItem.php b/lib/IFederatedItem.php index a79a82e52..309030ad8 100644 --- a/lib/IFederatedItem.php +++ b/lib/IFederatedItem.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Exceptions\FederatedItemException; diff --git a/lib/IFederatedItemAsyncProcess.php b/lib/IFederatedItemAsyncProcess.php index d614f2316..fe2456013 100644 --- a/lib/IFederatedItemAsyncProcess.php +++ b/lib/IFederatedItemAsyncProcess.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemCircleCheckNotRequired.php b/lib/IFederatedItemCircleCheckNotRequired.php index 539551bbb..dfaf47100 100644 --- a/lib/IFederatedItemCircleCheckNotRequired.php +++ b/lib/IFederatedItemCircleCheckNotRequired.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemDataRequestOnly.php b/lib/IFederatedItemDataRequestOnly.php index 9f0694c67..310d59298 100644 --- a/lib/IFederatedItemDataRequestOnly.php +++ b/lib/IFederatedItemDataRequestOnly.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemHighSeverity.php b/lib/IFederatedItemHighSeverity.php index 23f0622bb..63e32c728 100644 --- a/lib/IFederatedItemHighSeverity.php +++ b/lib/IFederatedItemHighSeverity.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemInitiatorCheckNotRequired.php b/lib/IFederatedItemInitiatorCheckNotRequired.php index 255aeba7b..6c3bae996 100644 --- a/lib/IFederatedItemInitiatorCheckNotRequired.php +++ b/lib/IFederatedItemInitiatorCheckNotRequired.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemInitiatorMembershipNotRequired.php b/lib/IFederatedItemInitiatorMembershipNotRequired.php index 5b8178cce..e8562f5a9 100644 --- a/lib/IFederatedItemInitiatorMembershipNotRequired.php +++ b/lib/IFederatedItemInitiatorMembershipNotRequired.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemLimitedToInstanceWithMembership.php b/lib/IFederatedItemLimitedToInstanceWithMembership.php index 7db6a0b05..c6663b410 100644 --- a/lib/IFederatedItemLimitedToInstanceWithMembership.php +++ b/lib/IFederatedItemLimitedToInstanceWithMembership.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemLoopbackTest.php b/lib/IFederatedItemLoopbackTest.php index b666662c0..92573eb8a 100644 --- a/lib/IFederatedItemLoopbackTest.php +++ b/lib/IFederatedItemLoopbackTest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemMemberCheckNotRequired.php b/lib/IFederatedItemMemberCheckNotRequired.php index 57ca365a0..5150dc545 100644 --- a/lib/IFederatedItemMemberCheckNotRequired.php +++ b/lib/IFederatedItemMemberCheckNotRequired.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemMemberEmpty.php b/lib/IFederatedItemMemberEmpty.php index 63b8c5d53..0f43bbdf8 100644 --- a/lib/IFederatedItemMemberEmpty.php +++ b/lib/IFederatedItemMemberEmpty.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemMemberOptional.php b/lib/IFederatedItemMemberOptional.php index 609f259d0..7861a1a5d 100644 --- a/lib/IFederatedItemMemberOptional.php +++ b/lib/IFederatedItemMemberOptional.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemMemberRequired.php b/lib/IFederatedItemMemberRequired.php index a473016fe..7f144adb9 100644 --- a/lib/IFederatedItemMemberRequired.php +++ b/lib/IFederatedItemMemberRequired.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemMustBeInitializedLocally.php b/lib/IFederatedItemMustBeInitializedLocally.php index 73b71c0f8..a5cdd847f 100644 --- a/lib/IFederatedItemMustBeInitializedLocally.php +++ b/lib/IFederatedItemMustBeInitializedLocally.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedItemShareManagement.php b/lib/IFederatedItemShareManagement.php index 71d114edf..58cf6b63b 100644 --- a/lib/IFederatedItemShareManagement.php +++ b/lib/IFederatedItemShareManagement.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Model\Federated\FederatedEvent; diff --git a/lib/IFederatedItemSharedItem.php b/lib/IFederatedItemSharedItem.php index 0f6a0a146..7049aab5e 100644 --- a/lib/IFederatedItemSharedItem.php +++ b/lib/IFederatedItemSharedItem.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedModel.php b/lib/IFederatedModel.php index 6b7b70a24..4ffd72b60 100644 --- a/lib/IFederatedModel.php +++ b/lib/IFederatedModel.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/IFederatedSync.php b/lib/IFederatedSync.php index 728b84a91..2f324b61d 100644 --- a/lib/IFederatedSync.php +++ b/lib/IFederatedSync.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Tools\Model\SimpleDataStore; diff --git a/lib/IFederatedUser.php b/lib/IFederatedUser.php index acc43f6c0..67e3c5a71 100644 --- a/lib/IFederatedUser.php +++ b/lib/IFederatedUser.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Model\Circle; diff --git a/lib/IQueryProbe.php b/lib/IQueryProbe.php index 52ce9798b..1fc8ce96e 100644 --- a/lib/IQueryProbe.php +++ b/lib/IQueryProbe.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Model\Circle; diff --git a/lib/ISearch.php b/lib/ISearch.php index 6ba6ee995..013ded959 100644 --- a/lib/ISearch.php +++ b/lib/ISearch.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; use OCA\Circles\Model\SearchResult; diff --git a/lib/Listeners/AccountUpdated.php b/lib/Listeners/AccountUpdated.php index 438896d1a..ba1da9f72 100644 --- a/lib/Listeners/AccountUpdated.php +++ b/lib/Listeners/AccountUpdated.php @@ -36,7 +36,6 @@ public function __construct( ) { } - /** * @param Event $event */ diff --git a/lib/Listeners/DeprecatedListener.php b/lib/Listeners/DeprecatedListener.php index cba5d995b..097a248c1 100644 --- a/lib/Listeners/DeprecatedListener.php +++ b/lib/Listeners/DeprecatedListener.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; @@ -56,7 +54,6 @@ public function __construct( ) { } - /** * @throws ContactAddressBookNotFoundException * @throws ContactFormatException diff --git a/lib/Listeners/Examples/ExampleAddingCircleMember.php b/lib/Listeners/Examples/ExampleAddingCircleMember.php index 1154bbc1e..cb4008100 100644 --- a/lib/Listeners/Examples/ExampleAddingCircleMember.php +++ b/lib/Listeners/Examples/ExampleAddingCircleMember.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Examples; use OCA\Circles\AppInfo\Application; diff --git a/lib/Listeners/Examples/ExampleMembershipsCreated.php b/lib/Listeners/Examples/ExampleMembershipsCreated.php index a70f295c8..63057a354 100644 --- a/lib/Listeners/Examples/ExampleMembershipsCreated.php +++ b/lib/Listeners/Examples/ExampleMembershipsCreated.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Examples; use Exception; @@ -48,8 +46,8 @@ public function handle(Event $event): void { $memberships = array_map( function (Membership $membership) { - $inheritance = ($membership->getInheritanceDepth() > 1) ? - 'an inherited member' : 'a direct member'; + $inheritance = ($membership->getInheritanceDepth() > 1) + ? 'an inherited member' : 'a direct member'; try { $federatedUser = $this->circlesManager->getFederatedUser($membership->getSingleId()); } catch (Exception $e) { diff --git a/lib/Listeners/Examples/ExampleMembershipsRemoved.php b/lib/Listeners/Examples/ExampleMembershipsRemoved.php index a9f031e2e..ed03e57b0 100644 --- a/lib/Listeners/Examples/ExampleMembershipsRemoved.php +++ b/lib/Listeners/Examples/ExampleMembershipsRemoved.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Examples; use Exception; @@ -48,8 +46,8 @@ public function handle(Event $event): void { $memberships = array_map( function (Membership $membership) { - $inheritance = ($membership->getInheritanceDepth() > 1) ? - 'an inherited member' : 'a direct member'; + $inheritance = ($membership->getInheritanceDepth() > 1) + ? 'an inherited member' : 'a direct member'; try { $federatedUser = $this->circlesManager->getFederatedUser($membership->getSingleId()); } catch (Exception $e) { diff --git a/lib/Listeners/Examples/ExampleRequestingCircleMember.php b/lib/Listeners/Examples/ExampleRequestingCircleMember.php index d2ae16ea5..d3efaea0b 100644 --- a/lib/Listeners/Examples/ExampleRequestingCircleMember.php +++ b/lib/Listeners/Examples/ExampleRequestingCircleMember.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Examples; use OCA\Circles\AppInfo\Application; diff --git a/lib/Listeners/Files/AddingMemberSendMail.php b/lib/Listeners/Files/AddingMemberSendMail.php index c67900996..30aead56d 100644 --- a/lib/Listeners/Files/AddingMemberSendMail.php +++ b/lib/Listeners/Files/AddingMemberSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use Exception; @@ -39,7 +37,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws RequestBuilderException */ diff --git a/lib/Listeners/Files/CreatingShareSendMail.php b/lib/Listeners/Files/CreatingShareSendMail.php index 1cd8fef83..2d8c04297 100644 --- a/lib/Listeners/Files/CreatingShareSendMail.php +++ b/lib/Listeners/Files/CreatingShareSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use Exception; @@ -46,7 +44,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws FederatedItemException * @throws RemoteInstanceException diff --git a/lib/Listeners/Files/DestroyingCircle.php b/lib/Listeners/Files/DestroyingCircle.php index 21659221f..016353a67 100644 --- a/lib/Listeners/Files/DestroyingCircle.php +++ b/lib/Listeners/Files/DestroyingCircle.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\AppInfo\Application; @@ -25,7 +23,6 @@ class DestroyingCircle implements IEventListener { use TStringTools; use TNCLogger; - /** * AddingMember constructor. * @@ -37,7 +34,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws RequestBuilderException */ diff --git a/lib/Listeners/Files/MemberAddedSendMail.php b/lib/Listeners/Files/MemberAddedSendMail.php index 5ead03738..2b4f685a1 100644 --- a/lib/Listeners/Files/MemberAddedSendMail.php +++ b/lib/Listeners/Files/MemberAddedSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\AppInfo\Application; diff --git a/lib/Listeners/Files/MembershipsRemoved.php b/lib/Listeners/Files/MembershipsRemoved.php index 4bff62457..89074fb6f 100644 --- a/lib/Listeners/Files/MembershipsRemoved.php +++ b/lib/Listeners/Files/MembershipsRemoved.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\CirclesManager; @@ -46,7 +44,6 @@ public function __construct( ) { } - /** * @throws CircleNotFoundException * @throws FederatedItemException diff --git a/lib/Listeners/Files/PreparingMemberSendMail.php b/lib/Listeners/Files/PreparingMemberSendMail.php index 1319bb4bd..97b1bd4ab 100644 --- a/lib/Listeners/Files/PreparingMemberSendMail.php +++ b/lib/Listeners/Files/PreparingMemberSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\AppInfo\Application; @@ -45,7 +43,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws RequestBuilderException * @throws FederatedItemException diff --git a/lib/Listeners/Files/PreparingShareSendMail.php b/lib/Listeners/Files/PreparingShareSendMail.php index 8c7d2b04c..a98e2ef2b 100644 --- a/lib/Listeners/Files/PreparingShareSendMail.php +++ b/lib/Listeners/Files/PreparingShareSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\AppInfo\Application; @@ -47,7 +45,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws FederatedItemException * @throws RemoteInstanceException diff --git a/lib/Listeners/Files/RemovingMember.php b/lib/Listeners/Files/RemovingMember.php index 0c4eb7f41..df3a52e93 100644 --- a/lib/Listeners/Files/RemovingMember.php +++ b/lib/Listeners/Files/RemovingMember.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use OCA\Circles\Events\RemovingCircleMemberEvent; @@ -72,7 +70,6 @@ public function handle(Event $event): void { } } - /** * @param Member $member * @param string[] $singleIds @@ -89,7 +86,6 @@ private function removingSharesExternalMember(Member $member, array $singleIds) } } - /** * @param Member $member * @param string[] $singleIds diff --git a/lib/Listeners/Files/ShareCreatedSendMail.php b/lib/Listeners/Files/ShareCreatedSendMail.php index 0d29bd5a4..058b71a3f 100644 --- a/lib/Listeners/Files/ShareCreatedSendMail.php +++ b/lib/Listeners/Files/ShareCreatedSendMail.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners\Files; use Exception; @@ -56,7 +54,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @throws FederatedItemException * @throws RemoteInstanceException diff --git a/lib/Listeners/GroupCreated.php b/lib/Listeners/GroupCreated.php index d7fe524ae..6e18521dc 100644 --- a/lib/Listeners/GroupCreated.php +++ b/lib/Listeners/GroupCreated.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; diff --git a/lib/Listeners/GroupDeleted.php b/lib/Listeners/GroupDeleted.php index 91d17c320..14f73c838 100644 --- a/lib/Listeners/GroupDeleted.php +++ b/lib/Listeners/GroupDeleted.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; diff --git a/lib/Listeners/GroupMemberAdded.php b/lib/Listeners/GroupMemberAdded.php index 18a886ea9..912895139 100644 --- a/lib/Listeners/GroupMemberAdded.php +++ b/lib/Listeners/GroupMemberAdded.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; diff --git a/lib/Listeners/GroupMemberRemoved.php b/lib/Listeners/GroupMemberRemoved.php index 3e5648ad0..644d5ff6f 100644 --- a/lib/Listeners/GroupMemberRemoved.php +++ b/lib/Listeners/GroupMemberRemoved.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; diff --git a/lib/Listeners/NodeEventListener.php b/lib/Listeners/NodeEventListener.php index 55262b033..f73aeb131 100644 --- a/lib/Listeners/NodeEventListener.php +++ b/lib/Listeners/NodeEventListener.php @@ -110,9 +110,9 @@ private function invalidateCacheForNode(Node $node): void { } $this->logger->debug( - 'Invalidated cache for node ' . $node->getId() . - ' affecting ' . count($affectedCircles) . ' circle(s), ' . - 'traversed ' . count($visitedNodeIds) . ' level(s)' + 'Invalidated cache for node ' . $node->getId() + . ' affecting ' . count($affectedCircles) . ' circle(s), ' + . 'traversed ' . count($visitedNodeIds) . ' level(s)' ); } } diff --git a/lib/Listeners/UserCreated.php b/lib/Listeners/UserCreated.php index 1cff65598..ea7a25c63 100644 --- a/lib/Listeners/UserCreated.php +++ b/lib/Listeners/UserCreated.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; @@ -29,7 +27,6 @@ public function __construct( ) { } - /** * @param Event $event */ diff --git a/lib/Listeners/UserDeleted.php b/lib/Listeners/UserDeleted.php index 57a0f142d..2cfee73e2 100644 --- a/lib/Listeners/UserDeleted.php +++ b/lib/Listeners/UserDeleted.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Listeners; use Exception; @@ -29,7 +27,6 @@ public function __construct( ) { } - /** * @param Event $event */ diff --git a/lib/Migration/Migration.php b/lib/Migration/Migration.php index 512edaf30..4889cf09c 100644 --- a/lib/Migration/Migration.php +++ b/lib/Migration/Migration.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Exception; @@ -27,7 +25,6 @@ class Migration implements IRepairStep { use TNCLogger; - /** * Migration constructor. * @@ -42,7 +39,6 @@ public function __construct( ) { } - /** * @return string */ @@ -50,7 +46,6 @@ public function getName(): string { return 'Upgrading Circles App'; } - /** * @param IOutput $output */ diff --git a/lib/Migration/Version0022Date20220526111723.php b/lib/Migration/Version0022Date20220526111723.php index 9dffba403..f2afa1475 100644 --- a/lib/Migration/Version0022Date20220526111723.php +++ b/lib/Migration/Version0022Date20220526111723.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -31,7 +30,6 @@ public function __construct( ) { } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/lib/Migration/Version0022Date20220526113601.php b/lib/Migration/Version0022Date20220526113601.php index 2e0596617..fd3846b62 100644 --- a/lib/Migration/Version0022Date20220526113601.php +++ b/lib/Migration/Version0022Date20220526113601.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; @@ -31,7 +29,6 @@ class Version0022Date20220526113601 extends SimpleMigrationStep { public function __construct(IDBConnection $connection) { } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` @@ -44,7 +41,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - /** * CIRCLES_CIRCLE */ @@ -143,7 +139,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['sanitized_name']); } - /** * CIRCLES_MEMBER */ @@ -256,7 +251,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['contact_id']); } - /** * CIRCLES_REMOTE */ @@ -319,7 +313,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['href']); } - /** * CIRCLES_EVENT */ @@ -387,7 +380,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addUniqueIndex(['token', 'instance']); } - /** * CIRCLES_MEMBERSHIP */ @@ -445,7 +437,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt ); } - /** * CIRCLES_TOKEN */ @@ -506,7 +497,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addUniqueIndex(['share_id', 'circle_id', 'single_id', 'member_id', 'token'], 'sicisimit'); } - /** * CIRCLES_MOUNT */ @@ -566,7 +556,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['circle_id', 'mount_id', 'parent', 'token'], 'circles_mount_cimipt'); } - /** * CIRCLES_MOUNTPOINT */ @@ -608,7 +597,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addIndex(['mount_id', 'single_id'], 'circles_mountpoint_ms'); } - /** * CIRCLES_SHARE_LOCK */ diff --git a/lib/Migration/Version0022Date20220703115023.php b/lib/Migration/Version0022Date20220703115023.php index 1e372f61d..0e3da3789 100644 --- a/lib/Migration/Version0022Date20220703115023.php +++ b/lib/Migration/Version0022Date20220703115023.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; @@ -30,7 +28,6 @@ class Version0022Date20220703115023 extends SimpleMigrationStep { public function __construct(IDBConnection $connection) { } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` @@ -75,7 +72,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt } } - if ($schema->hasTable('circles_circle')) { $table = $schema->getTable('circles_circle'); if (!$table->hasColumn('sanitized_name')) { @@ -91,7 +87,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt } } - if ($schema->hasTable('circles_membership')) { $table = $schema->getTable('circles_membership'); $table->modifyColumn( @@ -120,7 +115,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt ); } - if ($schema->hasTable('circles_mount')) { $table = $schema->getTable('circles_mount'); $table->modifyColumn( @@ -143,7 +137,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt ); } - if ($schema->hasTable('circles_mountpoint')) { $table = $schema->getTable('circles_mountpoint'); $table->modifyColumn( @@ -160,7 +153,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt ); } - if ($schema->hasTable('circles_share_lock')) { $table = $schema->getTable('circles_share_lock'); $table->modifyColumn( @@ -177,8 +169,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt ); } - - /** * CIRCLES_TOKEN */ @@ -239,7 +229,6 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt $table->addUniqueIndex(['share_id', 'circle_id', 'single_id', 'member_id', 'token'], 'sicisimit'); } - return $schema; } } diff --git a/lib/Migration/Version0023Date20211216113101.php b/lib/Migration/Version0023Date20211216113101.php index d9ffa28f4..cef279d73 100644 --- a/lib/Migration/Version0023Date20211216113101.php +++ b/lib/Migration/Version0023Date20211216113101.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use OCP\IDBConnection; diff --git a/lib/Migration/Version0024Date20220203123901.php b/lib/Migration/Version0024Date20220203123901.php index 0215f265a..7ead1f008 100644 --- a/lib/Migration/Version0024Date20220203123901.php +++ b/lib/Migration/Version0024Date20220203123901.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; @@ -30,7 +28,6 @@ class Version0024Date20220203123901 extends SimpleMigrationStep { public function __construct(IDBConnection $connection) { } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/lib/Migration/Version0024Date20220203123902.php b/lib/Migration/Version0024Date20220203123902.php index 102802b4d..549d5c62a 100644 --- a/lib/Migration/Version0024Date20220203123902.php +++ b/lib/Migration/Version0024Date20220203123902.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; @@ -25,7 +23,6 @@ class Version0024Date20220203123902 extends SimpleMigrationStep { public function __construct(IDBConnection $connection) { } - /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` diff --git a/lib/Migration/Version0024Date20220317190331.php b/lib/Migration/Version0024Date20220317190331.php index 904702f5e..333ba3dec 100644 --- a/lib/Migration/Version0024Date20220317190331.php +++ b/lib/Migration/Version0024Date20220317190331.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; diff --git a/lib/Migration/Version0028Date20230705222601.php b/lib/Migration/Version0028Date20230705222601.php index 028fc2ebc..e497b2efe 100644 --- a/lib/Migration/Version0028Date20230705222601.php +++ b/lib/Migration/Version0028Date20230705222601.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; diff --git a/lib/Migration/Version0031Date20241105133904.php b/lib/Migration/Version0031Date20241105133904.php index 0af92163f..eb00ee705 100644 --- a/lib/Migration/Version0031Date20241105133904.php +++ b/lib/Migration/Version0031Date20241105133904.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; diff --git a/lib/Migration/Version0032Date20250623120204.php b/lib/Migration/Version0032Date20250623120204.php index 484ced707..265e7d776 100644 --- a/lib/Migration/Version0032Date20250623120204.php +++ b/lib/Migration/Version0032Date20250623120204.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Migration; use Closure; diff --git a/lib/Model/BaseCircle.php b/lib/Model/BaseCircle.php index d4f7b085c..266b95469 100644 --- a/lib/Model/BaseCircle.php +++ b/lib/Model/BaseCircle.php @@ -75,7 +75,6 @@ class BaseCircle { /** @var int */ private $contactAddressBook = 0; - /** @var string */ private $creation; @@ -117,7 +116,6 @@ public function getId() { return $this->id; } - /** * @param string $uniqueId * @@ -202,7 +200,6 @@ public function setOwner($owner) { return $this; } - /** * @return DeprecatedMember */ @@ -221,12 +218,10 @@ public function setViewer($user) { return $this; } - public function hasViewer(): bool { return ($this->viewer !== null); } - /** * @return DeprecatedMember */ @@ -267,7 +262,6 @@ public function getHigherViewer() { return $this->getViewer(); } - /** * @param string $description * @@ -286,7 +280,6 @@ public function getDescription() { return $this->description; } - /** * @param int $contactAddressBook * @@ -305,7 +298,6 @@ public function getContactAddressBook() { return $this->contactAddressBook; } - /** * @param string $contactGroupName * @@ -324,7 +316,6 @@ public function getContactGroupName() { return $this->contactGroupName; } - /** * @param string|array $settings * @param bool $all @@ -373,7 +364,6 @@ public function getSettings($json = false) { return $settings; } - /** * @param string $k * @param mixed $v @@ -398,7 +388,6 @@ public function setSetting($k, $v) { } } - /** * @param string $k * @@ -415,7 +404,6 @@ public function getSetting($k) { return null; } - /** * @return string */ @@ -430,7 +418,6 @@ public function setPasswordSingle(string $passwordSingle): void { $this->passwordSingle = $passwordSingle; } - /** * * @param string $type @@ -522,7 +509,6 @@ public function getLinks() { return $this->links; } - // public function getRemote() { // return $this->remote; // } diff --git a/lib/Model/BaseMember.php b/lib/Model/BaseMember.php index 4dea9c545..1fe6326cb 100644 --- a/lib/Model/BaseMember.php +++ b/lib/Model/BaseMember.php @@ -101,7 +101,6 @@ public function __construct($userId = '', $type = 0, $circleUniqueId = '') { $this->setStatus(DeprecatedMember::STATUS_NONMEMBER); } - /** * @param string $circleUniqueId * @@ -120,7 +119,6 @@ public function getCircleId() { return $this->circleUniqueId; } - /** * @return int */ @@ -132,7 +130,6 @@ public function setType($type) { $this->type = (int)$type; } - public function getViewerType() { if ($this->getType() === 2) { return 'group'; @@ -141,7 +138,6 @@ public function getViewerType() { } } - public function setUserId($userId) { $this->userId = $userId; @@ -152,7 +148,6 @@ public function getUserId() { return $this->userId; } - public function setMemberId($memberId) { $this->memberId = $memberId; @@ -163,7 +158,6 @@ public function getMemberId() { return $this->memberId; } - public function setCachedName($display) { $this->cachedName = $display; @@ -178,7 +172,6 @@ public function getCachedName() { return $this->cachedName; } - public function setCachedUpdate(int $time) { $this->cachedUpdate = $time; @@ -189,7 +182,6 @@ public function getCachedUpdate(): int { return $this->cachedUpdate; } - public function setLevel($level) { $this->level = (int)$level; @@ -200,7 +192,6 @@ public function getLevel() { return $this->level; } - public function setNote($note) { $this->note = $note; @@ -211,7 +202,6 @@ public function getNote() { return $this->note; } - public function setInstance($instance) { $this->instance = $instance; @@ -222,7 +212,6 @@ public function getInstance() { return $this->instance; } - public function setContactId($contactId) { $this->contactId = $contactId; @@ -233,7 +222,6 @@ public function getContactId() { return $this->contactId; } - /** * @param array $contactMeta * @@ -292,7 +280,6 @@ public function setContactMetaArray(string $k, array $v): self { return $this; } - /** * @param $status * @@ -312,7 +299,6 @@ public function getStatus() { return $this->status; } - public function setJoined($joined) { $this->joined = $joined; @@ -323,7 +309,6 @@ public function getJoined() { return $this->joined; } - public function getJoinedSince(): int { return $this->joinedSince; } @@ -332,18 +317,15 @@ public function setJoinedSince(int $since) { $this->joinedSince = $since; } - public function isLevel($level) { return ($this->getLevel() >= $level); } - public function isAlmostMember() { return ($this->getStatus() === DeprecatedMember::STATUS_INVITED || $this->getStatus() === DeprecatedMember::STATUS_REQUEST); } - protected function setAsAMember($level = 1) { $this->setStatus(DeprecatedMember::STATUS_MEMBER); $this->setLevel($level); @@ -383,7 +365,6 @@ public static function fromJSON(string $json): ?DeprecatedMember { return self::fromArray(json_decode($json, true)); } - public function jsonSerialize(): array { return [ 'circle_id' => $this->getCircleId(), @@ -412,7 +393,6 @@ public function getLevelString() { }; } - public function getTypeString() { return match ($this->getType()) { self::TYPE_USER => 'Local Member', diff --git a/lib/Model/Circle.php b/lib/Model/Circle.php index 0e1b76688..5b236097f 100644 --- a/lib/Model/Circle.php +++ b/lib/Model/Circle.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use DateTime; @@ -94,7 +92,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow public const CFG_APP = 131072; // Some features are not available to the OCS API (ie. destroying Circle) public static $DEF_CFG_MAX = 262143; - /** * Note: When editing those values, update lib/Application/Capabilities.php * @@ -122,7 +119,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow 131072 => 'A|App' ]; - /** * Note: When editing those values, update lib/AppInfo/Capabilities.php * @@ -142,7 +138,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow 11010 => 'Collectives App' ]; - public static $DEF_CFG_CORE_FILTER = [ 1, 2, @@ -155,7 +150,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow 2048 ]; - /** @var string */ private $singleId = ''; @@ -210,7 +204,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow /** @var int */ private $creation = 0; - /** @var Member[] */ private $members = null; @@ -223,7 +216,6 @@ class Circle extends ManagedModel implements IEntity, IDeserializable, IQueryRow /** @var Membership[] */ private $memberships = null; - /** * Circle constructor. */ @@ -256,7 +248,6 @@ public function getUniqueId(): string { return $this->getSingleId(); } - /** * @param int $config * @@ -307,7 +298,6 @@ public function remConfig(int $flag): void { } } - /** * @param string $name * @@ -326,7 +316,6 @@ public function getName(): string { return $this->name; } - /** * @param string $displayName * @@ -345,7 +334,6 @@ public function getDisplayName(): string { return $this->displayName; } - /** * @param string $sanitizedName * @@ -364,7 +352,6 @@ public function getSanitizedName(): string { return $this->sanitizedName; } - /** * @param int $source * @@ -383,7 +370,6 @@ public function getSource(): int { return $this->source; } - /** * @param ?Member $owner * @@ -409,7 +395,6 @@ public function hasOwner(): bool { return !is_null($this->owner); } - /** * @return bool */ @@ -439,7 +424,6 @@ public function getMembers(int $limit = 0): array { return $this->members; } - /** * @param array $members * @param bool $detailed @@ -474,7 +458,6 @@ public function addInheritedMembers(array $members): self { return $this; } - /** * if $remote is true, it will returns also details on inherited members from remote+locals Circles. * This should be used only if extra details are required (mail address ?) as it will send a request to @@ -505,7 +488,6 @@ public function getInheritedMembers(bool $detailed = false, bool $remote = false return $this->inheritedMembers; } - /** * @return bool */ @@ -535,7 +517,6 @@ public function getMemberships(): array { return $this->memberships; } - /** * @param string $singleId * @param bool $detailed @@ -548,7 +529,6 @@ public function getLink(string $singleId, bool $detailed = false): Membership { return $this->getManager()->getLink($this, $singleId, $detailed); } - /** * @param Member|null $initiator * @@ -592,7 +572,6 @@ public function setDirectInitiator(?Member $directInitiator): self { return $this; } - /** * @param string $instance * @@ -618,7 +597,6 @@ public function getInstance(): string { return $this->getOwner()->getInstance(); } - /** * @return bool * @throws OwnerNotFoundException @@ -627,7 +605,6 @@ public function isLocal(): bool { return $this->getManager()->isLocalInstance($this->getInstance()); } - /** * @param int $population * @@ -646,7 +623,6 @@ public function getPopulation(): int { return $this->population; } - /** * @param int $population * @@ -665,7 +641,6 @@ public function getPopulationInherited(): int { return $this->populationInherited; } - /** * @param array $settings * @@ -684,7 +659,6 @@ public function getSettings(): array { return $this->settings; } - /** * @param string $description * @@ -703,7 +677,6 @@ public function getDescription(): string { return $this->description; } - /** * @return string */ @@ -711,7 +684,6 @@ public function getUrl(): string { return $this->getManager()->generateLinkToCircle($this->getSingleId()); } - /** * @param int $contactAddressBook * @@ -730,7 +702,6 @@ public function getContactAddressBook(): int { return $this->contactAddressBook; } - /** * @param string $contactGroupName * @@ -749,7 +720,6 @@ public function getContactGroupName(): string { return $this->contactGroupName; } - /** * @param int $creation * @@ -768,7 +738,6 @@ public function getCreation(): int { return $this->creation; } - /** * @param array $data * @@ -810,7 +779,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @return array * @throws FederatedItemException @@ -865,7 +833,6 @@ public function jsonSerialize(): array { return $arr; } - /** * @param array $data * @param string $prefix @@ -900,7 +867,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow $this->getManager()->manageImportFromDatabase($this, $data, $prefix); - // TODO: deprecated in NC27, remove those (17) lines that was needed to finalise migration to 24 // if password is not hashed (pre-22), hash it and update new settings in DB $curr = $this->get('password_single', $this->getSettings()); @@ -921,7 +887,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * @param Circle $circle * @@ -950,7 +915,6 @@ public function compareWith(Circle $circle): bool { return true; } - /** * @param Circle $circle * @param int $display diff --git a/lib/Model/DavCard.php b/lib/Model/DavCard.php index fc455f29c..3366052b3 100644 --- a/lib/Model/DavCard.php +++ b/lib/Model/DavCard.php @@ -1,12 +1,10 @@ getAddressBookId() . '/' . $this->getCardUri(); } - /** * @return string */ @@ -144,7 +134,6 @@ public function setContactId(string $contactId): self { return $this; } - /** * @return string */ @@ -163,7 +152,6 @@ public function setFn(string $fn): self { return $this; } - /** * @return array */ @@ -182,7 +170,6 @@ public function setEmails(array $emails): self { return $this; } - /** * @return array */ @@ -201,7 +188,6 @@ public function setClouds(array $clouds): self { return $this; } - /** * @return array */ @@ -220,7 +206,6 @@ public function setGroups(array $groups): self { return $this; } - /** * @return DeprecatedCircle[] */ @@ -250,7 +235,6 @@ public function setCircles(array $circles): self { return $this; } - /** * @return string */ @@ -269,7 +253,6 @@ public function setUserId(string $userId): self { return $this; } - /** * @param array $data */ @@ -285,7 +268,6 @@ public function import(array $data) { $this->setUserId($this->get('userId', $data)); } - /** * @param string $dav */ @@ -299,7 +281,6 @@ public function importFromDav(string $dav) { $this->setGroups($this->getArray('CATEGORIES', $data)); } - /** * get essential data from the dav content * (also don't think we need regex) @@ -360,7 +341,6 @@ private function parseDav(string $dav): array { return $result; } - /** * @return array */ diff --git a/lib/Model/DeprecatedCircle.php b/lib/Model/DeprecatedCircle.php index 10c841a03..a2c09961e 100644 --- a/lib/Model/DeprecatedCircle.php +++ b/lib/Model/DeprecatedCircle.php @@ -15,14 +15,12 @@ class DeprecatedCircle extends BaseCircle implements JsonSerializable { use TArrayTools; - /** @var bool */ private $fullJson = false; /** @var bool */ private $lightJson = false; - public function getTypeString() { return match ($this->getType()) { self::CIRCLES_PERSONAL => 'Personal', @@ -38,12 +36,10 @@ public function getTypeLongString() { return self::typeLongString($this->getType()); } - public function getInfo() { return $this->getTypeLongString(); } - /** * @param bool $fullJson * @@ -55,7 +51,6 @@ public function setFullJson(bool $fullJson): self { return $this; } - public function jsonSerialize(): array { $json = [ 'id' => $this->getId(), @@ -88,14 +83,12 @@ public function jsonSerialize(): array { return $json; } - public function getArray($full = false, $light = false) { $json = $this->getJson($full, $light); return json_decode((string)$json, true); } - public function getJson($full = false, $light = false) { $this->fullJson = $full; $this->lightJson = $light; @@ -106,7 +99,6 @@ public function getJson($full = false, $light = false) { return $json; } - /** * set all infos from an Array. */ @@ -139,11 +131,9 @@ public static function fromArray(?array $arr, bool $allSettings = false): self { $circle->setMembers($members); } - return $circle; } - /** * @param array $arr * @param $key @@ -163,7 +153,6 @@ private static function getMemberFromArray($arr, $key, $type = DeprecatedMember: return null; } - /** * @param array $arr * @@ -178,7 +167,6 @@ private static function getLinksFromArray($arr) { return $links; } - /** * @param array $arr * @@ -208,7 +196,6 @@ public function cantBePersonal() { } } - /** * @throws FederatedCircleNotAllowedException */ @@ -236,7 +223,6 @@ public static function typeLongString($type) { }; } - /** * convert old type to new config (nc22) * diff --git a/lib/Model/DeprecatedMember.php b/lib/Model/DeprecatedMember.php index 0bf76a68e..0136527e7 100644 --- a/lib/Model/DeprecatedMember.php +++ b/lib/Model/DeprecatedMember.php @@ -30,7 +30,6 @@ public function inviteToCircle($circleType) { return $this->addMemberToCircle(); } - /** * @param int $circleType * @@ -44,7 +43,6 @@ public function joinCircle($circleType) { }; } - /** * Update status of member like he joined a public circle. */ @@ -56,7 +54,6 @@ public function addMemberToCircle() { } } - /** * Update status of member like he joined a closed circle * (invite/request) @@ -74,7 +71,6 @@ private function joinClosedCircle() { } } - private function inviteIntoClosedCircle() { switch ($this->getStatus()) { case DeprecatedMember::STATUS_NONMEMBER: @@ -88,7 +84,6 @@ private function inviteIntoClosedCircle() { } } - /** * @throws MemberIsNotModeratorException */ @@ -100,7 +95,6 @@ public function hasToBeModerator() { } } - /** * @param $level * @@ -114,7 +108,6 @@ public function hasToBeHigherLevel($level) { } } - /** * @throws MemberDoesNotExistException */ @@ -126,7 +119,6 @@ public function hasToBeMember() { return true; } - /** * @throws MemberDoesNotExistException */ @@ -138,7 +130,6 @@ public function hasToBeMemberOrAlmost() { throw new MemberDoesNotExistException($this->l10n->t('This member does not exist')); } - /** * @throws MemberIsOwnerException */ @@ -150,7 +141,6 @@ public function cantBeOwner() { } } - /** * return if member already exists * @@ -163,7 +153,6 @@ public function alreadyExistOrJoining() { ); } - /** * @param bool $able */ @@ -171,7 +160,6 @@ public function broadcasting($able) { $this->broadcasting = $able; } - /** * @return bool */ @@ -179,7 +167,6 @@ public function isBroadcasting() { return $this->broadcasting; } - /** * @throws MemberTypeCantEditLevelException */ @@ -191,7 +178,6 @@ public function levelHasToBeEditable() { } } - /** * @throws MemberAlreadyExistsException * @throws MemberIsBlockedException @@ -210,7 +196,6 @@ public function hasToBeAbleToJoinTheCircle() { } } - /** * @throws MemberAlreadyExistsException */ diff --git a/lib/Model/Federated/EventWrapper.php b/lib/Model/Federated/EventWrapper.php index a0048e84b..2631baac0 100644 --- a/lib/Model/Federated/EventWrapper.php +++ b/lib/Model/Federated/EventWrapper.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Federated; use JsonSerializable; @@ -25,13 +23,11 @@ class EventWrapper implements IQueryRow, JsonSerializable { use TArrayTools; - public const STATUS_INIT = 0; public const STATUS_FAILED = 1; public const STATUS_DONE = 8; public const STATUS_OVER = 9; - /** @var string */ private $token = ''; @@ -59,12 +55,10 @@ class EventWrapper implements IQueryRow, JsonSerializable { /** @var int */ private $creation; - public function __construct() { $this->result = new SimpleDataStore(); } - /** * @return string */ @@ -83,7 +77,6 @@ public function setToken(string $token): self { return $this; } - /** * @return FederatedEvent */ @@ -109,7 +102,6 @@ public function hasEvent(): bool { return ($this->event !== null); } - /** * @param SimpleDataStore $result * @@ -128,7 +120,6 @@ public function getResult(): SimpleDataStore { return $this->result; } - /** * @return string */ @@ -147,7 +138,6 @@ public function setInstance(string $instance): self { return $this; } - /** * @return int */ @@ -166,7 +156,6 @@ public function setInterface(int $interface): self { return $this; } - /** * @return int */ @@ -203,7 +192,6 @@ public function getRetry(): int { return $this->retry; } - /** * @return int */ @@ -222,7 +210,6 @@ public function setStatus(int $status): self { return $this; } - /** * @return int */ @@ -241,7 +228,6 @@ public function setCreation(int $creation): self { return $this; } - /** * @param array $data * @@ -265,7 +251,6 @@ public function import(array $data): self { return $this; } - /** * @return array */ @@ -282,7 +267,6 @@ public function jsonSerialize(): array { ]; } - /** * @param array $data * diff --git a/lib/Model/Federated/FederatedEvent.php b/lib/Model/Federated/FederatedEvent.php index 748bd319c..0bd288dcd 100644 --- a/lib/Model/Federated/FederatedEvent.php +++ b/lib/Model/Federated/FederatedEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Federated; use JsonSerializable; @@ -83,7 +81,6 @@ class FederatedEvent implements JsonSerializable { /** @var string */ private $sender = ''; - /** @var string */ private $wrapperToken = ''; @@ -92,7 +89,6 @@ class FederatedEvent implements JsonSerializable { private bool $forceSync = false; - /** * FederatedEvent constructor. * @@ -107,7 +103,6 @@ public function __construct( $this->result = new SimpleDataStore(); } - /** * @return string */ @@ -126,7 +121,6 @@ public function setClass($class): self { return $this; } - /** * Origin of the event. * @@ -147,7 +141,6 @@ public function setOrigin(string $origin): self { return $this; } - /** * @return bool */ @@ -166,7 +159,6 @@ public function setAsync(bool $async): self { return $this; } - /** * @return bool */ @@ -185,7 +177,6 @@ public function setLimitedToInstanceWithMember(bool $limitedToInstanceWithMember return $this; } - /** * @return bool */ @@ -204,7 +195,6 @@ public function setDataRequestOnly(bool $dataRequestOnly): self { return $this; } - /** * * Origin of the request @@ -226,7 +216,6 @@ public function getSender(): string { return $this->sender; } - /** * @param string $wrapperToken * @@ -245,7 +234,6 @@ public function getWrapperToken(): string { return $this->wrapperToken; } - /** * @return bool */ @@ -271,7 +259,6 @@ public function getCircle(): Circle { return $this->circle; } - /** * @param string $itemId * @@ -290,7 +277,6 @@ public function getItemId(): string { return $this->itemId; } - /** * @param string $itemSource * @@ -309,7 +295,6 @@ public function getItemSource(): string { return $this->itemSource; } - /** * @return Member */ @@ -335,7 +320,6 @@ public function hasMember(): bool { return ($this->member !== null); } - /** * @return Member[] */ @@ -354,7 +338,6 @@ public function setMembers(array $members): self { return $this; } - /** * @param SimpleDataStore $params * @@ -373,7 +356,6 @@ public function getParams(): SimpleDataStore { return $this->params; } - /** * @param SimpleDataStore $internal * @@ -401,7 +383,6 @@ public function resetInternal(): self { return $this; } - /** * @param SimpleDataStore $data * @@ -430,7 +411,6 @@ public function resetData(): self { return $this; } - /** * @return int */ @@ -449,7 +429,6 @@ public function setSeverity(int $severity): self { return $this; } - /** * @return array */ @@ -468,7 +447,6 @@ public function setOutcome(array $data): self { return $this; } - /** * @return SimpleDataStore */ @@ -528,7 +506,6 @@ public function addResultEntry(string $key, array $result): self { return $this; } - /** * @param int $flag * @@ -560,7 +537,6 @@ public function isForceSync(): bool { return $this->forceSync; } - /** * @param array $data * @@ -600,7 +576,6 @@ public function import(array $data): self { return $this; } - /** * @return array */ diff --git a/lib/Model/Federated/FederatedShare.php b/lib/Model/Federated/FederatedShare.php index 8fd090c00..159787e9d 100644 --- a/lib/Model/Federated/FederatedShare.php +++ b/lib/Model/Federated/FederatedShare.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Federated; use JsonSerializable; @@ -27,7 +25,6 @@ class FederatedShare extends ManagedModel implements IFederatedModel, JsonSerializable, IQueryRow, IDeserializable { use TArrayTools; - /** @var int */ private $id = 0; @@ -46,14 +43,12 @@ class FederatedShare extends ManagedModel implements IFederatedModel, JsonSerial /** @var SimpleDataStore */ private $data; - /** * FederatedShare constructor. */ public function __construct() { } - /** * @param int $id * @@ -72,7 +67,6 @@ public function getId(): int { return $this->id; } - /** * @param string $itemId * @@ -91,7 +85,6 @@ public function getItemId(): string { return $this->itemId; } - /** * @param string $circleId * @@ -110,7 +103,6 @@ public function getCircleId(): string { return $this->circleId; } - /** * @param string $instance * @@ -122,7 +114,6 @@ public function setInstance(string $instance): self { return $this; } - /** * @param string $lockStatus * @@ -141,7 +132,6 @@ public function getLockStatus(): string { return $this->lockStatus; } - /** * @return string */ @@ -156,7 +146,6 @@ public function isLocal(): bool { return $this->getManager()->isLocalInstance($this->getInstance()); } - /** * @param array $data * @@ -171,7 +160,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param array $data * @@ -190,7 +178,6 @@ public function importFromDatabase(array $data): IQueryRow { return $this; } - /** * @return array */ diff --git a/lib/Model/Federated/RemoteInstance.php b/lib/Model/Federated/RemoteInstance.php index 794bf517c..3c9bd80af 100644 --- a/lib/Model/Federated/RemoteInstance.php +++ b/lib/Model/Federated/RemoteInstance.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Federated; use JsonSerializable; @@ -105,7 +103,6 @@ class RemoteInstance extends NCSignatory implements IQueryRow, JsonSerializable /** @var bool */ private $identityAuthed = false; - /** * @param int $dbId * @@ -124,7 +121,6 @@ public function getDbId(): int { return $this->dbId; } - /** * @param string $type * @@ -143,7 +139,6 @@ public function getType(): string { return $this->type; } - /** * @param int $interface * @@ -162,7 +157,6 @@ public function getInterface(): int { return $this->interface; } - /** * @param array $aliases * @@ -181,7 +175,6 @@ public function getAliases(): array { return $this->aliases; } - /** * @return string */ @@ -200,7 +193,6 @@ public function setIncoming(string $incoming): self { return $this; } - /** * @return string */ @@ -219,7 +211,6 @@ public function setRoot(string $root): self { return $this; } - /** * @return string */ @@ -238,7 +229,6 @@ public function setEvent(string $event): self { return $this; } - /** * @param string $test * @@ -257,7 +247,6 @@ public function getTest(): string { return $this->test; } - /** * @return string */ @@ -276,7 +265,6 @@ public function setCircles(string $circles): self { return $this; } - /** * @return string */ @@ -295,7 +283,6 @@ public function setCircle(string $circle): self { return $this; } - /** * @return string */ @@ -314,7 +301,6 @@ public function setMembers(string $members): self { return $this; } - /** * @return string */ @@ -333,7 +319,6 @@ public function setInherited(string $inherited): self { return $this; } - /** * @return string */ @@ -352,7 +337,6 @@ public function setMemberships(string $memberships): self { return $this; } - /** * @return string */ @@ -371,7 +355,6 @@ public function setMember(string $member): self { return $this; } - /** * @return $this */ @@ -405,7 +388,6 @@ public function getUid(bool $shorten = false): string { return $this->uid; } - /** * @param string $authSigned * @@ -424,7 +406,6 @@ public function getAuthSigned(): string { return $this->authSigned; } - /** * @param bool $identityAuthed * @@ -452,7 +433,6 @@ public function mustBeIdentityAuthed(): void { } } - /** * @param array $data * @@ -486,7 +466,6 @@ public function import(array $data): NCSignatory { return $this; } - /** * @return array */ @@ -516,7 +495,6 @@ public function jsonSerialize(): array { return array_filter(array_merge($data, parent::jsonSerialize())); } - /** * @param array $data * @param string $prefix diff --git a/lib/Model/FederatedLink.php b/lib/Model/FederatedLink.php index 40c10347b..7d9d2793b 100644 --- a/lib/Model/FederatedLink.php +++ b/lib/Model/FederatedLink.php @@ -57,7 +57,6 @@ class FederatedLink implements \JsonSerializable { public function __construct() { } - /** * @param int $id * @@ -76,7 +75,6 @@ public function getId() { return $this->id; } - /** * @param $token * @@ -101,7 +99,6 @@ public function getToken($full = false) { return substr($this->token, 0, FederatedLink::SHORT_UNIQUE_ID_LENGTH); } - /** * @return string */ @@ -112,7 +109,6 @@ public function generateToken() { return $token; } - /** * @param string $address * @@ -131,7 +127,6 @@ public function getAddress() { return $this->address; } - /** * @param string $address * @@ -150,7 +145,6 @@ public function getLocalAddress() { return $this->localAddress; } - /** * @param string $circleUniqueId * @@ -175,7 +169,6 @@ public function getCircleId($full = false) { return substr($this->circleUniqueId, 0, DeprecatedCircle::SHORT_UNIQUE_ID_LENGTH); } - /** * @param string $uniqueId * @@ -200,7 +193,6 @@ public function getUniqueId($full = false) { return substr($this->uniqueId, 0, FederatedLink::SHORT_UNIQUE_ID_LENGTH); } - /** * @param string $circleName * @@ -219,7 +211,6 @@ public function getRemoteCircleName() { return $this->remoteCircleName; } - /** * @param string $circleName * @@ -238,7 +229,6 @@ public function getCircleName() { return $this->localCircleName; } - /** * @param int $status * @@ -257,7 +247,6 @@ public function getStatus() { return $this->status; } - /** * @param int $creation * @@ -280,7 +269,6 @@ public function getCreation() { return $this->creation; } - public function hasToBeValidStatusUpdate($status) { try { $this->hasToBeValidStatusUpdateWhileLinkDown($status); @@ -292,7 +280,6 @@ public function hasToBeValidStatusUpdate($status) { } } - /** * @param $status * @@ -308,7 +295,6 @@ private function hasToBeValidStatusUpdateWhileLinkDown($status) { } } - /** * @param $status * @@ -325,7 +311,6 @@ private function hasToBeValidStatusUpdateWhileRequestDeclined($status) { } } - /** * @param $status * @@ -341,7 +326,6 @@ private function hasToBeValidStatusUpdateWhileLinkRequested($status) { } } - /** * @param $status * @@ -359,7 +343,6 @@ private function hasToBeValidStatusUpdateWhileRequestSent($status) { } } - public function jsonSerialize(): array { return [ 'id' => $this->getId(), @@ -372,7 +355,6 @@ public function jsonSerialize(): array { ]; } - public function getJson($full = false) { $this->fullJson = $full; $json = json_encode($this); diff --git a/lib/Model/FederatedUser.php b/lib/Model/FederatedUser.php index 056768d17..c4ed4fd31 100644 --- a/lib/Model/FederatedUser.php +++ b/lib/Model/FederatedUser.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; @@ -39,7 +37,6 @@ class FederatedUser extends ManagedModel implements use TArrayTools; use TDeserialize; - /** @var string */ private $singleId = ''; @@ -67,14 +64,12 @@ class FederatedUser extends ManagedModel implements /** @var Membership[] */ private $memberships = null; - /** * FederatedUser constructor. */ public function __construct() { } - /** * @param string $userId * @param string $instance @@ -100,7 +95,6 @@ public function set( return $this; } - /** * @param string $singleId * @@ -119,7 +113,6 @@ public function getSingleId(): string { return $this->singleId; } - /** * @param string $userId * @@ -138,7 +131,6 @@ public function getUserId(): string { return $this->userId; } - /** * @param int $userType * @@ -175,7 +167,6 @@ public function getDisplayName(): string { return $this->displayName; } - /** * @return bool */ @@ -201,7 +192,6 @@ public function getBasedOn(): ?Circle { return $this->basedOn; } - /** * @param int $config * @@ -220,7 +210,6 @@ public function getConfig(): int { return $this->config; } - /** * @param string $instance * @@ -244,7 +233,6 @@ public function getInstance(): string { return $this->instance; } - /** * @return bool */ @@ -277,7 +265,6 @@ public function getInheritance(): Membership { return $this->inheritance; } - /** * @return bool */ @@ -307,8 +294,6 @@ public function getMemberships(): array { return $this->memberships; } - - /** * @param string $singleId * @param bool $detailed @@ -321,7 +306,6 @@ public function getLink(string $singleId, bool $detailed = false): Membership { return $this->getManager()->getLink($this, $singleId, $detailed); } - /** * @param array $data * @@ -357,7 +341,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param Circle $circle * @@ -393,7 +376,6 @@ public function importFromCircle(Circle $circle): self { return $this; } - /** * @param array $data * @param string $prefix @@ -417,7 +399,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * @return string[] * @throws UnknownInterfaceException @@ -446,7 +427,6 @@ public function jsonSerialize(): array { return $arr; } - /** * @param IFederatedUser $member * diff --git a/lib/Model/FileCacheWrapper.php b/lib/Model/FileCacheWrapper.php index a572e8e58..fa18ed72a 100644 --- a/lib/Model/FileCacheWrapper.php +++ b/lib/Model/FileCacheWrapper.php @@ -212,7 +212,6 @@ public function toCache(): array { ]; } - /** * Returns whether the given database result can be interpreted as * a share with accessible file (not trashed, not deleted) @@ -267,7 +266,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param array $data * @param string $prefix diff --git a/lib/Model/GlobalScale/GSEvent.php b/lib/Model/GlobalScale/GSEvent.php index 03a8cce25..246a5d451 100644 --- a/lib/Model/GlobalScale/GSEvent.php +++ b/lib/Model/GlobalScale/GSEvent.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\GlobalScale; use JsonSerializable; @@ -44,7 +42,6 @@ class GSEvent implements JsonSerializable { public const FILE_SHARE = '\OCA\Circles\GlobalScale\FileShare'; public const FILE_UNSHARE = '\OCA\Circles\GlobalScale\FileUnshare'; - use TArrayTools; /** @var string */ @@ -77,7 +74,6 @@ class GSEvent implements JsonSerializable { /** @var bool */ private $checked = false; - /** * GSEvent constructor. * @@ -94,7 +90,6 @@ public function __construct( $this->result = new SimpleDataStore(); } - /** * @return string */ @@ -113,7 +108,6 @@ public function setType($type): self { return $this; } - /** * @return string */ @@ -147,7 +141,6 @@ public function setSource(string $source): self { return $this; } - /** * @return bool */ @@ -166,7 +159,6 @@ public function setLocal(bool $local): self { return $this; } - /** * @return bool */ @@ -185,7 +177,6 @@ public function setForced(bool $force): self { return $this; } - /** * @return bool */ @@ -204,7 +195,6 @@ public function setAsync(bool $async): self { return $this; } - /** * @return DeprecatedCircle * @deprecated @@ -250,7 +240,6 @@ public function getCircle(): Circle { return $this->circle; } - /** * @return DeprecatedMember */ @@ -276,7 +265,6 @@ public function hasMember(): bool { return ($this->member !== null); } - /** * @param SimpleDataStore $data * @@ -295,7 +283,6 @@ public function getData(): SimpleDataStore { return $this->data; } - /** * @return int */ @@ -314,7 +301,6 @@ public function setSeverity(int $severity): self { return $this; } - /** * @return SimpleDataStore */ @@ -333,7 +319,6 @@ public function setResult(SimpleDataStore $result): self { return $this; } - /** * @return string */ @@ -352,7 +337,6 @@ public function setKey(string $key): self { return $this; } - /** * @return bool */ @@ -408,7 +392,6 @@ public function import(array $data): self { return $this; } - /** * @return array */ diff --git a/lib/Model/GlobalScale/GSShare.php b/lib/Model/GlobalScale/GSShare.php index df3f8f564..3453c77ba 100644 --- a/lib/Model/GlobalScale/GSShare.php +++ b/lib/Model/GlobalScale/GSShare.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\GlobalScale; use JsonSerializable; @@ -22,7 +20,6 @@ class GSShare implements JsonSerializable { use TArrayTools; - /** @var int */ private $id = 0; @@ -44,7 +41,6 @@ class GSShare implements JsonSerializable { /** @var string */ private $password = ''; - /** * GSShare constructor. * @@ -57,7 +53,6 @@ public function __construct( ) { } - /** * @return int */ @@ -71,7 +66,6 @@ public function setId(int $id): self { return $this; } - /** * * @return string @@ -91,7 +85,6 @@ public function setCircleId(string $circleId): self { return $this; } - /** * @return string */ @@ -110,7 +103,6 @@ public function setDefaultMountPoint(string $mountPoint): self { return $this; } - /** * @param string $userId * @@ -141,7 +133,6 @@ public function setMountPoint(string $mountPoint): self { return $this; } - /** * @return int */ @@ -160,7 +151,6 @@ public function setParent(int $parent): self { return $this; } - /** * @return string */ @@ -179,7 +169,6 @@ public function setOwner(string $owner): self { return $this; } - /** * @return string */ @@ -198,7 +187,6 @@ public function setInstance(string $instance): self { return $this; } - /** * @return string */ @@ -206,7 +194,6 @@ public function getToken(): string { return $this->token; } - /** * @param string $token * @@ -218,7 +205,6 @@ public function setToken(string $token): self { return $this; } - /** * @return string */ @@ -237,7 +223,6 @@ public function setPassword(string $password): self { return $this; } - /** * @param array $data * @@ -256,7 +241,6 @@ public function importFromDatabase(array $data): self { return $this; } - /** * @param string $userId * @param string $protocol @@ -274,7 +258,6 @@ public function toMount(string $userId, string $protocol = 'https'): array { ]; } - /** * @return array */ diff --git a/lib/Model/GlobalScale/GSShareMountpoint.php b/lib/Model/GlobalScale/GSShareMountpoint.php index 9d8ed24f1..cb638d060 100644 --- a/lib/Model/GlobalScale/GSShareMountpoint.php +++ b/lib/Model/GlobalScale/GSShareMountpoint.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\GlobalScale; use JsonSerializable; @@ -22,7 +20,6 @@ class GSShareMountpoint implements JsonSerializable { use TArrayTools; - /** * GSShareMountpoint constructor. * @@ -37,7 +34,6 @@ public function __construct( ) { } - /** * @return string */ @@ -56,7 +52,6 @@ public function setUserId(string $userId): self { return $this; } - /** * @return int */ @@ -75,7 +70,6 @@ public function setShareId(int $shareId): self { return $this; } - /** * @return string */ @@ -94,7 +88,6 @@ public function setMountPoint(string $mountPoint): self { return $this; } - /** * @param array $data * @@ -108,7 +101,6 @@ public function importFromDatabase(array $data): self { return $this; } - /** * @return array */ diff --git a/lib/Model/GlobalScale/GSWrapper.php b/lib/Model/GlobalScale/GSWrapper.php index 9d9f5fc11..292a999d2 100644 --- a/lib/Model/GlobalScale/GSWrapper.php +++ b/lib/Model/GlobalScale/GSWrapper.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\GlobalScale; use JsonSerializable; @@ -24,13 +22,11 @@ class GSWrapper implements JsonSerializable { use TArrayTools; - public const STATUS_INIT = 0; public const STATUS_FAILED = 1; public const STATUS_DONE = 8; public const STATUS_OVER = 9; - /** @var string */ private $token = ''; @@ -49,11 +45,9 @@ class GSWrapper implements JsonSerializable { /** @var int */ private $creation; - public function __construct() { } - /** * @return string */ @@ -72,7 +66,6 @@ public function setToken(string $token): self { return $this; } - /** * @return GSEvent */ @@ -98,7 +91,6 @@ public function hasEvent(): bool { return ($this->event !== null); } - /** * @return string */ @@ -117,7 +109,6 @@ public function setInstance(string $instance): self { return $this; } - /** * @return int */ @@ -136,7 +127,6 @@ public function setSeverity(int $severity): self { return $this; } - /** * @return int */ @@ -155,7 +145,6 @@ public function setStatus(int $status): self { return $this; } - /** * @return int */ diff --git a/lib/Model/Helpers/MemberHelper.php b/lib/Model/Helpers/MemberHelper.php index 5e1de4d8e..51047df61 100644 --- a/lib/Model/Helpers/MemberHelper.php +++ b/lib/Model/Helpers/MemberHelper.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Helpers; use OCA\Circles\Exceptions\MemberHelperException; @@ -34,7 +32,6 @@ class MemberHelper { use TArrayTools; - /** * Member constructor. * @@ -45,7 +42,6 @@ public function __construct( ) { } - /** * @param string $name * @param array $arguments @@ -68,7 +64,6 @@ public function __call(string $name, array $arguments): void { throw new MemberHelperException('unknown method call'); } - /** * @param string $levelString * @param array $arguments @@ -86,7 +81,6 @@ private function mustBe(string $levelString, array $arguments): void { $this->mustHaveLevelEqualOrAbove($level); } - /** * @param string $levelString * @param array $arguments @@ -106,7 +100,6 @@ private function cannotBe(string $levelString, array $arguments): void { } } - /** * @param int $level * @@ -118,7 +111,6 @@ public function mustHaveLevelAbove(int $level) { } } - /** * @param int $level * @@ -130,7 +122,6 @@ public function mustHaveLevelAboveOrEqual(int $level) { } } - /** * @param int $level * @@ -142,7 +133,6 @@ public function mustHaveLevelEqualOrAbove(int $level) { } } - /** * @param Member $compare * diff --git a/lib/Model/ManagedModel.php b/lib/Model/ManagedModel.php index 5569c3fa9..7dd07ed9a 100644 --- a/lib/Model/ManagedModel.php +++ b/lib/Model/ManagedModel.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use OCA\Circles\IFederatedUser; @@ -22,11 +20,9 @@ class ManagedModel { public const ID_LENGTH = 31; - /** @var ModelManager */ private $modelManager; - /** * @return ModelManager */ @@ -38,7 +34,6 @@ protected function getManager(): ModelManager { return $this->modelManager; } - /** @noinspection PhpPossiblePolymorphicInvocationInspection */ public function importFromIFederatedUser(IFederatedUser $orig): void { if (!($this instanceof IFederatedUser)) { diff --git a/lib/Model/Member.php b/lib/Model/Member.php index e8682db4c..1f6424e9f 100644 --- a/lib/Model/Member.php +++ b/lib/Model/Member.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use DateTime; @@ -43,7 +41,6 @@ class Member extends ManagedModel implements use TArrayTools; use TDeserialize; - public const LEVEL_NONE = 0; public const LEVEL_MEMBER = 1; public const LEVEL_MODERATOR = 4; @@ -64,7 +61,6 @@ class Member extends ManagedModel implements public const APP_OCC = 10002; public const APP_DEFAULT = 11000; - public static $TYPE = [ 0 => 'single', 1 => 'user', @@ -85,7 +81,6 @@ class Member extends ManagedModel implements public const STATUS_MEMBER = 'Member'; public const STATUS_BLOCKED = 'Blocked'; - /** * Note: When editing those values, update lib/Application/Capabilities.php * @@ -99,10 +94,8 @@ class Member extends ManagedModel implements 9 => 'Owner' ]; - public static $DEF_TYPE_MAX = 31; - /** @var string */ private $id = ''; @@ -169,14 +162,12 @@ class Member extends ManagedModel implements /** @var Membership[] */ private $memberships = null; - /** * Member constructor. */ public function __construct() { } - /** * @param string $id * @@ -195,7 +186,6 @@ public function getId(): string { return $this->id; } - /** * @param string $circleId * @@ -214,7 +204,6 @@ public function getCircleId(): string { return $this->circleId; } - /** * This should replace user_id, user_type and instance; and will use the data from Circle with * Config=CFG_SINGLE @@ -236,7 +225,6 @@ public function getSingleId(): string { return $this->singleId; } - /** * @param string $userId * @@ -258,7 +246,6 @@ public function getUserId(): string { return $this->userId; } - /** * @param int $userType * @@ -285,7 +272,6 @@ public function getType(): int { return $this->getUserType(); } - /** * @param string $instance * @@ -304,7 +290,6 @@ public function getInstance(): string { return $this->instance; } - /** * @return bool */ @@ -312,7 +297,6 @@ public function isLocal(): bool { return $this->getManager()->isLocalInstance($this->getInstance()); } - /** * @param FederatedUser $invitedBy * @@ -338,7 +322,6 @@ public function hasInvitedBy(): bool { return !is_null($this->invitedBy); } - /** * @return bool */ @@ -364,7 +347,6 @@ public function getRemoteInstance(): RemoteInstance { return $this->remoteInstance; } - /** * @return bool */ @@ -390,7 +372,6 @@ public function getBasedOn(): ?Circle { return $this->basedOn; } - /** * @return bool */ @@ -416,7 +397,6 @@ public function getInheritedBy(): FederatedUser { return $this->inheritedBy; } - /** * @return bool */ @@ -442,7 +422,6 @@ public function getInheritanceFrom(): ?Member { return $this->inheritanceFrom; } - /** * @param int $level * @@ -461,7 +440,6 @@ public function getLevel(): int { return $this->level; } - /** * @param string $status * @@ -480,7 +458,6 @@ public function getStatus(): string { return $this->status; } - /** * @param array $notes * @@ -499,7 +476,6 @@ public function getNotes(): array { return $this->notes; } - /** * @param string $key * @@ -554,7 +530,6 @@ public function setNoteObj(string $key, JsonSerializable $obj): self { return $this; } - /** * @param string $displayName * @@ -568,7 +543,6 @@ public function setDisplayName(string $displayName): self { return $this; } - /** * @param int $displayUpdate * @@ -587,7 +561,6 @@ public function getDisplayUpdate(): int { return $this->displayUpdate; } - /** * @return string */ @@ -595,7 +568,6 @@ public function getDisplayName(): string { return $this->displayName; } - /** * @param string $contactId * @@ -614,7 +586,6 @@ public function getContactId(): string { return $this->contactId; } - /** * @param string $contactMeta * @@ -633,7 +604,6 @@ public function getContactMeta(): string { return $this->contactMeta; } - /** * @param Circle $circle * @@ -659,7 +629,6 @@ public function hasCircle(): bool { return (!is_null($this->circle)); } - /** * @param int $joined * @@ -678,7 +647,6 @@ public function getJoined(): int { return $this->joined; } - /** * @return bool */ @@ -708,7 +676,6 @@ public function getMemberships(): array { return $this->memberships; } - /** * @param string $singleId * @param bool $detailed @@ -738,7 +705,6 @@ public function getMembership(string $circleId, bool $detailed = false): Members return $this->getLink($circleId, $detailed); } - /** * @param Member $member * @param bool $full @@ -764,7 +730,6 @@ public function compareWith(Member $member, bool $full = true): bool { return true; } - /** * @param array $data * @@ -822,7 +787,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param array $data * @param string $prefix @@ -879,7 +843,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * @return string[] * @throws UnknownInterfaceException @@ -934,7 +897,6 @@ public function jsonSerialize(): array { return $arr; } - /** * @param int $level * @@ -950,7 +912,6 @@ public static function parseLevelInt(int $level): int { return $level; } - /** * @param string $levelString * diff --git a/lib/Model/Membership.php b/lib/Model/Membership.php index ae90db2c6..4917ffe5b 100644 --- a/lib/Model/Membership.php +++ b/lib/Model/Membership.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; @@ -26,7 +24,6 @@ class Membership extends ManagedModel implements IDeserializable, IQueryRow, JsonSerializable { use TArrayTools; - /** @var string */ private $singleId = ''; @@ -54,7 +51,6 @@ class Membership extends ManagedModel implements IDeserializable, IQueryRow, Jso /** @var array */ private $inheritanceDetails = []; - /** * Membership constructor. * @@ -79,7 +75,6 @@ public function __construct( $this->setLevel($member->getLevel()); } - /** * @param string $singleId * @@ -98,7 +93,6 @@ public function getSingleId(): string { return $this->singleId; } - /** * @param string $circleId * @@ -117,7 +111,6 @@ public function getCircleId(): string { return $this->circleId; } - /** * @param int $circleConfig * @@ -136,7 +129,6 @@ public function getCircleConfig(): int { return $this->circleConfig; } - /** * @param int $level * @@ -155,7 +147,6 @@ public function getLevel(): int { return $this->level; } - /** * @param string $inheritanceFirst * @@ -174,7 +165,6 @@ public function getInheritanceFirst(): string { return $this->inheritanceFirst; } - /** * @param string $inheritanceLast * @@ -193,7 +183,6 @@ public function getInheritanceLast(): string { return $this->inheritanceLast; } - /** * @param array $inheritancePath * @@ -212,7 +201,6 @@ public function getInheritancePath(): array { return $this->inheritancePath; } - /** * @param int $inheritanceDepth * @@ -231,7 +219,6 @@ public function getInheritanceDepth(): int { return $this->inheritanceDepth; } - /** * @param array $inheritanceDetails * @@ -250,7 +237,6 @@ public function getInheritanceDetails(): array { return $this->inheritanceDetails; } - /** * @param array $data * @@ -298,7 +284,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * @return array */ diff --git a/lib/Model/ModelManager.php b/lib/Model/ModelManager.php index c96e82b5c..0af3cd23c 100644 --- a/lib/Model/ModelManager.php +++ b/lib/Model/ModelManager.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use OCA\Circles\AppInfo\Application; @@ -82,7 +80,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @return ConfigService */ @@ -90,7 +87,6 @@ public function getConfigService(): ConfigService { return $this->configService; } - /** * @param Circle $circle */ @@ -102,7 +98,6 @@ public function getMembers(Circle $circle, int $limit = 0): void { } } - /** * @param Circle $circle * @param bool $detailed @@ -118,7 +113,6 @@ public function getInheritedMembers(Circle $circle, bool $detailed = false): voi } } - /** * @param Circle $circle * @param bool $detailed @@ -148,7 +142,6 @@ public function getRemoteInheritedMembers(Circle $circle, bool $detailed = false } } - /** * @param IEntity $member */ @@ -157,7 +150,6 @@ public function getMemberships(IEntity $member): void { $member->setMemberships($memberships); } - /** * @param IEntity $member * @param string $circleId @@ -171,7 +163,6 @@ public function getLink(IEntity $member, string $circleId, bool $detailed = fals return $this->membershipService->getMembership($circleId, $member->getSingleId(), $detailed); } - /** * @param ManagedModel $model * @param array $data @@ -207,7 +198,6 @@ public function manageImportFromDatabase(ManagedModel $model, array $data, strin } } - private function importBasedOnPath(ManagedModel $model, array $data, string $path, string $prefix) { if ($model instanceof Circle) { $this->importIntoCircle($model, $data, $path, $prefix); @@ -230,7 +220,6 @@ private function importBasedOnPath(ManagedModel $model, array $data, string $pat } } - /** * @param Circle $circle * @param array $data @@ -268,7 +257,6 @@ private function importIntoCircle(Circle $circle, array $data, string $path, str } } - /** * @param Member $member * @param array $data @@ -335,7 +323,6 @@ private function importIntoMember(Member $member, array $data, string $path, str } } - /** * @param FederatedUser $federatedUser * @param array $data @@ -360,7 +347,6 @@ private function importIntoFederatedUser( } } - /** * @param ShareWrapper $shareWrapper * @param array $data @@ -421,7 +407,6 @@ private function importIntoShareWrapper( } } - /** * @param Mount $mount * @param array $data @@ -464,7 +449,6 @@ private function importIntoMount( } } - /** * @return string */ @@ -481,7 +465,6 @@ public function isLocalInstance(string $instance): bool { return $this->configService->isLocalInstance($instance); } - /** * @param string $instance * @@ -500,7 +483,6 @@ public function fixInstance(string $instance): string { return $this->interfaceService->getCloudInstance(); } - /** * @param string $singleId * @@ -527,7 +509,6 @@ public function generateLinkToCircle(string $singleId): string { return $this->urlGenerator->linkToRoute($this->pathLinkGeneration, ['singleId' => $singleId]); } - /** * @param bool $full */ diff --git a/lib/Model/Mount.php b/lib/Model/Mount.php index d37255bf1..2eaa315a9 100644 --- a/lib/Model/Mount.php +++ b/lib/Model/Mount.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; @@ -44,14 +42,12 @@ class Mount extends ManagedModel implements IDeserializable, IQueryRow, JsonSeri private string $remote = ''; private int $remoteShareId = 0; - /** * Mount constructor. */ public function __construct() { } - /** * @return int */ @@ -65,7 +61,6 @@ public function setId(int $id): self { return $this; } - /** * * @return string @@ -85,7 +80,6 @@ public function setMountId(string $mountId): self { return $this; } - /** * * @return string @@ -183,7 +177,6 @@ public function setParent(int $parent): self { return $this; } - /** * @return Member */ @@ -202,7 +195,6 @@ public function setOwner(Member $owner): self { return $this; } - /** * @return bool */ @@ -228,7 +220,6 @@ public function setInitiator(Member $initiator): self { return $this; } - /** * @return string */ @@ -247,7 +238,6 @@ public function setToken(string $token): self { return $this; } - /** * @return string */ @@ -266,7 +256,6 @@ public function setPassword(string $password): self { return $this; } - /** * @param ICloudIdManager $cloudIdManager * @@ -285,7 +274,6 @@ public function getCloudIdManager(): ICloudIdManager { return $this->cloudIdManager; } - /** * @param IClientService $httpClientService * @@ -340,7 +328,6 @@ public function toMount(): array { ]; } - /** * @param ShareWrapper $wrappedShare * @@ -362,7 +349,6 @@ public function fromShare(ShareWrapper $wrappedShare) { $this->setRemoteShareId((int)$wrappedShare->getId()); } - /** * @param array $data * @@ -372,7 +358,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param array $data * @param string $prefix @@ -395,7 +380,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * @return array */ diff --git a/lib/Model/Mountpoint.php b/lib/Model/Mountpoint.php index 9ee603b90..e1eab5e7d 100644 --- a/lib/Model/Mountpoint.php +++ b/lib/Model/Mountpoint.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; diff --git a/lib/Model/Probes/BasicProbe.php b/lib/Model/Probes/BasicProbe.php index cff5c866a..657830708 100644 --- a/lib/Model/Probes/BasicProbe.php +++ b/lib/Model/Probes/BasicProbe.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Probes; use OCA\Circles\IQueryProbe; @@ -26,7 +24,6 @@ class BasicProbe implements IQueryProbe { public const DETAILS_POPULATION = 32; public const DETAILS_ALL = 127; - /** @var int */ private $itemsOffset = 0; @@ -48,7 +45,6 @@ class BasicProbe implements IQueryProbe { /** @var array */ private $options = []; - /** * @param int $itemsOffset * @@ -67,7 +63,6 @@ public function getItemsOffset(): int { return $this->itemsOffset; } - /** * @param int $itemsLimit * @@ -86,7 +81,6 @@ public function getItemsLimit(): int { return $this->itemsLimit; } - /** * @param int $details * @@ -123,7 +117,6 @@ public function showDetail(int $detail): bool { return (($this->getDetails() & $detail) !== 0); } - /** * @param Circle $filterCircle * @@ -149,7 +142,6 @@ public function hasFilterCircle(): bool { return !is_null($this->filterCircle); } - /** * @param Member $filterMember * @@ -175,7 +167,6 @@ public function hasFilterMember(): bool { return !is_null($this->filterMember); } - /** * @param RemoteInstance $filterRemoteInstance * @@ -201,7 +192,6 @@ public function hasFilterRemoteInstance(): bool { return !is_null($this->filterRemoteInstance); } - /** * @param string $key * @param string $value @@ -253,7 +243,6 @@ public function getAsOptions(): array { ); } - /** * @return array */ diff --git a/lib/Model/Probes/CircleProbe.php b/lib/Model/Probes/CircleProbe.php index 1c1766e37..3e0676a9a 100644 --- a/lib/Model/Probes/CircleProbe.php +++ b/lib/Model/Probes/CircleProbe.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Probes; use OCA\Circles\Model\Circle; @@ -31,7 +29,6 @@ class CircleProbe extends MemberProbe { public function __construct() { } - /** * Configure whether personal circles are included in the probe * @@ -139,7 +136,6 @@ public function nonVisibleCirclesIncluded(): bool { return $this->includeNonVisible; } - /** * Configure whether single circles are visited in the probe * @@ -162,7 +158,6 @@ public function visitingSingleCircles(): bool { return $this->visitSingleCircles; } - /** * Return the include value * @@ -183,7 +178,6 @@ public function isIncluded(int $config): bool { return (($this->included() & $config) !== 0); } - /** * limit to a specific config * @@ -205,7 +199,6 @@ public function getLimitConfig(): int { return $this->limitConfig; } - /** * Configure whether personal circles are filtered in the probe * @@ -291,7 +284,6 @@ public function filterBackendCircles(bool $filter = true): self { return $this; } - /** * Add a config to the probe filter * @@ -310,7 +302,6 @@ public function filterConfig(int $config, bool $filter = true): self { return $this; } - /** * Return the filtered value * @@ -331,7 +322,6 @@ public function isFiltered(int $config): bool { return (($this->filtered() & $config) !== 0); } - /** * Return an array with includes as options * @@ -360,7 +350,6 @@ public function getAsOptions(): array { ); } - /** * @return string */ diff --git a/lib/Model/Probes/DataProbe.php b/lib/Model/Probes/DataProbe.php index 7d0eca7a3..cb0f9176e 100644 --- a/lib/Model/Probes/DataProbe.php +++ b/lib/Model/Probes/DataProbe.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Probes; use OCA\Circles\Db\CoreQueryBuilder; @@ -27,14 +25,11 @@ class DataProbe extends BasicProbe { public const INITIATOR = CoreQueryBuilder::INITIATOR; public const INHERITED_BY = CoreQueryBuilder::INHERITED_BY; - private array $path = []; - public function __construct() { } - /** * @param string $key * @param array $path @@ -47,7 +42,6 @@ public function add(string $key, array $path = []): self { return $this; } - /** * @param string $key * @@ -57,7 +51,6 @@ public function has(string $key): bool { return (array_key_exists($key, $this->path)); } - /** * @return array */ @@ -65,7 +58,6 @@ public function getPath(): array { return $this->path; } - /** * Return an array with includes as options * diff --git a/lib/Model/Probes/MemberProbe.php b/lib/Model/Probes/MemberProbe.php index 69ec33fa5..fdb0d83a1 100644 --- a/lib/Model/Probes/MemberProbe.php +++ b/lib/Model/Probes/MemberProbe.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model\Probes; use OCA\Circles\Model\Member; @@ -44,7 +42,6 @@ public function isRequestingMembership(): bool { return $this->requestingMembership; } - /** * @param bool $include * @@ -63,7 +60,6 @@ public function directMemberInitiator(): bool { return $this->initiatorDirectMember; } - /** * force the generation an initiator if visitor * @@ -79,7 +75,6 @@ public function isEmulatingVisitor(): bool { return $this->emulateVisitor; } - /** * @return int */ @@ -127,7 +122,6 @@ public function mustBeOwner(): self { return $this; } - /** * @return array */ @@ -143,7 +137,6 @@ public function getAsOptions(): array { ); } - /** * @return array */ diff --git a/lib/Model/Report.php b/lib/Model/Report.php index 070e74eee..1b7f93ac7 100644 --- a/lib/Model/Report.php +++ b/lib/Model/Report.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; @@ -32,14 +30,12 @@ class Report implements IDeserializable, JsonSerializable { /** @var array */ private $obfuscated = []; - /** * Report constructor. */ public function __construct() { } - /** * @param string $source * @@ -58,7 +54,6 @@ public function getSource(): string { return $this->source; } - /** * @param Circle[] $circles * @@ -77,7 +72,6 @@ public function getCircles(): array { return $this->circles; } - /** * @param array $obfuscated * @@ -96,7 +90,6 @@ public function getObfuscated(): array { return $this->obfuscated; } - /** * @param array $data * @@ -110,7 +103,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @return array */ diff --git a/lib/Model/ShareToken.php b/lib/Model/ShareToken.php index f3643b028..8295a5174 100644 --- a/lib/Model/ShareToken.php +++ b/lib/Model/ShareToken.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use JsonSerializable; @@ -22,7 +20,6 @@ class ShareToken implements IDeserializable, IQueryRow, JsonSerializable { use TArrayTools; - /** @var int */ private $dbId = 0; @@ -50,14 +47,12 @@ class ShareToken implements IDeserializable, IQueryRow, JsonSerializable { /** @var string */ private $link = ''; - /** * ShareToken constructor. */ public function __construct() { } - /** * @param int $dbId * @@ -76,7 +71,6 @@ public function getDbId(): int { return $this->dbId; } - /** * @param int $shareId * @@ -95,7 +89,6 @@ public function getShareId(): int { return $this->shareId; } - /** * @param string $circleId * @@ -114,7 +107,6 @@ public function getCircleId(): string { return $this->circleId; } - /** * @param string $singleId * @@ -133,7 +125,6 @@ public function getSingleId(): string { return $this->singleId; } - /** * @param string $memberId * @@ -152,7 +143,6 @@ public function getMemberId(): string { return $this->memberId; } - /** * @param string $token * @@ -171,7 +161,6 @@ public function getToken(): string { return $this->token; } - /** * @param string $password * @@ -190,7 +179,6 @@ public function getPassword(): string { return $this->password; } - /** * @param int $accepted * @@ -209,7 +197,6 @@ public function getAccepted(): int { return $this->accepted; } - /** * @param string $link * @@ -228,7 +215,6 @@ public function getLink(): string { return $this->link; } - /** * @param array $data * @@ -252,7 +238,6 @@ public function import(array $data): IDeserializable { return $this; } - /** * @param array $data * @param string $prefix diff --git a/lib/Model/ShareWrapper.php b/lib/Model/ShareWrapper.php index f6cabe930..4f1659a9b 100644 --- a/lib/Model/ShareWrapper.php +++ b/lib/Model/ShareWrapper.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Model; use DateTime; @@ -386,7 +384,6 @@ public function getMailSend(): bool { return $this->mailSend; } - /** * @throws IllegalIDChangeException */ @@ -478,7 +475,6 @@ private function setShareDisplay(IShare $share, IURLGenerator $urlGenerator): vo $share->setSharedWithAvatar($icon); } - /** * @param array $data * @@ -605,7 +601,6 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow return $this; } - /** * Load from database format (JSON string) to IAttributes * based on \OC\Share20\DefaultShareProvider @@ -629,7 +624,6 @@ private function importAttributesFromDatabase(string $data): void { $this->setAttributes($attributes); } - public function jsonSerialize(): array { $arr = [ 'id' => $this->getId(), diff --git a/lib/Model/SharesToken.php b/lib/Model/SharesToken.php index 03bbcb52f..b0dee2273 100644 --- a/lib/Model/SharesToken.php +++ b/lib/Model/SharesToken.php @@ -19,7 +19,6 @@ class SharesToken implements JsonSerializable { use TArrayTools; - /** @var string */ private $circleId = ''; @@ -38,14 +37,12 @@ class SharesToken implements JsonSerializable { /** @var string */ private $token = ''; - /** * SharesToken constructor. */ public function __construct() { } - /** * @return string */ @@ -64,7 +61,6 @@ public function setCircleId(string $circleId): self { return $this; } - /** * @return string */ @@ -83,7 +79,6 @@ public function setMemberId(string $memberId): self { return $this; } - /** * @return string */ @@ -102,7 +97,6 @@ public function setUserId(string $userId): self { return $this; } - /** * @return int */ @@ -121,7 +115,6 @@ public function setShareId(int $shareId): self { return $this; } - /** * @return string */ @@ -140,7 +133,6 @@ public function setToken(string $token): self { return $this; } - /** * @return int */ @@ -159,7 +151,6 @@ public function setAccepted(int $accepted): self { return $this; } - /** * @param array $data */ @@ -172,7 +163,6 @@ public function import(array $data) { $this->setToken($this->get('token', $data, '')); } - /** * @return array */ diff --git a/lib/Model/SharingFrame.php b/lib/Model/SharingFrame.php index 6b61ca021..bbd080e5d 100644 --- a/lib/Model/SharingFrame.php +++ b/lib/Model/SharingFrame.php @@ -50,7 +50,6 @@ public function __construct($source, $type) { $this->type = (string)$type; } - /** * @return string */ @@ -79,7 +78,6 @@ public function getCircle() { return $this->circle; } - /** * @param string $author */ @@ -94,7 +92,6 @@ public function getAuthor() { return $this->author; } - /** * @param string $cloudId */ @@ -109,7 +106,6 @@ public function getCloudId() { return $this->cloudId; } - /** * @param string $uniqueId * @@ -158,7 +154,6 @@ public function getPayload($asJson = false) { return $this->payload; } - /** * @param array $headers */ @@ -179,7 +174,6 @@ public function getHeaders($asJson = false) { return $this->headers; } - /** * @param string $k * @@ -206,7 +200,6 @@ public function setHeader($k, $v) { $this->headers[(string)$k] = $v; } - /** * @param int $creation */ @@ -225,7 +218,6 @@ public function getCreation() { return $this->creation; } - /** * @return bool */ @@ -233,7 +225,6 @@ public function isLocal() { return ($this->getCloudId() === null); } - /** * @return bool */ @@ -250,7 +241,6 @@ public function cannotBeFromCircles() { } } - public function jsonSerialize(): array { return [ 'unique_id' => $this->getUniqueId(), @@ -292,7 +282,6 @@ public static function fromArray(?array $arr): ?self { return $share; } - /** * @param array $arr * @@ -307,7 +296,6 @@ private static function getHeadersFromArray($arr) { return $headers; } - /** * @param array $arr * diff --git a/lib/MountManager/CircleMount.php b/lib/MountManager/CircleMount.php index 30ba49060..b13b7b91c 100644 --- a/lib/MountManager/CircleMount.php +++ b/lib/MountManager/CircleMount.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\MountManager; use Exception; diff --git a/lib/MountManager/CircleMountProvider.php b/lib/MountManager/CircleMountProvider.php index 160389f96..f436ada7c 100644 --- a/lib/MountManager/CircleMountProvider.php +++ b/lib/MountManager/CircleMountProvider.php @@ -84,7 +84,6 @@ public function getMountsForUser(IUser $user, IStorageFactory $loader): array { return $mounts; } - /** * @throws InitiatorNotFoundException * @throws MountPointConstructionException diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 12bfa471c..0f24a4ef5 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Notification; use Exception; @@ -55,7 +53,6 @@ class Notifier implements INotifier { /** @var ICloudIdManager */ protected $cloudIdManager; - public function __construct( private readonly IL10N $l10n, IFactory $factory, @@ -123,7 +120,6 @@ public function prepare(INotification $notification, string $languageCode): INot return $notification; } - /** * @param INotification $notification * @@ -176,7 +172,6 @@ private function prepareMemberNotification(INotification $notification) { $notification->setParsedSubject($subject); } - /** * @param INotification $notification */ diff --git a/lib/Search/Contacts.php b/lib/Search/Contacts.php index 1cbdd061e..7abefea90 100644 --- a/lib/Search/Contacts.php +++ b/lib/Search/Contacts.php @@ -36,7 +36,6 @@ public function search($needle): array { return $result; } - /** * @param array $contact * diff --git a/lib/Search/FederatedUsers.php b/lib/Search/FederatedUsers.php index 5f221ec08..2a4f3b1a6 100644 --- a/lib/Search/FederatedUsers.php +++ b/lib/Search/FederatedUsers.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Search; use OCA\Circles\Db\MemberRequest; diff --git a/lib/Search/GlobalScaleUsers.php b/lib/Search/GlobalScaleUsers.php index 1ba542207..adae3b685 100644 --- a/lib/Search/GlobalScaleUsers.php +++ b/lib/Search/GlobalScaleUsers.php @@ -29,7 +29,6 @@ class GlobalScaleUsers implements ISearch { use TNCRequest; use TArrayTools; - /** * GlobalScaleUsers constructor. * @@ -78,8 +77,8 @@ public function search(string $needle): array { continue; } - $result[] = - new SearchResult( + $result[] + = new SearchResult( $this->get('userid.value', $user), DeprecatedMember::TYPE_USER, $instance, ['display' => $this->get('name.value', $user)] ); diff --git a/lib/Search/LocalUsers.php b/lib/Search/LocalUsers.php index 9355729c9..e58a275ca 100644 --- a/lib/Search/LocalUsers.php +++ b/lib/Search/LocalUsers.php @@ -20,7 +20,6 @@ class LocalUsers implements ISearch { use TArrayTools; - /** * LocalUsers constructor. * @@ -33,7 +32,6 @@ public function __construct( ) { } - /** * {@inheritdoc} */ @@ -58,7 +56,6 @@ public function search($needle): array { return $result; } - /** * @param $search * @@ -70,8 +67,8 @@ private function searchFromCollaborator($search): array { $result = array_merge($temp['exact']['users'], $temp['users']); $parsed = []; foreach ($result as $entry) { - $parsed[] = - new SearchResult( + $parsed[] + = new SearchResult( $this->get('value.shareWith', $entry), Member::TYPE_USER, '', diff --git a/lib/Search/UnifiedSearchProvider.php b/lib/Search/UnifiedSearchProvider.php index 71226d663..0b2be7d1f 100644 --- a/lib/Search/UnifiedSearchProvider.php +++ b/lib/Search/UnifiedSearchProvider.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Search; use Exception; @@ -26,7 +24,6 @@ class UnifiedSearchProvider implements IProvider { public const PROVIDER_ID = 'circles'; public const ORDER = 9; - /** * @param IL10N $l10n * @param FederatedUserService $federatedUserService @@ -39,7 +36,6 @@ public function __construct( ) { } - /** * return unique id of the provider */ @@ -47,7 +43,6 @@ public function getId(): string { return self::PROVIDER_ID; } - /** * @return string */ @@ -55,7 +50,6 @@ public function getName(): string { return $this->l10n->t('Teams'); } - /** * @param string $route * @param array $routeParameters @@ -66,7 +60,6 @@ public function getOrder(string $route, array $routeParameters): int { return self::ORDER; } - /** * @param IUser $user * @param ISearchQuery $query @@ -91,7 +84,6 @@ public function search(IUser $user, ISearchQuery $query): SearchResult { ); } - /** * This is temporary, should be handled by core to extract Options from Term * diff --git a/lib/Search/UnifiedSearchResult.php b/lib/Search/UnifiedSearchResult.php index 736434ae1..9f39821bb 100644 --- a/lib/Search/UnifiedSearchResult.php +++ b/lib/Search/UnifiedSearchResult.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Search; use OCP\Search\SearchResultEntry; @@ -35,7 +33,6 @@ public function __construct( parent::__construct($thumbnailUrl, $title, $subline, $resourceUrl, $icon, $rounded); } - /** * @return string */ @@ -54,7 +51,6 @@ public function setThumbnailUrl(string $thumbnailUrl): self { return $this; } - /** * @return string */ @@ -73,7 +69,6 @@ public function setTitle(string $title): self { return $this; } - /** * @return string */ @@ -92,7 +87,6 @@ public function setSubline(string $subline): self { return $this; } - /** * @return string */ @@ -111,7 +105,6 @@ public function setResourceUrl(string $resourceUrl): self { return $this; } - /** * @return string */ @@ -130,7 +123,6 @@ public function setIcon(string $icon): self { return $this; } - /** * @return bool */ diff --git a/lib/Service/CircleService.php b/lib/Service/CircleService.php index 2c8f34ef9..b2292f6e0 100644 --- a/lib/Service/CircleService.php +++ b/lib/Service/CircleService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\AppInfo\Application; @@ -70,7 +68,6 @@ class CircleService { /** @var ICache $cache */ private $cache; - /** * @param IL10N $l10n * @param IHasher $hasher @@ -102,7 +99,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param string $name * @param FederatedUser|null $owner @@ -180,7 +176,6 @@ public function create( return $event->getOutcome(); } - /** * @param string $circleId * @param bool $forceSync @@ -211,7 +206,6 @@ public function destroy(string $circleId, bool $forceSync = false): array { return $event->getOutcome(); } - /** * @param string $circleId * @param int $config @@ -250,7 +244,6 @@ public function updateConfig(string $circleId, int $config): array { return $event->getOutcome(); } - /** * if $value is null, setting is unset * @@ -295,7 +288,6 @@ public function updateSetting(string $circleId, string $setting, ?string $value) return $event->getOutcome(); } - /** * @param string $circleId * @param string $name @@ -365,7 +357,6 @@ public function updateDescription(string $circleId, string $description): array return $event->getOutcome(); } - /** * @param string $circleId * @@ -411,7 +402,6 @@ public function circleJoin(string $circleId): array { return $event->getOutcome(); } - /** * @param string $circleId * @param bool $force @@ -477,7 +467,6 @@ public function getCircle( ); } - /** * @return Circle[] * @throws InitiatorNotFoundException @@ -516,7 +505,6 @@ public function getCircles(CircleProbe $probe, bool $caching = false): array { return $circles; } - /** * @param Circle $circle * @@ -561,7 +549,6 @@ private function confirmDisplayName(Circle $circle) { } } - /** * @param Circle $circle * @@ -614,7 +601,6 @@ public function sanitizeName(string $name): string { return trim($sanitized, ' .'); } - /** * @param Circle $circle * @@ -626,7 +612,6 @@ public function confirmCircleNotFull(Circle $circle): void { } } - /** * @param Circle $circle * @@ -652,7 +637,6 @@ public function isCircleFull(Circle $circle): bool { return (sizeof($members) >= $limit); } - /** * @param string $name * @@ -664,7 +648,6 @@ public function cleanCircleName(string $name): string { return trim((string)$name); } - /** * @param IEntity $entity * @@ -719,12 +702,10 @@ public function getDefinitionUser(IFederatedUser $federatedUser): string { return $this->l10n->t('%s', [Circle::$DEF_SOURCE[$federatedUser->getUserType()]]); } - private function generateGetCirclesCacheKey(FederatedUser $federatedUser, string $probeSum): string { return $federatedUser->getSingleId() . '#' . $probeSum; } - /** * @param string $circleId * @param CircleProbe $circleProbe diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 4eb636b92..b3a56add8 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OC; @@ -37,7 +35,6 @@ class ConfigService { use TArrayTools; use TNCLogger; - public const FRONTAL_CLOUD_BASE = 'frontal_cloud_base'; public const FRONTAL_CLOUD_ID = 'frontal_cloud_id'; public const FRONTAL_CLOUD_SCHEME = 'frontal_cloud_scheme'; @@ -107,7 +104,6 @@ class ConfigService { public const GS_LOOKUP_INSTANCES = '/instances'; public const GS_LOOKUP_USERS = '/users'; - // deprecated -- removing in NC25 public const CIRCLES_CONTACT_BACKEND = 'contact_backend'; public const CIRCLES_ACCOUNTS_ONLY = 'accounts_only'; // only UserType=1 @@ -116,7 +112,6 @@ class ConfigService { public const FORCE_NC_BASE = 'force_nc_base'; public const TEST_NC_BASE = 'test_nc_base'; - private static $defaults = [ self::FRONTAL_CLOUD_BASE => '', self::FRONTAL_CLOUD_ID => '', @@ -188,12 +183,10 @@ class ConfigService { self::CIRCLES_SEARCH_FROM_COLLABORATOR => '0', ]; - public const DISPLAY_NONE = 0; public const DISPLAY_AT = 1; public const DISPLAY_PARENTHESIS = 2; - /** * ConfigService constructor. * @@ -210,7 +203,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * Get a value by key * @@ -248,7 +240,6 @@ public function getAppValueBool(string $key): bool { return ($this->getAppValueInt($key) === 1); } - /** * Set a value by key * @@ -261,7 +252,6 @@ public function setAppValue(string $key, string $value): void { $this->appConfig->setAppValueString($key, $value); } - /** * */ @@ -269,7 +259,6 @@ public function unsetAppConfig(): void { $this->appConfig->deleteAppValues(); } - /** * Get available hosts * @@ -279,7 +268,6 @@ public function getAvailableHosts(): array { return $this->config->getSystemValue('trusted_domains', []); } - /** * Get a user value by key and user * @@ -295,7 +283,6 @@ public function getCoreValueForUser($userId, $key, $default = '') { return $this->userConfig->getValueString($userId, 'core', $key, $default); } - /** * @return bool * @deprecated @@ -305,7 +292,6 @@ public function isContactsBackend(): bool { && $this->getAppValue(ConfigService::CIRCLES_CONTACT_BACKEND) !== ''); } - /** * @return int * @deprecated @@ -314,7 +300,6 @@ public function contactsBackendType(): int { return (int)$this->getAppValue(ConfigService::CIRCLES_CONTACT_BACKEND); } - /** * true if: * - password is generated randomly @@ -332,7 +317,6 @@ public function sendPasswordByMail(Circle $circle): bool { || $this->get('password_single', $circle->getSettings()) === ''); } - /** * true if: * - password enforced for Circle @@ -352,7 +336,6 @@ public function isSinglePasswordAvailable(Circle $circle): bool { && $this->get('password_single', $circle->getSettings()) !== ''); } - /** * true if: * - global setting of Nextcloud enforce password on shares. @@ -380,7 +363,6 @@ public function enforcePasswordOnSharedFile(Circle $circle): bool { return $this->getBool('enforce_password', $circle->getSettings(), false); } - /** * // TODO: fetch data from somewhere else than hard coded... * @@ -395,7 +377,6 @@ public function getSettings(): array { ]; } - /** * @return bool */ @@ -407,7 +388,6 @@ public function isGSAvailable(): bool { return $this->config->getSystemValueBool('gs.enabled', false); } - /** * @return string * @throws GSStatusException @@ -422,7 +402,6 @@ public function getGSLookup(): string { return $lookup; } - /** * @return array */ @@ -430,7 +409,6 @@ public function getGSSMockup(): array { return $this->config->getSystemValue('gss.mockup', []); } - /** * @param string $type * @@ -446,7 +424,6 @@ public function getGSInfo(string $type): string { }; } - /** * @return array * @throws GSStatusException @@ -461,7 +438,6 @@ public function getGSData(): array { ]; } - /** * @return array */ @@ -471,7 +447,6 @@ public function getTrustedDomains(): array { ); } - /** * @return string */ @@ -549,7 +524,6 @@ public function getLoopbackPath(string $route = '', array $args = []): string { return rtrim($base, '/') . $this->linkToRoute($route, $args); } - /** * - must be configured using INTERNAL_CLOUD_ID * - returns host+port, does not specify any protocol @@ -563,7 +537,6 @@ public function getInternalInstance(): string { return $this->getAppValue(self::INTERNAL_CLOUD_ID); } - /** * - must be configured using FRONTAL_CLOUD_ID * - returns host+port, does not specify any protocol @@ -586,7 +559,6 @@ public function getFrontalInstance(): string { return $frontalCloudId; } - /** * @param int $iface * @@ -603,7 +575,6 @@ public function getIfaceInstance(int $iface): string { }; } - /** * @param string $instance * @@ -630,7 +601,6 @@ public function isLocalInstance(string $instance): bool { return (in_array($instance, $this->getTrustedDomains())); } - /** * @param IFederatedUser $federatedUser * @param bool $displayName @@ -675,7 +645,6 @@ public function displayInstance(string $instance, int $type = self::DISPLAY_NONE }; } - /** * - Create route using getLoopbackAddress() * - perfect for loopback request. @@ -694,7 +663,6 @@ public function configureLoopbackRequest( $request->basedOnUrl($this->getLoopbackPath($route, $args)); } - /** * @param NCRequest $request */ @@ -707,7 +675,6 @@ public function configureRequest(NCRequest $request): void { $request->setTimeout(5); } - /** * @param string $route * @param array $args @@ -742,7 +709,6 @@ public function linkToRoute(string $route, array $args): string { return $path; } - /** * Enforce or Block circle's config/type * @@ -756,7 +722,7 @@ public function confirmAllowedCircleTypes(Circle $circle): void { } public function isFederatedTeamsEnabled(): bool { - return $this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED) && - $this->appConfig->hasAppKey(ConfigLexicon::FEDERATED_TEAMS_FRONTAL, true); + return $this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED) + && $this->appConfig->hasAppKey(ConfigLexicon::FEDERATED_TEAMS_FRONTAL, true); } } diff --git a/lib/Service/ContactService.php b/lib/Service/ContactService.php index fc26ce526..7b192fb1a 100644 --- a/lib/Service/ContactService.php +++ b/lib/Service/ContactService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -35,7 +33,6 @@ class ContactService { use TStringTools; use TNCLogger; - /** * ContactService constructor. * @@ -48,7 +45,6 @@ public function __construct( ) { } - /** * @param string $contactPath * @@ -76,7 +72,6 @@ public function getDisplayName(string $contactPath): string { return md5($contactPath); } - /** * @param string $contactPath * @@ -91,7 +86,6 @@ public function getMailAddresses(string $contactPath): array { return ($this->get('EMAIL', $c) === '') ? [$this->get('EMAIL', $c)] : $this->getArray('EMAIL', $c); } - /** * @throws ContactFormatException * @throws ContactNotFoundException @@ -128,7 +122,6 @@ private function getContact(string $contactPath): array { return $contacts[0]; } - /** * @param IManager $cm * @param string $addressBookUri @@ -146,7 +139,6 @@ private function getAddressBook(IManager $cm, string $addressBookUri): IAddressB throw new ContactAddressBookNotFoundException(); } - /** * @param IManager $cm * @param string $addressBookKey @@ -164,7 +156,6 @@ public function getAddressBoxById(IManager $cm, string $addressBookKey): IAddres throw new ContactAddressBookNotFoundException(); } - /** * @param Member $member * diff --git a/lib/Service/EventService.php b/lib/Service/EventService.php index d614237af..b2b806743 100644 --- a/lib/Service/EventService.php +++ b/lib/Service/EventService.php @@ -7,7 +7,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Events\AddingCircleMemberEvent; @@ -45,7 +44,6 @@ public function __construct( ) { } - /** * @param FederatedEvent $federatedEvent */ @@ -64,7 +62,6 @@ public function circleCreated(FederatedEvent $federatedEvent, array $results): v $this->activityService->onCircleCreation($event->getCircle()); } - /** * @param FederatedEvent $federatedEvent */ @@ -100,7 +97,6 @@ public function circleDestroyed(FederatedEvent $federatedEvent, array $results): $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -129,7 +125,6 @@ public function memberAdded(FederatedEvent $federatedEvent, array $results): voi $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -150,7 +145,6 @@ public function memberInvited(FederatedEvent $federatedEvent, array $results): v $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -171,7 +165,6 @@ public function memberRequested(FederatedEvent $federatedEvent, array $results): $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -192,7 +185,6 @@ public function memberJoined(FederatedEvent $federatedEvent, array $results): vo $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -215,7 +207,6 @@ public function memberLevelEdited(FederatedEvent $federatedEvent, array $results $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -237,7 +228,6 @@ public function memberNameEdited(FederatedEvent $federatedEvent, array $results) $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent */ @@ -258,7 +248,6 @@ public function memberRemoved(FederatedEvent $federatedEvent, array $results): v $this->activityService->onMemberRemove($event->getCircle(), $event->getMember(), CircleGenericEvent::REMOVED); } - /** * @param FederatedEvent $federatedEvent */ @@ -279,7 +268,6 @@ public function memberLeft(FederatedEvent $federatedEvent, array $results): void $this->activityService->onMemberRemove($event->getCircle(), $event->getMember(), CircleGenericEvent::LEFT); } - /** * @param FederatedEvent $federatedEvent */ @@ -300,7 +288,6 @@ public function fileShareCreating(FederatedEvent $federatedEvent, ?Mount $mount $this->eventDispatcher->dispatchTyped($event); } - /** * @param FederatedEvent $federatedEvent * @param SimpleDataStore[] $result @@ -311,7 +298,6 @@ public function fileShareCreated(FederatedEvent $federatedEvent, array $result): $this->activityService->onShareNew($event->getCircle(), $event->getFederatedEvent()); } - /** * @param Membership[] $new */ diff --git a/lib/Service/EventWrapperService.php b/lib/Service/EventWrapperService.php index b9aa94d86..babf6cbda 100644 --- a/lib/Service/EventWrapperService.php +++ b/lib/Service/EventWrapperService.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -27,7 +26,6 @@ class EventWrapperService extends NCSignature { use TNCRequest; use TStringTools; - public const RETRY_ASAP = 'asap'; public const RETRY_HOURLY = 'hourly'; public const RETRY_DAILY = 'daily'; @@ -38,7 +36,6 @@ class EventWrapperService extends NCSignature { 'daily' => [150, 300] ]; - /** * EventWrapperService constructor. * @@ -55,7 +52,6 @@ public function __construct( ) { } - /** * @param string $token * @param bool $refresh @@ -65,8 +61,8 @@ public function confirmStatus(string $token, bool $refresh = false): void { foreach ($wrappers as $wrapper) { $status = $wrapper->getStatus(); - if ($refresh && ($status === EventWrapper::STATUS_FAILED || - $status === EventWrapper::STATUS_INIT)) { + if ($refresh && ($status === EventWrapper::STATUS_FAILED + || $status === EventWrapper::STATUS_INIT)) { $wrapper->setStatus(EventWrapper::STATUS_INIT); $this->eventWrapperRequest->update($wrapper); $status = $this->manageWrapper($wrapper); @@ -81,7 +77,6 @@ public function confirmStatus(string $token, bool $refresh = false): void { $this->eventWrapperRequest->updateAll($token, EventWrapper::STATUS_OVER); } - /** * @param EventWrapper $wrapper * @@ -119,7 +114,6 @@ public function manageWrapper(EventWrapper $wrapper): int { return $status; } - /** * @param string $retry */ @@ -130,7 +124,6 @@ public function retry(string $retry) { } } - /** * @param array $retryRange * diff --git a/lib/Service/FederatedEventService.php b/lib/Service/FederatedEventService.php index 7e89ef202..283faef09 100644 --- a/lib/Service/FederatedEventService.php +++ b/lib/Service/FederatedEventService.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -148,7 +147,6 @@ public function newEvent(FederatedEvent $event): array { return $event->getOutcome(); } - /** * This confirmation is optional, method is just here to avoid going too far away on the process * @@ -187,7 +185,6 @@ public function confirmInitiator(FederatedEvent $event, bool $local = false): vo } } - /** * @param FederatedEvent $event * @param bool $checkLocalOnly @@ -225,7 +222,6 @@ public function getFederatedItem(FederatedEvent $event, bool $checkLocalOnly = t return $item; } - /** * Some event might need to bypass some checks * @@ -290,7 +286,6 @@ private function confirmRequiredCondition( } } - /** * @param FederatedEvent $event * @param IFederatedItem $item @@ -317,7 +312,6 @@ private function confirmSharedItem(FederatedEvent $event, IFederatedItem $item): } } - /** * @param FederatedEvent $event * @param IFederatedItem $item @@ -334,7 +328,6 @@ private function configureEvent(FederatedEvent $event, IFederatedItem $item) { } } - /** * async the process, generate a local request that will be closed. * @@ -369,8 +362,8 @@ public function initBroadcast(FederatedEvent $event): bool { break; } - if ($instance->getInterface() === InterfaceService::IFACE_FRONTAL && - !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { + if ($instance->getInterface() === InterfaceService::IFACE_FRONTAL + && !$this->appConfig->getAppValueBool(ConfigLexicon::FEDERATED_TEAMS_ENABLED)) { break; } @@ -403,7 +396,6 @@ public function initBroadcast(FederatedEvent $event): bool { return true; } - /** * @param FederatedEvent $event * @@ -453,7 +445,6 @@ function (RemoteInstance $instance) use ($knownInstances) { return $instances; } - /** * should be used to manage results from events, like sending mails on user creation * diff --git a/lib/Service/FederatedShareService.php b/lib/Service/FederatedShareService.php index 74ba1d47a..bbceee2e8 100644 --- a/lib/Service/FederatedShareService.php +++ b/lib/Service/FederatedShareService.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -48,7 +47,6 @@ public function __construct( ) { } - /** * @param string $circleId * @param string $itemId diff --git a/lib/Service/FederatedUserService.php b/lib/Service/FederatedUserService.php index b93aef816..36654b68f 100644 --- a/lib/Service/FederatedUserService.php +++ b/lib/Service/FederatedUserService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -74,7 +72,6 @@ class FederatedUserService { use TNCLogger; use TDeserialize; - public const CACHE_SINGLE_CIRCLE = 'circles/singleCircle'; public const CACHE_SINGLE_CIRCLE_TTL = 604800; // one week @@ -84,7 +81,6 @@ class FederatedUserService { public const CONFLICT_004 = 4; public const CONFLICT_005 = 5; - /** @var ICache */ private $cache; @@ -106,7 +102,6 @@ class FederatedUserService { /** @var FederatedUser */ private $initiatedByAdmin = null; - /** * FederatedUserService constructor. * @@ -148,7 +143,6 @@ public function __construct( } } - /** * specify $defaultUser in case a session is not opened but user needs to be emulated (ie. cron) * @@ -171,7 +165,6 @@ public function initCurrentUser(string $defaultUser = ''): void { $this->setLocalCurrentUser($user); } - /** * @param IUser|null $user * @@ -218,7 +211,6 @@ public function setLocalCurrentApp(string $appId, int $appNumber): void { $this->currentApp = $this->getAppInitiator($appId, $appNumber); } - /** * set a CurrentUser, based on a IFederatedUser. * CurrentUser is mainly used to manage rights when requesting the database. @@ -297,7 +289,6 @@ public function confirmSuperSession(): void { throw new SuperSessionException('Must initialise Super Session'); } - /** * @param bool $initiatedByOcc */ @@ -351,7 +342,6 @@ public function setCurrentPatron(string $userId): void { $this->setInitiatedByAdmin($patron); } - /** * @param Member $member * @@ -375,7 +365,6 @@ public function setMemberPatron(Member $member): void { } } - /** * @return FederatedUser|null */ @@ -390,7 +379,6 @@ public function hasCurrentApp(): bool { return !is_null($this->currentApp); } - /** * @return FederatedUser|null */ @@ -409,7 +397,6 @@ public function hasCurrentEntity(): bool { return !is_null($this->currentApp) || !is_null($this->currentUser); } - /** * set a RemoteInstance, mostly from a remote request (RemoteController) * Used to limit rights in some request in the local database. @@ -434,7 +421,6 @@ public function hasRemoteInstance(): bool { return !is_null($this->remoteInstance); } - /** * Get the full FederatedUser for a local user. * Will generate the SingleId if none exist @@ -548,7 +534,6 @@ public function getAppInitiator( return $federatedUser; } - /** * some ./occ commands allows to add an Initiator, or force the PoV from the local circles' owner * @@ -604,7 +589,6 @@ public function commandLineInitiator( $this->bypassCurrentUserCondition($bypass); } - /** * @param string $circleId * @@ -618,7 +602,7 @@ public function setOwnerAsCurrentUser(string $circleId): void { $probe = new CircleProbe(); $probe->includeSystemCircles() ->includePersonalCircles(); - + $localCircle = $this->circleRequest->getCircle($circleId, null, $probe); if ($this->configService->isLocalInstance($localCircle->getInstance())) { $this->setCurrentUser($localCircle->getOwner()); @@ -627,7 +611,6 @@ public function setOwnerAsCurrentUser(string $circleId): void { } } - /** * Works like getFederatedUser, but returns a member. * Allow to specify a level: handle@instance,level @@ -667,7 +650,6 @@ public function getFederatedMember(string $userId, int $level = Member::LEVEL_ME return $member; } - /** * get a valid FederatedUser, based on the federatedId (userId@instance) and its type. * If instance is local, get the local valid FederatedUser @@ -718,7 +700,6 @@ public function getFederatedUser(string $federatedId, int $type = Member::TYPE_S }; } - /** * Generate a FederatedUser based on local data. * WARNING: There is no confirmation that the returned FederatedUser exists or is valid at this point. @@ -754,7 +735,6 @@ public function generateFederatedUser(string $federatedId, int $type = 0): Feder return $federatedUser; } - /** * @param FederatedUser $federatedUser */ @@ -766,7 +746,6 @@ public function deleteFederatedUser(FederatedUser $federatedUser): void { $this->cache->remove($this->generateCacheKey($federatedUser)); } - /** * @param string $singleId * @param string $instance @@ -800,7 +779,6 @@ public function getFederatedUser_SingleId(string $singleId, string $instance): F } } - /** * @param string $userId * @param string $instance @@ -833,7 +811,6 @@ private function getFederatedUser_User(string $userId, string $instance): Federa } } - /** * @param string $groupName * @param string $instance @@ -864,7 +841,6 @@ public function getFederatedUser_Group(string $groupName, string $instance = '') } } - /** * @param string $mailAddress * @@ -885,7 +861,6 @@ public function getFederatedUser_Mail(string $mailAddress): FederatedUser { return $federatedUser; } - /** * @param string $contactPath * @@ -912,7 +887,6 @@ public function getFederatedUser_Contact(string $contactPath): FederatedUser { return $federatedUser; } - /** * extract userID and instance from a federatedId * @@ -934,7 +908,6 @@ public function extractIdAndInstance(string $federatedId): array { return [$userId, $instance]; } - /** * @param FederatedUser $federatedUser * @param bool $generate @@ -960,7 +933,6 @@ private function fillSingleCircleId(FederatedUser $federatedUser, bool $generate $federatedUser->setBasedOn($circle); } - /** * get the Single Circle from a local user * @@ -1047,7 +1019,6 @@ private function getSingleCircle(FederatedUser $federatedUser, bool $generate = return $singleCircle; } - /** * Confirm that all field of a FederatedUser are filled. * @@ -1089,7 +1060,6 @@ public function confirmLocalSingleId(IFederatedUser $federatedUser): void { } } - /** * // TODO: implement this check in a maintenance background job * @@ -1139,7 +1109,6 @@ public function confirmSingleIdUniqueness(IFederatedUser $federatedUser): void { } } - /** * @param IFederatedUser $federatedUser * @param Member $knownMember @@ -1225,7 +1194,6 @@ public function getGroupCircle(string $groupId): Circle { return $circle; } - /** * @param FederatedUser $federatedUser * diff --git a/lib/Service/GlobalScaleService.php b/lib/Service/GlobalScaleService.php index 9ddd0b961..33cf7975a 100644 --- a/lib/Service/GlobalScaleService.php +++ b/lib/Service/GlobalScaleService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OC\Security\IdentityProof\Signer; @@ -35,7 +33,6 @@ class GlobalScaleService { /** @var Signer */ private $signer; - /** * GlobalScaleService constructor. * @@ -59,7 +56,6 @@ public function __construct( $this->signer = $signer; } - /** * @return array */ diff --git a/lib/Service/InterfaceService.php b/lib/Service/InterfaceService.php index 5fc5d3ee1..af00237fe 100644 --- a/lib/Service/InterfaceService.php +++ b/lib/Service/InterfaceService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\AppInfo\Application; @@ -46,19 +44,16 @@ class InterfaceService { self::IFACE4 => 'iface4', ]; - use TStringTools; use TArrayTools; use TNCLogger; - /** @var int */ private $currentInterface = 0; /** @var int */ private $outgoingInterface = 0; - /** * InterfaceService constructor. * @@ -74,7 +69,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param int $interface */ @@ -101,7 +95,6 @@ public function hasCurrentInterface(): bool { return ($this->currentInterface !== 0); } - /** * @return bool * @throws UnknownInterfaceException @@ -129,7 +122,6 @@ public function isInterfaceInternal(int $interface): bool { }; } - /** * @param IRequest $request * @param string $testToken @@ -164,7 +156,6 @@ public function setCurrentInterfaceFromRequest(IRequest $request, string $testTo } } - /** * @param string $instance * @@ -187,7 +178,6 @@ public function setCurrentInterfaceFromInstance(string $instance): void { } } - /** * @param int $interface * @@ -203,7 +193,6 @@ public function isInterfaceConfigured(int $interface): bool { return ($this->configService->getAppValue($config) !== ''); } - /** * @param int $interface * @@ -223,7 +212,6 @@ private function getCloudIdConfigKey(int $interface): string { }; } - /** * @param bool $useString * @@ -252,7 +240,6 @@ public function getInterfaces(bool $useString = false): array { return $detailed; } - /** * @param bool $useString * @@ -282,7 +269,6 @@ public function getInternalInterfaces(bool $useString = false): array { return $detailed; } - /** * use this only if interface must be defined. If not, use getLocalInstance() * @@ -301,7 +287,6 @@ public function getCloudInstance(int $interface = 0): string { }; } - /** * @throws UnknownInterfaceException */ @@ -358,7 +343,6 @@ public function getCloudPath(string $route = '', array $args = [], int $interfac return $base . $this->configService->linkToRoute($route, $args); } - /** * should be used when unsure about the used Interface * @@ -375,7 +359,6 @@ public function getLocalInstance(): string { return $this->configService->getLoopbackInstance(); } - /** * @param string $route * @param array $args @@ -391,7 +374,6 @@ public function getLocalPath(string $route, array $args): string { return rtrim($base, '/') . $this->configService->linkToRoute($route, $args); } - /** * should be used when trying to generate an address * @@ -447,7 +429,6 @@ public function getFrontalPath(string $route, array $args): string { return $this->getLocalPath($route, $args); } - /** * @return string */ diff --git a/lib/Service/MaintenanceService.php b/lib/Service/MaintenanceService.php index 663e3a221..41a3a78ce 100644 --- a/lib/Service/MaintenanceService.php +++ b/lib/Service/MaintenanceService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -42,8 +40,8 @@ class MaintenanceService { use TNCLogger; public const TIMEOUT = 18000; - public static $DELAY = - [ + public static $DELAY + = [ 1 => 60, // every minute 2 => 300, // every 5 minutes 3 => 3600, // every hour @@ -73,7 +71,6 @@ public function __construct( ) { } - /** * @param OutputInterface $output */ @@ -81,7 +78,6 @@ public function setOccOutput(OutputInterface $output): void { $this->output = $output; } - /** * level=1 -> run every minute * level=2 -> run every 5 minutes @@ -120,7 +116,6 @@ public function runMaintenance(int $level, bool $forceRefresh = false): void { $this->configService->setAppValue(ConfigService::MAINTENANCE_RUN, '0'); } - /** * @throws MaintenanceException */ @@ -133,7 +128,6 @@ private function lockMaintenanceRun(): void { $this->configService->setAppValue(ConfigService::MAINTENANCE_RUN, (string)time()); } - /** * every minute */ @@ -145,7 +139,6 @@ private function runMaintenance1(bool $forceRefresh = false): void { } } - /** * every 10 minutes */ @@ -169,7 +162,6 @@ private function runMaintenance2(bool $forceRefresh = false): void { } } - /** * every hour */ @@ -181,7 +173,6 @@ private function runMaintenance3(bool $forceRefresh = false): void { } } - /** * every day */ @@ -246,7 +237,6 @@ private function runMaintenance5(bool $forceRefresh = false): void { } } - /** * @throws InitiatorNotFoundException * @throws RequestBuilderException @@ -264,7 +254,6 @@ private function removeCirclesWithNoOwner(): void { } } - /** * */ @@ -280,12 +269,10 @@ private function removeMembersWithNoCircles(): void { // } } - private function removeOrphanShares(): void { $this->shareWrapperRequest->removeOrphanShares(); } - /** * @throws RequestBuilderException */ @@ -314,7 +301,6 @@ private function removeDeprecatedShares(): void { } } - /** * @throws InitiatorNotFoundException * @throws RequestBuilderException @@ -380,7 +366,6 @@ public function updateDisplayName(IFederatedUser $federatedUser): string { return $displayName; } - /** * @throws RequestBuilderException * @throws InitiatorNotFoundException @@ -396,7 +381,6 @@ private function fixSubCirclesDisplayName(): void { } } - /** * should only be called from a BackgroundJob * @@ -421,7 +405,6 @@ public function runMaintenances(bool $heavy = false): void { $this->configService->setAppValue(ConfigService::MAINTENANCE_UPDATE, json_encode($last)); } - /** * @param int $level * @param SimpleDataStore $last @@ -438,7 +421,6 @@ private function canRunLevel(int $level, SimpleDataStore $last): bool { return ($timeLastRun + self::$DELAY[$level] < $now); } - /** * @param string $message */ diff --git a/lib/Service/MemberService.php b/lib/Service/MemberService.php index 20b35b08f..b3834e1e4 100644 --- a/lib/Service/MemberService.php +++ b/lib/Service/MemberService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Db\CircleRequest; @@ -59,7 +57,6 @@ class MemberService { use TStringTools; use TNCLogger; - /** * MemberService constructor. * @@ -93,7 +90,6 @@ public function __construct( // } // - /** * @param string $memberId * @param string $circleId @@ -124,7 +120,6 @@ public function getMemberById( return $member; } - /** * @param string $circleId * @param bool $fullDetails @@ -157,7 +152,6 @@ public function getMembers(string $circleId, bool $fullDetails = false, int $lim ); } - /** * @param string $circleId * @param FederatedUser $federatedUser @@ -202,7 +196,6 @@ public function addMember(string $circleId, FederatedUser $federatedUser, bool $ return $event->getOutcome(); } - /** * @param string $circleId * @param IFederatedUser[] $members @@ -252,7 +245,6 @@ function (FederatedUser $federatedUser) use ($patron) { return $event->getOutcome(); } - /** * @param string $memberId * @param bool $forceSync @@ -288,7 +280,6 @@ public function removeMember(string $memberId, bool $forceSync = false): array { return $event->getOutcome(); } - /** * @return list */ @@ -325,8 +316,8 @@ public function collectShareAccessUpdateUsers(Member|FederatedUser $member): arr */ public function memberLevel(string $memberId, int $level): array { $this->federatedUserService->mustHaveCurrentUser(); - $member = - $this->memberRequest->getMemberById($memberId, $this->federatedUserService->getCurrentUser()); + $member + = $this->memberRequest->getMemberById($memberId, $this->federatedUserService->getCurrentUser()); $event = new FederatedEvent(MemberLevel::class); $event->setCircle($member->getCircle()); @@ -338,7 +329,6 @@ public function memberLevel(string $memberId, int $level): array { return $event->getOutcome(); } - /** * @param Member $member * diff --git a/lib/Service/MembershipService.php b/lib/Service/MembershipService.php index d784c70b3..e8bfd0e66 100644 --- a/lib/Service/MembershipService.php +++ b/lib/Service/MembershipService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Db\CircleRequest; @@ -33,7 +31,6 @@ class MembershipService { use TNCLogger; - /** * MembershipService constructor. * @@ -54,7 +51,6 @@ public function __construct( ) { } - /** * @param string $singleId * @@ -84,7 +80,6 @@ public function onUpdate(string $singleId): void { } } - /** * @param string $singleId * @@ -97,7 +92,6 @@ public function manageMemberships(string $singleId): int { return $this->updateMembershipsDatabase($singleId, $memberships); } - /** * @param string $circleId * @param string $singleId @@ -117,7 +111,6 @@ public function getMembership(string $circleId, string $singleId, bool $detailed return $membership; } - /** * @param string $singleId * @param bool $all @@ -126,7 +119,6 @@ public function resetMemberships(string $singleId = '', bool $all = false) { $this->membershipRequest->removeBySingleId($singleId, $all); } - /** * @param FederatedUser $federatedUser */ @@ -134,7 +126,6 @@ public function deleteFederatedUser(FederatedUser $federatedUser) { $this->membershipRequest->deleteFederatedUser($federatedUser); } - /** * @param string $singleId * @param string $circleId @@ -185,7 +176,6 @@ private function generateMemberships( return $memberships; } - /** * @param string $singleId * @param Membership[] $memberships @@ -208,7 +198,6 @@ private function updateMembershipsDatabase(string $singleId, array $memberships) return count($deprecated) + count($new); } - /** * @param string $id * @param array $knownIds @@ -232,7 +221,6 @@ private function getChildrenMembers(string $id, array &$knownIds = []): array { return array_unique($singleIds); } - /** * @param string $id * @param array $knownIds @@ -255,7 +243,6 @@ private function getChildrenMemberships(string $id, array &$knownIds = []): arra return array_unique($singleIds); } - /** * Add the new membership if unknown or Update known membership if: * - new membership comes with more power @@ -285,7 +272,6 @@ private function fillMemberships(Membership $membership, array &$memberships) { $memberships[$membership->getCircleId()] = $membership; } - /** * @param Membership[] $memberships * @param Membership[] $known @@ -312,7 +298,6 @@ private function removeDeprecatedMemberships(array $memberships, array $known): return $deprecated; } - /** * @param Membership[] $memberships * @param Membership[] $known @@ -343,7 +328,6 @@ private function createNewMemberships(array $memberships, array $known): array { return $new; } - /** * @param Membership[] $list * @param string $circleId diff --git a/lib/Service/MigrationService.php b/lib/Service/MigrationService.php index cf3c472c5..213bdf9c4 100644 --- a/lib/Service/MigrationService.php +++ b/lib/Service/MigrationService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -59,11 +57,9 @@ class MigrationService { use TStringTools; use TNCLogger; - /** @var FederatedUser */ private $appCircle = null; - /** * MigrationService constructor. * @@ -97,7 +93,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param bool $force * @@ -132,7 +127,6 @@ public function migration(bool $force = false): void { $this->configService->setAppValue(ConfigService::MIGRATION_RUN, '0'); } - /** * @throws RequestBuilderException */ @@ -160,7 +154,6 @@ private function migrationTo22(): void { $this->configService->setAppValue(ConfigService::MIGRATION_22, '1'); } - /** * run migration if: * - old tables exist. @@ -223,7 +216,6 @@ public function migrationTo22_Members_Memberships(): void { $this->outputService->finishMigrationProgress(); } - /** * */ @@ -256,7 +248,6 @@ private function migrationTo22_Circles(): void { $this->outputService->finishMigrationProgress(); } - /** * @param SimpleDataStore $data * @@ -287,7 +278,6 @@ private function generateCircleFrom21(SimpleDataStore $data): Circle { return $circle; } - /** * @param Circle $circle * @param int $type @@ -312,7 +302,6 @@ private function convertCircleTypeFrom21(Circle $circle, int $type): void { } } - /** * @param Circle $circle */ @@ -328,7 +317,6 @@ private function saveGeneratedCircle(Circle $circle): void { } } - /** */ private function migrationTo22_Members(): void { @@ -361,7 +349,6 @@ private function migrationTo22_Members(): void { $this->outputService->finishMigrationProgress(); } - /** * @throws CircleNotFoundException * @throws RemoteInstanceException @@ -405,7 +392,6 @@ private function generateMemberFrom21(SimpleDataStore $data): Member { return $member; } - /** * @param Member $member * @param int $userType @@ -434,7 +420,6 @@ private function convertMemberUserTypeFrom21(Member $member, int $userType): voi } } - private function migrationTo22_1_SubShares(): void { $qb = $this->dbConnection->getQueryBuilder(); $expr = $qb->expr(); @@ -450,8 +435,8 @@ private function migrationTo22_1_SubShares(): void { while ($row = $cursor->fetchAssociative()) { try { $data = new SimpleDataStore($row); - $federatedUser = - $this->federatedUserService->getLocalFederatedUser($data->g('share_with')); + $federatedUser + = $this->federatedUserService->getLocalFederatedUser($data->g('share_with')); $this->outputService->output( 'Migrating child share #' . $data->gInt('id') . ' owner: ' . $data->g('share_with') . ' -> ' . $federatedUser->getSingleId(), @@ -470,7 +455,6 @@ private function migrationTo22_1_SubShares(): void { $this->outputService->finishMigrationProgress(); } - /** * @param SimpleDataStore $data * @param FederatedUser $federatedUser @@ -504,7 +488,6 @@ private function updateSubShare(SimpleDataStore $data, FederatedUser $federatedU $qb->executeStatement(); } - /** * @param Member $member * @@ -521,14 +504,13 @@ private function fixContactId(Member $member) { $contact = $cm->search($contactId, ['UID']); if (sizeof($contact) === 1) { $entry = array_shift($contact); - $addressBook = - $this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry)); + $addressBook + = $this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry)); $member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId); } } - /** * @param Member $member */ @@ -544,7 +526,6 @@ private function saveGeneratedMember(Member $member): void { } } - /** */ public function migrationTo22_Tokens(): void { @@ -577,7 +558,6 @@ public function migrationTo22_Tokens(): void { $this->outputService->finishMigrationProgress(); } - /** * @param SimpleDataStore $data * diff --git a/lib/Service/MiscService.php b/lib/Service/MiscService.php index b14429938..6f4b198c0 100644 --- a/lib/Service/MiscService.php +++ b/lib/Service/MiscService.php @@ -43,7 +43,6 @@ public function log($message, $level = 4) { $this->logger->log($level, $message, $data); } - /** * @param Exception $e */ @@ -51,7 +50,6 @@ public function e(Exception $e) { $this->logger->error($e->getMessage(), ['app' => 'circles', 'exception' => $e]); } - /** * @param array $arr * @param int|string $k @@ -68,7 +66,6 @@ public static function get($arr, $k, $default = '') { return $arr[$k]; } - public static function mustContains($data, $arr) { if (!is_array($arr)) { $arr = [$arr]; @@ -81,7 +78,6 @@ public static function mustContains($data, $arr) { } } - /** * @param $data * @@ -96,7 +92,6 @@ public function fail($data) { ); } - /** * @param $data * @@ -109,7 +104,6 @@ public function success($data) { ); } - /** * return the real userId, with its real case * @@ -134,7 +128,6 @@ public function getRealUserId($userId) { return $user->getUID(); } - /** * @param string $ident * @@ -169,7 +162,6 @@ public function getContactDisplayName(string $ident): string { } } - /** * @param string $ident * @param int $type @@ -187,7 +179,6 @@ public static function getDisplay($ident, $type) { return $display; } - /** * @param string $display * @param string $ident @@ -205,7 +196,6 @@ private static function getDisplayMember(&$display, $ident, $type) { } } - /** * @param string $display * @param string $ident @@ -223,7 +213,6 @@ private static function getDisplayContact(&$display, $ident, $type) { self::getDisplayContactFromArray($display, $contact); } - /** * @param $ident * @@ -254,7 +243,6 @@ public static function getContactData($ident) { return []; } - /** * @param string $display * @param array $contact @@ -279,7 +267,6 @@ private static function getDisplayContactFromArray(string &$display, array $cont } } - /** * return Display Name if user exists and display name exists. * returns Exception if user does not exist. @@ -305,7 +292,6 @@ public function getDisplayName($userId, $noException = false) { return $user->getDisplayName(); } - /** * @param array $options * @@ -319,7 +305,6 @@ public static function generateClientBodyData($options = []) { ]; } - /** * Hacky way to async the rest of the process without keeping client on hold. * @@ -342,7 +327,6 @@ public function asyncAndLeaveClientOutOfThis($result = '') { flush(); } - /** * Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80 * @@ -365,7 +349,6 @@ public function token(int $length = 0): string { return $str; } - /** * @param DeprecatedMember $member * diff --git a/lib/Service/NotificationService.php b/lib/Service/NotificationService.php index 529c8baae..53644c3f3 100644 --- a/lib/Service/NotificationService.php +++ b/lib/Service/NotificationService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\AppInfo\Application; @@ -28,7 +26,6 @@ class NotificationService { use TNCLogger; - /** * NotificationService constructor. * @@ -46,7 +43,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param Member $member */ @@ -77,7 +73,6 @@ public function notificationInvited(Member $member): void { $this->notificationManager->notify($notification); } - /** * @param Member $member * @@ -135,7 +130,6 @@ public function notificationRequested(Member $member): void { } } - /** * @param string $object * @param string $objectId @@ -152,7 +146,6 @@ public function deleteNotification(string $object, string $objectId) { // $this->notificationManager->markProcessed($notification); } - /** * @param string $userId * @param string $memberId diff --git a/lib/Service/OutputService.php b/lib/Service/OutputService.php index a5801366c..a07557da1 100644 --- a/lib/Service/OutputService.php +++ b/lib/Service/OutputService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Tools\Traits\TNCLogger; @@ -25,18 +23,15 @@ class OutputService { use TStringTools; use TNCLogger; - /** @var IOutput */ private $migrationOutput; /** @var OutputInterface */ private $occOutput; - public function __construct() { } - /** * @param OutputInterface $output */ @@ -51,7 +46,6 @@ public function setMigrationOutput(IOutput $output): void { $this->migrationOutput = $output; } - /** * @param string $message * @param bool $advance @@ -70,7 +64,6 @@ public function output(string $message, bool $advance = false): void { } } - /** * @param int $int */ @@ -82,7 +75,6 @@ public function startMigrationProgress(int $int): void { $this->migrationOutput->startProgress($int); } - /** * */ diff --git a/lib/Service/PermissionService.php b/lib/Service/PermissionService.php index e08128ed2..5651bd71e 100644 --- a/lib/Service/PermissionService.php +++ b/lib/Service/PermissionService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Db\MemberRequest; @@ -36,7 +34,6 @@ public function __construct( ) { } - /** * @throws RequestBuilderException * @throws InitiatorNotFoundException @@ -52,7 +49,6 @@ public function confirmCircleCreation(): void { } } - /** * @param string $config * @@ -75,7 +71,6 @@ private function confirm(string $config): void { } } - /** * @param Circle $circle * @@ -99,7 +94,6 @@ private function canBypassCircleTypes(Circle $circle): bool { return false; } - /** * Enforce or Block circle's config/type * @@ -134,7 +128,6 @@ public function confirmAllowedCircleTypes(Circle $circle, ?Circle $previous = nu $circle->setConfig($config); } - /** * @return int[] */ diff --git a/lib/Service/RemoteDownstreamService.php b/lib/Service/RemoteDownstreamService.php index d465055ba..ac3282b65 100644 --- a/lib/Service/RemoteDownstreamService.php +++ b/lib/Service/RemoteDownstreamService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -44,7 +42,6 @@ class RemoteDownstreamService { use TNCLogger; use TAsync; - /** * RemoteDownstreamService constructor. * @@ -63,7 +60,6 @@ public function __construct( $this->setup('app', 'circles'); } - // // // /** @@ -84,7 +80,6 @@ public function __construct( // } // - /** * @param FederatedEvent $event * @@ -129,7 +124,6 @@ public function requestedEvent(FederatedEvent $event): void { $this->federatedEventService->initBroadcast($event); } - /** * @param FederatedEvent $event */ @@ -145,7 +139,6 @@ public function incomingEvent(FederatedEvent $event): void { } } - /** * @param FederatedEvent $event * @param bool $full @@ -158,7 +151,6 @@ private function confirmContent(FederatedEvent $event, bool $full = true): void $this->confirmMember($event, $full); } - /** * @param FederatedEvent $event * @@ -232,7 +224,6 @@ private function verifyCircle(FederatedEvent $event): bool { return true; } - /** * @param FederatedEvent $event * @param bool $full @@ -279,7 +270,6 @@ private function verifyMember(FederatedEvent $event, bool $full): bool { return true; } - /** * @param FederatedEvent $event * diff --git a/lib/Service/RemoteService.php b/lib/Service/RemoteService.php index ac57afdb6..8138d1315 100644 --- a/lib/Service/RemoteService.php +++ b/lib/Service/RemoteService.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -59,7 +58,6 @@ public function __construct( $this->setup('app', 'circles'); } - /** * @param string $instance * @param array $data @@ -93,7 +91,6 @@ public function getCirclesFromInstance(string $instance, array $data = []): arra return $circles; } - /** * @param string $circleId * @param string $instance @@ -128,7 +125,6 @@ public function getCircleFromInstance(string $circleId, string $instance, array return $circle; } - /** * @param string $circleId * @param string $instance @@ -163,7 +159,6 @@ public function getMembersFromInstance(string $circleId, string $instance, array return $members; } - /** * @param string $circleId * @param string $instance @@ -198,7 +193,6 @@ public function getInheritedFromInstance(string $circleId, string $instance, arr return $members; } - /** * @param string $circleId * @param string $instance @@ -233,7 +227,6 @@ public function getMembershipsFromInstance(string $circleId, string $instance, a return $members; } - /** * @param Circle $circle * @@ -256,14 +249,12 @@ public function syncCircle(Circle $circle): void { // } } - /** * @param Circle $circle */ private function syncLocalCircle(Circle $circle): void { } - /** * @param string $circleId * @param string $instance @@ -308,7 +299,6 @@ public function syncRemoteCircle(string $circleId, string $instance): void { $this->shareService->syncRemoteShares($circle); } - /** * @param Circle $circle * @@ -332,7 +322,6 @@ public function syncRemoteMembers(Circle $circle) { $this->membershipService->onUpdate($circle->getSingleId()); } - /** * @param string $userId * @param string $instance diff --git a/lib/Service/RemoteStreamService.php b/lib/Service/RemoteStreamService.php index 1c814b3e0..5b6a63998 100644 --- a/lib/Service/RemoteStreamService.php +++ b/lib/Service/RemoteStreamService.php @@ -2,7 +2,6 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -54,14 +53,12 @@ class RemoteStreamService extends NCSignature { use TStringTools; use TNCWellKnown; - public const UPDATE_DATA = 'data'; public const UPDATE_ITEM = 'item'; public const UPDATE_TYPE = 'type'; public const UPDATE_INSTANCE = 'instance'; public const UPDATE_HREF = 'href'; - /** * RemoteStreamService constructor. * @@ -80,7 +77,6 @@ public function __construct( $this->setup('app', 'circles'); } - /** * Returns the Signatory model for the Circles app. * Can be signed with a confirmKey. @@ -150,7 +146,6 @@ public function getAppSignatory(bool $generate = true, string $confirmKey = ''): return $app; } - /** * Reset the Signatory (and the Identity) for the Circles app. */ @@ -163,7 +158,6 @@ public function resetAppSignatory(): void { } } - /** * shortcut to requestRemoteInstance that return result if available, or exception. * @@ -203,7 +197,6 @@ public function resultRequestRemoteInstance( throw $this->getFederatedItemExceptionFromResult($result); } - /** * Send a request to a remote instance, based on: * - instance: address as saved in database, @@ -257,7 +250,6 @@ private function requestRemoteInstance( return $signedRequest; } - /** * get the value of an entry from the Signatory of the RemoteInstance. * @@ -281,7 +273,6 @@ private function getRemoteInstanceEntry(string $instance, string $item, array $p return $this->feedStringWithParams($value, $params); } - /** * get RemoteInstance with confirmed and known identity from database. * @@ -300,7 +291,6 @@ public function getCachedRemoteInstance(string $instance): RemoteInstance { return $remoteInstance; } - /** * Add a remote instance, based on the address * @@ -322,7 +312,6 @@ public function retrieveRemoteInstance(string $instance): RemoteInstance { return $remoteInstance; } - /** * retrieve Signatory. * @@ -357,7 +346,6 @@ public function retrieveSignatory(string $keyId, bool $refresh = true): NCSignat return $remoteInstance; } - /** * Add a remote instance, based on the address * @@ -404,7 +392,6 @@ public function addRemoteInstance( $this->remoteRequest->save($remoteInstance); } - /** * @param string $address * @@ -422,7 +409,6 @@ public function getRemoteInstanceFromAddress(string $address): RemoteInstance { throw new RemoteNotFoundException(); } - /** * @param string $instance * @param string $check @@ -439,7 +425,6 @@ public function isFromSameInstance(string $instance, string $check): bool { return false; } - /** * Confirm the Auth of a RemoteInstance, based on the result from a request * @@ -467,7 +452,6 @@ private function confirmAuth(RemoteInstance $remote, string $auth): void { } } - /** * @param NCRequestResult $result * @@ -491,7 +475,6 @@ private function getFederatedItemExceptionFromResult(NCRequestResult $result): F return new $e($message, $code); } - /** * @param ReflectionClass $class * @@ -512,7 +495,6 @@ private function confirmFederatedItemExceptionFromClass(ReflectionClass $class): } } - /** * @param int $statusCode * @@ -528,7 +510,6 @@ private function getFederatedItemExceptionFromStatus(int $statusCode): string { return FederatedItemException::class; } - /** * TODO: confirm if method is really needed * @@ -554,7 +535,6 @@ public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance &$sto } } - /** * TODO: check if this method is not useless * diff --git a/lib/Service/RemoteSyncService.php b/lib/Service/RemoteSyncService.php index 426d9e1ee..93e08e2d2 100644 --- a/lib/Service/RemoteSyncService.php +++ b/lib/Service/RemoteSyncService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Service; use Exception; diff --git a/lib/Service/RemoteUpstreamService.php b/lib/Service/RemoteUpstreamService.php index 9da661c51..bb2985b77 100644 --- a/lib/Service/RemoteUpstreamService.php +++ b/lib/Service/RemoteUpstreamService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Db\EventWrapperRequest; @@ -33,7 +31,6 @@ class RemoteUpstreamService { use TNCRequest; - /** * RemoteUpstreamService constructor. * @@ -50,7 +47,6 @@ public function __construct( ) { } - /** * @param string $token * @@ -60,7 +56,6 @@ public function getEventsByToken(string $token): array { return $this->eventWrapperRequest->getByToken($token); } - /** * @param EventWrapper $wrapper * @@ -85,7 +80,6 @@ public function broadcastEvent(EventWrapper $wrapper): void { $wrapper->getEvent()->setResult(new SimpleDataStore($data)); } - /** * @param FederatedEvent $event * @@ -109,7 +103,6 @@ public function confirmEvent(FederatedEvent $event): void { $event->setOutcome($data); } - // // // @@ -127,7 +120,6 @@ public function confirmEvent(FederatedEvent $event): void { // $this->removeDeprecatedEvents(); // } - // /** // * @param array $circles // */ diff --git a/lib/Service/SearchService.php b/lib/Service/SearchService.php index 28b552051..7056b9ac7 100644 --- a/lib/Service/SearchService.php +++ b/lib/Service/SearchService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\AppInfo\Application; @@ -29,12 +27,10 @@ class SearchService { use TArrayTools; - public static $SERVICES = [ FederatedUsers::class ]; - /** * @param IURLGenerator $urlGenerator * @param CircleService $circleService @@ -45,7 +41,6 @@ public function __construct( ) { } - /** * @param string $needle * @@ -64,7 +59,6 @@ public function search(string $needle): array { return $result; } - /** * @param string $term * @param array $options @@ -97,7 +91,6 @@ public function unifiedSearch(string $term, array $options): array { return $result; } - /** * @param string $term * @param array $options diff --git a/lib/Service/SendMailService.php b/lib/Service/SendMailService.php index 015a98668..cd24d6f5d 100644 --- a/lib/Service/SendMailService.php +++ b/lib/Service/SendMailService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -30,7 +28,6 @@ class SendMailService { use TArrayTools; use TStringTools; - /** * SendMailService constructor. * @@ -49,7 +46,6 @@ public function __construct( ) { } - /** * @param string $author * @param Circle $circle @@ -107,7 +103,6 @@ public function generateMail( } } - /** * @param string $author * @param string $circleName @@ -146,7 +141,6 @@ private function fillMailExistingShares(IEMailTemplate $emailTemplate, array $li } } - /** * @param IEMailTemplate $emailTemplate * @param string $author @@ -258,7 +252,6 @@ public function sendUserShareMail( } } - /** * @param Circle $circle * @param string $author @@ -330,7 +323,6 @@ private function sendMailPassword( $this->mailer->send($message); } - /** * @param Circle $circle * diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index 59bdf2304..617b7f385 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Model\Circle; @@ -32,7 +30,6 @@ public function __construct( ) { } - /** * @param Circle $circle */ diff --git a/lib/Service/ShareTokenService.php b/lib/Service/ShareTokenService.php index a4af72921..2d50b3442 100644 --- a/lib/Service/ShareTokenService.php +++ b/lib/Service/ShareTokenService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use OCA\Circles\Db\ShareTokenRequest; @@ -29,7 +27,6 @@ class ShareTokenService { use TStringTools; - /** * ShareTokenService constructor. * @@ -46,7 +43,6 @@ public function __construct( ) { } - /** * @param ShareWrapper $share * @param Member $member @@ -88,7 +84,6 @@ public function generateShareToken( return $shareToken; } - /** * @param ShareToken $shareToken */ @@ -101,7 +96,6 @@ public function setShareTokenLink(ShareToken $shareToken): void { $shareToken->setLink($link); } - /** * update password on files previously shared to circleId * diff --git a/lib/Service/SyncService.php b/lib/Service/SyncService.php index e534f89b7..ee604a1ea 100644 --- a/lib/Service/SyncService.php +++ b/lib/Service/SyncService.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Service; use Exception; @@ -53,7 +51,6 @@ class SyncService { use TStringTools; use TNCLogger; - public const SYNC_APPS = 1; public const SYNC_USERS = 2; public const SYNC_GROUPS = 4; @@ -62,7 +59,6 @@ class SyncService { public const SYNC_CONTACTS = 32; public const SYNC_ALL = 63; - /** * SyncService constructor. * @@ -92,7 +88,6 @@ public function __construct( $this->setup('app', Application::APP_ID); } - /** * @param int $sync * @@ -126,7 +121,6 @@ public function sync(int $sync = self::SYNC_ALL): void { } } - /** * @param int $item * @param int $all @@ -137,7 +131,6 @@ private function shouldSync(int $item, int $all): bool { return (($item & $all) !== 0); } - /** */ public function syncApps(): void { @@ -151,7 +144,6 @@ public function syncApps(): void { } } - /** * @return void */ @@ -190,7 +182,6 @@ public function syncNextcloudUser(string $userId): FederatedUser { return $this->federatedUserService->getLocalFederatedUser($userId, false, true); } - /** * @return void */ @@ -259,7 +250,6 @@ public function syncNextcloudGroup(string $groupId): Circle { return $circle; } - /** * @param string $userId * @@ -295,7 +285,6 @@ public function userDeleted(string $userId): void { $this->federatedUserService->deleteFederatedUser($federatedUser); } - /** * @param string $groupId * @@ -337,7 +326,6 @@ public function groupDeleted(string $groupId): void { $this->membershipService->onUpdate($circle->getSingleId()); } - /** * @param Circle $circle * @param string $userId @@ -366,7 +354,6 @@ private function generateGroupMember(Circle $circle, string $userId): Member { return $member; } - /** * @param string $groupId * @param string $userId @@ -400,7 +387,6 @@ public function groupMemberAdded(string $groupId, string $userId): void { $this->federatedEventService->newEvent($event); } - /** * @param string $groupId * @param string $userId @@ -428,7 +414,6 @@ public function groupMemberRemoved(string $groupId, string $userId): void { $this->membershipService->onUpdate($federatedUser->getSingleId()); } - /** * @return void */ @@ -436,7 +421,6 @@ public function syncContacts(): void { $this->outputService->output('Syncing Contacts'); } - /** * @return void */ @@ -444,7 +428,6 @@ public function syncGlobalScale(): void { $this->outputService->output('Syncing GlobalScale'); } - /** * @return void */ @@ -452,7 +435,6 @@ public function syncRemote(): void { $this->outputService->output('Syncing Remote Instance'); } - /** * @param string $circleId * diff --git a/lib/Service/TeamResourceService.php b/lib/Service/TeamResourceService.php index 3351904cd..136eb9498 100644 --- a/lib/Service/TeamResourceService.php +++ b/lib/Service/TeamResourceService.php @@ -12,7 +12,7 @@ use Psr\Log\LoggerInterface; class TeamResourceService { - + public function __construct( private readonly FileSharingTeamResourceProvider $resourceProvider, private readonly IURLGenerator $urlGenerator, @@ -27,26 +27,26 @@ public function getAllTeamResources(string $teamId): array { try { // Get real shared resources for this team $teamResources = $this->resourceProvider->getSharedWith($teamId); - + $resources = []; foreach ($teamResources as $resource) { try { $resourceId = $resource->getId(); $resourceLabel = $resource->getLabel(); $resourceUrl = $resource->getUrl(); - + // Use the URLs and icons that FileSharingTeamResourceProvider already provides // This works correctly for all users with team access, including non-owners $iconUrl = $resource->getIconURL(); $iconSvg = $resource->getIconSvg(); - + // Determine if it's a folder based on having iconSvg (folders have SVG, files have iconURL) $isFolder = !empty($iconSvg) && empty($iconUrl); - + // Use the appropriate icon $previewUrl = $iconUrl ?: $this->urlGenerator->imagePath('core', 'filetypes/folder.svg'); $fallbackIcon = $iconUrl ?: $this->urlGenerator->imagePath('core', 'filetypes/folder.svg'); - + $resources[] = [ 'id' => $resourceId, 'name' => $resourceLabel, @@ -55,15 +55,14 @@ public function getAllTeamResources(string $teamId): array { 'fallbackIcon' => $fallbackIcon, 'url' => $resourceUrl, ]; - + } catch (\Exception $e) { $this->logger->warning('Failed to process team resource: ' . $e->getMessage()); continue; } } - + return $resources; - } catch (\Exception $e) { $this->logger->error('Failed to fetch team resources: ' . $e->getMessage()); return []; diff --git a/lib/Service/TimezoneService.php b/lib/Service/TimezoneService.php index 39572a3d4..2486a97ce 100644 --- a/lib/Service/TimezoneService.php +++ b/lib/Service/TimezoneService.php @@ -4,6 +4,7 @@ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Service; use DateTime; @@ -13,7 +14,6 @@ class TimezoneService { /** @var TimeFactory */ private $timeFactory; - /** * TimezoneService constructor. * @@ -29,7 +29,6 @@ public function __construct( $this->timeFactory = $timeFactory; } - /** * @param string $time * @@ -39,12 +38,10 @@ public function convertTimeForCurrentUser($time) { return $this->convertTimeForUserId($this->userId, $time); } - public function convertToTimestamp($time) { return strtotime((string)$time); } - /** * @param string $userId * @param string $time @@ -63,7 +60,6 @@ public function convertTimeForUserId($userId, $time) { return $date->format('Y-m-d H:i:s'); } - /** * @param string $time * @@ -73,7 +69,6 @@ public function getDateTime(string $time = 'now'): DateTime { return $this->timeFactory->getDateTime($time); } - /** * @return string */ diff --git a/lib/Service/TrustedServerService.php b/lib/Service/TrustedServerService.php index 53380307c..18c2b14a5 100644 --- a/lib/Service/TrustedServerService.php +++ b/lib/Service/TrustedServerService.php @@ -6,6 +6,7 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OCA\Circles\Service; use OCA\Federation\TrustedServers; @@ -32,8 +33,8 @@ public function getTrustedServers(): array { $trustedServers = []; try { foreach ($this->trustedServers->getServers() as $server) { - if (($server['status'] ?? 0) === TrustedServers::STATUS_OK && - str_starts_with((string)$server['url'], 'https://')) { + if (($server['status'] ?? 0) === TrustedServers::STATUS_OK + && str_starts_with((string)$server['url'], 'https://')) { $server['address'] = substr((string)$server['url'], 8); $trustedServers[] = $server; } diff --git a/lib/ShareByCircleProvider.php b/lib/ShareByCircleProvider.php index a4ff84166..f53bdfea3 100644 --- a/lib/ShareByCircleProvider.php +++ b/lib/ShareByCircleProvider.php @@ -260,7 +260,6 @@ public function deleteFromSelf(IShare $share, $recipient): void { } } - /** * @param IShare $share * @param string $recipient @@ -293,7 +292,6 @@ public function move(IShare $share, $recipient): IShare { return $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); } - /** * @param IShare $share * @param string $recipient @@ -317,7 +315,6 @@ public function restore(IShare $share, string $recipient): IShare { return $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); } - /** * @param string $userId * @param Folder $node @@ -352,8 +349,8 @@ public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = t $result[$wrappedShare->getFileSource()] = []; } if ($wrappedShare->getFileCache()->isAccessible()) { - $result[$wrappedShare->getFileSource()][] = - $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); + $result[$wrappedShare->getFileSource()][] + = $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); } else { $this->logger->debug('shared document is not available anymore', ['wrappedShare' => $wrappedShare]); if ($wrappedShare->getFileCache()->getPath() === '') { @@ -365,7 +362,6 @@ public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = t return $result; } - /** * @param string $userId * @param int $shareType @@ -419,7 +415,6 @@ public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offs ); } - /** * @param string $shareId * @param string|null $recipientId @@ -449,7 +444,6 @@ public function getShareById($shareId, $recipientId = null): IShare { return $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator); } - /** * @param Node $path * @@ -470,7 +464,6 @@ public function getSharesByPath(Node $path): array { ); } - /** * @param string $userId * @param int $shareType @@ -590,7 +583,6 @@ public function getShareByToken($token): IShare { return $share; } - public function formatShare(IShare $share): array { $this->federatedUserService->initCurrentUser(); $circleProbe = new CircleProbe(); @@ -613,7 +605,6 @@ public function formatShare(IShare $share): array { return $result; } - /** * @param string $uid * @param int $shareType @@ -621,14 +612,12 @@ public function formatShare(IShare $share): array { public function userDeleted($uid, $shareType): void { } - /** * @param string $gid */ public function groupDeleted($gid): void { } - /** * @param string $uid * @param string $gid @@ -636,7 +625,6 @@ public function groupDeleted($gid): void { public function userDeletedFromGroup($uid, $gid): void { } - /** * if $currentAccess, returns long version of the access list: * [ @@ -670,7 +658,6 @@ public function getAccessList($nodes, $currentAccess): array { $ids[] = $node->getId(); } - if (!$currentAccess) { return $this->getAccessListShort($ids); } @@ -814,7 +801,6 @@ public function getChildren(IShare $parent): array { return []; } - /** * @return iterable */ diff --git a/lib/StatusCode.php b/lib/StatusCode.php index facddbbf4..eeba47faa 100644 --- a/lib/StatusCode.php +++ b/lib/StatusCode.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles; /** diff --git a/lib/Tools/ActivityPub/NCSignature.php b/lib/Tools/ActivityPub/NCSignature.php index d5eb4b396..88526826a 100644 --- a/lib/Tools/ActivityPub/NCSignature.php +++ b/lib/Tools/ActivityPub/NCSignature.php @@ -7,7 +7,6 @@ declare(strict_types=1); - /** * Circles - Bring cloud-users closer together. * @@ -33,7 +32,6 @@ * */ - namespace OCA\Circles\Tools\ActivityPub; use DateTime; @@ -57,15 +55,12 @@ class NCSignature { public const DATE_TTL = 300; - use TNCSignatory; - /** @var int */ private $ttl = self::DATE_TTL; private $dateHeader = self::DATE_HEADER; - /** * @param string $body * @@ -95,7 +90,6 @@ public function incomingSignedRequest(string $body = ''): NCSignedRequest { return $signedRequest; } - /** * @param NCRequest $request * @param NCSignatory $signatory @@ -116,7 +110,6 @@ public function signOutgoingRequest(NCRequest $request, NCSignatory $signatory): return $signedRequest; } - /** * @param NCSignedRequest $signedRequest * @@ -138,7 +131,6 @@ private function verifyIncomingRequestTime(NCSignedRequest $signedRequest): void } } - /** * @param NCSignedRequest $signedRequest * @@ -179,7 +171,6 @@ private function setIncomingSignatureHeader(NCSignedRequest $signedRequest): voi $signedRequest->setSignatureHeader(new SimpleDataStore($sign)); } - /** * @param NCSignedRequest $signedRequest * @@ -214,7 +205,6 @@ private function setIncomingClearSignature(NCSignedRequest $signedRequest): void $signedRequest->setClearSignature(implode("\n", $estimated)); } - /** * @param NCSignedRequest $signedRequest * @@ -229,7 +219,6 @@ private function parseIncomingSignatureHeader(NCSignedRequest $signedRequest): v $signedRequest->setSignedSignature($data->g('signature')); } - /** * @param NCSignedRequest $signedRequest * @@ -248,7 +237,6 @@ private function verifyIncomingRequestSignature(NCSignedRequest $signedRequest) } } - /** * @param NCSignedRequest $signedRequest * @@ -273,7 +261,6 @@ private function verifySignedRequest(NCSignedRequest $signedRequest) { } } - /** * @param NCSignedRequest $signedRequest */ @@ -290,7 +277,6 @@ private function setOutgoingSignatureHeader(NCSignedRequest $signedRequest): voi $signedRequest->setSignatureHeader($data); } - /** * @param NCSignedRequest $signedRequest */ @@ -311,7 +297,6 @@ private function setOutgoingClearSignature(NCSignedRequest $signedRequest): void $signedRequest->setClearSignature(implode("\n", $signing)); } - /** * @param NCSignedRequest $signedRequest * @@ -323,7 +308,6 @@ private function setOutgoingSignedSignature(NCSignedRequest $signedRequest): voi $signedRequest->setSignedSignature($signed); } - /** * @param NCSignedRequest $signedRequest * @@ -342,7 +326,6 @@ private function signingOutgoingRequest(NCSignedRequest $signedRequest): void { $signedRequest->getOutgoingRequest()->addHeader('Signature', implode(',', $signatureElements)); } - /** * @param NCSignedRequest $signedRequest * @@ -367,7 +350,6 @@ private function getChosenEncryption(NCSignatory $signatory): string { }; } - /** * @param NCSignatory $signatory * diff --git a/lib/Tools/Db/ExtendedQueryBuilder.php b/lib/Tools/Db/ExtendedQueryBuilder.php index b0baa0a6a..2446cfe58 100644 --- a/lib/Tools/Db/ExtendedQueryBuilder.php +++ b/lib/Tools/Db/ExtendedQueryBuilder.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Db; use DateInterval; @@ -30,14 +28,12 @@ class ExtendedQueryBuilder extends QueryBuilder { use TArrayTools; - /** @var string */ private $defaultSelectAlias = ''; /** @var array */ private $defaultValues = []; - public function __construct() { parent::__construct( Server::get(IDBConnection::class), @@ -46,7 +42,6 @@ public function __construct() { ); } - /** * @param string $alias * @@ -65,7 +60,6 @@ public function getDefaultSelectAlias(): string { return $this->defaultSelectAlias; } - /** * @return array */ @@ -111,7 +105,6 @@ public function chunk(int $offset, int $limit): void { } } - /** * Limit the request to the Id * @@ -184,7 +177,6 @@ public function limitToToken(string $token): void { $this->limit('token', $token); } - /** * Limit the request to the creation * @@ -202,7 +194,6 @@ public function limitToCreation(int $delay = 0): self { return $this; } - /** * @param string $field * @param DateTime $date @@ -223,7 +214,6 @@ public function limitToDBFieldDateTime(string $field, DateTime $date, bool $orNu $this->andWhere($expr->orX(...$orX)); } - /** * @param int $timestamp * @param string $field @@ -245,7 +235,6 @@ public function limitToSince(int $timestamp, string $field): void { $this->andWhere($expr->gte($field, $this->createNamedParameter($dTime, IQueryBuilder::PARAM_DATE))); } - /** * @param string $field * @param string $value @@ -259,7 +248,6 @@ public function searchInDBField(string $field, string $value): void { $this->andWhere($expr->iLike($field, $this->createNamedParameter($value))); } - /** * @param string $field * @param string $value @@ -270,7 +258,6 @@ public function like(string $field, string $value, string $alias = '', bool $cs $this->andWhere($this->exprLike($field, $value, $alias, $cs)); } - /** * @param string $field * @param string $value @@ -366,7 +353,6 @@ public function lt(string $field, int $value, bool $lte = false, string $alias = $this->andWhere($this->exprLt($field, $value, $lte, $alias)); } - /** * @param string $field * @param string $value @@ -416,7 +402,6 @@ public function exprLimitInt(string $field, int $value, string $alias = ''): str return $expr->eq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } - /** * @param string $field * @param bool $value @@ -484,7 +469,6 @@ public function exprLimitNull( return $expr->orX(...$orX); } - /** * @param string $field * @param array $values @@ -533,7 +517,6 @@ public function exprLimitInArray( return $expr->in($field, $this->createNamedParameter($values, $type)); } - /** * @param string $field * @param int $flag @@ -554,7 +537,6 @@ public function exprLimitBitwise(string $field, int $flag, string $alias = ''): ); } - /** * @param string $field * @param int $value @@ -599,7 +581,6 @@ public function exprGt(string $field, int $value, bool $gte = false, string $ali } } - /** * @param string $field * @param string $value @@ -610,7 +591,6 @@ public function unlike(string $field, string $value, string $alias = '', bool $c $this->andWhere($this->exprUnlike($field, $value, $alias, $cs)); } - /** * @param string $field * @param string $value @@ -685,7 +665,6 @@ public function filterBitwise(string $field, int $flag, string $alias = ''): voi $this->andWhere($this->exprFilterBitwise($field, $flag, $alias)); } - /** * @param string $field * @param string $value @@ -709,7 +688,6 @@ public function exprUnlike(string $field, string $value, string $alias = '', boo } } - /** * @param string $field * @param string $value @@ -736,7 +714,6 @@ public function exprFilter(string $field, string $value, string $alias = '', boo } } - /** * @param string $field * @param int $value @@ -754,7 +731,6 @@ public function exprFilterInt(string $field, int $value, string $alias = ''): st return $expr->neq($field, $this->createNamedParameter($value, IQueryBuilder::PARAM_INT)); } - /** * @param string $field * @param bool $value @@ -822,7 +798,6 @@ public function exprFilterNull( return $expr->andX(...$andX); } - /** * @param string $field * @param array $values @@ -853,7 +828,6 @@ public function exprFilterArray( return $this->expr()->orX(...$orX); } - /** * @param string $field * @param array $values @@ -871,7 +845,6 @@ public function exprFilterInArray(string $field, array $values, string $alias = return $expr->notIn($field, $this->createNamedParameter($values, IQueryBuilder::PARAM_STR_ARRAY)); } - /** * @param string $field * @param int $flag @@ -892,7 +865,6 @@ public function exprFilterBitwise(string $field, int $flag, string $alias = ''): ); } - /** * @param string $object * @param array $params @@ -915,7 +887,6 @@ public function asItems(string $object, array $params = []): array { return $this->getRows($this->parseSimpleSelectSql(...), $object, $params); } - /** * @param string $field * @param array $params @@ -942,7 +913,6 @@ public function asItemsFromField(string $field, array $params = []): array { return $this->getRows($this->parseSimpleSelectSql(...), $field, $params); } - /** * @param array $data * @param ExtendedQueryBuilder $qb @@ -985,7 +955,6 @@ private function parseSimpleSelectSql( return $item; } - /** * @param callable $method * @param string $object @@ -1006,7 +975,6 @@ public function getRow(callable $method, string $object = '', array $params = [] return $method($data, $this, $object, $params); } - /** * @param callable $method * @param string $object @@ -1028,7 +996,6 @@ public function getRows(callable $method, string $object = '', array $params = [ return $rows; } - /** * @param string $table * @param array $fields @@ -1058,7 +1025,6 @@ function (string $item) use ($alias) { return $this; } - /** * @param array $fields * @param string $alias diff --git a/lib/Tools/Db/IQueryRow.php b/lib/Tools/Db/IQueryRow.php index af2c6236d..b2e3b8ce5 100644 --- a/lib/Tools/Db/IQueryRow.php +++ b/lib/Tools/Db/IQueryRow.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Db; /** diff --git a/lib/Tools/Exceptions/ArrayNotFoundException.php b/lib/Tools/Exceptions/ArrayNotFoundException.php index 1c4859506..4b95c7462 100644 --- a/lib/Tools/Exceptions/ArrayNotFoundException.php +++ b/lib/Tools/Exceptions/ArrayNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/DateTimeException.php b/lib/Tools/Exceptions/DateTimeException.php index c81eecd9c..2fcd5d46f 100644 --- a/lib/Tools/Exceptions/DateTimeException.php +++ b/lib/Tools/Exceptions/DateTimeException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/InvalidItemException.php b/lib/Tools/Exceptions/InvalidItemException.php index 7faabf9c9..0ccaa387a 100644 --- a/lib/Tools/Exceptions/InvalidItemException.php +++ b/lib/Tools/Exceptions/InvalidItemException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/InvalidOriginException.php b/lib/Tools/Exceptions/InvalidOriginException.php index dc101e536..96f2f6628 100644 --- a/lib/Tools/Exceptions/InvalidOriginException.php +++ b/lib/Tools/Exceptions/InvalidOriginException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/InvalidRemoteInstanceException.php b/lib/Tools/Exceptions/InvalidRemoteInstanceException.php index 55182874b..569726f69 100644 --- a/lib/Tools/Exceptions/InvalidRemoteInstanceException.php +++ b/lib/Tools/Exceptions/InvalidRemoteInstanceException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/ItemNotFoundException.php b/lib/Tools/Exceptions/ItemNotFoundException.php index af8d376ae..66614314d 100644 --- a/lib/Tools/Exceptions/ItemNotFoundException.php +++ b/lib/Tools/Exceptions/ItemNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/MalformedArrayException.php b/lib/Tools/Exceptions/MalformedArrayException.php index 15bd309fe..ff12e14e8 100644 --- a/lib/Tools/Exceptions/MalformedArrayException.php +++ b/lib/Tools/Exceptions/MalformedArrayException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RequestContentException.php b/lib/Tools/Exceptions/RequestContentException.php index a1a73366b..64c5f4604 100644 --- a/lib/Tools/Exceptions/RequestContentException.php +++ b/lib/Tools/Exceptions/RequestContentException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RequestNetworkException.php b/lib/Tools/Exceptions/RequestNetworkException.php index 2d479f6b5..270c5c81a 100644 --- a/lib/Tools/Exceptions/RequestNetworkException.php +++ b/lib/Tools/Exceptions/RequestNetworkException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RequestResultNotJsonException.php b/lib/Tools/Exceptions/RequestResultNotJsonException.php index d8c20b9e4..3e526a62d 100644 --- a/lib/Tools/Exceptions/RequestResultNotJsonException.php +++ b/lib/Tools/Exceptions/RequestResultNotJsonException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RequestResultSizeException.php b/lib/Tools/Exceptions/RequestResultSizeException.php index 2d670adbd..64d882f1e 100644 --- a/lib/Tools/Exceptions/RequestResultSizeException.php +++ b/lib/Tools/Exceptions/RequestResultSizeException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RequestServerException.php b/lib/Tools/Exceptions/RequestServerException.php index 3e2309d84..0843e077a 100644 --- a/lib/Tools/Exceptions/RequestServerException.php +++ b/lib/Tools/Exceptions/RequestServerException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/RowNotFoundException.php b/lib/Tools/Exceptions/RowNotFoundException.php index 3f27c533e..c7f5bfd65 100644 --- a/lib/Tools/Exceptions/RowNotFoundException.php +++ b/lib/Tools/Exceptions/RowNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/SignatoryException.php b/lib/Tools/Exceptions/SignatoryException.php index e046aa961..d29173cdc 100644 --- a/lib/Tools/Exceptions/SignatoryException.php +++ b/lib/Tools/Exceptions/SignatoryException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/SignatureException.php b/lib/Tools/Exceptions/SignatureException.php index 8f2fa8c18..06e4fdb77 100644 --- a/lib/Tools/Exceptions/SignatureException.php +++ b/lib/Tools/Exceptions/SignatureException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/UnknownTypeException.php b/lib/Tools/Exceptions/UnknownTypeException.php index f1e3d5324..f5090a11a 100644 --- a/lib/Tools/Exceptions/UnknownTypeException.php +++ b/lib/Tools/Exceptions/UnknownTypeException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/Exceptions/WellKnownLinkNotFoundException.php b/lib/Tools/Exceptions/WellKnownLinkNotFoundException.php index cbbdfbea3..03fe485c7 100644 --- a/lib/Tools/Exceptions/WellKnownLinkNotFoundException.php +++ b/lib/Tools/Exceptions/WellKnownLinkNotFoundException.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Exceptions; use Exception; diff --git a/lib/Tools/IDeserializable.php b/lib/Tools/IDeserializable.php index 94487b7ad..54ae516ad 100644 --- a/lib/Tools/IDeserializable.php +++ b/lib/Tools/IDeserializable.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools; interface IDeserializable { diff --git a/lib/Tools/Model/NCRequest.php b/lib/Tools/Model/NCRequest.php index 75c237cc7..227b6f385 100644 --- a/lib/Tools/Model/NCRequest.php +++ b/lib/Tools/Model/NCRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use OCP\Http\Client\IClient; @@ -29,7 +27,6 @@ class NCRequest extends Request { /** @var NCRequestResult[] */ private $previousResults = []; - /** * @param IClient $client * @@ -48,7 +45,6 @@ public function getClient(): IClient { return $this->client; } - /** * @return array */ @@ -67,7 +63,6 @@ public function setClientOptions(array $clientOptions): self { return $this; } - /** * @return bool */ @@ -86,7 +81,6 @@ public function setLocalAddressAllowed(bool $allowed): self { return $this; } - /** * @return bool */ @@ -130,7 +124,6 @@ public function getAllResults(): array { return array_values(array_merge([$this->getResult()], $this->previousResults)); } - /** * @return array */ diff --git a/lib/Tools/Model/NCRequestResult.php b/lib/Tools/Model/NCRequestResult.php index 50853a343..801d86938 100644 --- a/lib/Tools/Model/NCRequestResult.php +++ b/lib/Tools/Model/NCRequestResult.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use GuzzleHttp\Exception\BadResponseException; @@ -20,13 +18,11 @@ class NCRequestResult implements JsonSerializable { use TArrayTools; - public const TYPE_STRING = 0; public const TYPE_BINARY = 1; public const TYPE_JSON = 2; public const TYPE_XRD = 3; - /** @var int */ private $statusCode = 0; @@ -45,7 +41,6 @@ class NCRequestResult implements JsonSerializable { /** @var BadResponseException */ private $exception = null; - /** * NCRequestResult constructor. * @@ -66,7 +61,6 @@ public function __construct(?IResponse $response, ?BadResponseException $e = nul $this->generateMeta(); } - /** * @return int */ @@ -85,7 +79,6 @@ public function setStatusCode(int $statusCode): self { return $this; } - /** * @return array */ @@ -123,7 +116,6 @@ public function withinHeader(string $key, string $needle): bool { return false; } - /** * @param string $content * @@ -135,7 +127,6 @@ public function setContent(string $content): self { return $this; } - /** * @return string * @throws RequestContentException @@ -159,7 +150,6 @@ public function getAsArray(): array { return $this->contentAsArray; } - /** * @return string */ @@ -167,7 +157,6 @@ public function getBinary() { return $this->content; } - /** * @return int */ @@ -195,7 +184,6 @@ public function isContentType(int $type): bool { return ($this->contentType === $type); } - /** * */ @@ -252,7 +240,6 @@ private function generateContentAsArray(): void { } } - /** * @param BadResponseException $e * @@ -279,7 +266,6 @@ public function hasException(): bool { return (!is_null($this->exception)); } - /** * @return array */ diff --git a/lib/Tools/Model/NCSignatory.php b/lib/Tools/Model/NCSignatory.php index 918e3f730..90674b01e 100644 --- a/lib/Tools/Model/NCSignatory.php +++ b/lib/Tools/Model/NCSignatory.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -17,11 +15,9 @@ class NCSignatory implements JsonSerializable { use TArrayTools; - public const SHA256 = 'sha256'; public const SHA512 = 'sha512'; - /** @var string */ private $instance = ''; @@ -46,7 +42,6 @@ class NCSignatory implements JsonSerializable { /** @var string */ private $algorithm = self::SHA256; - /** * NC22Signatory constructor. * @@ -56,7 +51,6 @@ public function __construct(string $id = '') { $this->id = self::removeFragment($id); } - /** * @param string $instance * @@ -75,7 +69,6 @@ public function getInstance(): string { return $this->instance; } - /** * @return array */ @@ -95,7 +88,6 @@ public function setOrigData(array $data): self { return $this; } - /** * @return string */ @@ -114,7 +106,6 @@ public function setId(string $id): self { return $this; } - /** * @param string $keyId * @@ -133,7 +124,6 @@ public function getKeyId(): string { return $this->keyId; } - /** * @param string $keyOwner * @@ -152,7 +142,6 @@ public function getKeyOwner(): string { return $this->keyOwner; } - /** * @param string $publicKey * @@ -203,7 +192,6 @@ public function hasPrivateKey(): bool { return ($this->privateKey !== ''); } - /** * @param string $algorithm * @@ -222,7 +210,6 @@ public function getAlgorithm(): string { return $this->algorithm; } - /** * @param array $data * @@ -240,15 +227,14 @@ public function import(array $data): self { return $this; } - /** * @return array */ public function jsonSerialize(): array { return [ 'id' => $this->getId(), - 'publicKey' => - [ + 'publicKey' + => [ 'id' => $this->getKeyId(), 'owner' => $this->getKeyOwner(), 'publicKeyPem' => $this->getPublicKey() @@ -256,7 +242,6 @@ public function jsonSerialize(): array { ]; } - /** * @param string $id * diff --git a/lib/Tools/Model/NCSignedRequest.php b/lib/Tools/Model/NCSignedRequest.php index 0bcb08132..5672ad505 100644 --- a/lib/Tools/Model/NCSignedRequest.php +++ b/lib/Tools/Model/NCSignedRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -48,12 +46,10 @@ class NCSignedRequest implements JsonSerializable { /** @var NCSignatory */ private $signatory; - public function __construct(string $body = '') { $this->setBody($body); } - /** * IRequest of the incoming request * incoming @@ -75,7 +71,6 @@ public function setIncomingRequest(IRequest $request): self { return $this; } - /** * NCRequest of the outgoing request * outgoing @@ -97,7 +92,6 @@ public function getOutgoingRequest(): NCRequest { return $this->outgoingRequest; } - /** * Body content of the request * incoming/outgoing @@ -120,7 +114,6 @@ public function setBody(string $body): self { return $this; } - /** * Timestamp of the request * incoming (outgoing ?) @@ -142,7 +135,6 @@ public function setTime(int $time): self { return $this; } - /** * Origin of the request, based on the keyId * incoming @@ -164,7 +156,6 @@ public function setOrigin(string $origin): self { return $this; } - /** * @return string */ @@ -183,7 +174,6 @@ public function setDigest(string $digest): self { return $this; } - /** * Data from the 'Signature' header * incoming/outgoing @@ -205,7 +195,6 @@ public function setSignatureHeader(SimpleDataStore $signatureHeader): self { return $this; } - /** * _Clear_ value of the Signature. * incoming/outgoing @@ -230,7 +219,6 @@ public function getClearSignature(): string { return $this->clearSignature; } - /** * _Signed_ value of the signature. * /!\ base64_encoded, not RAW /!\ @@ -254,7 +242,6 @@ public function getSignedSignature(): string { return $this->signedSignature; } - /** * Host/Address to be used in the signature. * incoming/outgoing @@ -279,7 +266,6 @@ public function getHost(): string { return $this->host; } - /** * Signatory used to sign the request * incoming/outgoing @@ -304,7 +290,6 @@ public function hasSignatory(): bool { return ($this->signatory !== null); } - /** * @return array */ diff --git a/lib/Tools/Model/NCWebfinger.php b/lib/Tools/Model/NCWebfinger.php index 4644fdf72..076e6985c 100644 --- a/lib/Tools/Model/NCWebfinger.php +++ b/lib/Tools/Model/NCWebfinger.php @@ -7,7 +7,6 @@ declare(strict_types=1); - /** * Circles - Bring cloud-users closer together. * @@ -33,7 +32,6 @@ * */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -42,7 +40,6 @@ class NCWebfinger implements JsonSerializable { use TArrayTools; - /** @var string */ private $subject = ''; @@ -55,7 +52,6 @@ class NCWebfinger implements JsonSerializable { /** @var NCWellKnownLink[] */ private $links = []; - /** * NC22Webfinger constructor. * @@ -71,7 +67,6 @@ public function __construct(array $json = []) { } } - /** * @return string */ @@ -90,7 +85,6 @@ public function setSubject(string $subject): self { return $this; } - /** * @return array */ @@ -109,7 +103,6 @@ public function setAliases(array $aliases): self { return $this; } - /** * @return array */ @@ -137,7 +130,6 @@ public function getProperty(string $key): string { return $this->get($key, $this->properties); } - /** * @return NCWellKnownLink[] */ diff --git a/lib/Tools/Model/NCWellKnownLink.php b/lib/Tools/Model/NCWellKnownLink.php index 7bc9d4a65..816767431 100644 --- a/lib/Tools/Model/NCWellKnownLink.php +++ b/lib/Tools/Model/NCWellKnownLink.php @@ -7,7 +7,6 @@ declare(strict_types=1); - /** * Circles - Bring cloud-users closer together. * @@ -33,7 +32,6 @@ * */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -42,7 +40,6 @@ class NCWellKnownLink implements JsonSerializable { use TArrayTools; - /** @var string */ private $rel = ''; @@ -58,7 +55,6 @@ class NCWellKnownLink implements JsonSerializable { /** @var array */ private $properties = []; - /** * NC22WellKnownLink constructor. * @@ -72,7 +68,6 @@ public function __construct(array $json = []) { $this->setProperties($this->getArray('properties', $json)); } - /** * @return string */ @@ -91,7 +86,6 @@ public function setRel(string $rel): self { return $this; } - /** * @return string */ @@ -110,7 +104,6 @@ public function setType(string $type): self { return $this; } - /** * @return string */ @@ -129,7 +122,6 @@ public function setHref(string $href): self { return $this; } - /** * @return array */ @@ -157,7 +149,6 @@ public function getTitle(string $key): string { return $this->get($key, $this->properties); } - /** * @return array */ @@ -185,7 +176,6 @@ public function getProperty(string $key): string { return $this->get($key, $this->properties); } - /** * @return array */ diff --git a/lib/Tools/Model/Request.php b/lib/Tools/Model/Request.php index a1c0468c5..af8d36005 100644 --- a/lib/Tools/Model/Request.php +++ b/lib/Tools/Model/Request.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -17,17 +15,14 @@ class Request implements JsonSerializable { use TArrayTools; - public const TYPE_GET = 0; public const TYPE_POST = 1; public const TYPE_PUT = 2; public const TYPE_DELETE = 3; - public const QS_VAR_DUPLICATE = 1; public const QS_VAR_ARRAY = 2; - /** @var string */ private $protocol = ''; @@ -79,7 +74,6 @@ class Request implements JsonSerializable { /** @var string */ private $contentType = ''; - /** * Request constructor. * @@ -94,7 +88,6 @@ public function __construct( ) { } - /** * @param string $protocol * @@ -142,7 +135,6 @@ public function setUsedProtocol(string $protocol): Request { return $this; } - /** * @return string * @deprecated - 19 - use getHost(); @@ -181,7 +173,6 @@ public function setHost(string $host): Request { return $this; } - /** * @return int */ @@ -200,7 +191,6 @@ public function setPort(int $port): Request { return $this; } - /** * @param string $instance * @@ -222,7 +212,6 @@ public function setInstance(string $instance): Request { return $this; } - /** * @return string */ @@ -235,7 +224,6 @@ public function getInstance(): string { return $instance; } - /** * @param string $url * @@ -293,7 +281,6 @@ public function isBinary(): bool { return $this->binary; } - /** * @param bool $verifyPeer * @@ -312,7 +299,6 @@ public function isVerifyPeer(): bool { return $this->verifyPeer; } - /** * @param bool $httpErrorsAllowed * @@ -331,7 +317,6 @@ public function isHttpErrorsAllowed(): bool { return $this->httpErrorsAllowed; } - /** * @param bool $followLocation * @@ -350,7 +335,6 @@ public function isFollowLocation(): bool { return $this->followLocation; } - /** * @return string * @deprecated - 19 - use getParametersUrl() + addParam() @@ -386,7 +370,6 @@ public function getParametersUrl(): string { return $url; } - /** * @return string */ @@ -394,7 +377,6 @@ public function getPath(): string { return $this->baseUrl . $this->url; } - /** * @return string * @deprecated - 19 - use getPath() @@ -403,7 +385,6 @@ public function getUrl(): string { return $this->getPath(); } - /** * @return string */ @@ -413,7 +394,6 @@ public function getCompleteUrl(): string { return $this->getUsedProtocol() . '://' . $this->getHost() . $port . $this->getParametersUrl(); } - /** * @return int */ @@ -421,7 +401,6 @@ public function getType(): int { return $this->type; } - public function addHeader($key, $value): Request { $header = $this->get($key, $this->headers); if ($header !== '') { @@ -453,7 +432,6 @@ public function setHeaders(array $headers): Request { return $this; } - /** * @return array */ @@ -472,7 +450,6 @@ public function setCookies(array $cookies): Request { return $this; } - /** * @param int $queryStringType * @@ -491,7 +468,6 @@ public function getQueryStringType(): int { return $this->queryStringType; } - /** * @return array */ @@ -499,7 +475,6 @@ public function getData(): array { return $this->data; } - /** * @param array $data * @@ -511,7 +486,6 @@ public function setData(array $data): Request { return $this; } - /** * @param string $data * @@ -523,7 +497,6 @@ public function setDataJson(string $data): Request { return $this; } - /** * @param JsonSerializable $data * @@ -535,7 +508,6 @@ public function setDataSerialize(JsonSerializable $data): Request { return $this; } - /** * @return array */ @@ -554,7 +526,6 @@ public function setParams(array $params): Request { return $this; } - /** * @param string $k * @param string $v @@ -567,7 +538,6 @@ public function addParam(string $k, string $v): Request { return $this; } - /** * @param string $k * @param int $v @@ -580,7 +550,6 @@ public function addParamInt(string $k, int $v): Request { return $this; } - /** * @param string $k * @param string $v @@ -593,7 +562,6 @@ public function addData(string $k, string $v): Request { return $this; } - /** * @param string $k * @param int $v @@ -606,7 +574,6 @@ public function addDataInt(string $k, int $v): Request { return $this; } - /** * @return string */ @@ -642,7 +609,6 @@ public function getUrlParams(): string { ); } - /** * @param int $type * @@ -661,7 +627,6 @@ public function getQueryString(): string { }; } - /** * @return int */ @@ -680,7 +645,6 @@ public function setTimeout(int $timeout): Request { return $this; } - /** * @return string */ @@ -699,7 +663,6 @@ public function setUserAgent(string $userAgent): Request { return $this; } - /** * @return int */ @@ -718,7 +681,6 @@ public function setResultCode(int $resultCode): Request { return $this; } - /** * @return string */ @@ -737,7 +699,6 @@ public function setContentType(string $contentType): Request { return $this; } - /** * @return array */ @@ -761,7 +722,6 @@ public function jsonSerialize(): array { ]; } - /** * @param string $type * @@ -777,7 +737,6 @@ public static function type(string $type): int { }; } - public static function method(int $type): string { return match ($type) { self::TYPE_GET => 'get', diff --git a/lib/Tools/Model/SimpleDataStore.php b/lib/Tools/Model/SimpleDataStore.php index 9358cfde4..543894d9d 100644 --- a/lib/Tools/Model/SimpleDataStore.php +++ b/lib/Tools/Model/SimpleDataStore.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Model; use JsonSerializable; @@ -22,11 +20,9 @@ class SimpleDataStore implements JsonSerializable { use TArrayTools; - /** @var array */ private $data; - /** * SimpleDataStore constructor. * @@ -44,7 +40,6 @@ public function default(array $default = []): void { $this->data = array_merge($default, $this->data); } - /** * @param string $key * @param string $value @@ -95,7 +90,6 @@ public function a(string $key, string $value): self { return $this; } - /** * @param string $key * @param int $value @@ -133,7 +127,6 @@ public function aInt(string $key, int $value): self { return $this; } - /** * @param string $key * @param bool $value @@ -171,7 +164,6 @@ public function aBool(string $key, bool $value): self { return $this; } - /** * @param string $key * @param array $values @@ -209,7 +201,6 @@ public function aArray(string $key, array $values): self { return $this; } - /** * @param string $key * @param JsonSerializable $value @@ -222,7 +213,6 @@ public function sObj(string $key, JsonSerializable $value): self { return $this; } - /** * @param string $key * @param string $class @@ -240,7 +230,6 @@ public function gObjs(string $key, string $class = ''): array { return array_filter($result); } - /** * @param string $key * @param string $class @@ -297,7 +286,6 @@ public function aObj(string $key, JsonSerializable $value): self { return $this; } - /** * @param string $key * @param SimpleDataStore $data @@ -335,7 +323,6 @@ public function gData(string $key): SimpleDataStore { return new SimpleDataStore($this->getArray($key, $this->data)); } - /** * @param string $key * @@ -350,7 +337,6 @@ public function gItem(string $key) { return $this->data[$key]; } - /** * @return array */ @@ -369,7 +355,6 @@ public function sAll(array $data): self { return $this; } - public function keys(): array { return array_keys($this->data); } @@ -383,7 +368,6 @@ public function hasKey(string $key): bool { return (array_key_exists($key, $this->data)); } - /** * @param array $keys * @@ -406,7 +390,6 @@ public function hasKeys(array $keys, bool $must = false): bool { return true; } - /** * @param array $keys * @param bool $must @@ -429,7 +412,6 @@ public function haveKey(string $key): bool { return $this->hasKey($key); } - /** * @param string $json * diff --git a/lib/Tools/Traits/TArrayTools.php b/lib/Tools/Traits/TArrayTools.php index 3d2d6c2b3..372361264 100644 --- a/lib/Tools/Traits/TArrayTools.php +++ b/lib/Tools/Traits/TArrayTools.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use Exception; @@ -26,7 +24,6 @@ trait TArrayTools { public static $TYPE_INTEGER = 'Integer'; public static $TYPE_SERIALIZABLE = 'Serializable'; - /** * @param string $k * @param array $arr @@ -60,7 +57,6 @@ protected function get(string $k, array $arr, string $default = ''): string { return (string)$arr[$k]; } - /** * @param string $k * @param array $arr @@ -94,7 +90,6 @@ protected function getInt(string $k, array $arr, int $default = 0): int { return intval($arr[$k]); } - /** * @param string $k * @param array $arr @@ -128,7 +123,6 @@ protected function getFloat(string $k, array $arr, float $default = 0): float { return intval($arr[$k]); } - /** * @param string $k * @param array $arr @@ -170,7 +164,6 @@ protected function getBool(string $k, array $arr, bool $default = false): bool { return $default; } - /** * @param string $k * @param array $arr @@ -195,7 +188,6 @@ protected function getObj(string $k, array $arr, ?JsonSerializable $default = nu return $arr[$k]; } - /** * @param string $k * @param array $arr @@ -238,7 +230,6 @@ protected function getArray(string $k, array $arr, array $default = []): array { return $r; } - /** * @param string $k * @param array $arr @@ -267,7 +258,6 @@ public function validKey(string $k, array $arr): bool { return false; } - /** * @param string $k * @param array $arr @@ -294,7 +284,6 @@ protected function getList(string $k, array $arr, array $import, array $default return $r; } - /** * @param string $k * @param string $value @@ -317,7 +306,6 @@ protected function extractArray(string $k, string $value, array $list) { throw new ArrayNotFoundException(); } - /** * @param string $key * @param array $arr @@ -373,7 +361,6 @@ public function typeOf(string $key, array $arr, bool $root = true): string { throw new ItemNotFoundException(); } - /** * @param array $keys * @param array $arr @@ -390,7 +377,6 @@ protected function mustContains(array $keys, array $arr) { } } - /** * @param array $arr */ diff --git a/lib/Tools/Traits/TAsync.php b/lib/Tools/Traits/TAsync.php index 48d76c497..0bfe318b2 100644 --- a/lib/Tools/Traits/TAsync.php +++ b/lib/Tools/Traits/TAsync.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use JsonSerializable; @@ -16,11 +14,9 @@ trait TAsync { use TNCSetup; - /** @var string */ public static $SETUP_TIME_LIMIT = 'async_time_limit'; - /** * Hacky way to async the rest of the process without keeping client on hold. * diff --git a/lib/Tools/Traits/TConsoleTree.php b/lib/Tools/Traits/TConsoleTree.php index 0dc7e7c60..b096c2d02 100644 --- a/lib/Tools/Traits/TConsoleTree.php +++ b/lib/Tools/Traits/TConsoleTree.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use OCA\Circles\Tools\Model\TreeNode; diff --git a/lib/Tools/Traits/TDeserialize.php b/lib/Tools/Traits/TDeserialize.php index 7f97027e1..6590a16c3 100644 --- a/lib/Tools/Traits/TDeserialize.php +++ b/lib/Tools/Traits/TDeserialize.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use JsonSerializable; @@ -34,7 +32,6 @@ public function serializeArray(array $data): array { return json_decode(json_encode($data), true); } - /** * @param array $data * @param string $class @@ -50,7 +47,6 @@ public function deserialize(array $data, string $class): IDeserializable { return $item; } - /** * @param array $data * @param string $class @@ -78,7 +74,6 @@ public function deserializeArray(array $data, string $class, bool $associative = return $arr; } - /** * @param string $json * @param string $class @@ -100,8 +95,6 @@ public function deserializeList(string $json, string $class): array { return $arr; } - - /** * @param string $json * @param string $class diff --git a/lib/Tools/Traits/TNCLocalSignatory.php b/lib/Tools/Traits/TNCLocalSignatory.php index c3af8676c..5c42a3d95 100644 --- a/lib/Tools/Traits/TNCLocalSignatory.php +++ b/lib/Tools/Traits/TNCLocalSignatory.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use OCA\Circles\Tools\Exceptions\SignatoryException; @@ -21,7 +19,6 @@ trait TNCLocalSignatory { public static $SIGNATORIES_APP = 'signatories'; - /** * @param NCSignatory $signatory * @param bool $generate @@ -50,7 +47,6 @@ public function fillSimpleSignatory(NCSignatory $signatory, bool $generate = fal $this->createSimpleSignatory($signatory); } - /** * @param NCSignatory $signatory */ @@ -72,7 +68,6 @@ public function createSimpleSignatory(NCSignatory $signatory): void { $appConfig->setValueArray($app, 'key_pairs', $signatories); } - /** * @param NCSignatory $signatory */ diff --git a/lib/Tools/Traits/TNCLogger.php b/lib/Tools/Traits/TNCLogger.php index 546eac1c1..2c5b5cc0c 100644 --- a/lib/Tools/Traits/TNCLogger.php +++ b/lib/Tools/Traits/TNCLogger.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use Exception; @@ -20,7 +18,6 @@ trait TNCLogger { use TNCSetup; - public static $EMERGENCY = 4; public static $ALERT = 3; public static $CRITICAL = 3; @@ -60,7 +57,6 @@ public function throwable(Throwable $t, int $level = 3, array $serializable = [] ); } - /** * @param Exception $e * @param array $serializable @@ -100,7 +96,6 @@ public function exception(Exception $e, $level = 3, array $serializable = []): v ); } - /** * @param string $message * @param bool $trace @@ -147,7 +142,6 @@ public function debug(string $message, array $serializable = []): void { $this->log($debugLevel, $message, ($this->appConfig('debug_trace') === '1'), $serializable); } - /** * @param int $level * @param string $message @@ -166,7 +160,6 @@ public function log(int $level, string $message, bool $trace = false, array $ser ->log($level, $message, $opts); } - /** * @return LoggerInterface */ diff --git a/lib/Tools/Traits/TNCRequest.php b/lib/Tools/Traits/TNCRequest.php index 45bb9dcb1..8b276c17e 100644 --- a/lib/Tools/Traits/TNCRequest.php +++ b/lib/Tools/Traits/TNCRequest.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use Exception; @@ -30,7 +28,6 @@ trait TNCRequest { public function setMaxDownloadSize(int $size) { } - /** * @param NCRequest $request * @@ -44,7 +41,6 @@ public function retrieveJson(NCRequest $request): array { return $requestResult->getAsArray(); } - /** * @param NCRequest $request * @param bool $exceptionOnIssue @@ -80,7 +76,6 @@ public function doRequest(NCRequest $request, bool $exceptionOnIssue = true): vo } } - /** * @return IClientService */ @@ -93,7 +88,6 @@ public function clientService(): IClientService { } } - /** * @param NCRequest $request */ @@ -131,7 +125,6 @@ private function generationClientOptions(NCRequest $request) { $request->setClientOptions($options); } - /** * @param NCRequest $request * diff --git a/lib/Tools/Traits/TNCSetup.php b/lib/Tools/Traits/TNCSetup.php index ec74762ae..7b16d738a 100644 --- a/lib/Tools/Traits/TNCSetup.php +++ b/lib/Tools/Traits/TNCSetup.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use OCP\IAppConfig; @@ -17,11 +15,9 @@ trait TNCSetup { use TArrayTools; - /** @var array */ private $_setup = []; - /** * @param string $key * @param string $value diff --git a/lib/Tools/Traits/TNCSignatory.php b/lib/Tools/Traits/TNCSignatory.php index 8b81d262c..d3b4b0c3b 100644 --- a/lib/Tools/Traits/TNCSignatory.php +++ b/lib/Tools/Traits/TNCSignatory.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use OCA\Circles\Tools\Exceptions\InvalidOriginException; @@ -21,7 +19,6 @@ trait TNCSignatory { use TNCRequest; - /** * return Signatory by its Id from cache or from direct request. * Should be overwritten. @@ -43,7 +40,6 @@ public function retrieveSignatory(string $keyId, bool $refresh = false): NCSigna return $signatory; } - /** * @param NCSignatory $signatory * @param string $keyId @@ -76,7 +72,6 @@ public function downloadSignatory( } } - /** * @param NCSignatory $signatory * @param array $json @@ -105,7 +100,6 @@ public function updateSignatory(NCSignatory $signatory, array $json, string $key } } - /** * @param string $keyId * @@ -121,7 +115,6 @@ public function getKeyOrigin(string $keyId) { throw new InvalidOriginException('cannot retrieve origin from ' . $keyId); } - /** * @param NCSignatory $signatory * @param string $digest diff --git a/lib/Tools/Traits/TNCWellKnown.php b/lib/Tools/Traits/TNCWellKnown.php index dff77ef3e..3d225833f 100644 --- a/lib/Tools/Traits/TNCWellKnown.php +++ b/lib/Tools/Traits/TNCWellKnown.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use OCA\Circles\Tools\Exceptions\RequestNetworkException; @@ -23,7 +21,6 @@ trait TNCWellKnown { public static $WEBFINGER = '/.well-known/webfinger'; - /** * @param string $host * @param string $subject @@ -47,7 +44,6 @@ public function getResourceData(string $host, string $subject, string $rel): Sim return new SimpleDataStore($data); } - /** * @param string $host * @param string $subject @@ -61,7 +57,6 @@ public function getLink(string $host, string $subject, string $rel): NCWellKnown return $this->extractLink($rel, $this->getWebfinger($host, $subject)); } - /** * @param string $host * @param string $subject @@ -88,7 +83,6 @@ public function getWebfinger(string $host, string $subject, string $rel = ''): N return new NCWebfinger($result); } - /** * @param string $rel * @param NCWebfinger $webfinger diff --git a/lib/Tools/Traits/TStringTools.php b/lib/Tools/Traits/TStringTools.php index 30cad7379..300a33050 100644 --- a/lib/Tools/Traits/TStringTools.php +++ b/lib/Tools/Traits/TStringTools.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\Tools\Traits; use DateTime; @@ -17,7 +15,6 @@ trait TStringTools { use TArrayTools; - /** * @param int $length * @@ -38,7 +35,6 @@ protected function token(int $length = 15): string { return $str; } - /** * Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80 * @@ -64,7 +60,6 @@ protected function uuid(int $length = 0): string { return $uuid; } - /** * @param string $uuid * @@ -117,7 +112,6 @@ protected function commonPart(string $str1, string $str2, bool $cs = true): stri return substr($str1, 0, $i); } - /** * @param string $line * @param array $params @@ -133,7 +127,6 @@ protected function feedStringWithParams(string $line, array $params): string { return $line; } - /** * @param int $words * @@ -148,7 +141,6 @@ public function generateRandomSentence(int $words = 5): string { return implode(' ', $sentence); } - /** * @param int $length * @@ -178,7 +170,6 @@ public function humanReadable(int $bytes): string { return (string)round($bytes / (1024 ** $e), 2) . ' ' . $s[$e]; } - /** * @param int $first * @param int $second @@ -236,10 +227,10 @@ public function getDateDiff( } return $f->diff($s)->format( - '%a ' . $days . - ', %h ' . $hours . - ', %i ' . $minutes . - ' and %s ' . $seconds + '%a ' . $days + . ', %h ' . $hours + . ', %i ' . $minutes + . ' and %s ' . $seconds ); } } diff --git a/lib/UnifiedSearch/UnifiedSearchResult.php b/lib/UnifiedSearch/UnifiedSearchResult.php index aefaf386e..072474de7 100644 --- a/lib/UnifiedSearch/UnifiedSearchResult.php +++ b/lib/UnifiedSearch/UnifiedSearchResult.php @@ -2,13 +2,11 @@ declare(strict_types=1); - /** * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ - namespace OCA\Circles\UnifiedSearch; use OCP\Search\SearchResultEntry; diff --git a/tests/TestSuiteListener.php b/tests/TestSuiteListener.php index 0b4aaf5a8..59539fc42 100644 --- a/tests/TestSuiteListener.php +++ b/tests/TestSuiteListener.php @@ -39,7 +39,6 @@ class Env implements TestListener { public const ENV_TEST_USER2 = '_test_circles_user2'; public const ENV_TEST_USER3 = '_test_circles_user3'; - /** @var array */ private $users;